UNPKG

@layerzerolabs/oft-alt-evm

Version:

LayerZero Labs reference EVM OmniChain Fungible Token (OFT) implementation

1 lines 4.94 kB
{"abi":[],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.22+commit.4fc1097e\"},\"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/@layerzerolabs/toolbox-foundry/lib/forge-std/StdChains.sol\":\"StdChains\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":20000},\"remappings\":[\":@layerzerolabs/=node_modules/@layerzerolabs/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":ds-test/=node_modules/@layerzerolabs/toolbox-foundry/lib/ds-test/\",\":forge-std/=node_modules/@layerzerolabs/toolbox-foundry/lib/forge-std/\",\":solidity-bytes-utils/contracts/=node_modules/@layerzerolabs/toolbox-foundry/lib/solidity-bytes-utils/\"]},\"sources\":{\"node_modules/@layerzerolabs/toolbox-foundry/lib/forge-std/StdChains.sol\":{\"keccak256\":\"0x7dd11ac4db798fa196e00a0cfa288ce984acac881f1f34de03fe3187deed58de\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2c15fb03d5545e2d8d3948661596410edec5ec278a73988914b14a05d0d54557\",\"dweb:/ipfs/QmWGjkLgp4wSrTrFxF8cmhghaXQp5VyXYQvWE1DUTPL4rG\"]},\"node_modules/@layerzerolabs/toolbox-foundry/lib/forge-std/Vm.sol\":{\"keccak256\":\"0xfe4466244a3c783594443a2f96e4b2d14e62e3eca310260f1b4c9107e9aafb53\",\"license\":\"MIT OR Apache-2.0\",\"urls\":[\"bzz-raw://3890f26c3e2c2d96f4b11f269e679c0a6f47ca995d761530a36c42382ddf7359\",\"dweb:/ipfs/QmWpcGEYqLxtfjouqwa3RP77uX2jnFGYnHjnzT4PPyRdbr\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.22+commit.4fc1097e"},"language":"Solidity","output":{"abi":[],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@layerzerolabs/=node_modules/@layerzerolabs/","@openzeppelin/=node_modules/@openzeppelin/","ds-test/=node_modules/@layerzerolabs/toolbox-foundry/lib/ds-test/","forge-std/=node_modules/@layerzerolabs/toolbox-foundry/lib/forge-std/","solidity-bytes-utils/contracts/=node_modules/@layerzerolabs/toolbox-foundry/lib/solidity-bytes-utils/"],"optimizer":{"enabled":true,"runs":20000},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@layerzerolabs/toolbox-foundry/lib/forge-std/StdChains.sol":"StdChains"},"evmVersion":"shanghai","libraries":{}},"sources":{"node_modules/@layerzerolabs/toolbox-foundry/lib/forge-std/StdChains.sol":{"keccak256":"0x7dd11ac4db798fa196e00a0cfa288ce984acac881f1f34de03fe3187deed58de","urls":["bzz-raw://2c15fb03d5545e2d8d3948661596410edec5ec278a73988914b14a05d0d54557","dweb:/ipfs/QmWGjkLgp4wSrTrFxF8cmhghaXQp5VyXYQvWE1DUTPL4rG"],"license":"MIT"},"node_modules/@layerzerolabs/toolbox-foundry/lib/forge-std/Vm.sol":{"keccak256":"0xfe4466244a3c783594443a2f96e4b2d14e62e3eca310260f1b4c9107e9aafb53","urls":["bzz-raw://3890f26c3e2c2d96f4b11f269e679c0a6f47ca995d761530a36c42382ddf7359","dweb:/ipfs/QmWpcGEYqLxtfjouqwa3RP77uX2jnFGYnHjnzT4PPyRdbr"],"license":"MIT OR Apache-2.0"}},"version":1},"id":92}