Skip to content

Commit

Permalink
test: clarify fn purpose
Browse files Browse the repository at this point in the history
  • Loading branch information
mds1 committed Mar 11, 2024
1 parent 94d6608 commit cf05a34
Showing 1 changed file with 29 additions and 21 deletions.
50 changes: 29 additions & 21 deletions test/StdChains.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,36 @@ contract StdChainsTest is Test {
assertEq(getChain("sepolia").rpcUrl, "https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001");
}

// Named with a leading underscore to clarify this is not intended to be run as a normal test,
// and is intended to be used in the below `test_Rpcs` test.
function _testRpc(string memory rpcAlias) internal {
string memory rpcUrl = getChain(rpcAlias).rpcUrl;
vm.createSelectFork(rpcUrl);
}

// Ensure we can connect to the default RPC URL for each chain.
// function testRpcs() public {
// testRpc("mainnet");
// testRpc("goerli");
// testRpc("sepolia");
// testRpc("optimism");
// testRpc("optimism_goerli");
// testRpc("arbitrum_one");
// testRpc("arbitrum_one_goerli");
// testRpc("arbitrum_nova");
// testRpc("polygon");
// testRpc("polygon_mumbai");
// testRpc("avalanche");
// testRpc("avalanche_fuji");
// testRpc("bnb_smart_chain");
// testRpc("bnb_smart_chain_testnet");
// testRpc("gnosis_chain");
// testRpc("moonbeam");
// testRpc("moonriver");
// testRpc("moonbase");
// testRpc("base_goerli");
// testRpc("base");
// 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("optimism");
// _testRpc("optimism_goerli");
// _testRpc("arbitrum_one");
// _testRpc("arbitrum_one_goerli");
// _testRpc("arbitrum_nova");
// _testRpc("polygon");
// _testRpc("polygon_mumbai");
// _testRpc("avalanche");
// _testRpc("avalanche_fuji");
// _testRpc("bnb_smart_chain");
// _testRpc("bnb_smart_chain_testnet");
// _testRpc("gnosis_chain");
// _testRpc("moonbeam");
// _testRpc("moonriver");
// _testRpc("moonbase");
// _testRpc("base_goerli");
// _testRpc("base");
// }

function test_ChainNoDefault() public {
Expand Down

0 comments on commit cf05a34

Please sign in to comment.