Files
contract/deployment/arb1/out/StdChains.sol/StdChains.json
2024-10-29 00:53:46 -04:00

1 line
4.2 KiB
JSON

{"abi":[],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"StdChains provides information about EVM compatible chains that can be used in scripts/tests. For each chain, the chain's name, chain ID, and a default RPC URL are provided. Chains are identified by their alias, which is the same as the alias in the `[rpc_endpoints]` section of the `foundry.toml` file. For best UX, ensure the alias in the `foundry.toml` file match the alias used in this contract, which can be found as the first argument to the `setChainWithDefaultRpcUrl` call in the `initializeStdChains` function. There are two main ways to use this contract: 1. Set a chain with `setChain(string memory chainAlias, ChainData memory chain)` or `setChain(string memory chainAlias, Chain memory chain)` 2. Get a chain with `getChain(string memory chainAlias)` or `getChain(uint256 chainId)`. The first time either of those are used, chains are initialized with the default set of RPC URLs. This is done in `initializeStdChains`, which uses `setChainWithDefaultRpcUrl`. Defaults are recorded in `defaultRpcUrls`. The `setChain` function is straightforward, and it simply saves off the given chain data. The `getChain` methods use `getChainWithUpdatedRpcUrl` to return a chain. For example, let's say we want to retrieve the RPC URL for `mainnet`: - If you have specified data with `setChain`, it will return that. - If you have configured a mainnet RPC URL in `foundry.toml`, it will return the URL, provided it is valid (e.g. a URL is specified, or an environment variable is given and exists). - If neither of the above conditions is met, the default data is returned. Summarizing the above, the prioritization hierarchy is `setChain` -> `foundry.toml` -> environment variable -> defaults.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"lib_forge_std/src/StdChains.sol\":\"StdChains\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":999999999},\"remappings\":[\":@forge-std/=lib_forge_std/src/\",\":@openzeppelin/contracts/=lib_openzeppelin_contracts/contracts/\",\":@uniswap/=lib_uniswap/\"],\"viaIR\":true},\"sources\":{\"lib_forge_std/src/StdChains.sol\":{\"keccak256\":\"0x2ba8ee7e4a68efd4cd75331b229874f4d4dc0a1010599afad88fc2cae5cb5d4a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://77ce1968d402b0414fec0a344b59c275d0706d4df5ac6293d605dd2202016345\",\"dweb:/ipfs/QmSVy4N4F15NzEuSpmvwRj1nTfAwaJpng7CywUBWLnWC4w\"]},\"lib_forge_std/src/Vm.sol\":{\"keccak256\":\"0x882b5ae1b429dda7696bc57c913808f0942423d024fad8cedf0ba08d34040649\",\"license\":\"MIT OR Apache-2.0\",\"urls\":[\"bzz-raw://31b63dcea38a411471679c9cc78b3f6d5ae830b9e0560091a6d6b1f0049aa166\",\"dweb:/ipfs/QmW61wSQ3yj5j4yapXVCxmwdXFEr8ASnxjXiDev8QHVgHT\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.26+commit.8a97fa7a"},"language":"Solidity","output":{"abi":[],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@forge-std/=lib_forge_std/src/","@openzeppelin/contracts/=lib_openzeppelin_contracts/contracts/","@uniswap/=lib_uniswap/"],"optimizer":{"enabled":true,"runs":999999999},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"lib_forge_std/src/StdChains.sol":"StdChains"},"evmVersion":"paris","libraries":{},"viaIR":true},"sources":{"lib_forge_std/src/StdChains.sol":{"keccak256":"0x2ba8ee7e4a68efd4cd75331b229874f4d4dc0a1010599afad88fc2cae5cb5d4a","urls":["bzz-raw://77ce1968d402b0414fec0a344b59c275d0706d4df5ac6293d605dd2202016345","dweb:/ipfs/QmSVy4N4F15NzEuSpmvwRj1nTfAwaJpng7CywUBWLnWC4w"],"license":"MIT"},"lib_forge_std/src/Vm.sol":{"keccak256":"0x882b5ae1b429dda7696bc57c913808f0942423d024fad8cedf0ba08d34040649","urls":["bzz-raw://31b63dcea38a411471679c9cc78b3f6d5ae830b9e0560091a6d6b1f0049aa166","dweb:/ipfs/QmW61wSQ3yj5j4yapXVCxmwdXFEr8ASnxjXiDev8QHVgHT"],"license":"MIT OR Apache-2.0"}},"version":1},"id":3}