Skip to content

Commit

Permalink
fix: swap default mainnet RPC URL (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
mds1 authored Nov 19, 2022
1 parent 3d17201 commit 14b6b45
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
fs_permissions = [{ access = "read-write", path = "./"}]

[rpc_endpoints]
# The RPC URLs below match the StdChains URLs but append a trailing slash for testing.
mainnet = "https://api.mycryptoapi.com/eth/"
optimism_goerli = "https://goerli.optimism.io/"
arbitrum_one_goerli = "https://goerli-rollup.arbitrum.io/rpc/"
# The RPC URLs are modified versions of the default for testing initialization.
mainnet = "https://mainnet.infura.io/v3/7a8769b798b642f6933f2ed52042bd70" # 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.

[fmt]
# These are all the `forge fmt` defaults.
Expand Down
2 changes: 1 addition & 1 deletion src/StdCheats.sol
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ abstract contract StdCheatsSafe {
// Initialize `stdChains` with the defaults.
stdChains["anvil"] = Chain("Anvil", 31337, "http://127.0.0.1:8545");
stdChains["hardhat"] = Chain("Hardhat", 31337, "http://127.0.0.1:8545");
stdChains["mainnet"] = Chain("Mainnet", 1, "https://api.mycryptoapi.com/eth");
stdChains["mainnet"] = Chain("Mainnet", 1, "https://mainnet.infura.io/v3/6770454bc6ea42c58aac12978531b93f");
stdChains["goerli"] = Chain("Goerli", 5, "https://goerli.infura.io/v3/6770454bc6ea42c58aac12978531b93f");
stdChains["sepolia"] = Chain("Sepolia", 11155111, "https://rpc.sepolia.dev");
stdChains["optimism"] = Chain("Optimism", 10, "https://mainnet.optimism.io");
Expand Down
2 changes: 1 addition & 1 deletion test/StdCheats.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ contract StdCheatsTest is Test {

function testChainRpcInitialization() public {
// RPCs specified in `foundry.toml` should be updated.
assertEq(stdChains["mainnet"].rpcUrl, "https://api.mycryptoapi.com/eth/");
assertEq(stdChains["mainnet"].rpcUrl, "https://mainnet.infura.io/v3/7a8769b798b642f6933f2ed52042bd70");
assertEq(stdChains["optimism_goerli"].rpcUrl, "https://goerli.optimism.io/");
assertEq(stdChains["arbitrum_one_goerli"].rpcUrl, "https://goerli-rollup.arbitrum.io/rpc/");

Expand Down

0 comments on commit 14b6b45

Please sign in to comment.