Skip to content

非公式本サイトは非公式の日本語ドキュメントであり、Cloudflare 公式サイトではありません。最新情報はdevelopers.cloudflare.comをご確認ください。

Rinkeby の廃止

最終更新 Markdown で表示Agent セットアップ

Cloudflare の Ethereum Gateway は、当初 Rinkeby テストネットに対応していました。ただし Rinkeby は The Merge を経ておらず、その結果、mainnet 向けの信頼できるステージング環境ではなくなります。

Cloudflare は、2023 年 1 月 30 日に Rinkeby のサポートを廃止します。

移行

Web3 の開発やデバッグで問題が起きないよう、Ethereum Gateway で完全にサポートされている Sepolia テストネット へ切り替えてください。

移行するには、Ethereum ネットワークの 読み取りまたは書き込み に使うエンドポイントを更新します。

たとえば、以前は次のエンドポイントで Ethereum Gateway とやり取りしていた場合があります。

以前の curlbash
curl https://web3-trial.cloudflare-eth.com/v1/rinkeby \
--header 'Content-Type: application/json' \
--data '{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": ["0x2244", true],
  "id": 1
}'
以前の JS Fetch APIjs
await fetch(
  new Request('https://web3-trial.cloudflare-eth.com/v1/rinkeby', {
    method: 'POST',
    body: JSON.stringify({
      jsonrpc: '2.0',
      method: 'eth_getBlockByNumber',
      params: ['0x2244', true],
      id: 1,
    }),
    headers: {
      'Content-Type': 'application/json',
    },
  })
).then(resp => {
  return resp.json();
});

Rinkeby から移行するには、エンドポイントの末尾を別のテストネットに変更します。

新しい curlbash
curl https://web3-trial.cloudflare-eth.com/v1/sepolia \
--header 'Content-Type: application/json' \
--data '{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": ["0x2244", true],
  "id": 1
}'
新しい JS Fetch APIjs
await fetch(
  new Request('https://web3-trial.cloudflare-eth.com/v1/sepolia', {
    method: 'POST',
    body: JSON.stringify({
      jsonrpc: '2.0',
      method: 'eth_getBlockByNumber',
      params: ['0x2244', true],
      id: 1,
    }),
    headers: {
      'Content-Type': 'application/json',
    },
  })
).then(resp => {
  return resp.json();
});

役に立ちましたか?