More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 9,887 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Ccip Send | 65372305 | 5 mins ago | IN | 3.85800292 POL | 0.0080879 | ||||
Ccip Send | 65372254 | 7 mins ago | IN | 3.85800292 POL | 0.0080879 | ||||
Ccip Send | 65372224 | 8 mins ago | IN | 2.73648501 POL | 0.00757 | ||||
Ccip Send | 65372189 | 9 mins ago | IN | 2.73648501 POL | 0.0221754 | ||||
Ccip Send | 65371277 | 42 mins ago | IN | 0.1586191 POL | 0.00375657 | ||||
Ccip Send | 65371231 | 43 mins ago | IN | 1.99019511 POL | 0.00821962 | ||||
Ccip Send | 65365735 | 4 hrs ago | IN | 2.01260339 POL | 0.00822005 | ||||
Ccip Send | 65361135 | 6 hrs ago | IN | 0.90847419 POL | 0.00373938 | ||||
Ccip Send | 65361078 | 6 hrs ago | IN | 0.18866608 POL | 0.00378769 | ||||
Ccip Send | 65361068 | 6 hrs ago | IN | 0.21853436 POL | 0.00373985 | ||||
Ccip Send | 65359545 | 7 hrs ago | IN | 1.98838046 POL | 0.00864967 | ||||
Ccip Send | 65347467 | 14 hrs ago | IN | 0.57458238 POL | 0.0073749 | ||||
Ccip Send | 65341234 | 18 hrs ago | IN | 23.75339241 POL | 0.00374154 | ||||
Ccip Send | 65336253 | 21 hrs ago | IN | 2.88142406 POL | 0.0221754 | ||||
Ccip Send | 65331574 | 24 hrs ago | IN | 2.84194659 POL | 0.0221754 | ||||
Ccip Send | 65331574 | 24 hrs ago | IN | 2.84194659 POL | 0.0112696 | ||||
Ccip Send | 65330412 | 25 hrs ago | IN | 0.52986257 POL | 0.01196407 | ||||
Ccip Send | 65329216 | 25 hrs ago | IN | 2.08547389 POL | 0.00822005 | ||||
Ccip Send | 65327455 | 26 hrs ago | IN | 4.06051663 POL | 0.0080889 | ||||
Ccip Send | 65321105 | 30 hrs ago | IN | 0.18182302 POL | 0.01666308 | ||||
Ccip Send | 65317363 | 32 hrs ago | IN | 2.82555026 POL | 0.12739001 | ||||
Ccip Send | 65314296 | 34 hrs ago | IN | 2.16378347 POL | 0.01869424 | ||||
Ccip Send | 65312241 | 35 hrs ago | IN | 0.57495923 POL | 0.06972084 | ||||
Ccip Send | 65311969 | 36 hrs ago | IN | 0.54323975 POL | 0.09655899 | ||||
Ccip Send | 65310941 | 36 hrs ago | IN | 0.85925842 POL | 0.0092362 |
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
65372305 | 5 mins ago | 3.85800292 POL | ||||
65372254 | 7 mins ago | 3.85800292 POL | ||||
65372189 | 9 mins ago | 2.73648501 POL | ||||
65371277 | 42 mins ago | 0.1586191 POL | ||||
65371231 | 43 mins ago | 1.99019511 POL | ||||
65365735 | 4 hrs ago | 2.01260339 POL | ||||
65363921 | 5 hrs ago | 0.66197766 POL | ||||
65363921 | 5 hrs ago | 0.66197766 POL | ||||
65363712 | 5 hrs ago | 0.66197766 POL | ||||
65363712 | 5 hrs ago | 0.66197766 POL | ||||
65361135 | 6 hrs ago | 0.90847419 POL | ||||
65361078 | 6 hrs ago | 0.18866608 POL | ||||
65361068 | 6 hrs ago | 0.21853436 POL | ||||
65359545 | 7 hrs ago | 1.98838046 POL | ||||
65356584 | 9 hrs ago | 3.41233032 POL | ||||
65356584 | 9 hrs ago | 3.41233032 POL | ||||
65347467 | 14 hrs ago | 0.57458238 POL | ||||
65341234 | 18 hrs ago | 23.75339241 POL | ||||
65336253 | 21 hrs ago | 2.88142406 POL | ||||
65331574 | 24 hrs ago | 2.84194659 POL | ||||
65331574 | 24 hrs ago | 2.84194659 POL | ||||
65330412 | 25 hrs ago | 0.52986257 POL | ||||
65329216 | 25 hrs ago | 2.08547389 POL | ||||
65327455 | 26 hrs ago | 4.06051663 POL | ||||
65326400 | 27 hrs ago | 1.9827887 POL |
Loading...
Loading
Contract Name:
Router
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 26000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.19; import {ITypeAndVersion} from "../shared/interfaces/ITypeAndVersion.sol"; import {IRouterClient} from "./interfaces/IRouterClient.sol"; import {IRouter} from "./interfaces/IRouter.sol"; import {IEVM2AnyOnRamp} from "./interfaces/IEVM2AnyOnRamp.sol"; import {IARM} from "./interfaces/IARM.sol"; import {IWrappedNative} from "./interfaces/IWrappedNative.sol"; import {IAny2EVMMessageReceiver} from "./interfaces/IAny2EVMMessageReceiver.sol"; import {Client} from "./libraries/Client.sol"; import {Internal} from "./libraries/Internal.sol"; import {CallWithExactGas} from "../shared/call/CallWithExactGas.sol"; import {OwnerIsCreator} from "../shared/access/OwnerIsCreator.sol"; import {EnumerableSet} from "../vendor/openzeppelin-solidity/v4.8.0/contracts/utils/structs/EnumerableSet.sol"; import {SafeERC20} from "../vendor/openzeppelin-solidity/v4.8.0/contracts/token/ERC20/utils/SafeERC20.sol"; import {IERC20} from "../vendor/openzeppelin-solidity/v4.8.0/contracts/token/ERC20/IERC20.sol"; /// @title Router /// @notice This is the entry point for the end user wishing to send data across chains. /// @dev This contract is used as a router for both on-ramps and off-ramps contract Router is IRouter, IRouterClient, ITypeAndVersion, OwnerIsCreator { using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.UintSet; error FailedToSendValue(); error InvalidRecipientAddress(address to); error OffRampMismatch(uint64 chainSelector, address offRamp); error BadARMSignal(); event OnRampSet(uint64 indexed destChainSelector, address onRamp); event OffRampAdded(uint64 indexed sourceChainSelector, address offRamp); event OffRampRemoved(uint64 indexed sourceChainSelector, address offRamp); event MessageExecuted(bytes32 messageId, uint64 sourceChainSelector, address offRamp, bytes32 calldataHash); struct OnRamp { uint64 destChainSelector; address onRamp; } struct OffRamp { uint64 sourceChainSelector; address offRamp; } // solhint-disable-next-line chainlink-solidity/all-caps-constant-storage-variables string public constant override typeAndVersion = "Router 1.2.0"; // We limit return data to a selector plus 4 words. This is to avoid // malicious contracts from returning large amounts of data and causing // repeated out-of-gas scenarios. uint16 public constant MAX_RET_BYTES = 4 + 4 * 32; // STATIC CONFIG // Address of arm proxy contract. address private immutable i_armProxy; // DYNAMIC CONFIG address private s_wrappedNative; // destChainSelector => onRamp address // Only ever one onRamp enabled at a time for a given destChainSelector. mapping(uint256 destChainSelector => address onRamp) private s_onRamps; // Stores [sourceChainSelector << 160 + offramp] as a pair to allow for // lookups for specific chain/offramp pairs. EnumerableSet.UintSet private s_chainSelectorAndOffRamps; constructor(address wrappedNative, address armProxy) { // Zero address indicates unsupported auto-wrapping, therefore, unsupported // native fee token payments. s_wrappedNative = wrappedNative; i_armProxy = armProxy; } // ================================================================ // │ Message sending │ // ================================================================ /// @inheritdoc IRouterClient function getFee( uint64 destinationChainSelector, Client.EVM2AnyMessage memory message ) external view returns (uint256 fee) { if (message.feeToken == address(0)) { // For empty feeToken return native quote. message.feeToken = address(s_wrappedNative); } address onRamp = s_onRamps[destinationChainSelector]; if (onRamp == address(0)) revert UnsupportedDestinationChain(destinationChainSelector); return IEVM2AnyOnRamp(onRamp).getFee(destinationChainSelector, message); } /// @inheritdoc IRouterClient function getSupportedTokens(uint64 chainSelector) external view returns (address[] memory) { if (!isChainSupported(chainSelector)) { return new address[](0); } return IEVM2AnyOnRamp(s_onRamps[uint256(chainSelector)]).getSupportedTokens(chainSelector); } /// @inheritdoc IRouterClient function isChainSupported(uint64 chainSelector) public view returns (bool) { return s_onRamps[chainSelector] != address(0); } /// @inheritdoc IRouterClient function ccipSend( uint64 destinationChainSelector, Client.EVM2AnyMessage memory message ) external payable whenHealthy returns (bytes32) { address onRamp = s_onRamps[destinationChainSelector]; if (onRamp == address(0)) revert UnsupportedDestinationChain(destinationChainSelector); uint256 feeTokenAmount; // address(0) signals payment in true native if (message.feeToken == address(0)) { // for fee calculation we check the wrapped native price as we wrap // as part of the native fee coin payment. message.feeToken = s_wrappedNative; // We rely on getFee to validate that the feeToken is whitelisted. feeTokenAmount = IEVM2AnyOnRamp(onRamp).getFee(destinationChainSelector, message); // Ensure sufficient native. if (msg.value < feeTokenAmount) revert InsufficientFeeTokenAmount(); // Wrap and send native payment. // Note we take the whole msg.value regardless if its larger. feeTokenAmount = msg.value; IWrappedNative(message.feeToken).deposit{value: feeTokenAmount}(); IERC20(message.feeToken).safeTransfer(onRamp, feeTokenAmount); } else { if (msg.value > 0) revert InvalidMsgValue(); // We rely on getFee to validate that the feeToken is whitelisted. feeTokenAmount = IEVM2AnyOnRamp(onRamp).getFee(destinationChainSelector, message); IERC20(message.feeToken).safeTransferFrom(msg.sender, onRamp, feeTokenAmount); } // Transfer the tokens to the token pools. for (uint256 i = 0; i < message.tokenAmounts.length; ++i) { IERC20 token = IERC20(message.tokenAmounts[i].token); // We rely on getPoolBySourceToken to validate that the token is whitelisted. token.safeTransferFrom( msg.sender, address(IEVM2AnyOnRamp(onRamp).getPoolBySourceToken(destinationChainSelector, token)), message.tokenAmounts[i].amount ); } return IEVM2AnyOnRamp(onRamp).forwardFromRouter(destinationChainSelector, message, feeTokenAmount, msg.sender); } // ================================================================ // │ Message execution │ // ================================================================ /// @inheritdoc IRouter /// @dev _callWithExactGas protects against return data bombs by capping the return data size at MAX_RET_BYTES. function routeMessage( Client.Any2EVMMessage calldata message, uint16 gasForCallExactCheck, uint256 gasLimit, address receiver ) external override whenHealthy returns (bool success, bytes memory retData, uint256 gasUsed) { // We only permit offRamps to call this function. if (!isOffRamp(message.sourceChainSelector, msg.sender)) revert OnlyOffRamp(); // We encode here instead of the offRamps to constrain specifically what functions // can be called from the router. bytes memory data = abi.encodeWithSelector(IAny2EVMMessageReceiver.ccipReceive.selector, message); (success, retData, gasUsed) = CallWithExactGas._callWithExactGasSafeReturnData( data, receiver, gasLimit, gasForCallExactCheck, Internal.MAX_RET_BYTES ); emit MessageExecuted(message.messageId, message.sourceChainSelector, msg.sender, keccak256(data)); return (success, retData, gasUsed); } // @notice Merges a chain selector and offRamp address into a single uint256 by shifting the // chain selector 160 bits to the left. function _mergeChainSelectorAndOffRamp( uint64 sourceChainSelector, address offRampAddress ) internal pure returns (uint256) { return (uint256(sourceChainSelector) << 160) + uint160(offRampAddress); } // ================================================================ // │ Config │ // ================================================================ /// @notice Gets the wrapped representation of the native fee coin. /// @return The address of the ERC20 wrapped native. function getWrappedNative() external view returns (address) { return s_wrappedNative; } /// @notice Sets a new wrapped native token. /// @param wrappedNative The address of the new wrapped native ERC20 token. function setWrappedNative(address wrappedNative) external onlyOwner { s_wrappedNative = wrappedNative; } /// @notice Gets the arm address /// @return The address of the ARM proxy contract. function getArmProxy() external view returns (address) { return i_armProxy; } /// @notice Return the configured onramp for specific a destination chain. /// @param destChainSelector The destination chain Id to get the onRamp for. /// @return The address of the onRamp. function getOnRamp(uint64 destChainSelector) external view returns (address) { return s_onRamps[destChainSelector]; } function getOffRamps() external view returns (OffRamp[] memory) { uint256[] memory encodedOffRamps = s_chainSelectorAndOffRamps.values(); OffRamp[] memory offRamps = new OffRamp[](encodedOffRamps.length); for (uint256 i = 0; i < encodedOffRamps.length; ++i) { uint256 encodedOffRamp = encodedOffRamps[i]; offRamps[i] = OffRamp({ sourceChainSelector: uint64(encodedOffRamp >> 160), offRamp: address(uint160(encodedOffRamp)) }); } return offRamps; } function isOffRamp(uint64 sourceChainSelector, address offRamp) public view returns (bool) { // We have to encode the sourceChainSelector and offRamp into a uint256 to use as a key in the set. return s_chainSelectorAndOffRamps.contains(_mergeChainSelectorAndOffRamp(sourceChainSelector, offRamp)); } /// @notice applyRampUpdates applies a set of ramp changes which provides /// the ability to add new chains and upgrade ramps. function applyRampUpdates( OnRamp[] calldata onRampUpdates, OffRamp[] calldata offRampRemoves, OffRamp[] calldata offRampAdds ) external onlyOwner { // Apply egress updates. // We permit zero address as way to disable egress. for (uint256 i = 0; i < onRampUpdates.length; ++i) { OnRamp memory onRampUpdate = onRampUpdates[i]; s_onRamps[onRampUpdate.destChainSelector] = onRampUpdate.onRamp; emit OnRampSet(onRampUpdate.destChainSelector, onRampUpdate.onRamp); } // Apply ingress updates. for (uint256 i = 0; i < offRampRemoves.length; ++i) { uint64 sourceChainSelector = offRampRemoves[i].sourceChainSelector; address offRampAddress = offRampRemoves[i].offRamp; // If the selector-offRamp pair does not exist, revert. if (!s_chainSelectorAndOffRamps.remove(_mergeChainSelectorAndOffRamp(sourceChainSelector, offRampAddress))) revert OffRampMismatch(sourceChainSelector, offRampAddress); emit OffRampRemoved(sourceChainSelector, offRampAddress); } for (uint256 i = 0; i < offRampAdds.length; ++i) { uint64 sourceChainSelector = offRampAdds[i].sourceChainSelector; address offRampAddress = offRampAdds[i].offRamp; if (s_chainSelectorAndOffRamps.add(_mergeChainSelectorAndOffRamp(sourceChainSelector, offRampAddress))) { emit OffRampAdded(sourceChainSelector, offRampAddress); } } } /// @notice Provides the ability for the owner to recover any tokens accidentally /// sent to this contract. /// @dev Must be onlyOwner to avoid malicious token contract calls. /// @param tokenAddress ERC20-token to recover /// @param to Destination address to send the tokens to. function recoverTokens(address tokenAddress, address to, uint256 amount) external onlyOwner { if (to == address(0)) revert InvalidRecipientAddress(to); if (tokenAddress == address(0)) { (bool success, ) = to.call{value: amount}(""); if (!success) revert FailedToSendValue(); return; } IERC20(tokenAddress).safeTransfer(to, amount); } // ================================================================ // │ Access │ // ================================================================ /// @notice Ensure that the ARM has not emitted a bad signal, and that the latest heartbeat is not stale. modifier whenHealthy() { if (IARM(i_armProxy).isCursed()) revert BadARMSignal(); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface ITypeAndVersion { function typeAndVersion() external pure returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {Client} from "../libraries/Client.sol"; interface IRouterClient { error UnsupportedDestinationChain(uint64 destChainSelector); error InsufficientFeeTokenAmount(); error InvalidMsgValue(); /// @notice Checks if the given chain ID is supported for sending/receiving. /// @param chainSelector The chain to check. /// @return supported is true if it is supported, false if not. function isChainSupported(uint64 chainSelector) external view returns (bool supported); /// @notice Gets a list of all supported tokens which can be sent or received /// to/from a given chain id. /// @param chainSelector The chainSelector. /// @return tokens The addresses of all tokens that are supported. function getSupportedTokens(uint64 chainSelector) external view returns (address[] memory tokens); /// @param destinationChainSelector The destination chainSelector /// @param message The cross-chain CCIP message including data and/or tokens /// @return fee returns execution fee for the message /// delivery to destination chain, denominated in the feeToken specified in the message. /// @dev Reverts with appropriate reason upon invalid message. function getFee( uint64 destinationChainSelector, Client.EVM2AnyMessage memory message ) external view returns (uint256 fee); /// @notice Request a message to be sent to the destination chain /// @param destinationChainSelector The destination chain ID /// @param message The cross-chain CCIP message including data and/or tokens /// @return messageId The message ID /// @dev Note if msg.value is larger than the required fee (from getFee) we accept /// the overpayment with no refund. /// @dev Reverts with appropriate reason upon invalid message. function ccipSend( uint64 destinationChainSelector, Client.EVM2AnyMessage calldata message ) external payable returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {Client} from "../libraries/Client.sol"; interface IRouter { error OnlyOffRamp(); /// @notice Route the message to its intended receiver contract. /// @param message Client.Any2EVMMessage struct. /// @param gasForCallExactCheck of params for exec /// @param gasLimit set of params for exec /// @param receiver set of params for exec /// @dev if the receiver is a contracts that signals support for CCIP execution through EIP-165. /// the contract is called. If not, only tokens are transferred. /// @return success A boolean value indicating whether the ccip message was received without errors. /// @return retBytes A bytes array containing return data form CCIP receiver. /// @return gasUsed the gas used by the external customer call. Does not include any overhead. function routeMessage( Client.Any2EVMMessage calldata message, uint16 gasForCallExactCheck, uint256 gasLimit, address receiver ) external returns (bool success, bytes memory retBytes, uint256 gasUsed); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {IEVM2AnyOnRampClient} from "./IEVM2AnyOnRampClient.sol"; import {Internal} from "../libraries/Internal.sol"; interface IEVM2AnyOnRamp is IEVM2AnyOnRampClient { /// @notice Gets the next sequence number to be used in the onRamp /// @return the next sequence number to be used function getExpectedNextSequenceNumber() external view returns (uint64); /// @notice Get the next nonce for a given sender /// @param sender The sender to get the nonce for /// @return nonce The next nonce for the sender function getSenderNonce(address sender) external view returns (uint64 nonce); /// @notice Adds and removed token pools. /// @param removes The tokens and pools to be removed /// @param adds The tokens and pools to be added. function applyPoolUpdates(Internal.PoolUpdate[] memory removes, Internal.PoolUpdate[] memory adds) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @notice This interface contains the only ARM-related functions that might be used on-chain by other CCIP contracts. interface IARM { /// @notice A Merkle root tagged with the address of the commit store contract it is destined for. struct TaggedRoot { address commitStore; bytes32 root; } /// @notice Callers MUST NOT cache the return value as a blessed tagged root could become unblessed. function isBlessed(TaggedRoot calldata taggedRoot) external view returns (bool); /// @notice When the ARM is "cursed", CCIP pauses until the curse is lifted. function isCursed() external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {IERC20} from "../../vendor/openzeppelin-solidity/v4.8.0/contracts/token/ERC20/IERC20.sol"; interface IWrappedNative is IERC20 { function deposit() external payable; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {Client} from "../libraries/Client.sol"; /// @notice Application contracts that intend to receive messages from /// the router should implement this interface. interface IAny2EVMMessageReceiver { /// @notice Called by the Router to deliver a message. /// If this reverts, any token transfers also revert. The message /// will move to a FAILED state and become available for manual execution. /// @param message CCIP Message /// @dev Note ensure you check the msg.sender is the OffRampRouter function ccipReceive(Client.Any2EVMMessage calldata message) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // End consumer library. library Client { /// @dev RMN depends on this struct, if changing, please notify the RMN maintainers. struct EVMTokenAmount { address token; // token address on the local chain. uint256 amount; // Amount of tokens. } struct Any2EVMMessage { bytes32 messageId; // MessageId corresponding to ccipSend on source. uint64 sourceChainSelector; // Source chain selector. bytes sender; // abi.decode(sender) if coming from an EVM chain. bytes data; // payload sent in original message. EVMTokenAmount[] destTokenAmounts; // Tokens and their amounts in their destination chain representation. } // If extraArgs is empty bytes, the default is 200k gas limit. struct EVM2AnyMessage { bytes receiver; // abi.encode(receiver address) for dest EVM chains bytes data; // Data payload EVMTokenAmount[] tokenAmounts; // Token transfers address feeToken; // Address of feeToken. address(0) means you will send msg.value. bytes extraArgs; // Populate this with _argsToBytes(EVMExtraArgsV1) } // bytes4(keccak256("CCIP EVMExtraArgsV1")); bytes4 public constant EVM_EXTRA_ARGS_V1_TAG = 0x97a657c9; struct EVMExtraArgsV1 { uint256 gasLimit; } function _argsToBytes(EVMExtraArgsV1 memory extraArgs) internal pure returns (bytes memory bts) { return abi.encodeWithSelector(EVM_EXTRA_ARGS_V1_TAG, extraArgs); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {Client} from "./Client.sol"; import {MerkleMultiProof} from "../libraries/MerkleMultiProof.sol"; // Library for CCIP internal definitions common to multiple contracts. library Internal { /// @dev The minimum amount of gas to perform the call with exact gas. /// We include this in the offramp so that we can redeploy to adjust it /// should a hardfork change the gas costs of relevant opcodes in callWithExactGas. uint16 internal constant GAS_FOR_CALL_EXACT_CHECK = 5_000; // @dev We limit return data to a selector plus 4 words. This is to avoid // malicious contracts from returning large amounts of data and causing // repeated out-of-gas scenarios. uint16 internal constant MAX_RET_BYTES = 4 + 4 * 32; /// @notice A collection of token price and gas price updates. /// @dev RMN depends on this struct, if changing, please notify the RMN maintainers. struct PriceUpdates { TokenPriceUpdate[] tokenPriceUpdates; GasPriceUpdate[] gasPriceUpdates; } /// @notice Token price in USD. /// @dev RMN depends on this struct, if changing, please notify the RMN maintainers. struct TokenPriceUpdate { address sourceToken; // Source token uint224 usdPerToken; // 1e18 USD per smallest unit of token } /// @notice Gas price for a given chain in USD, its value may contain tightly packed fields. /// @dev RMN depends on this struct, if changing, please notify the RMN maintainers. struct GasPriceUpdate { uint64 destChainSelector; // Destination chain selector uint224 usdPerUnitGas; // 1e18 USD per smallest unit (e.g. wei) of destination chain gas } /// @notice A timestamped uint224 value that can contain several tightly packed fields. struct TimestampedPackedUint224 { uint224 value; // ───────╮ Value in uint224, packed. uint32 timestamp; // ────╯ Timestamp of the most recent price update. } /// @dev Gas price is stored in 112-bit unsigned int. uint224 can pack 2 prices. /// When packing L1 and L2 gas prices, L1 gas price is left-shifted to the higher-order bits. /// Using uint8 type, which cannot be higher than other bit shift operands, to avoid shift operand type warning. uint8 public constant GAS_PRICE_BITS = 112; struct PoolUpdate { address token; // The IERC20 token address address pool; // The token pool address } /// @notice Report that is submitted by the execution DON at the execution phase. /// @dev RMN depends on this struct, if changing, please notify the RMN maintainers. struct ExecutionReport { EVM2EVMMessage[] messages; // Contains a bytes array for each message, each inner bytes array contains bytes per transferred token bytes[][] offchainTokenData; bytes32[] proofs; uint256 proofFlagBits; } /// @notice The cross chain message that gets committed to EVM chains. /// @dev RMN depends on this struct, if changing, please notify the RMN maintainers. struct EVM2EVMMessage { uint64 sourceChainSelector; // ─────────╮ the chain selector of the source chain, note: not chainId address sender; // ─────────────────────╯ sender address on the source chain address receiver; // ───────────────────╮ receiver address on the destination chain uint64 sequenceNumber; // ──────────────╯ sequence number, not unique across lanes uint256 gasLimit; // user supplied maximum gas amount available for dest chain execution bool strict; // ────────────────────────╮ DEPRECATED uint64 nonce; // │ nonce for this lane for this sender, not unique across senders/lanes address feeToken; // ───────────────────╯ fee token uint256 feeTokenAmount; // fee token amount bytes data; // arbitrary data payload supplied by the message sender Client.EVMTokenAmount[] tokenAmounts; // array of tokens and amounts to transfer bytes[] sourceTokenData; // array of token pool return values, one per token bytes32 messageId; // a hash of the message data } /// @dev EVM2EVMMessage struct has 13 fields, including 3 variable arrays. /// Each variable array takes 1 more slot to store its length. /// When abi encoded, excluding array contents, /// EVM2EVMMessage takes up a fixed number of 16 lots, 32 bytes each. /// For structs that contain arrays, 1 more slot is added to the front, reaching a total of 17. uint256 public constant MESSAGE_FIXED_BYTES = 32 * 17; /// @dev Each token transfer adds 1 EVMTokenAmount and 1 bytes. /// When abiEncoded, each EVMTokenAmount takes 2 slots, each bytes takes 2 slots, excl bytes contents uint256 public constant MESSAGE_FIXED_BYTES_PER_TOKEN = 32 * 4; function _toAny2EVMMessage( EVM2EVMMessage memory original, Client.EVMTokenAmount[] memory destTokenAmounts ) internal pure returns (Client.Any2EVMMessage memory message) { message = Client.Any2EVMMessage({ messageId: original.messageId, sourceChainSelector: original.sourceChainSelector, sender: abi.encode(original.sender), data: original.data, destTokenAmounts: destTokenAmounts }); } bytes32 internal constant EVM_2_EVM_MESSAGE_HASH = keccak256("EVM2EVMMessageHashV2"); function _hash(EVM2EVMMessage memory original, bytes32 metadataHash) internal pure returns (bytes32) { // Fixed-size message fields are included in nested hash to reduce stack pressure. // This hashing scheme is also used by RMN. If changing it, please notify the RMN maintainers. return keccak256( abi.encode( MerkleMultiProof.LEAF_DOMAIN_SEPARATOR, metadataHash, keccak256( abi.encode( original.sender, original.receiver, original.sequenceNumber, original.gasLimit, original.strict, original.nonce, original.feeToken, original.feeTokenAmount ) ), keccak256(original.data), keccak256(abi.encode(original.tokenAmounts)), keccak256(abi.encode(original.sourceTokenData)) ) ); } /// @notice Enum listing the possible message execution states within /// the offRamp contract. /// UNTOUCHED never executed /// IN_PROGRESS currently being executed, used a replay protection /// SUCCESS successfully executed. End state /// FAILURE unsuccessfully executed, manual execution is now enabled. /// @dev RMN depends on this enum, if changing, please notify the RMN maintainers. enum MessageExecutionState { UNTOUCHED, IN_PROGRESS, SUCCESS, FAILURE } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // solhint-disable chainlink-solidity/all-caps-constant-storage-variables library CallWithExactGas { error NoContract(); error NoGasForCallExactCheck(); error NotEnoughGasForCall(); bytes4 internal constant NoContractSig = 0x0c3b563c; bytes4 internal constant NoGasForCallExactCheckSig = 0xafa32a2c; bytes4 internal constant NotEnoughGasForCallSig = 0x37c3be29; /// @notice calls target address with exactly gasAmount gas and payload as calldata. /// Account for gasForCallExactCheck gas that will be used by this function. Will revert /// if the target is not a contact. Will revert when there is not enough gas to call the /// target with gasAmount gas. /// @dev Caps the return data length, which makes it immune to gas bomb attacks. /// @dev Return data cap logic borrowed from /// https://github.com/nomad-xyz/ExcessivelySafeCall/blob/main/src/ExcessivelySafeCall.sol. /// @return success whether the call succeeded /// @return retData the return data from the call, capped at maxReturnBytes bytes /// @return gasUsed the gas used by the external call. Does not include the overhead of this function. function _callWithExactGasSafeReturnData( bytes memory payload, address target, uint256 gasLimit, uint16 gasForCallExactCheck, uint16 maxReturnBytes ) internal returns (bool success, bytes memory retData, uint256 gasUsed) { // allocate retData memory ahead of time retData = new bytes(maxReturnBytes); assembly { // solidity calls check that a contract actually exists at the destination, so we do the same // Note we do this check prior to measuring gas so gasForCallExactCheck (our "cushion") // doesn't need to account for it. if iszero(extcodesize(target)) { mstore(0, NoContractSig) revert(0, 0x4) } let g := gas() // Compute g -= gasForCallExactCheck and check for underflow // The gas actually passed to the callee is _min(gasAmount, 63//64*gas available). // We want to ensure that we revert if gasAmount > 63//64*gas available // as we do not want to provide them with less, however that check itself costs // gas. gasForCallExactCheck ensures we have at least enough gas to be able // to revert if gasAmount > 63//64*gas available. if lt(g, gasForCallExactCheck) { mstore(0, NoGasForCallExactCheckSig) revert(0, 0x4) } g := sub(g, gasForCallExactCheck) // if g - g//64 <= gasAmount, revert. We subtract g//64 because of EIP-150 if iszero(gt(sub(g, div(g, 64)), gasLimit)) { mstore(0, NotEnoughGasForCallSig) revert(0, 0x4) } // We save the gas before the call so we can calculate how much gas the call used let gasBeforeCall := gas() // call and return whether we succeeded. ignore return data // call(gas,addr,value,argsOffset,argsLength,retOffset,retLength) success := call(gasLimit, target, 0, add(payload, 0x20), mload(payload), 0, 0) gasUsed := sub(gasBeforeCall, gas()) // limit our copy to maxReturnBytes bytes let toCopy := returndatasize() if gt(toCopy, maxReturnBytes) { toCopy := maxReturnBytes } // Store the length of the copied bytes mstore(retData, toCopy) // copy the bytes from retData[0:_toCopy] returndatacopy(add(retData, 0x20), 0, toCopy) } return (success, retData, gasUsed); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {ConfirmedOwner} from "./ConfirmedOwner.sol"; /// @title The OwnerIsCreator contract /// @notice A contract with helpers for basic contract ownership. contract OwnerIsCreator is ConfirmedOwner { constructor() ConfirmedOwner(msg.sender) {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {IPool} from "./pools/IPool.sol"; import {Client} from "../libraries/Client.sol"; import {IERC20} from "../../vendor/openzeppelin-solidity/v4.8.0/contracts/token/ERC20/IERC20.sol"; interface IEVM2AnyOnRampClient { /// @notice Get the fee for a given ccip message /// @param destChainSelector The destination chain selector /// @param message The message to calculate the cost for /// @return fee The calculated fee function getFee(uint64 destChainSelector, Client.EVM2AnyMessage calldata message) external view returns (uint256 fee); /// @notice Get the pool for a specific token /// @param destChainSelector The destination chain selector /// @param sourceToken The source chain token to get the pool for /// @return pool Token pool function getPoolBySourceToken(uint64 destChainSelector, IERC20 sourceToken) external view returns (IPool); /// @notice Gets a list of all supported source chain tokens. /// @param destChainSelector The destination chain selector /// @return tokens The addresses of all tokens that this onRamp supports the given destination chain function getSupportedTokens(uint64 destChainSelector) external view returns (address[] memory tokens); /// @notice Send a message to the remote chain /// @dev only callable by the Router /// @dev approve() must have already been called on the token using the this ramp address as the spender. /// @dev if the contract is paused, this function will revert. /// @param destChainSelector The destination chain selector /// @param message Message struct to send /// @param feeTokenAmount Amount of fee tokens for payment /// @param originalSender The original initiator of the CCIP request function forwardFromRouter( uint64 destChainSelector, Client.EVM2AnyMessage memory message, uint256 feeTokenAmount, address originalSender ) external returns (bytes32); }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; library MerkleMultiProof { /// @notice Leaf domain separator, should be used as the first 32 bytes of a leaf's preimage. bytes32 internal constant LEAF_DOMAIN_SEPARATOR = 0x0000000000000000000000000000000000000000000000000000000000000000; /// @notice Internal domain separator, should be used as the first 32 bytes of an internal node's preiimage. bytes32 internal constant INTERNAL_DOMAIN_SEPARATOR = 0x0000000000000000000000000000000000000000000000000000000000000001; uint256 internal constant MAX_NUM_HASHES = 256; error InvalidProof(); error LeavesCannotBeEmpty(); /// @notice Computes the root based on provided pre-hashed leaf nodes in /// leaves, internal nodes in proofs, and using proofFlagBits' i-th bit to /// determine if an element of proofs or one of the previously computed leafs /// or internal nodes will be used for the i-th hash. /// @param leaves Should be pre-hashed and the first 32 bytes of a leaf's /// preimage should match LEAF_DOMAIN_SEPARATOR. /// @param proofs The hashes to be used instead of a leaf hash when the proofFlagBits /// indicates a proof should be used. /// @param proofFlagBits A single uint256 of which each bit indicates whether a leaf or /// a proof needs to be used in a hash operation. /// @dev the maximum number of hash operations it set to 256. Any input that would require /// more than 256 hashes to get to a root will revert. /// @dev For given input `leaves` = [a,b,c] `proofs` = [D] and `proofFlagBits` = 5 /// totalHashes = 3 + 1 - 1 = 3 /// ** round 1 ** /// proofFlagBits = (5 >> 0) & 1 = true /// hashes[0] = hashPair(a, b) /// (leafPos, hashPos, proofPos) = (2, 0, 0); /// /// ** round 2 ** /// proofFlagBits = (5 >> 1) & 1 = false /// hashes[1] = hashPair(D, c) /// (leafPos, hashPos, proofPos) = (3, 0, 1); /// /// ** round 3 ** /// proofFlagBits = (5 >> 2) & 1 = true /// hashes[2] = hashPair(hashes[0], hashes[1]) /// (leafPos, hashPos, proofPos) = (3, 2, 1); /// /// i = 3 and no longer < totalHashes. The algorithm is done /// return hashes[totalHashes - 1] = hashes[2]; the last hash we computed. // We mark this function as internal to force it to be inlined in contracts // that use it, but semantically it is public. // solhint-disable-next-line chainlink-solidity/prefix-internal-functions-with-underscore function merkleRoot( bytes32[] memory leaves, bytes32[] memory proofs, uint256 proofFlagBits ) internal pure returns (bytes32) { unchecked { uint256 leavesLen = leaves.length; uint256 proofsLen = proofs.length; if (leavesLen == 0) revert LeavesCannotBeEmpty(); if (!(leavesLen <= MAX_NUM_HASHES + 1 && proofsLen <= MAX_NUM_HASHES + 1)) revert InvalidProof(); uint256 totalHashes = leavesLen + proofsLen - 1; if (!(totalHashes <= MAX_NUM_HASHES)) revert InvalidProof(); if (totalHashes == 0) { return leaves[0]; } bytes32[] memory hashes = new bytes32[](totalHashes); (uint256 leafPos, uint256 hashPos, uint256 proofPos) = (0, 0, 0); for (uint256 i = 0; i < totalHashes; ++i) { // Checks if the bit flag signals the use of a supplied proof or a leaf/previous hash. bytes32 a; if (proofFlagBits & (1 << i) == (1 << i)) { // Use a leaf or a previously computed hash. if (leafPos < leavesLen) { a = leaves[leafPos++]; } else { a = hashes[hashPos++]; } } else { // Use a supplied proof. a = proofs[proofPos++]; } // The second part of the hashed pair is never a proof as hashing two proofs would result in a // hash that can already be computed offchain. bytes32 b; if (leafPos < leavesLen) { b = leaves[leafPos++]; } else { b = hashes[hashPos++]; } if (!(hashPos <= i)) revert InvalidProof(); hashes[i] = _hashPair(a, b); } if (!(hashPos == totalHashes - 1 && leafPos == leavesLen && proofPos == proofsLen)) revert InvalidProof(); // Return the last hash. return hashes[totalHashes - 1]; } } /// @notice Hashes two bytes32 objects in their given order, prepended by the /// INTERNAL_DOMAIN_SEPARATOR. function _hashInternalNode(bytes32 left, bytes32 right) private pure returns (bytes32 hash) { return keccak256(abi.encode(INTERNAL_DOMAIN_SEPARATOR, left, right)); } /// @notice Hashes two bytes32 objects. The order is taken into account, /// using the lower value first. function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _hashInternalNode(a, b) : _hashInternalNode(b, a); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {ConfirmedOwnerWithProposal} from "./ConfirmedOwnerWithProposal.sol"; /** * @title The ConfirmedOwner contract * @notice A contract with helpers for basic contract ownership. */ contract ConfirmedOwner is ConfirmedOwnerWithProposal { constructor(address newOwner) ConfirmedOwnerWithProposal(newOwner, address(0)) {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.0/contracts/token/ERC20/IERC20.sol"; // Shared public interface for multiple pool types. // Each pool type handles a different child token model (lock/unlock, mint/burn.) interface IPool { /// @notice Lock tokens into the pool or burn the tokens. /// @param originalSender Original sender of the tokens. /// @param receiver Receiver of the tokens on destination chain. /// @param amount Amount to lock or burn. /// @param destChainSelector Destination chain Id. /// @param extraArgs Additional data passed in by sender for lockOrBurn processing /// in custom pools on source chain. /// @return retData Optional field that contains bytes. Unused for now but already /// implemented to allow future upgrades while preserving the interface. function lockOrBurn( address originalSender, bytes calldata receiver, uint256 amount, uint64 destChainSelector, bytes calldata extraArgs ) external returns (bytes memory); /// @notice Releases or mints tokens to the receiver address. /// @param originalSender Original sender of the tokens. /// @param receiver Receiver of the tokens. /// @param amount Amount to release or mint. /// @param sourceChainSelector Source chain Id. /// @param extraData Additional data supplied offchain for releaseOrMint processing in /// custom pools on dest chain. This could be an attestation that was retrieved through a /// third party API. /// @dev offchainData can come from any untrusted source. function releaseOrMint( bytes memory originalSender, address receiver, uint256 amount, uint64 sourceChainSelector, bytes memory extraData ) external; /// @notice Gets the IERC20 token that this pool can lock or burn. /// @return token The IERC20 token representation. function getToken() external view returns (IERC20 token); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {IOwnable} from "../interfaces/IOwnable.sol"; /** * @title The ConfirmedOwner contract * @notice A contract with helpers for basic contract ownership. */ contract ConfirmedOwnerWithProposal is IOwnable { address private s_owner; address private s_pendingOwner; event OwnershipTransferRequested(address indexed from, address indexed to); event OwnershipTransferred(address indexed from, address indexed to); constructor(address newOwner, address pendingOwner) { // solhint-disable-next-line custom-errors require(newOwner != address(0), "Cannot set owner to zero"); s_owner = newOwner; if (pendingOwner != address(0)) { _transferOwnership(pendingOwner); } } /** * @notice Allows an owner to begin transferring ownership to a new address, * pending. */ function transferOwnership(address to) public override onlyOwner { _transferOwnership(to); } /** * @notice Allows an ownership transfer to be completed by the recipient. */ function acceptOwnership() external override { // solhint-disable-next-line custom-errors require(msg.sender == s_pendingOwner, "Must be proposed owner"); address oldOwner = s_owner; s_owner = msg.sender; s_pendingOwner = address(0); emit OwnershipTransferred(oldOwner, msg.sender); } /** * @notice Get the current owner */ function owner() public view override returns (address) { return s_owner; } /** * @notice validate, transfer ownership, and emit relevant events */ function _transferOwnership(address to) private { // solhint-disable-next-line custom-errors require(to != msg.sender, "Cannot transfer to self"); s_pendingOwner = to; emit OwnershipTransferRequested(s_owner, to); } /** * @notice validate access */ function _validateOwnership() internal view { // solhint-disable-next-line custom-errors require(msg.sender == s_owner, "Only callable by owner"); } /** * @notice Reverts if called by anyone other than the contract owner. */ modifier onlyOwner() { _validateOwnership(); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IOwnable { function owner() external returns (address); function transferOwnership(address recipient) external; function acceptOwnership() external; }
{ "remappings": [ "ds-test/=foundry-lib/forge-std/lib/ds-test/src/", "forge-std/=foundry-lib/forge-std/src/", "@openzeppelin/=node_modules/@openzeppelin/", "hardhat/=node_modules/hardhat/", "@eth-optimism/=node_modules/@eth-optimism/" ], "optimizer": { "enabled": true, "runs": 26000 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "none", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"wrappedNative","type":"address"},{"internalType":"address","name":"armProxy","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BadARMSignal","type":"error"},{"inputs":[],"name":"FailedToSendValue","type":"error"},{"inputs":[],"name":"InsufficientFeeTokenAmount","type":"error"},{"inputs":[],"name":"InvalidMsgValue","type":"error"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"InvalidRecipientAddress","type":"error"},{"inputs":[{"internalType":"uint64","name":"chainSelector","type":"uint64"},{"internalType":"address","name":"offRamp","type":"address"}],"name":"OffRampMismatch","type":"error"},{"inputs":[],"name":"OnlyOffRamp","type":"error"},{"inputs":[{"internalType":"uint64","name":"destChainSelector","type":"uint64"}],"name":"UnsupportedDestinationChain","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"messageId","type":"bytes32"},{"indexed":false,"internalType":"uint64","name":"sourceChainSelector","type":"uint64"},{"indexed":false,"internalType":"address","name":"offRamp","type":"address"},{"indexed":false,"internalType":"bytes32","name":"calldataHash","type":"bytes32"}],"name":"MessageExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"sourceChainSelector","type":"uint64"},{"indexed":false,"internalType":"address","name":"offRamp","type":"address"}],"name":"OffRampAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"sourceChainSelector","type":"uint64"},{"indexed":false,"internalType":"address","name":"offRamp","type":"address"}],"name":"OffRampRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"destChainSelector","type":"uint64"},{"indexed":false,"internalType":"address","name":"onRamp","type":"address"}],"name":"OnRampSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"MAX_RET_BYTES","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint64","name":"destChainSelector","type":"uint64"},{"internalType":"address","name":"onRamp","type":"address"}],"internalType":"struct Router.OnRamp[]","name":"onRampUpdates","type":"tuple[]"},{"components":[{"internalType":"uint64","name":"sourceChainSelector","type":"uint64"},{"internalType":"address","name":"offRamp","type":"address"}],"internalType":"struct Router.OffRamp[]","name":"offRampRemoves","type":"tuple[]"},{"components":[{"internalType":"uint64","name":"sourceChainSelector","type":"uint64"},{"internalType":"address","name":"offRamp","type":"address"}],"internalType":"struct Router.OffRamp[]","name":"offRampAdds","type":"tuple[]"}],"name":"applyRampUpdates","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"destinationChainSelector","type":"uint64"},{"components":[{"internalType":"bytes","name":"receiver","type":"bytes"},{"internalType":"bytes","name":"data","type":"bytes"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct Client.EVMTokenAmount[]","name":"tokenAmounts","type":"tuple[]"},{"internalType":"address","name":"feeToken","type":"address"},{"internalType":"bytes","name":"extraArgs","type":"bytes"}],"internalType":"struct Client.EVM2AnyMessage","name":"message","type":"tuple"}],"name":"ccipSend","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getArmProxy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"destinationChainSelector","type":"uint64"},{"components":[{"internalType":"bytes","name":"receiver","type":"bytes"},{"internalType":"bytes","name":"data","type":"bytes"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct Client.EVMTokenAmount[]","name":"tokenAmounts","type":"tuple[]"},{"internalType":"address","name":"feeToken","type":"address"},{"internalType":"bytes","name":"extraArgs","type":"bytes"}],"internalType":"struct Client.EVM2AnyMessage","name":"message","type":"tuple"}],"name":"getFee","outputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOffRamps","outputs":[{"components":[{"internalType":"uint64","name":"sourceChainSelector","type":"uint64"},{"internalType":"address","name":"offRamp","type":"address"}],"internalType":"struct Router.OffRamp[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"destChainSelector","type":"uint64"}],"name":"getOnRamp","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"chainSelector","type":"uint64"}],"name":"getSupportedTokens","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWrappedNative","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"chainSelector","type":"uint64"}],"name":"isChainSupported","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"sourceChainSelector","type":"uint64"},{"internalType":"address","name":"offRamp","type":"address"}],"name":"isOffRamp","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"recoverTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"messageId","type":"bytes32"},{"internalType":"uint64","name":"sourceChainSelector","type":"uint64"},{"internalType":"bytes","name":"sender","type":"bytes"},{"internalType":"bytes","name":"data","type":"bytes"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct Client.EVMTokenAmount[]","name":"destTokenAmounts","type":"tuple[]"}],"internalType":"struct Client.Any2EVMMessage","name":"message","type":"tuple"},{"internalType":"uint16","name":"gasForCallExactCheck","type":"uint16"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"routeMessage","outputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"retData","type":"bytes"},{"internalType":"uint256","name":"gasUsed","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wrappedNative","type":"address"}],"name":"setWrappedNative","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"typeAndVersion","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b5060405162002d8b38038062002d8b8339810160408190526200003491620001af565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000e7565b5050600280546001600160a01b0319166001600160a01b039485161790555016608052620001e7565b336001600160a01b03821603620001415760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b0381168114620001aa57600080fd5b919050565b60008060408385031215620001c357600080fd5b620001ce8362000192565b9150620001de6020840162000192565b90509250929050565b608051612b7a62000211600039600081816101f9015281816105e10152610af20152612b7a6000f3fe6080604052600436106101295760003560e01c80638da5cb5b116100a5578063a8d87a3b11610074578063e861e90711610059578063e861e90714610409578063f2fde38b14610434578063fbca3b741461045457600080fd5b8063a8d87a3b1461039c578063da5fcac8146103e957600080fd5b80638da5cb5b146102ed57806396f4e9f914610318578063a40e69c71461032b578063a48a90581461034d57600080fd5b806352cb60ca116100fc578063787350e3116100e1578063787350e31461028057806379ba5097146102a857806383826b2b146102bd57600080fd5b806352cb60ca1461023e5780635f3e849f1461026057600080fd5b8063181f5a771461012e57806320487ded1461018d5780633cf97983146101bb5780635246492f146101ea575b600080fd5b34801561013a57600080fd5b506101776040518060400160405280600c81526020017f526f7574657220312e322e30000000000000000000000000000000000000000081525081565b6040516101849190611f67565b60405180910390f35b34801561019957600080fd5b506101ad6101a83660046121d8565b610481565b604051908152602001610184565b3480156101c757600080fd5b506101db6101d63660046122d5565b6105d9565b6040516101849392919061234d565b3480156101f657600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610184565b34801561024a57600080fd5b5061025e610259366004612378565b610836565b005b34801561026c57600080fd5b5061025e61027b366004612395565b610885565b34801561028c57600080fd5b50610295608481565b60405161ffff9091168152602001610184565b3480156102b457600080fd5b5061025e6109d3565b3480156102c957600080fd5b506102dd6102d83660046123d6565b610ad0565b6040519015158152602001610184565b3480156102f957600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610219565b6101ad6103263660046121d8565b610aee565b34801561033757600080fd5b5061034061108f565b604051610184919061240d565b34801561035957600080fd5b506102dd61036836600461247c565b67ffffffffffffffff1660009081526003602052604090205473ffffffffffffffffffffffffffffffffffffffff16151590565b3480156103a857600080fd5b506102196103b736600461247c565b67ffffffffffffffff1660009081526003602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b3480156103f557600080fd5b5061025e6104043660046124e3565b61119c565b34801561041557600080fd5b5060025473ffffffffffffffffffffffffffffffffffffffff16610219565b34801561044057600080fd5b5061025e61044f366004612378565b6114bb565b34801561046057600080fd5b5061047461046f36600461247c565b6114cf565b604051610184919061257d565b606081015160009073ffffffffffffffffffffffffffffffffffffffff166104c25760025473ffffffffffffffffffffffffffffffffffffffff1660608301525b67ffffffffffffffff831660009081526003602052604090205473ffffffffffffffffffffffffffffffffffffffff168061053a576040517fae236d9c00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff851660048201526024015b60405180910390fd5b6040517f20487ded00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216906320487ded9061058e90879087906004016126b4565b602060405180830381865afa1580156105ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105cf91906126d7565b9150505b92915050565b6000606060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663397796f76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561064a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066e91906126f0565b156106a5576040517fc148371500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106be6106b86040890160208a0161247c565b33610ad0565b6106f4576040517fd2316ede00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006385572ffb60e01b8860405160240161070f919061281f565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905061079c8186888a60846115ef565b919550935091507f9b877de93ea9895756e337442c657f95a34fc68e7eb988bdfa693d5be83016b688356107d660408b0160208c0161247c565b83516020850120604051610823939291339193845267ffffffffffffffff92909216602084015273ffffffffffffffffffffffffffffffffffffffff166040830152606082015260800190565b60405180910390a1509450945094915050565b61083e611715565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b61088d611715565b73ffffffffffffffffffffffffffffffffffffffff82166108f2576040517f26a78f8f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152602401610531565b73ffffffffffffffffffffffffffffffffffffffff83166109ad5760008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114610967576040519150601f19603f3d011682016040523d82523d6000602084013e61096c565b606091505b50509050806109a7576040517fe417b80b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b6109ce73ffffffffffffffffffffffffffffffffffffffff84168383611798565b505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610a54576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610531565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6000610ae7610adf848461186c565b6004906118b0565b9392505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663397796f76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7f91906126f0565b15610bb6576040517fc148371500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff831660009081526003602052604090205473ffffffffffffffffffffffffffffffffffffffff1680610c29576040517fae236d9c00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff85166004820152602401610531565b606083015160009073ffffffffffffffffffffffffffffffffffffffff16610dbb5760025473ffffffffffffffffffffffffffffffffffffffff90811660608601526040517f20487ded000000000000000000000000000000000000000000000000000000008152908316906320487ded90610cab90889088906004016126b4565b602060405180830381865afa158015610cc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cec91906126d7565b905080341015610d28576040517f07da6ee600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b349050836060015173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610d7757600080fd5b505af1158015610d8b573d6000803e3d6000fd5b505050506060850151610db6915073ffffffffffffffffffffffffffffffffffffffff168383611798565b610eb2565b3415610df3576040517f1841b4e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f20487ded00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316906320487ded90610e4790889088906004016126b4565b602060405180830381865afa158015610e64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8891906126d7565b6060850151909150610eb29073ffffffffffffffffffffffffffffffffffffffff163384846118c8565b60005b846040015151811015610fea57600085604001518281518110610eda57610eda61292b565b6020908102919091010151516040517f48a98aa400000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8916600482015273ffffffffffffffffffffffffffffffffffffffff8083166024830152919250610fd9913391908716906348a98aa490604401602060405180830381865afa158015610f6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f90919061295a565b88604001518581518110610fa657610fa661292b565b6020026020010151602001518473ffffffffffffffffffffffffffffffffffffffff166118c8909392919063ffffffff16565b50610fe3816129a6565b9050610eb5565b506040517fdf0aa9e900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83169063df0aa9e9906110439088908890869033906004016129de565b6020604051808303816000875af1158015611062573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108691906126d7565b95945050505050565b6060600061109d6004611926565b90506000815167ffffffffffffffff8111156110bb576110bb611f97565b60405190808252806020026020018201604052801561110057816020015b60408051808201909152600080825260208201528152602001906001900390816110d95790505b50905060005b82518110156111955760008382815181106111235761112361292b565b60200260200101519050604051806040016040528060a083901c67ffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff168152508383815181106111785761117861292b565b6020026020010181905250508061118e906129a6565b9050611106565b5092915050565b6111a4611715565b60005b858110156112885760008787838181106111c3576111c361292b565b9050604002018036038101906111d99190612a2e565b60208181018051835167ffffffffffffffff90811660009081526003855260409081902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff948516179055855193519051921682529394509216917f1f7d0ec248b80e5c0dde0ee531c4fc8fdb6ce9a2b3d90f560c74acd6a7202f23910160405180910390a250611281816129a6565b90506111a7565b5060005b838110156113c95760008585838181106112a8576112a861292b565b6112be926020604090920201908101915061247c565b905060008686848181106112d4576112d461292b565b90506040020160200160208101906112ec9190612378565b90506113036112fb838361186c565b600490611933565b611361576040517f4964779000000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8316600482015273ffffffffffffffffffffffffffffffffffffffff82166024820152604401610531565b60405173ffffffffffffffffffffffffffffffffffffffff8216815267ffffffffffffffff8316907fa823809efda3ba66c873364eec120fa0923d9fabda73bc97dd5663341e2d9bcb9060200160405180910390a25050806113c2906129a6565b905061128c565b5060005b818110156114b25760008383838181106113e9576113e961292b565b6113ff926020604090920201908101915061247c565b905060008484848181106114155761141561292b565b905060400201602001602081019061142d9190612378565b905061144461143c838361186c565b60049061193f565b1561149f5760405173ffffffffffffffffffffffffffffffffffffffff8216815267ffffffffffffffff8316907fa4bdf64ebdf3316320601a081916a75aa144bcef6c4beeb0e9fb1982cacc6b949060200160405180910390a25b5050806114ab906129a6565b90506113cd565b50505050505050565b6114c3611715565b6114cc8161194b565b50565b60606115098267ffffffffffffffff1660009081526003602052604090205473ffffffffffffffffffffffffffffffffffffffff16151590565b611523576040805160008082526020820190925290611195565b67ffffffffffffffff8216600081815260036020526040908190205490517ffbca3b74000000000000000000000000000000000000000000000000000000008152600481019290925273ffffffffffffffffffffffffffffffffffffffff169063fbca3b7490602401600060405180830381865afa1580156115a9573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526105d39190810190612a6d565b6000606060008361ffff1667ffffffffffffffff81111561161257611612611f97565b6040519080825280601f01601f19166020018201604052801561163c576020820181803683370190505b509150863b61166f577f0c3b563c0000000000000000000000000000000000000000000000000000000060005260046000fd5b5a858110156116a2577fafa32a2c0000000000000000000000000000000000000000000000000000000060005260046000fd5b85900360408104810387106116db577f37c3be290000000000000000000000000000000000000000000000000000000060005260046000fd5b505a6000808a5160208c0160008c8cf193505a900390503d848111156116fe5750835b808352806000602085013e50955095509592505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611796576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610531565b565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526109ce9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611a40565b6000610ae773ffffffffffffffffffffffffffffffffffffffff83167bffffffffffffffff000000000000000000000000000000000000000060a086901b16612afc565b60008181526001830160205260408120541515610ae7565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526109a79085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016117ea565b60606000610ae783611b4c565b6000610ae78383611ba8565b6000610ae78383611c9b565b3373ffffffffffffffffffffffffffffffffffffffff8216036119ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610531565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000611aa2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611cea9092919063ffffffff16565b8051909150156109ce5780806020019051810190611ac091906126f0565b6109ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610531565b606081600001805480602002602001604051908101604052809291908181526020018280548015611b9c57602002820191906000526020600020905b815481526020019060010190808311611b88575b50505050509050919050565b60008181526001830160205260408120548015611c91576000611bcc600183612b0f565b8554909150600090611be090600190612b0f565b9050818114611c45576000866000018281548110611c0057611c0061292b565b9060005260206000200154905080876000018481548110611c2357611c2361292b565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611c5657611c56612b22565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506105d3565b60009150506105d3565b6000818152600183016020526040812054611ce2575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556105d3565b5060006105d3565b6060611cf98484600085611d01565b949350505050565b606082471015611d93576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610531565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611dbc9190612b51565b60006040518083038185875af1925050503d8060008114611df9576040519150601f19603f3d011682016040523d82523d6000602084013e611dfe565b606091505b5091509150611e0f87838387611e1a565b979650505050505050565b60608315611eb0578251600003611ea95773ffffffffffffffffffffffffffffffffffffffff85163b611ea9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610531565b5081611cf9565b611cf98383815115611ec55781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105319190611f67565b60005b83811015611f14578181015183820152602001611efc565b50506000910152565b60008151808452611f35816020860160208601611ef9565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610ae76020830184611f1d565b803567ffffffffffffffff81168114611f9257600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715611fe957611fe9611f97565b60405290565b60405160a0810167ffffffffffffffff81118282101715611fe957611fe9611f97565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561205957612059611f97565b604052919050565b600082601f83011261207257600080fd5b813567ffffffffffffffff81111561208c5761208c611f97565b6120bd60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601612012565b8181528460208386010111156120d257600080fd5b816020850160208301376000918101602001919091529392505050565b600067ffffffffffffffff82111561210957612109611f97565b5060051b60200190565b73ffffffffffffffffffffffffffffffffffffffff811681146114cc57600080fd5b8035611f9281612113565b600082601f83011261215157600080fd5b81356020612166612161836120ef565b612012565b82815260069290921b8401810191818101908684111561218557600080fd5b8286015b848110156121cd57604081890312156121a25760008081fd5b6121aa611fc6565b81356121b581612113565b81528185013585820152835291830191604001612189565b509695505050505050565b600080604083850312156121eb57600080fd5b6121f483611f7a565b9150602083013567ffffffffffffffff8082111561221157600080fd5b9084019060a0828703121561222557600080fd5b61222d611fef565b82358281111561223c57600080fd5b61224888828601612061565b82525060208301358281111561225d57600080fd5b61226988828601612061565b60208301525060408301358281111561228157600080fd5b61228d88828601612140565b60408301525061229f60608401612135565b60608201526080830135828111156122b657600080fd5b6122c288828601612061565b6080830152508093505050509250929050565b600080600080608085870312156122eb57600080fd5b843567ffffffffffffffff81111561230257600080fd5b850160a0818803121561231457600080fd5b9350602085013561ffff8116811461232b57600080fd5b925060408501359150606085013561234281612113565b939692955090935050565b83151581526060602082015260006123686060830185611f1d565b9050826040830152949350505050565b60006020828403121561238a57600080fd5b8135610ae781612113565b6000806000606084860312156123aa57600080fd5b83356123b581612113565b925060208401356123c581612113565b929592945050506040919091013590565b600080604083850312156123e957600080fd5b6123f283611f7a565b9150602083013561240281612113565b809150509250929050565b602080825282518282018190526000919060409081850190868401855b8281101561246f578151805167ffffffffffffffff16855286015173ffffffffffffffffffffffffffffffffffffffff1686850152928401929085019060010161242a565b5091979650505050505050565b60006020828403121561248e57600080fd5b610ae782611f7a565b60008083601f8401126124a957600080fd5b50813567ffffffffffffffff8111156124c157600080fd5b6020830191508360208260061b85010111156124dc57600080fd5b9250929050565b600080600080600080606087890312156124fc57600080fd5b863567ffffffffffffffff8082111561251457600080fd5b6125208a838b01612497565b9098509650602089013591508082111561253957600080fd5b6125458a838b01612497565b9096509450604089013591508082111561255e57600080fd5b5061256b89828a01612497565b979a9699509497509295939492505050565b6020808252825182820181905260009190848201906040850190845b818110156125cb57835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101612599565b50909695505050505050565b6000815160a084526125ec60a0850182611f1d565b9050602080840151858303828701526126058382611f1d565b60408681015188830389830152805180845290850195509092506000918401905b80831015612665578551805173ffffffffffffffffffffffffffffffffffffffff16835285015185830152948401946001929092019190830190612626565b506060870151945061268f606089018673ffffffffffffffffffffffffffffffffffffffff169052565b6080870151945087810360808901526126a88186611f1d565b98975050505050505050565b67ffffffffffffffff83168152604060208201526000611cf960408301846125d7565b6000602082840312156126e957600080fd5b5051919050565b60006020828403121561270257600080fd5b81518015158114610ae757600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261274757600080fd5b830160208101925035905067ffffffffffffffff81111561276757600080fd5b8036038213156124dc57600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b8183526000602080850194508260005b858110156128145781356127e281612113565b73ffffffffffffffffffffffffffffffffffffffff1687528183013583880152604096870196909101906001016127cf565b509495945050505050565b6020815281356020820152600061283860208401611f7a565b67ffffffffffffffff80821660408501526128566040860186612712565b925060a0606086015261286d60c086018483612776565b92505061287d6060860186612712565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0808786030160808801526128b3858385612776565b9450608088013592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18836030183126128ec57600080fd5b6020928801928301923591508382111561290557600080fd5b8160061b360383131561291757600080fd5b8685030160a0870152611e0f8482846127bf565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561296c57600080fd5b8151610ae781612113565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036129d7576129d7612977565b5060010190565b67ffffffffffffffff85168152608060208201526000612a0160808301866125d7565b905083604083015273ffffffffffffffffffffffffffffffffffffffff8316606083015295945050505050565b600060408284031215612a4057600080fd5b612a48611fc6565b612a5183611f7a565b81526020830135612a6181612113565b60208201529392505050565b60006020808385031215612a8057600080fd5b825167ffffffffffffffff811115612a9757600080fd5b8301601f81018513612aa857600080fd5b8051612ab6612161826120ef565b81815260059190911b82018301908381019087831115612ad557600080fd5b928401925b82841015611e0f578351612aed81612113565b82529284019290840190612ada565b808201808211156105d3576105d3612977565b818103818111156105d3576105d3612977565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60008251612b63818460208701611ef9565b919091019291505056fea164736f6c6343000813000a0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf1270000000000000000000000000f1ceaa46d8d13cac9fc38aaef3d3d14754c5a9c2
Deployed Bytecode
0x6080604052600436106101295760003560e01c80638da5cb5b116100a5578063a8d87a3b11610074578063e861e90711610059578063e861e90714610409578063f2fde38b14610434578063fbca3b741461045457600080fd5b8063a8d87a3b1461039c578063da5fcac8146103e957600080fd5b80638da5cb5b146102ed57806396f4e9f914610318578063a40e69c71461032b578063a48a90581461034d57600080fd5b806352cb60ca116100fc578063787350e3116100e1578063787350e31461028057806379ba5097146102a857806383826b2b146102bd57600080fd5b806352cb60ca1461023e5780635f3e849f1461026057600080fd5b8063181f5a771461012e57806320487ded1461018d5780633cf97983146101bb5780635246492f146101ea575b600080fd5b34801561013a57600080fd5b506101776040518060400160405280600c81526020017f526f7574657220312e322e30000000000000000000000000000000000000000081525081565b6040516101849190611f67565b60405180910390f35b34801561019957600080fd5b506101ad6101a83660046121d8565b610481565b604051908152602001610184565b3480156101c757600080fd5b506101db6101d63660046122d5565b6105d9565b6040516101849392919061234d565b3480156101f657600080fd5b507f000000000000000000000000f1ceaa46d8d13cac9fc38aaef3d3d14754c5a9c25b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610184565b34801561024a57600080fd5b5061025e610259366004612378565b610836565b005b34801561026c57600080fd5b5061025e61027b366004612395565b610885565b34801561028c57600080fd5b50610295608481565b60405161ffff9091168152602001610184565b3480156102b457600080fd5b5061025e6109d3565b3480156102c957600080fd5b506102dd6102d83660046123d6565b610ad0565b6040519015158152602001610184565b3480156102f957600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610219565b6101ad6103263660046121d8565b610aee565b34801561033757600080fd5b5061034061108f565b604051610184919061240d565b34801561035957600080fd5b506102dd61036836600461247c565b67ffffffffffffffff1660009081526003602052604090205473ffffffffffffffffffffffffffffffffffffffff16151590565b3480156103a857600080fd5b506102196103b736600461247c565b67ffffffffffffffff1660009081526003602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b3480156103f557600080fd5b5061025e6104043660046124e3565b61119c565b34801561041557600080fd5b5060025473ffffffffffffffffffffffffffffffffffffffff16610219565b34801561044057600080fd5b5061025e61044f366004612378565b6114bb565b34801561046057600080fd5b5061047461046f36600461247c565b6114cf565b604051610184919061257d565b606081015160009073ffffffffffffffffffffffffffffffffffffffff166104c25760025473ffffffffffffffffffffffffffffffffffffffff1660608301525b67ffffffffffffffff831660009081526003602052604090205473ffffffffffffffffffffffffffffffffffffffff168061053a576040517fae236d9c00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff851660048201526024015b60405180910390fd5b6040517f20487ded00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216906320487ded9061058e90879087906004016126b4565b602060405180830381865afa1580156105ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105cf91906126d7565b9150505b92915050565b6000606060007f000000000000000000000000f1ceaa46d8d13cac9fc38aaef3d3d14754c5a9c273ffffffffffffffffffffffffffffffffffffffff1663397796f76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561064a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066e91906126f0565b156106a5576040517fc148371500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106be6106b86040890160208a0161247c565b33610ad0565b6106f4576040517fd2316ede00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006385572ffb60e01b8860405160240161070f919061281f565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905061079c8186888a60846115ef565b919550935091507f9b877de93ea9895756e337442c657f95a34fc68e7eb988bdfa693d5be83016b688356107d660408b0160208c0161247c565b83516020850120604051610823939291339193845267ffffffffffffffff92909216602084015273ffffffffffffffffffffffffffffffffffffffff166040830152606082015260800190565b60405180910390a1509450945094915050565b61083e611715565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b61088d611715565b73ffffffffffffffffffffffffffffffffffffffff82166108f2576040517f26a78f8f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152602401610531565b73ffffffffffffffffffffffffffffffffffffffff83166109ad5760008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114610967576040519150601f19603f3d011682016040523d82523d6000602084013e61096c565b606091505b50509050806109a7576040517fe417b80b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b6109ce73ffffffffffffffffffffffffffffffffffffffff84168383611798565b505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610a54576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610531565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6000610ae7610adf848461186c565b6004906118b0565b9392505050565b60007f000000000000000000000000f1ceaa46d8d13cac9fc38aaef3d3d14754c5a9c273ffffffffffffffffffffffffffffffffffffffff1663397796f76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7f91906126f0565b15610bb6576040517fc148371500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff831660009081526003602052604090205473ffffffffffffffffffffffffffffffffffffffff1680610c29576040517fae236d9c00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff85166004820152602401610531565b606083015160009073ffffffffffffffffffffffffffffffffffffffff16610dbb5760025473ffffffffffffffffffffffffffffffffffffffff90811660608601526040517f20487ded000000000000000000000000000000000000000000000000000000008152908316906320487ded90610cab90889088906004016126b4565b602060405180830381865afa158015610cc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cec91906126d7565b905080341015610d28576040517f07da6ee600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b349050836060015173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610d7757600080fd5b505af1158015610d8b573d6000803e3d6000fd5b505050506060850151610db6915073ffffffffffffffffffffffffffffffffffffffff168383611798565b610eb2565b3415610df3576040517f1841b4e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f20487ded00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316906320487ded90610e4790889088906004016126b4565b602060405180830381865afa158015610e64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8891906126d7565b6060850151909150610eb29073ffffffffffffffffffffffffffffffffffffffff163384846118c8565b60005b846040015151811015610fea57600085604001518281518110610eda57610eda61292b565b6020908102919091010151516040517f48a98aa400000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8916600482015273ffffffffffffffffffffffffffffffffffffffff8083166024830152919250610fd9913391908716906348a98aa490604401602060405180830381865afa158015610f6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f90919061295a565b88604001518581518110610fa657610fa661292b565b6020026020010151602001518473ffffffffffffffffffffffffffffffffffffffff166118c8909392919063ffffffff16565b50610fe3816129a6565b9050610eb5565b506040517fdf0aa9e900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83169063df0aa9e9906110439088908890869033906004016129de565b6020604051808303816000875af1158015611062573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108691906126d7565b95945050505050565b6060600061109d6004611926565b90506000815167ffffffffffffffff8111156110bb576110bb611f97565b60405190808252806020026020018201604052801561110057816020015b60408051808201909152600080825260208201528152602001906001900390816110d95790505b50905060005b82518110156111955760008382815181106111235761112361292b565b60200260200101519050604051806040016040528060a083901c67ffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff168152508383815181106111785761117861292b565b6020026020010181905250508061118e906129a6565b9050611106565b5092915050565b6111a4611715565b60005b858110156112885760008787838181106111c3576111c361292b565b9050604002018036038101906111d99190612a2e565b60208181018051835167ffffffffffffffff90811660009081526003855260409081902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff948516179055855193519051921682529394509216917f1f7d0ec248b80e5c0dde0ee531c4fc8fdb6ce9a2b3d90f560c74acd6a7202f23910160405180910390a250611281816129a6565b90506111a7565b5060005b838110156113c95760008585838181106112a8576112a861292b565b6112be926020604090920201908101915061247c565b905060008686848181106112d4576112d461292b565b90506040020160200160208101906112ec9190612378565b90506113036112fb838361186c565b600490611933565b611361576040517f4964779000000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8316600482015273ffffffffffffffffffffffffffffffffffffffff82166024820152604401610531565b60405173ffffffffffffffffffffffffffffffffffffffff8216815267ffffffffffffffff8316907fa823809efda3ba66c873364eec120fa0923d9fabda73bc97dd5663341e2d9bcb9060200160405180910390a25050806113c2906129a6565b905061128c565b5060005b818110156114b25760008383838181106113e9576113e961292b565b6113ff926020604090920201908101915061247c565b905060008484848181106114155761141561292b565b905060400201602001602081019061142d9190612378565b905061144461143c838361186c565b60049061193f565b1561149f5760405173ffffffffffffffffffffffffffffffffffffffff8216815267ffffffffffffffff8316907fa4bdf64ebdf3316320601a081916a75aa144bcef6c4beeb0e9fb1982cacc6b949060200160405180910390a25b5050806114ab906129a6565b90506113cd565b50505050505050565b6114c3611715565b6114cc8161194b565b50565b60606115098267ffffffffffffffff1660009081526003602052604090205473ffffffffffffffffffffffffffffffffffffffff16151590565b611523576040805160008082526020820190925290611195565b67ffffffffffffffff8216600081815260036020526040908190205490517ffbca3b74000000000000000000000000000000000000000000000000000000008152600481019290925273ffffffffffffffffffffffffffffffffffffffff169063fbca3b7490602401600060405180830381865afa1580156115a9573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526105d39190810190612a6d565b6000606060008361ffff1667ffffffffffffffff81111561161257611612611f97565b6040519080825280601f01601f19166020018201604052801561163c576020820181803683370190505b509150863b61166f577f0c3b563c0000000000000000000000000000000000000000000000000000000060005260046000fd5b5a858110156116a2577fafa32a2c0000000000000000000000000000000000000000000000000000000060005260046000fd5b85900360408104810387106116db577f37c3be290000000000000000000000000000000000000000000000000000000060005260046000fd5b505a6000808a5160208c0160008c8cf193505a900390503d848111156116fe5750835b808352806000602085013e50955095509592505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611796576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610531565b565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526109ce9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611a40565b6000610ae773ffffffffffffffffffffffffffffffffffffffff83167bffffffffffffffff000000000000000000000000000000000000000060a086901b16612afc565b60008181526001830160205260408120541515610ae7565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526109a79085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016117ea565b60606000610ae783611b4c565b6000610ae78383611ba8565b6000610ae78383611c9b565b3373ffffffffffffffffffffffffffffffffffffffff8216036119ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610531565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000611aa2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611cea9092919063ffffffff16565b8051909150156109ce5780806020019051810190611ac091906126f0565b6109ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610531565b606081600001805480602002602001604051908101604052809291908181526020018280548015611b9c57602002820191906000526020600020905b815481526020019060010190808311611b88575b50505050509050919050565b60008181526001830160205260408120548015611c91576000611bcc600183612b0f565b8554909150600090611be090600190612b0f565b9050818114611c45576000866000018281548110611c0057611c0061292b565b9060005260206000200154905080876000018481548110611c2357611c2361292b565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611c5657611c56612b22565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506105d3565b60009150506105d3565b6000818152600183016020526040812054611ce2575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556105d3565b5060006105d3565b6060611cf98484600085611d01565b949350505050565b606082471015611d93576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610531565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611dbc9190612b51565b60006040518083038185875af1925050503d8060008114611df9576040519150601f19603f3d011682016040523d82523d6000602084013e611dfe565b606091505b5091509150611e0f87838387611e1a565b979650505050505050565b60608315611eb0578251600003611ea95773ffffffffffffffffffffffffffffffffffffffff85163b611ea9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610531565b5081611cf9565b611cf98383815115611ec55781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105319190611f67565b60005b83811015611f14578181015183820152602001611efc565b50506000910152565b60008151808452611f35816020860160208601611ef9565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610ae76020830184611f1d565b803567ffffffffffffffff81168114611f9257600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715611fe957611fe9611f97565b60405290565b60405160a0810167ffffffffffffffff81118282101715611fe957611fe9611f97565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561205957612059611f97565b604052919050565b600082601f83011261207257600080fd5b813567ffffffffffffffff81111561208c5761208c611f97565b6120bd60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601612012565b8181528460208386010111156120d257600080fd5b816020850160208301376000918101602001919091529392505050565b600067ffffffffffffffff82111561210957612109611f97565b5060051b60200190565b73ffffffffffffffffffffffffffffffffffffffff811681146114cc57600080fd5b8035611f9281612113565b600082601f83011261215157600080fd5b81356020612166612161836120ef565b612012565b82815260069290921b8401810191818101908684111561218557600080fd5b8286015b848110156121cd57604081890312156121a25760008081fd5b6121aa611fc6565b81356121b581612113565b81528185013585820152835291830191604001612189565b509695505050505050565b600080604083850312156121eb57600080fd5b6121f483611f7a565b9150602083013567ffffffffffffffff8082111561221157600080fd5b9084019060a0828703121561222557600080fd5b61222d611fef565b82358281111561223c57600080fd5b61224888828601612061565b82525060208301358281111561225d57600080fd5b61226988828601612061565b60208301525060408301358281111561228157600080fd5b61228d88828601612140565b60408301525061229f60608401612135565b60608201526080830135828111156122b657600080fd5b6122c288828601612061565b6080830152508093505050509250929050565b600080600080608085870312156122eb57600080fd5b843567ffffffffffffffff81111561230257600080fd5b850160a0818803121561231457600080fd5b9350602085013561ffff8116811461232b57600080fd5b925060408501359150606085013561234281612113565b939692955090935050565b83151581526060602082015260006123686060830185611f1d565b9050826040830152949350505050565b60006020828403121561238a57600080fd5b8135610ae781612113565b6000806000606084860312156123aa57600080fd5b83356123b581612113565b925060208401356123c581612113565b929592945050506040919091013590565b600080604083850312156123e957600080fd5b6123f283611f7a565b9150602083013561240281612113565b809150509250929050565b602080825282518282018190526000919060409081850190868401855b8281101561246f578151805167ffffffffffffffff16855286015173ffffffffffffffffffffffffffffffffffffffff1686850152928401929085019060010161242a565b5091979650505050505050565b60006020828403121561248e57600080fd5b610ae782611f7a565b60008083601f8401126124a957600080fd5b50813567ffffffffffffffff8111156124c157600080fd5b6020830191508360208260061b85010111156124dc57600080fd5b9250929050565b600080600080600080606087890312156124fc57600080fd5b863567ffffffffffffffff8082111561251457600080fd5b6125208a838b01612497565b9098509650602089013591508082111561253957600080fd5b6125458a838b01612497565b9096509450604089013591508082111561255e57600080fd5b5061256b89828a01612497565b979a9699509497509295939492505050565b6020808252825182820181905260009190848201906040850190845b818110156125cb57835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101612599565b50909695505050505050565b6000815160a084526125ec60a0850182611f1d565b9050602080840151858303828701526126058382611f1d565b60408681015188830389830152805180845290850195509092506000918401905b80831015612665578551805173ffffffffffffffffffffffffffffffffffffffff16835285015185830152948401946001929092019190830190612626565b506060870151945061268f606089018673ffffffffffffffffffffffffffffffffffffffff169052565b6080870151945087810360808901526126a88186611f1d565b98975050505050505050565b67ffffffffffffffff83168152604060208201526000611cf960408301846125d7565b6000602082840312156126e957600080fd5b5051919050565b60006020828403121561270257600080fd5b81518015158114610ae757600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261274757600080fd5b830160208101925035905067ffffffffffffffff81111561276757600080fd5b8036038213156124dc57600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b8183526000602080850194508260005b858110156128145781356127e281612113565b73ffffffffffffffffffffffffffffffffffffffff1687528183013583880152604096870196909101906001016127cf565b509495945050505050565b6020815281356020820152600061283860208401611f7a565b67ffffffffffffffff80821660408501526128566040860186612712565b925060a0606086015261286d60c086018483612776565b92505061287d6060860186612712565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0808786030160808801526128b3858385612776565b9450608088013592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18836030183126128ec57600080fd5b6020928801928301923591508382111561290557600080fd5b8160061b360383131561291757600080fd5b8685030160a0870152611e0f8482846127bf565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561296c57600080fd5b8151610ae781612113565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036129d7576129d7612977565b5060010190565b67ffffffffffffffff85168152608060208201526000612a0160808301866125d7565b905083604083015273ffffffffffffffffffffffffffffffffffffffff8316606083015295945050505050565b600060408284031215612a4057600080fd5b612a48611fc6565b612a5183611f7a565b81526020830135612a6181612113565b60208201529392505050565b60006020808385031215612a8057600080fd5b825167ffffffffffffffff811115612a9757600080fd5b8301601f81018513612aa857600080fd5b8051612ab6612161826120ef565b81815260059190911b82018301908381019087831115612ad557600080fd5b928401925b82841015611e0f578351612aed81612113565b82529284019290840190612ada565b808201808211156105d3576105d3612977565b818103818111156105d3576105d3612977565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60008251612b63818460208701611ef9565b919091019291505056fea164736f6c6343000813000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf1270000000000000000000000000f1ceaa46d8d13cac9fc38aaef3d3d14754c5a9c2
-----Decoded View---------------
Arg [0] : wrappedNative (address): 0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270
Arg [1] : armProxy (address): 0xf1ceAa46D8d13Cac9fC38aaEF3d3d14754C5A9c2
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf1270
Arg [1] : 000000000000000000000000f1ceaa46d8d13cac9fc38aaef3d3d14754c5a9c2
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
BSC | 100.00% | $715.83 | 0.001 | $0.71583 |
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.