@excubiae/contracts
Version:
1 lines • 4.84 kB
JSON
{"abi":[],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"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\":{\"node_modules/forge-std/src/StdChains.sol\":\"StdChains\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200000},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":@semaphore-protocol/=node_modules/@semaphore-protocol/\",\":@solady/=node_modules/solady/\",\":@zk-kit/=node_modules/@zk-kit/\",\":eth-gas-reporter/=node_modules/eth-gas-reporter/\",\":forge-std/=node_modules/forge-std/\",\":hardhat/=node_modules/hardhat/\",\":poseidon-solidity/=node_modules/poseidon-solidity/\",\":solady/=node_modules/solady/\"]},\"sources\":{\"node_modules/forge-std/src/StdChains.sol\":{\"keccak256\":\"0x1e2c73d51d6b0d1101f3a4cf0e6def9818a891d6aa8d306f2b127943a69dca2d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ab436d74b405f890e2634c6077df15cc196b4032ec1bdabaaf021ef209e68db\",\"dweb:/ipfs/Qmbb1Qgtdn6S4aqrnpg3y9TDX7erFFcRir9GN62Y7QazaY\"]},\"node_modules/forge-std/src/Vm.sol\":{\"keccak256\":\"0x7121b5b99c4baefb34fdc1f3cc7235aac7138bbc2265344571709417623f5029\",\"license\":\"MIT OR Apache-2.0\",\"urls\":[\"bzz-raw://3866315b5f89f81746192969834b5932b30c62d7e86ad646e99b6055bdc0ca74\",\"dweb:/ipfs/QmRLhuB96iRxeF5pX4FdsizAaqgDaH2eCWFqfEXbdz9v7n\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.28+commit.7893614a"},"language":"Solidity","output":{"abi":[],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","@semaphore-protocol/=node_modules/@semaphore-protocol/","@solady/=node_modules/solady/","@zk-kit/=node_modules/@zk-kit/","eth-gas-reporter/=node_modules/eth-gas-reporter/","forge-std/=node_modules/forge-std/","hardhat/=node_modules/hardhat/","poseidon-solidity/=node_modules/poseidon-solidity/","solady/=node_modules/solady/"],"optimizer":{"enabled":true,"runs":200000},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/forge-std/src/StdChains.sol":"StdChains"},"evmVersion":"cancun","libraries":{}},"sources":{"node_modules/forge-std/src/StdChains.sol":{"keccak256":"0x1e2c73d51d6b0d1101f3a4cf0e6def9818a891d6aa8d306f2b127943a69dca2d","urls":["bzz-raw://0ab436d74b405f890e2634c6077df15cc196b4032ec1bdabaaf021ef209e68db","dweb:/ipfs/Qmbb1Qgtdn6S4aqrnpg3y9TDX7erFFcRir9GN62Y7QazaY"],"license":"MIT"},"node_modules/forge-std/src/Vm.sol":{"keccak256":"0x7121b5b99c4baefb34fdc1f3cc7235aac7138bbc2265344571709417623f5029","urls":["bzz-raw://3866315b5f89f81746192969834b5932b30c62d7e86ad646e99b6055bdc0ca74","dweb:/ipfs/QmRLhuB96iRxeF5pX4FdsizAaqgDaH2eCWFqfEXbdz9v7n"],"license":"MIT OR Apache-2.0"}},"version":1},"id":111}