@uniswap/universal-router
Version:
Smart contracts for Universal Router
1 lines • 6.07 kB
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\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":44444444},\"remappings\":[\":@ensdomains/=lib/v4-periphery/lib/v4-core/node_modules/@ensdomains/\",\":@openzeppelin/=lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/\",\":@openzeppelin/contracts/=lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/contracts/\",\":@uniswap/v2-core/=node_modules/@uniswap/v2-core/\",\":@uniswap/v3-core/=node_modules/@uniswap/v3-core/\",\":@uniswap/v3-periphery/=lib/v3-periphery/\",\":@uniswap/v4-core/=lib/v4-periphery/lib/v4-core/\",\":@uniswap/v4-periphery/=lib/v4-periphery/\",\":ds-test/=lib/solmate/lib/ds-test/src/\",\":erc4626-tests/=lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-gas-snapshot/=lib/permit2/lib/forge-gas-snapshot/src/\",\":forge-std/=lib/forge-std/src/\",\":hardhat/=lib/v4-periphery/lib/v4-core/node_modules/hardhat/\",\":openzeppelin-contracts/=lib/permit2/lib/openzeppelin-contracts/\",\":permit2/=lib/permit2/\",\":solmate/=lib/solmate/\",\":v3-periphery/=lib/v3-periphery/contracts/\",\":v4-core/=lib/v4-periphery/lib/v4-core/src/\",\":v4-periphery/=lib/v4-periphery/\"],\"viaIR\":true},\"sources\":{\"lib/forge-std/src/StdChains.sol\":{\"keccak256\":\"0x9100bd38453711d5f5ae32d16b4aacef8d4e26abb3061fcc9920cd30cdb49315\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://114654e304083d3403510edd13d7df2223747337150ecf51dd36b441e50498f7\",\"dweb:/ipfs/QmQy6uvcVHyHzU2RbuvEo1hKiV7k81z21gR6DSj4DkCP8D\"]},\"lib/forge-std/src/Vm.sol\":{\"keccak256\":\"0x06f0761a502a8dc74c06029c603831780ff32f1e85dad2ae0f810b7545fba09b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://70e940ed53ef0270d1d6f3215fcccf92dd675f8ec4a59e1fbd0535e0d52fb46c\",\"dweb:/ipfs/QmPTkXXzGKFyWBmbQPrL6Yg4ECWmu3LndSH9ex2E3czZuF\"]}},\"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":["@ensdomains/=lib/v4-periphery/lib/v4-core/node_modules/@ensdomains/","@openzeppelin/=lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/","@openzeppelin/contracts/=lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/contracts/","@uniswap/v2-core/=node_modules/@uniswap/v2-core/","@uniswap/v3-core/=node_modules/@uniswap/v3-core/","@uniswap/v3-periphery/=lib/v3-periphery/","@uniswap/v4-core/=lib/v4-periphery/lib/v4-core/","@uniswap/v4-periphery/=lib/v4-periphery/","ds-test/=lib/solmate/lib/ds-test/src/","erc4626-tests/=lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/","forge-gas-snapshot/=lib/permit2/lib/forge-gas-snapshot/src/","forge-std/=lib/forge-std/src/","hardhat/=lib/v4-periphery/lib/v4-core/node_modules/hardhat/","openzeppelin-contracts/=lib/permit2/lib/openzeppelin-contracts/","permit2/=lib/permit2/","solmate/=lib/solmate/","v3-periphery/=lib/v3-periphery/contracts/","v4-core/=lib/v4-periphery/lib/v4-core/src/","v4-periphery/=lib/v4-periphery/"],"optimizer":{"enabled":true,"runs":44444444},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"lib/forge-std/src/StdChains.sol":"StdChains"},"evmVersion":"cancun","libraries":{},"viaIR":true},"sources":{"lib/forge-std/src/StdChains.sol":{"keccak256":"0x9100bd38453711d5f5ae32d16b4aacef8d4e26abb3061fcc9920cd30cdb49315","urls":["bzz-raw://114654e304083d3403510edd13d7df2223747337150ecf51dd36b441e50498f7","dweb:/ipfs/QmQy6uvcVHyHzU2RbuvEo1hKiV7k81z21gR6DSj4DkCP8D"],"license":"MIT"},"lib/forge-std/src/Vm.sol":{"keccak256":"0x06f0761a502a8dc74c06029c603831780ff32f1e85dad2ae0f810b7545fba09b","urls":["bzz-raw://70e940ed53ef0270d1d6f3215fcccf92dd675f8ec4a59e1fbd0535e0d52fb46c","dweb:/ipfs/QmPTkXXzGKFyWBmbQPrL6Yg4ECWmu3LndSH9ex2E3czZuF"],"license":"MIT"}},"version":1},"id":29}