Skip to content

Commit

Permalink
chore(networks): goerli sunset (#525)
Browse files Browse the repository at this point in the history
* chore(networks): goerli sunset

* chore(tests): remove goerli, add holesky
	For more information about the sunsetting of Goerli,
	see <https://blog.ethereum.org/2023/11/30/goerli-lts-update>

* chore: remove goerli entirely

* style: forge fmt

---------

Co-authored-by: Matt Solomon <[email protected]>
  • Loading branch information
sambacha and mds1 authored Apr 17, 2024
1 parent 2a6c861 commit 5dd1c68
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ fs_permissions = [{ access = "read-write", path = "./"}]
[rpc_endpoints]
# The RPC URLs are modified versions of the default for testing initialization.
mainnet = "https://eth-mainnet.alchemyapi.io/v2/WV407BEiBmjNJfKo9Uo_55u0z0ITyCOX" # Different API key.
optimism_goerli = "https://goerli.optimism.io/" # Adds a trailing slash.
arbitrum_one_goerli = "https://goerli-rollup.arbitrum.io/rpc/" # Adds a trailing slash.
optimism_sepolia = "https://sepolia.optimism.io/" # Adds a trailing slash.
arbitrum_one_sepolia = "https://sepolia-rollup.arbitrum.io/rpc/" # Adds a trailing slash.
needs_undefined_env_var = "${UNDEFINED_RPC_URL_PLACEHOLDER}"

[fmt]
Expand Down
12 changes: 6 additions & 6 deletions src/StdChains.sol
Original file line number Diff line number Diff line change
Expand Up @@ -199,17 +199,17 @@ abstract contract StdChains {
setChainWithDefaultRpcUrl(
"mainnet", ChainData("Mainnet", 1, "https://eth-mainnet.alchemyapi.io/v2/pwc5rmJhrdoaSEfimoKEmsvOjKSmPDrP")
);
setChainWithDefaultRpcUrl(
"goerli", ChainData("Goerli", 5, "https://goerli.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001")
);
setChainWithDefaultRpcUrl(
"sepolia", ChainData("Sepolia", 11155111, "https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001")
);
setChainWithDefaultRpcUrl("holesky", ChainData("Holesky", 17000, "https://rpc.holesky.ethpandaops.io"));
setChainWithDefaultRpcUrl("optimism", ChainData("Optimism", 10, "https://mainnet.optimism.io"));
setChainWithDefaultRpcUrl("optimism_goerli", ChainData("Optimism Goerli", 420, "https://goerli.optimism.io"));
setChainWithDefaultRpcUrl(
"optimism_sepolia", ChainData("Optimism Sepolia", 11155420, "https://sepolia.optimism.io")
);
setChainWithDefaultRpcUrl("arbitrum_one", ChainData("Arbitrum One", 42161, "https://arb1.arbitrum.io/rpc"));
setChainWithDefaultRpcUrl(
"arbitrum_one_goerli", ChainData("Arbitrum One Goerli", 421613, "https://goerli-rollup.arbitrum.io/rpc")
"arbitrum_one_sepolia", ChainData("Arbitrum One Sepolia", 421614, "https://sepolia-rollup.arbitrum.io/rpc")
);
setChainWithDefaultRpcUrl("arbitrum_nova", ChainData("Arbitrum Nova", 42170, "https://nova.arbitrum.io/rpc"));
setChainWithDefaultRpcUrl("polygon", ChainData("Polygon", 137, "https://polygon-rpc.com"));
Expand All @@ -233,7 +233,7 @@ abstract contract StdChains {
"moonriver", ChainData("Moonriver", 1285, "https://rpc.api.moonriver.moonbeam.network")
);
setChainWithDefaultRpcUrl("moonbase", ChainData("Moonbase", 1287, "https://rpc.testnet.moonbeam.network"));
setChainWithDefaultRpcUrl("base_goerli", ChainData("Base Goerli", 84531, "https://goerli.base.org"));
setChainWithDefaultRpcUrl("base_sepolia", ChainData("Base Sepolia", 84532, "https://sepolia.base.org"));
setChainWithDefaultRpcUrl("base", ChainData("Base", 8453, "https://mainnet.base.org"));
setChainWithDefaultRpcUrl("fraxtal", ChainData("Fraxtal", 252, "https://rpc.frax.com"));
setChainWithDefaultRpcUrl("fraxtal_testnet", ChainData("Fraxtal Testnet", 2522, "https://rpc.testnet.frax.com"));
Expand Down
12 changes: 6 additions & 6 deletions test/StdChains.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ contract StdChainsTest is Test {
function test_ChainRpcInitialization() public {
// RPCs specified in `foundry.toml` should be updated.
assertEq(getChain(1).rpcUrl, "https://eth-mainnet.alchemyapi.io/v2/WV407BEiBmjNJfKo9Uo_55u0z0ITyCOX");
assertEq(getChain("optimism_goerli").rpcUrl, "https://goerli.optimism.io/");
assertEq(getChain("arbitrum_one_goerli").rpcUrl, "https://goerli-rollup.arbitrum.io/rpc/");
assertEq(getChain("optimism_sepolia").rpcUrl, "https://sepolia.optimism.io/");
assertEq(getChain("arbitrum_one_sepolia").rpcUrl, "https://sepolia-rollup.arbitrum.io/rpc/");

// Environment variables should be the next fallback
assertEq(getChain("arbitrum_nova").rpcUrl, "https://nova.arbitrum.io/rpc");
Expand Down Expand Up @@ -54,12 +54,12 @@ contract StdChainsTest is Test {
// Currently commented out since this is slow and public RPCs are flaky, often resulting in failing CI.
// function test_Rpcs() public {
// _testRpc("mainnet");
// _testRpc("goerli");
// _testRpc("sepolia");
// _testRpc("holesky");
// _testRpc("optimism");
// _testRpc("optimism_goerli");
// _testRpc("optimism_sepolia");
// _testRpc("arbitrum_one");
// _testRpc("arbitrum_one_goerli");
// _testRpc("arbitrum_one_sepolia");
// _testRpc("arbitrum_nova");
// _testRpc("polygon");
// _testRpc("polygon_mumbai");
Expand All @@ -71,7 +71,7 @@ contract StdChainsTest is Test {
// _testRpc("moonbeam");
// _testRpc("moonriver");
// _testRpc("moonbase");
// _testRpc("base_goerli");
// _testRpc("base_sepolia");
// _testRpc("base");
// _testRpc("fraxtal");
// _testRpc("fraxtal_testnet");
Expand Down
2 changes: 1 addition & 1 deletion test/StdCheats.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ contract StdCheatsTest is Test {
}

function testFuzz_AssumeNotPrecompile(address addr) external {
assumeNotPrecompile(addr, getChain("optimism_goerli").chainId);
assumeNotPrecompile(addr, getChain("optimism_sepolia").chainId);
assertTrue(
addr < address(1) || (addr > address(9) && addr < address(0x4200000000000000000000000000000000000000))
|| addr > address(0x4200000000000000000000000000000000000800)
Expand Down

0 comments on commit 5dd1c68

Please sign in to comment.