Cloudflare の Ethereum Gateway は、当初 Rinkeby テストネットに対応していました。ただし Rinkeby は The Merge ↗ を経ておらず、その結果、mainnet 向けの信頼できるステージング環境ではなくなります。
Cloudflare は、2023 年 1 月 30 日に Rinkeby のサポートを廃止します。
Web3 の開発やデバッグで問題が起きないよう、Ethereum Gateway で完全にサポートされている Sepolia テストネット へ切り替えてください。
移行するには、Ethereum ネットワークの 読み取りまたは書き込み に使うエンドポイントを更新します。
たとえば、以前は次のエンドポイントで Ethereum Gateway とやり取りしていた場合があります。
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
}'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 から移行するには、エンドポイントの末尾を別のテストネットに変更します。
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
}'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();
});