Source Code
Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 6 from a total of 6 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Renounce Manager... | 75204401 | 755 days ago | IN | 0 ETH | 0.00003297 | ||||
Transfer Ownersh... | 75204242 | 755 days ago | IN | 0 ETH | 0.0000394 | ||||
Set Manager | 75204030 | 755 days ago | IN | 0 ETH | 0.00005427 | ||||
Set Peers | 70091131 | 769 days ago | IN | 0 ETH | 0.00015533 | ||||
Renounce Manager... | 70047356 | 769 days ago | IN | 0 ETH | 0.00002693 | ||||
Set Client | 70047150 | 769 days ago | IN | 0 ETH | 0.00003426 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
122945679 | 612 days ago | 0.00027405 ETH | ||||
122945679 | 612 days ago | 0.00027405 ETH | ||||
122945639 | 612 days ago | 0.00027405 ETH | ||||
122945639 | 612 days ago | 0.00027405 ETH | ||||
122945600 | 612 days ago | 0.00027405 ETH | ||||
122945600 | 612 days ago | 0.00027405 ETH | ||||
122543928 | 614 days ago | 0.00027405 ETH | ||||
122543928 | 614 days ago | 0.00027405 ETH | ||||
122543889 | 614 days ago | 0.00027405 ETH | ||||
122543889 | 614 days ago | 0.00027405 ETH | ||||
122543851 | 614 days ago | 0.00027405 ETH | ||||
122543851 | 614 days ago | 0.00027405 ETH | ||||
122542757 | 614 days ago | 0.00027405 ETH | ||||
122542757 | 614 days ago | 0.00027405 ETH | ||||
121975997 | 615 days ago | 0.00025596 ETH | ||||
121975997 | 615 days ago | 0.00025596 ETH | ||||
121975960 | 615 days ago | 0.00025596 ETH | ||||
121975960 | 615 days ago | 0.00025596 ETH | ||||
121975922 | 615 days ago | 0.00025596 ETH | ||||
121975922 | 615 days ago | 0.00025596 ETH | ||||
121975884 | 615 days ago | 0.00025596 ETH | ||||
121975884 | 615 days ago | 0.00025596 ETH | ||||
121975846 | 615 days ago | 0.00025596 ETH | ||||
121975846 | 615 days ago | 0.00025596 ETH | ||||
121975810 | 615 days ago | 0.00025596 ETH |
Loading...
Loading
Contract Name:
LayerZeroGateway
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; import { ReentrancyGuard } from '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import { IGateway } from '../interfaces/IGateway.sol'; import { IGatewayClient } from '../interfaces/IGatewayClient.sol'; import { ILayerZeroEndpoint } from './interfaces/ILayerZeroEndpoint.sol'; import { GatewayBase } from '../GatewayBase.sol'; import { SystemVersionId } from '../../SystemVersionId.sol'; import { ZeroAddressError } from '../../Errors.sol'; import '../../helpers/AddressHelper.sol' as AddressHelper; import '../../helpers/GasReserveHelper.sol' as GasReserveHelper; /** * @title LayerZeroGateway * @notice The contract implementing the cross-chain messaging logic specific to LayerZero */ contract LayerZeroGateway is SystemVersionId, GatewayBase { /** * @notice Chain ID pair structure * @dev See https://layerzero.gitbook.io/docs/technical-reference/mainnet/supported-chain-ids * @param standardId The standard EVM chain ID * @param layerZeroId The LayerZero chain ID */ struct ChainIdPair { uint256 standardId; uint16 layerZeroId; } /** * @dev LayerZero endpoint contract reference */ ILayerZeroEndpoint public endpoint; /** * @dev The correspondence between standard EVM chain IDs and LayerZero chain IDs */ mapping(uint256 /*standardId*/ => uint16 /*layerZeroId*/) public standardToLayerZeroChainId; /** * @dev The correspondence between LayerZero chain IDs and standard EVM chain IDs */ mapping(uint16 /*layerZeroId*/ => uint256 /*standardId*/) public layerZeroToStandardChainId; uint16 private constant ADAPTER_PARAMETERS_VERSION = 1; /** * @notice Emitted when the cross-chain endpoint contract reference is set * @param endpointAddress The address of the cross-chain endpoint contract */ event SetEndpoint(address indexed endpointAddress); /** * @notice Emitted when a chain ID pair is added or updated * @param standardId The standard EVM chain ID * @param layerZeroId The LayerZero chain ID */ event SetChainIdPair(uint256 indexed standardId, uint16 indexed layerZeroId); /** * @notice Emitted when a chain ID pair is removed * @param standardId The standard EVM chain ID * @param layerZeroId The LayerZero chain ID */ event RemoveChainIdPair(uint256 indexed standardId, uint16 indexed layerZeroId); /** * @notice Emitted when there is no registered LayerZero chain ID matching the standard EVM chain ID */ error LayerZeroChainIdNotSetError(); /** * @notice Emitted when the caller is not the LayerZero endpoint contract */ error OnlyEndpointError(); /** * @dev Modifier to check if the caller is the LayerZero endpoint contract */ modifier onlyEndpoint() { if (msg.sender != address(endpoint)) { revert OnlyEndpointError(); } _; } /** * @notice Deploys the LayerZeroGateway contract * @param _endpointAddress The cross-chain endpoint address * @param _chainIdPairs The correspondence between standard EVM chain IDs and LayerZero chain IDs * @param _targetGasReserve The initial gas reserve value for target chain action processing * @param _owner The address of the initial owner of the contract * @param _managers The addresses of initial managers of the contract * @param _addOwnerToManagers The flag to optionally add the owner to the list of managers */ constructor( address _endpointAddress, ChainIdPair[] memory _chainIdPairs, uint256 _targetGasReserve, address _owner, address[] memory _managers, bool _addOwnerToManagers ) { _setEndpoint(_endpointAddress); for (uint256 index; index < _chainIdPairs.length; index++) { ChainIdPair memory chainIdPair = _chainIdPairs[index]; _setChainIdPair(chainIdPair.standardId, chainIdPair.layerZeroId); } _setTargetGasReserve(_targetGasReserve); _initRoles(_owner, _managers, _addOwnerToManagers); } /** * @notice Sets the cross-chain endpoint contract reference * @param _endpointAddress The address of the cross-chain endpoint contract */ function setEndpoint(address _endpointAddress) external onlyManager { _setEndpoint(_endpointAddress); } /** * @notice Adds or updates registered chain ID pairs * @param _chainIdPairs The list of chain ID pairs */ function setChainIdPairs(ChainIdPair[] calldata _chainIdPairs) external onlyManager { for (uint256 index; index < _chainIdPairs.length; index++) { ChainIdPair calldata chainIdPair = _chainIdPairs[index]; _setChainIdPair(chainIdPair.standardId, chainIdPair.layerZeroId); } } /** * @notice Removes registered chain ID pairs * @param _standardChainIds The list of standard EVM chain IDs */ function removeChainIdPairs(uint256[] calldata _standardChainIds) external onlyManager { for (uint256 index; index < _standardChainIds.length; index++) { uint256 standardId = _standardChainIds[index]; _removeChainIdPair(standardId); } } /** * @notice Send a cross-chain message * @dev The settings parameter contains an ABI-encoded uint256 value of the target chain gas * @param _targetChainId The message target chain ID * @param _message The message content * @param _settings The gateway-specific settings */ function sendMessage( uint256 _targetChainId, bytes calldata _message, bytes calldata _settings ) external payable onlyClient whenNotPaused { address peerAddress = _checkPeerAddress(_targetChainId); uint16 targetLayerZeroChainId = standardToLayerZeroChainId[_targetChainId]; if (targetLayerZeroChainId == 0) { revert LayerZeroChainIdNotSetError(); } endpoint.send{ value: msg.value }( targetLayerZeroChainId, abi.encodePacked(peerAddress, address(this)), _message, payable(client), // refund address address(0), // future parameter _getAdapterParameters(_settings) ); } /** * @notice Receives cross-chain messages * @dev The function is called by the cross-chain endpoint * @param _srcChainId The message source chain ID * @param _srcAddress The message source address * @param _payload The message content */ function lzReceive( uint16 _srcChainId, bytes memory _srcAddress, uint64 /*_nonce*/, bytes calldata _payload ) external nonReentrant onlyEndpoint { if (paused()) { emit TargetPausedFailure(); return; } if (address(client) == address(0)) { emit TargetClientNotSetFailure(); return; } uint256 sourceStandardChainId = layerZeroToStandardChainId[_srcChainId]; // use assembly to extract the address address fromAddress; assembly { fromAddress := mload(add(_srcAddress, 20)) } bool condition = sourceStandardChainId != 0 && fromAddress != address(0) && fromAddress == peerMap[sourceStandardChainId]; if (!condition) { emit TargetFromAddressFailure(sourceStandardChainId, fromAddress); return; } (bool hasGasReserve, uint256 gasAllowed) = GasReserveHelper.checkGasReserve( targetGasReserve ); if (!hasGasReserve) { emit TargetGasReserveFailure(sourceStandardChainId); return; } try client.handleExecutionPayload{ gas: gasAllowed }(sourceStandardChainId, _payload) {} catch { emit TargetExecutionFailure(); } } /** * @notice Cross-chain message fee estimation * @dev The settings parameter contains an ABI-encoded uint256 value of the target chain gas * @param _targetChainId The ID of the target chain * @param _message The message content * @param _settings The gateway-specific settings */ function messageFee( uint256 _targetChainId, bytes calldata _message, bytes calldata _settings ) external view returns (uint256) { uint16 targetLayerZeroChainId = standardToLayerZeroChainId[_targetChainId]; (uint256 nativeFee, ) = endpoint.estimateFees( targetLayerZeroChainId, address(this), _message, false, _getAdapterParameters(_settings) ); return nativeFee; } function _setEndpoint(address _endpointAddress) private { AddressHelper.requireContract(_endpointAddress); endpoint = ILayerZeroEndpoint(_endpointAddress); emit SetEndpoint(_endpointAddress); } function _setChainIdPair(uint256 _standardId, uint16 _layerZeroId) private { standardToLayerZeroChainId[_standardId] = _layerZeroId; layerZeroToStandardChainId[_layerZeroId] = _standardId; emit SetChainIdPair(_standardId, _layerZeroId); } function _removeChainIdPair(uint256 _standardId) private { uint16 layerZeroId = standardToLayerZeroChainId[_standardId]; delete standardToLayerZeroChainId[_standardId]; delete layerZeroToStandardChainId[layerZeroId]; emit RemoveChainIdPair(_standardId, layerZeroId); } function _getAdapterParameters(bytes calldata _settings) private pure returns (bytes memory) { uint256 targetGas = abi.decode(_settings, (uint256)); return abi.encodePacked(ADAPTER_PARAMETERS_VERSION, targetGas); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; import { ITokenBalance } from './interfaces/ITokenBalance.sol'; import { ManagerRole } from './roles/ManagerRole.sol'; import './helpers/TransferHelper.sol' as TransferHelper; import './Constants.sol' as Constants; /** * @title BalanceManagement * @notice Base contract for the withdrawal of tokens, except for reserved ones */ abstract contract BalanceManagement is ManagerRole { /** * @notice Emitted when the specified token is reserved */ error ReservedTokenError(); /** * @notice Performs the withdrawal of tokens, except for reserved ones * @dev Use the "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" address for the native token * @param _tokenAddress The address of the token * @param _tokenAmount The amount of the token */ function cleanup(address _tokenAddress, uint256 _tokenAmount) external onlyManager { if (isReservedToken(_tokenAddress)) { revert ReservedTokenError(); } if (_tokenAddress == Constants.NATIVE_TOKEN_ADDRESS) { TransferHelper.safeTransferNative(msg.sender, _tokenAmount); } else { TransferHelper.safeTransfer(_tokenAddress, msg.sender, _tokenAmount); } } /** * @notice Getter of the token balance of the current contract * @dev Use the "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" address for the native token * @param _tokenAddress The address of the token * @return The token balance of the current contract */ function tokenBalance(address _tokenAddress) public view returns (uint256) { if (_tokenAddress == Constants.NATIVE_TOKEN_ADDRESS) { return address(this).balance; } else { return ITokenBalance(_tokenAddress).balanceOf(address(this)); } } /** * @notice Getter of the reserved token flag * @dev Override to add reserved token addresses * @param _tokenAddress The address of the token * @return The reserved token flag */ function isReservedToken(address _tokenAddress) public view virtual returns (bool) { // The function returns false by default. // The explicit return statement is omitted to avoid the unused parameter warning. // See https://github.com/ethereum/solidity/issues/5295 } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; /** * @dev The default token decimals value */ uint256 constant DECIMALS_DEFAULT = 18; /** * @dev The maximum uint256 value for swap amount limit settings */ uint256 constant INFINITY = type(uint256).max; /** * @dev The default limit of account list size */ uint256 constant LIST_SIZE_LIMIT_DEFAULT = 100; /** * @dev The limit of swap router list size */ uint256 constant LIST_SIZE_LIMIT_ROUTERS = 200; /** * @dev The factor for percentage settings. Example: 100 is 0.1% */ uint256 constant MILLIPERCENT_FACTOR = 100_000; /** * @dev The de facto standard address to denote the native token */ address constant NATIVE_TOKEN_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; import { ReentrancyGuard } from '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import { IGateway } from './interfaces/IGateway.sol'; import { IGatewayClient } from './interfaces/IGatewayClient.sol'; import { BalanceManagement } from '../BalanceManagement.sol'; import { Pausable } from '../Pausable.sol'; import { TargetGasReserve } from './TargetGasReserve.sol'; import { ZeroAddressError } from '../Errors.sol'; import '../helpers/AddressHelper.sol' as AddressHelper; import '../Constants.sol' as Constants; import '../DataStructures.sol' as DataStructures; /** * @title GatewayBase * @notice Base contract that implements the cross-chain gateway logic */ abstract contract GatewayBase is Pausable, ReentrancyGuard, TargetGasReserve, BalanceManagement, IGateway { /** * @dev Gateway client contract reference */ IGatewayClient public client; /** * @dev Registered peer gateway addresses by the chain ID */ mapping(uint256 /*peerChainId*/ => address /*peerAddress*/) public peerMap; /** * @dev Registered peer gateway chain IDs */ uint256[] public peerChainIdList; /** * @dev Registered peer gateway chain ID indices */ mapping(uint256 /*peerChainId*/ => DataStructures.OptionalValue /*peerChainIdIndex*/) public peerChainIdIndexMap; /** * @notice Emitted when the gateway client contract reference is set * @param clientAddress The gateway client contract address */ event SetClient(address indexed clientAddress); /** * @notice Emitted when a registered peer gateway contract address is added or updated * @param chainId The chain ID of the registered peer gateway * @param peerAddress The address of the registered peer gateway contract */ event SetPeer(uint256 indexed chainId, address indexed peerAddress); /** * @notice Emitted when a registered peer gateway contract address is removed * @param chainId The chain ID of the registered peer gateway */ event RemovePeer(uint256 indexed chainId); /** * @notice Emitted when the target chain gateway is paused */ event TargetPausedFailure(); /** * @notice Emitted when the target chain gateway client contract is not set */ event TargetClientNotSetFailure(); /** * @notice Emitted when the message source address does not match the registered peer gateway on the target chain * @param sourceChainId The ID of the message source chain * @param sourceChainId The address of the message source */ event TargetFromAddressFailure(uint256 indexed sourceChainId, address indexed fromAddress); /** * @notice Emitted when the gas reserve on the target chain does not allow further action processing * @param sourceChainId The ID of the message source chain */ event TargetGasReserveFailure(uint256 indexed sourceChainId); /** * @notice Emitted when the gateway client execution on the target chain fails */ event TargetExecutionFailure(); /** * @notice Emitted when the caller is not the gateway client contract */ error OnlyClientError(); /** * @notice Emitted when the peer config address for the current chain does not match the current contract */ error PeerAddressMismatchError(); /** * @notice Emitted when the peer gateway address for the specified chain is not set */ error PeerNotSetError(); /** * @notice Emitted when the chain ID is not set */ error ZeroChainIdError(); /** * @dev Modifier to check if the caller is the gateway client contract */ modifier onlyClient() { if (msg.sender != address(client)) { revert OnlyClientError(); } _; } /** * @notice Sets the gateway client contract reference * @param _clientAddress The gateway client contract address */ function setClient(address payable _clientAddress) external virtual onlyManager { AddressHelper.requireContract(_clientAddress); client = IGatewayClient(_clientAddress); emit SetClient(_clientAddress); } /** * @notice Adds or updates registered peer gateways * @param _peers Chain IDs and addresses of peer gateways */ function setPeers( DataStructures.KeyToAddressValue[] calldata _peers ) external virtual onlyManager { for (uint256 index; index < _peers.length; index++) { DataStructures.KeyToAddressValue calldata item = _peers[index]; uint256 chainId = item.key; address peerAddress = item.value; // Allow the same configuration on multiple chains if (chainId == block.chainid) { if (peerAddress != address(this)) { revert PeerAddressMismatchError(); } } else { _setPeer(chainId, peerAddress); } } } /** * @notice Removes registered peer gateways * @param _chainIds Peer gateway chain IDs */ function removePeers(uint256[] calldata _chainIds) external virtual onlyManager { for (uint256 index; index < _chainIds.length; index++) { uint256 chainId = _chainIds[index]; // Allow the same configuration on multiple chains if (chainId != block.chainid) { _removePeer(chainId); } } } /** * @notice Getter of the peer gateway count * @return The peer gateway count */ function peerCount() external view virtual returns (uint256) { return peerChainIdList.length; } /** * @notice Getter of the complete list of the peer gateway chain IDs * @return The complete list of the peer gateway chain IDs */ function fullPeerChainIdList() external view virtual returns (uint256[] memory) { return peerChainIdList; } function _setPeer(uint256 _chainId, address _peerAddress) internal virtual { if (_chainId == 0) { revert ZeroChainIdError(); } if (_peerAddress == address(0)) { revert ZeroAddressError(); } DataStructures.combinedMapSet( peerMap, peerChainIdList, peerChainIdIndexMap, _chainId, _peerAddress, Constants.LIST_SIZE_LIMIT_DEFAULT ); emit SetPeer(_chainId, _peerAddress); } function _removePeer(uint256 _chainId) internal virtual { if (_chainId == 0) { revert ZeroChainIdError(); } DataStructures.combinedMapRemove(peerMap, peerChainIdList, peerChainIdIndexMap, _chainId); emit RemovePeer(_chainId); } function _checkPeerAddress(uint256 _chainId) internal virtual returns (address) { address peerAddress = peerMap[_chainId]; if (peerAddress == address(0)) { revert PeerNotSetError(); } return peerAddress; } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; /** * @title IGateway * @notice Cross-chain gateway interface */ interface IGateway { /** * @notice Send a cross-chain message * @param _targetChainId The message target chain ID * @param _message The message content * @param _settings The gateway-specific settings */ function sendMessage( uint256 _targetChainId, bytes calldata _message, bytes calldata _settings ) external payable; /** * @notice Cross-chain message fee estimation * @param _targetChainId The ID of the target chain * @param _message The message content * @param _settings The gateway-specific settings */ function messageFee( uint256 _targetChainId, bytes calldata _message, bytes calldata _settings ) external view returns (uint256); }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; /** * @title IGatewayClient * @notice Cross-chain gateway client interface */ interface IGatewayClient { /** * @notice Cross-chain message handler on the target chain * @dev The function is called by cross-chain gateways * @param _messageSourceChainId The ID of the message source chain * @param _payloadData The content of the cross-chain message */ function handleExecutionPayload( uint256 _messageSourceChainId, bytes calldata _payloadData ) external; /** * @notice The standard "receive" function */ receive() external payable; }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; /** * @title ILayerZeroEndpoint * @notice LayerZero endpoint interface */ interface ILayerZeroEndpoint { /** * @notice Send a cross-chain message * @param _dstChainId The destination chain identifier * @param _destination Remote address concatenated with local address packed into 40 bytes * @param _payload The message content * @param _refundAddress Refund the additional amount to this address * @param _zroPaymentAddress The address of the ZRO token holder who would pay for the transaction * @param _adapterParam Parameters for the adapter service */ function send( uint16 _dstChainId, bytes calldata _destination, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParam ) external payable; /** * @notice Cross-chain message fee estimation * @param _dstChainId The destination chain identifier * @param _userApplication The application address on the source chain * @param _payload The message content * @param _payInZRO If false, the user application pays the protocol fee in the native token * @param _adapterParam Parameters for the adapter service * @return nativeFee The native token fee for the message * @return zroFee The ZRO token fee for the message */ function estimateFees( uint16 _dstChainId, address _userApplication, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParam ) external view returns (uint256 nativeFee, uint256 zroFee); }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; import { ManagerRole } from '../roles/ManagerRole.sol'; /** * @title TargetGasReserve * @notice Base contract that implements the gas reserve logic for the target chain actions */ abstract contract TargetGasReserve is ManagerRole { /** * @dev The target chain gas reserve value */ uint256 public targetGasReserve; /** * @notice Emitted when the target chain gas reserve value is set * @param gasReserve The target chain gas reserve value */ event SetTargetGasReserve(uint256 gasReserve); /** * @notice Sets the target chain gas reserve value * @param _gasReserve The target chain gas reserve value */ function setTargetGasReserve(uint256 _gasReserve) external onlyManager { _setTargetGasReserve(_gasReserve); } function _setTargetGasReserve(uint256 _gasReserve) internal virtual { targetGasReserve = _gasReserve; emit SetTargetGasReserve(_gasReserve); } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; /** * @notice Optional value structure * @dev Is used in mappings to allow zero values * @param isSet Value presence flag * @param value Numeric value */ struct OptionalValue { bool isSet; uint256 value; } /** * @notice Key-to-value structure * @dev Is used as an array parameter item to perform multiple key-value settings * @param key Numeric key * @param value Numeric value */ struct KeyToValue { uint256 key; uint256 value; } /** * @notice Key-to-value structure for address values * @dev Is used as an array parameter item to perform multiple key-value settings with address values * @param key Numeric key * @param value Address value */ struct KeyToAddressValue { uint256 key; address value; } /** * @notice Address-to-flag structure * @dev Is used as an array parameter item to perform multiple settings * @param account Account address * @param flag Flag value */ struct AccountToFlag { address account; bool flag; } /** * @notice Emitted when a list exceeds the size limit */ error ListSizeLimitError(); /** * @notice Sets or updates a value in a combined map (a mapping with a key list and key index mapping) * @param _map The mapping reference * @param _keyList The key list reference * @param _keyIndexMap The key list index mapping reference * @param _key The numeric key * @param _value The address value * @param _sizeLimit The map and list size limit * @return isNewKey True if the key was just added, otherwise false */ function combinedMapSet( mapping(uint256 => address) storage _map, uint256[] storage _keyList, mapping(uint256 => OptionalValue) storage _keyIndexMap, uint256 _key, address _value, uint256 _sizeLimit ) returns (bool isNewKey) { isNewKey = !_keyIndexMap[_key].isSet; if (isNewKey) { uniqueListAdd(_keyList, _keyIndexMap, _key, _sizeLimit); } _map[_key] = _value; } /** * @notice Removes a value from a combined map (a mapping with a key list and key index mapping) * @param _map The mapping reference * @param _keyList The key list reference * @param _keyIndexMap The key list index mapping reference * @param _key The numeric key * @return isChanged True if the combined map was changed, otherwise false */ function combinedMapRemove( mapping(uint256 => address) storage _map, uint256[] storage _keyList, mapping(uint256 => OptionalValue) storage _keyIndexMap, uint256 _key ) returns (bool isChanged) { isChanged = _keyIndexMap[_key].isSet; if (isChanged) { delete _map[_key]; uniqueListRemove(_keyList, _keyIndexMap, _key); } } /** * @notice Adds a value to a unique value list (a list with value index mapping) * @param _list The list reference * @param _indexMap The value index mapping reference * @param _value The numeric value * @param _sizeLimit The list size limit * @return isChanged True if the list was changed, otherwise false */ function uniqueListAdd( uint256[] storage _list, mapping(uint256 => OptionalValue) storage _indexMap, uint256 _value, uint256 _sizeLimit ) returns (bool isChanged) { isChanged = !_indexMap[_value].isSet; if (isChanged) { if (_list.length >= _sizeLimit) { revert ListSizeLimitError(); } _indexMap[_value] = OptionalValue(true, _list.length); _list.push(_value); } } /** * @notice Removes a value from a unique value list (a list with value index mapping) * @param _list The list reference * @param _indexMap The value index mapping reference * @param _value The numeric value * @return isChanged True if the list was changed, otherwise false */ function uniqueListRemove( uint256[] storage _list, mapping(uint256 => OptionalValue) storage _indexMap, uint256 _value ) returns (bool isChanged) { OptionalValue storage indexItem = _indexMap[_value]; isChanged = indexItem.isSet; if (isChanged) { uint256 itemIndex = indexItem.value; uint256 lastIndex = _list.length - 1; if (itemIndex != lastIndex) { uint256 lastValue = _list[lastIndex]; _list[itemIndex] = lastValue; _indexMap[lastValue].value = itemIndex; } _list.pop(); delete _indexMap[_value]; } } /** * @notice Adds a value to a unique address value list (a list with value index mapping) * @param _list The list reference * @param _indexMap The value index mapping reference * @param _value The address value * @param _sizeLimit The list size limit * @return isChanged True if the list was changed, otherwise false */ function uniqueAddressListAdd( address[] storage _list, mapping(address => OptionalValue) storage _indexMap, address _value, uint256 _sizeLimit ) returns (bool isChanged) { isChanged = !_indexMap[_value].isSet; if (isChanged) { if (_list.length >= _sizeLimit) { revert ListSizeLimitError(); } _indexMap[_value] = OptionalValue(true, _list.length); _list.push(_value); } } /** * @notice Removes a value from a unique address value list (a list with value index mapping) * @param _list The list reference * @param _indexMap The value index mapping reference * @param _value The address value * @return isChanged True if the list was changed, otherwise false */ function uniqueAddressListRemove( address[] storage _list, mapping(address => OptionalValue) storage _indexMap, address _value ) returns (bool isChanged) { OptionalValue storage indexItem = _indexMap[_value]; isChanged = indexItem.isSet; if (isChanged) { uint256 itemIndex = indexItem.value; uint256 lastIndex = _list.length - 1; if (itemIndex != lastIndex) { address lastValue = _list[lastIndex]; _list[itemIndex] = lastValue; _indexMap[lastValue].value = itemIndex; } _list.pop(); delete _indexMap[_value]; } } /** * @notice Adds or removes a value to/from a unique address value list (a list with value index mapping) * @dev The list size limit is checked on items adding only * @param _list The list reference * @param _indexMap The value index mapping reference * @param _value The address value * @param _flag The value inclusion flag * @param _sizeLimit The list size limit * @return isChanged True if the list was changed, otherwise false */ function uniqueAddressListUpdate( address[] storage _list, mapping(address => OptionalValue) storage _indexMap, address _value, bool _flag, uint256 _sizeLimit ) returns (bool isChanged) { return _flag ? uniqueAddressListAdd(_list, _indexMap, _value, _sizeLimit) : uniqueAddressListRemove(_list, _indexMap, _value); }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; /** * @notice Emitted when an attempt to burn a token fails */ error TokenBurnError(); /** * @notice Emitted when an attempt to mint a token fails */ error TokenMintError(); /** * @notice Emitted when a zero address is specified where it is not allowed */ error ZeroAddressError();
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; /** * @notice Emitted when the account is not a contract * @param account The account address */ error NonContractAddressError(address account); /** * @notice Function to check if the account is a contract * @return The account contract status flag */ function isContract(address _account) view returns (bool) { return _account.code.length > 0; } /** * @notice Function to require an account to be a contract */ function requireContract(address _account) view { if (!isContract(_account)) { revert NonContractAddressError(_account); } } /** * @notice Function to require an account to be a contract or a zero address */ function requireContractOrZeroAddress(address _account) view { if (_account != address(0)) { requireContract(_account); } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; /** * @notice Function to check if the available gas matches the specified gas reserve value * @param _gasReserve Gas reserve value * @return hasGasReserve Flag of gas reserve availability * @return gasAllowed The remaining gas quantity taking the reserve into account */ function checkGasReserve( uint256 _gasReserve ) view returns (bool hasGasReserve, uint256 gasAllowed) { uint256 gasLeft = gasleft(); hasGasReserve = gasLeft >= _gasReserve; gasAllowed = hasGasReserve ? gasLeft - _gasReserve : 0; }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; /** * @notice Emitted when an approval action fails */ error SafeApproveError(); /** * @notice Emitted when a transfer action fails */ error SafeTransferError(); /** * @notice Emitted when a transferFrom action fails */ error SafeTransferFromError(); /** * @notice Emitted when a transfer of the native token fails */ error SafeTransferNativeError(); /** * @notice Safely approve the token to the account * @param _token The token address * @param _to The token approval recipient address * @param _value The token approval amount */ function safeApprove(address _token, address _to, uint256 _value) { // 0x095ea7b3 is the selector for "approve(address,uint256)" (bool success, bytes memory data) = _token.call( abi.encodeWithSelector(0x095ea7b3, _to, _value) ); bool condition = success && (data.length == 0 || abi.decode(data, (bool))); if (!condition) { revert SafeApproveError(); } } /** * @notice Safely transfer the token to the account * @param _token The token address * @param _to The token transfer recipient address * @param _value The token transfer amount */ function safeTransfer(address _token, address _to, uint256 _value) { // 0xa9059cbb is the selector for "transfer(address,uint256)" (bool success, bytes memory data) = _token.call( abi.encodeWithSelector(0xa9059cbb, _to, _value) ); bool condition = success && (data.length == 0 || abi.decode(data, (bool))); if (!condition) { revert SafeTransferError(); } } /** * @notice Safely transfer the token between the accounts * @param _token The token address * @param _from The token transfer source address * @param _to The token transfer recipient address * @param _value The token transfer amount */ function safeTransferFrom(address _token, address _from, address _to, uint256 _value) { // 0x23b872dd is the selector for "transferFrom(address,address,uint256)" (bool success, bytes memory data) = _token.call( abi.encodeWithSelector(0x23b872dd, _from, _to, _value) ); bool condition = success && (data.length == 0 || abi.decode(data, (bool))); if (!condition) { revert SafeTransferFromError(); } } /** * @notice Safely transfer the native token to the account * @param _to The native token transfer recipient address * @param _value The native token transfer amount */ function safeTransferNative(address _to, uint256 _value) { (bool success, ) = _to.call{ value: _value }(new bytes(0)); if (!success) { revert SafeTransferNativeError(); } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; /** * @title ITokenBalance * @notice Token balance interface */ interface ITokenBalance { /** * @notice Getter of the token balance by the account * @param _account The account address * @return Token balance */ function balanceOf(address _account) external view returns (uint256); }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; import { Pausable as PausableBase } from '@openzeppelin/contracts/security/Pausable.sol'; import { ManagerRole } from './roles/ManagerRole.sol'; /** * @title Pausable * @notice Base contract that implements the emergency pause mechanism */ abstract contract Pausable is PausableBase, ManagerRole { /** * @notice Enter pause state */ function pause() external onlyManager whenNotPaused { _pause(); } /** * @notice Exit pause state */ function unpause() external onlyManager whenPaused { _unpause(); } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; import { Ownable } from '@openzeppelin/contracts/access/Ownable.sol'; import { RoleBearers } from './RoleBearers.sol'; /** * @title ManagerRole * @notice Base contract that implements the Manager role. * The manager role is a high-permission role for core team members only. * Managers can set vaults and routers addresses, fees, cross-chain protocols, * and other parameters for Interchain (cross-chain) swaps and single-network swaps. * Please note, the manager role is unique for every contract, * hence different addresses may be assigned as managers for different contracts. */ abstract contract ManagerRole is Ownable, RoleBearers { bytes32 private constant ROLE_KEY = keccak256('Manager'); /** * @notice Emitted when the Manager role status for the account is updated * @param account The account address * @param value The Manager role status flag */ event SetManager(address indexed account, bool indexed value); /** * @notice Emitted when the Manager role status for the account is renounced * @param account The account address */ event RenounceManagerRole(address indexed account); /** * @notice Emitted when the caller is not a Manager role bearer */ error OnlyManagerError(); /** * @dev Modifier to check if the caller is a Manager role bearer */ modifier onlyManager() { if (!isManager(msg.sender)) { revert OnlyManagerError(); } _; } /** * @notice Updates the Manager role status for the account * @param _account The account address * @param _value The Manager role status flag */ function setManager(address _account, bool _value) public onlyOwner { _setRoleBearer(ROLE_KEY, _account, _value); emit SetManager(_account, _value); } /** * @notice Renounces the Manager role */ function renounceManagerRole() external onlyManager { _setRoleBearer(ROLE_KEY, msg.sender, false); emit RenounceManagerRole(msg.sender); } /** * @notice Getter of the Manager role bearer count * @return The Manager role bearer count */ function managerCount() external view returns (uint256) { return _roleBearerCount(ROLE_KEY); } /** * @notice Getter of the complete list of the Manager role bearers * @return The complete list of the Manager role bearers */ function fullManagerList() external view returns (address[] memory) { return _fullRoleBearerList(ROLE_KEY); } /** * @notice Getter of the Manager role bearer status * @param _account The account address */ function isManager(address _account) public view returns (bool) { return _isRoleBearer(ROLE_KEY, _account); } function _initRoles( address _owner, address[] memory _managers, bool _addOwnerToManagers ) internal { address ownerAddress = _owner == address(0) ? msg.sender : _owner; for (uint256 index; index < _managers.length; index++) { setManager(_managers[index], true); } if (_addOwnerToManagers && !isManager(ownerAddress)) { setManager(ownerAddress, true); } if (ownerAddress != msg.sender) { transferOwnership(ownerAddress); } } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; import '../Constants.sol' as Constants; import '../DataStructures.sol' as DataStructures; /** * @title RoleBearers * @notice Base contract that implements role-based access control * @dev A custom implementation providing full role bearer lists */ abstract contract RoleBearers { mapping(bytes32 /*roleKey*/ => address[] /*roleBearers*/) private roleBearerTable; mapping(bytes32 /*roleKey*/ => mapping(address /*account*/ => DataStructures.OptionalValue /*status*/)) private roleBearerIndexTable; function _setRoleBearer(bytes32 _roleKey, address _account, bool _value) internal { DataStructures.uniqueAddressListUpdate( roleBearerTable[_roleKey], roleBearerIndexTable[_roleKey], _account, _value, Constants.LIST_SIZE_LIMIT_DEFAULT ); } function _isRoleBearer(bytes32 _roleKey, address _account) internal view returns (bool) { return roleBearerIndexTable[_roleKey][_account].isSet; } function _roleBearerCount(bytes32 _roleKey) internal view returns (uint256) { return roleBearerTable[_roleKey].length; } function _fullRoleBearerList(bytes32 _roleKey) internal view returns (address[] memory) { return roleBearerTable[_roleKey]; } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; /** * @title SystemVersionId * @notice Base contract providing the system version identifier */ abstract contract SystemVersionId { /** * @dev The system version identifier */ uint256 public constant SYSTEM_VERSION_ID = uint256(keccak256('2023-03')); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_endpointAddress","type":"address"},{"components":[{"internalType":"uint256","name":"standardId","type":"uint256"},{"internalType":"uint16","name":"layerZeroId","type":"uint16"}],"internalType":"struct LayerZeroGateway.ChainIdPair[]","name":"_chainIdPairs","type":"tuple[]"},{"internalType":"uint256","name":"_targetGasReserve","type":"uint256"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address[]","name":"_managers","type":"address[]"},{"internalType":"bool","name":"_addOwnerToManagers","type":"bool"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"LayerZeroChainIdNotSetError","type":"error"},{"inputs":[],"name":"ListSizeLimitError","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"NonContractAddressError","type":"error"},{"inputs":[],"name":"OnlyClientError","type":"error"},{"inputs":[],"name":"OnlyEndpointError","type":"error"},{"inputs":[],"name":"OnlyManagerError","type":"error"},{"inputs":[],"name":"PeerAddressMismatchError","type":"error"},{"inputs":[],"name":"PeerNotSetError","type":"error"},{"inputs":[],"name":"ReservedTokenError","type":"error"},{"inputs":[],"name":"SafeTransferError","type":"error"},{"inputs":[],"name":"SafeTransferNativeError","type":"error"},{"inputs":[],"name":"ZeroAddressError","type":"error"},{"inputs":[],"name":"ZeroChainIdError","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"standardId","type":"uint256"},{"indexed":true,"internalType":"uint16","name":"layerZeroId","type":"uint16"}],"name":"RemoveChainIdPair","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"RemovePeer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"RenounceManagerRole","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"standardId","type":"uint256"},{"indexed":true,"internalType":"uint16","name":"layerZeroId","type":"uint16"}],"name":"SetChainIdPair","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"clientAddress","type":"address"}],"name":"SetClient","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"endpointAddress","type":"address"}],"name":"SetEndpoint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"bool","name":"value","type":"bool"}],"name":"SetManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":true,"internalType":"address","name":"peerAddress","type":"address"}],"name":"SetPeer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"gasReserve","type":"uint256"}],"name":"SetTargetGasReserve","type":"event"},{"anonymous":false,"inputs":[],"name":"TargetClientNotSetFailure","type":"event"},{"anonymous":false,"inputs":[],"name":"TargetExecutionFailure","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"sourceChainId","type":"uint256"},{"indexed":true,"internalType":"address","name":"fromAddress","type":"address"}],"name":"TargetFromAddressFailure","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"sourceChainId","type":"uint256"}],"name":"TargetGasReserveFailure","type":"event"},{"anonymous":false,"inputs":[],"name":"TargetPausedFailure","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"SYSTEM_VERSION_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"uint256","name":"_tokenAmount","type":"uint256"}],"name":"cleanup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"client","outputs":[{"internalType":"contract IGatewayClient","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endpoint","outputs":[{"internalType":"contract ILayerZeroEndpoint","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fullManagerList","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fullPeerChainIdList","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"isManager","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"}],"name":"isReservedToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"layerZeroToStandardChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"lzReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"managerCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_targetChainId","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"bytes","name":"_settings","type":"bytes"}],"name":"messageFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"peerChainIdIndexMap","outputs":[{"internalType":"bool","name":"isSet","type":"bool"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"peerChainIdList","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"peerCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"peerMap","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_standardChainIds","type":"uint256[]"}],"name":"removeChainIdPairs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_chainIds","type":"uint256[]"}],"name":"removePeers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceManagerRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_targetChainId","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"bytes","name":"_settings","type":"bytes"}],"name":"sendMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"standardId","type":"uint256"},{"internalType":"uint16","name":"layerZeroId","type":"uint16"}],"internalType":"struct LayerZeroGateway.ChainIdPair[]","name":"_chainIdPairs","type":"tuple[]"}],"name":"setChainIdPairs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_clientAddress","type":"address"}],"name":"setClient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_endpointAddress","type":"address"}],"name":"setEndpoint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"bool","name":"_value","type":"bool"}],"name":"setManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"key","type":"uint256"},{"internalType":"address","name":"value","type":"address"}],"internalType":"struct KeyToAddressValue[]","name":"_peers","type":"tuple[]"}],"name":"setPeers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gasReserve","type":"uint256"}],"name":"setTargetGasReserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"standardToLayerZeroChainId","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"targetGasReserve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"}],"name":"tokenBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162002dff38038062002dff833981016040819052620000349162000832565b6000805460ff191690556200004933620000dc565b6001600355620000598662000135565b60005b8551811015620000b75760008682815181106200007d576200007d62000977565b60200260200101519050620000a1816000015182602001516200018a60201b60201c565b5080620000ae81620009a3565b9150506200005c565b50620000c384620001e8565b620000d083838362000223565b505050505050620009eb565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6200014081620002dd565b600980546001600160a01b0319166001600160a01b0383169081179091556040517fc8e81a4efc849969069ec6aae575cf7a6bc5f9d3abac59f4ed190a6f7e05fc6f90600090a250565b6000828152600a60209081526040808320805461ffff191661ffff8616908117909155808452600b90925280832085905551909184917fe8b662b513ff40c8ca90e64deacc96541614246ae47724df4d670d6b3ba2e5d79190a35050565b60048190556040518181527fec9e8f9ec7dd2c5310e5b87c7bedeb6ba1c5943cb4d2da1ee80335508a5bc5a49060200160405180910390a150565b60006001600160a01b038416156200023c57836200023e565b335b905060005b835181101562000291576200027c84828151811062000266576200026662000977565b602002602001015160016200031960201b60201c565b806200028881620009a3565b91505062000243565b50818015620002a85750620002a6816200038c565b155b15620002bb57620002bb81600162000319565b6001600160a01b0381163314620002d757620002d781620003ce565b50505050565b6001600160a01b0381163b6200031657604051638c50d7cd60e01b81526001600160a01b03821660048201526024015b60405180910390fd5b50565b620003236200044a565b620003507f6d439300980e333f0256d64be2c9f67e86f4493ce25f82498d6db7f4be3d9e6f8383620004ae565b604051811515906001600160a01b038416907fbe9474bb3e78da7e315cdffa5cfa30b767fcc95bbf44a6197da60228eea1028690600090a35050565b6001600160a01b03811660009081527f260b29b219d450563ddb0e5ca806bdadb1e125f7e8c506de0443797dd7122728602052604081205460ff165b92915050565b620003d86200044a565b6001600160a01b0381166200043f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016200030d565b6200031681620000dc565b6000546001600160a01b03610100909104163314620004ac5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016200030d565b565b60008381526001602090815260408083206002909252909120620002d7919084846064600082620004ec57620004e686868662000504565b620004fa565b620004fa8686868562000639565b9695505050505050565b6001600160a01b0381166000908152602083905260409020805460ff16908115620006315760018082015486549091600091620005429190620009bf565b9050808214620005d657600087828154811062000563576200056362000977565b9060005260206000200160009054906101000a90046001600160a01b031690508088848154811062000599576200059962000977565b600091825260208083209190910180546001600160a01b0319166001600160a01b0394851617905592909116815290879052604090206001018290555b86805480620005e957620005e9620009d5565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038716825287905260408120805460ff191681556001015550505b509392505050565b6001600160a01b03821660009081526020849052604090205460ff16158015620006e657845482116200067f5760405163b1655e3360e01b815260040160405180910390fd5b6040805180820182526001808252875460208084019182526001600160a01b03881660008181528a83529586209451855460ff1916901515178555915193830193909355885491820189558884529190922090910180546001600160a01b03191690911790555b949350505050565b80516001600160a01b03811681146200070657600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156200074657620007466200070b565b60405290565b604051601f8201601f191681016001600160401b03811182821017156200077757620007776200070b565b604052919050565b60006001600160401b038211156200079b576200079b6200070b565b5060051b60200190565b600082601f830112620007b757600080fd5b81516020620007d0620007ca836200077f565b6200074c565b82815260059290921b84018101918181019086841115620007f057600080fd5b8286015b8481101562000816576200080881620006ee565b8352918301918301620007f4565b509695505050505050565b805180151581146200070657600080fd5b60008060008060008060c087890312156200084c57600080fd5b6200085787620006ee565b602088810151919750906001600160401b03808211156200087757600080fd5b818a0191508a601f8301126200088c57600080fd5b81516200089d620007ca826200077f565b81815260069190911b8301840190848101908d831115620008bd57600080fd5b938501935b8285101562000918576040858f031215620008dd5760008081fd5b620008e762000721565b855181528686015161ffff81168114620009015760008081fd5b8188015282526040949094019390850190620008c2565b809a5050505060408a015196506200093360608b01620006ee565b955060808a01519250808311156200094a57600080fd5b50506200095a89828a01620007a5565b9250506200096b60a0880162000821565b90509295509295509295565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201620009b857620009b86200098d565b5060010190565b81810381811115620003c857620003c86200098d565b634e487b7160e01b600052603160045260246000fd5b61240480620009fb6000396000f3fe6080604052600436106102035760003560e01c8063786ea0ce11610118578063c84e329e116100a0578063e81ea5951161006f578063e81ea5951461066c578063eca7faab14610681578063eedc966a146106ae578063f2fde38b146106ce578063f3ae2415146106ee57600080fd5b8063c84e329e146105d4578063dbbb41551461060a578063dcd44d711461062a578063e3725b151461064a57600080fd5b80638da5cb5b116100e75780638da5cb5b1461053a578063a5e90eee1461055d578063aa4fc83d1461057d578063bc7881691461059d578063c2c518e1146105bf57600080fd5b8063786ea0ce14610494578063832b5491146104e55780638456cb59146105055780638526690a1461051a57600080fd5b806336c3aaba1161019b5780635c975abb1161016a5780635c975abb146104145780635e280f111461042c578063630eae081461044c5780636ea9cec91461046c578063715018a61461047f57600080fd5b806336c3aaba146103745780633f4ba83a146103b8578063440d7248146103cd5780635a9fab50146103fe57600080fd5b80631fd83e67116101d75780631fd83e67146102f45780632f204e81146103145780632fac88c01461033457806330eb12781461035457600080fd5b80621d356714610208578063093f0e271461022a578063103b739714610271578063109e94cf146102bc575b600080fd5b34801561021457600080fd5b50610228610223366004611db4565b61070e565b005b34801561023657600080fd5b5061025e7f8e1b4d9fa83837c77e7143aff1b7a1a921a3382984267c0eeb8d18dfd3898fca81565b6040519081526020015b60405180910390f35b34801561027d57600080fd5b506000805160206123af83398151915260005260016020527f3c2285c553468ca8f30447b24bb463c127f1b840e23a0cafa23caa79d906669a5461025e565b3480156102c857600080fd5b506005546102dc906001600160a01b031681565b6040516001600160a01b039091168152602001610268565b34801561030057600080fd5b5061022861030f366004611ef7565b61094c565b34801561032057600080fd5b5061022861032f366004611f39565b6109d0565b34801561034057600080fd5b5061022861034f366004611ef7565b610a3a565b34801561036057600080fd5b5061022861036f366004611fc3565b610af6565b34801561038057600080fd5b506103a561038f366004611fef565b600a6020526000908152604090205461ffff1681565b60405161ffff9091168152602001610268565b3480156103c457600080fd5b50610228610b5a565b3480156103d957600080fd5b506103ee6103e8366004612008565b50600090565b6040519015158152602001610268565b34801561040a57600080fd5b5061025e60045481565b34801561042057600080fd5b5060005460ff166103ee565b34801561043857600080fd5b506009546102dc906001600160a01b031681565b34801561045857600080fd5b50610228610467366004611fef565b610b92565b61022861047a36600461202c565b610bc4565b34801561048b57600080fd5b50610228610d06565b3480156104a057600080fd5b506104ce6104af366004611fef565b6008602052600090815260409020805460019091015460ff9091169082565b604080519215158352602083019190915201610268565b3480156104f157600080fd5b5061025e610500366004611fef565b610d18565b34801561051157600080fd5b50610228610d39565b34801561052657600080fd5b50610228610535366004612008565b610d6f565b34801561054657600080fd5b5060005461010090046001600160a01b03166102dc565b34801561056957600080fd5b50610228610578366004612096565b610de8565b34801561058957600080fd5b5061025e61059836600461202c565b610e45565b3480156105a957600080fd5b506105b2610eeb565b60405161026891906120cf565b3480156105cb57600080fd5b50610228610f43565b3480156105e057600080fd5b506102dc6105ef366004611fef565b6006602052600090815260409020546001600160a01b031681565b34801561061657600080fd5b50610228610625366004612008565b610fb0565b34801561063657600080fd5b50610228610645366004611f39565b610fdf565b34801561065657600080fd5b5061065f611050565b6040516102689190612113565b34801561067857600080fd5b5060075461025e565b34801561068d57600080fd5b5061025e61069c366004612154565b600b6020526000908152604090205481565b3480156106ba57600080fd5b5061025e6106c9366004612008565b611069565b3480156106da57600080fd5b506102286106e9366004612008565b61110a565b3480156106fa57600080fd5b506103ee610709366004612008565b611185565b6107166111c5565b6009546001600160a01b031633146107415760405163d9b0b35560e01b815260040160405180910390fd5b60005460ff161561077a576040517febfa14817ead60a20b8a0fc2f6e70025b7414b60eeb0f786c0446e7e543db64b90600090a1610936565b6005546001600160a01b03166107b8576040517fe01ba9b0feb354b2205901cb697991b39ccdfdb7967cd9d28eed6d2b9ab0903490600090a1610936565b61ffff85166000908152600b60205260408120546014860151909182158015906107ea57506001600160a01b03821615155b801561080f57506000838152600660205260409020546001600160a01b038381169116145b905080610854576040516001600160a01b0383169084907fac80426faf130d4151e14cb1e038276f673086f5fc3dd98833115986676840cf90600090a3505050610936565b60008061086260045461121e565b91509150816108a05760405185907f4222f6e215aa16476c9027f9b1025ddb1b27a125d45d40a9e87a76caa5133db890600090a25050505050610936565b60055460405163032ad3cf60e51b81526001600160a01b039091169063655a79e09083906108d69089908c908c90600401612198565b600060405180830381600088803b1580156108f057600080fd5b5087f193505050508015610902575060015b610930576040517f3004b2d8ec75a545f6abc58879cd00cc4fb6c951131a7cf023a21fc01020e78690600090a15b50505050505b6109406001600355565b5050505050565b905090565b61095533611185565b61097257604051637c3ea23f60e01b815260040160405180910390fd5b60005b818110156109cb5736838383818110610990576109906121bb565b90506040020190506109b881600001358260200160208101906109b39190612154565b61124a565b50806109c3816121e7565b915050610975565b505050565b6109d933611185565b6109f657604051637c3ea23f60e01b815260040160405180910390fd5b60005b818110156109cb576000838383818110610a1557610a156121bb565b905060200201359050610a27816112a8565b5080610a32816121e7565b9150506109f9565b610a4333611185565b610a6057604051637c3ea23f60e01b815260040160405180910390fd5b60005b818110156109cb5736838383818110610a7e57610a7e6121bb565b604090810292909201925050813590600090610a9f90840160208501612008565b9050468203610ad6576001600160a01b0381163014610ad157604051631131ed9760e31b815260040160405180910390fd5b610ae0565b610ae08282611304565b5050508080610aee906121e7565b915050610a63565b610aff33611185565b610b1c57604051637c3ea23f60e01b815260040160405180910390fd5b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b03831601610b4f57610b4b3382611399565b5050565b610b4b823383611427565b610b6333611185565b610b8057604051637c3ea23f60e01b815260040160405180910390fd5b610b88611519565b610b90611562565b565b610b9b33611185565b610bb857604051637c3ea23f60e01b815260040160405180910390fd5b610bc1816115b4565b50565b6005546001600160a01b03163314610bef5760405163424029e160e01b815260040160405180910390fd5b610bf76115ef565b6000610c0286611635565b6000878152600a602052604081205491925061ffff90911690819003610c3b5760405163d5a6cc2d60e01b815260040160405180910390fd5b6009546040516bffffffffffffffffffffffff19606085811b8216602084015230901b1660348201526001600160a01b039091169063c5803100903490849060480160408051601f198184030181529190526005548b908b906001600160a01b03166000610ca98d8d61166b565b6040518963ffffffff1660e01b8152600401610ccb9796959493929190612250565b6000604051808303818588803b158015610ce457600080fd5b505af1158015610cf8573d6000803e3d6000fd5b505050505050505050505050565b610d0e6116a9565b610b906000611709565b60078181548110610d2857600080fd5b600091825260209091200154905081565b610d4233611185565b610d5f57604051637c3ea23f60e01b815260040160405180910390fd5b610d676115ef565b610b90611762565b610d7833611185565b610d9557604051637c3ea23f60e01b815260040160405180910390fd5b610d9e8161179f565b600580546001600160a01b0319166001600160a01b0383169081179091556040517f764166c557b419ae9f4bca81c505141ce7017b4bdb4c610ad113a50ec7e578a990600090a250565b610df06116a9565b610e096000805160206123af83398151915283836117d2565b604051811515906001600160a01b038416907fbe9474bb3e78da7e315cdffa5cfa30b767fcc95bbf44a6197da60228eea1028690600090a35050565b6000858152600a602052604081205460095461ffff9091169082906001600160a01b03166340a7bb1083308a8a86610e7d8c8c61166b565b6040518763ffffffff1660e01b8152600401610e9e969594939291906122b9565b6040805180830381865afa158015610eba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ede919061230f565b5098975050505050505050565b60606007805480602002602001604051908101604052809291908181526020018280548015610f3957602002820191906000526020600020905b815481526020019060010190808311610f25575b5050505050905090565b610f4c33611185565b610f6957604051637c3ea23f60e01b815260040160405180910390fd5b610f836000805160206123af8339815191523360006117d2565b60405133907f6cc2c67081f55c2fffb7c008fa995fbbf890f48c7c16fba93d8220f00dc84cc590600090a2565b610fb933611185565b610fd657604051637c3ea23f60e01b815260040160405180910390fd5b610bc1816117ff565b610fe833611185565b61100557604051637c3ea23f60e01b815260040160405180910390fd5b60005b818110156109cb576000838383818110611024576110246121bb565b90506020020135905046811461103d5761103d81611852565b5080611048816121e7565b915050611008565b60606109476000805160206123af8339815191526118b1565b600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b03831601611097575047919050565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa1580156110db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ff9190612333565b92915050565b919050565b6111126116a9565b6001600160a01b03811661117c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b610bc181611709565b6001600160a01b03811660009081527f260b29b219d450563ddb0e5ca806bdadb1e125f7e8c506de0443797dd7122728602052604081205460ff166110ff565b6002600354036112175760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611173565b6002600355565b60008060005a905083811015925082611238576000611242565b611242848261234c565b915050915091565b6000828152600a60209081526040808320805461ffff191661ffff8616908117909155808452600b90925280832085905551909184917fe8b662b513ff40c8ca90e64deacc96541614246ae47724df4d670d6b3ba2e5d79190a35050565b6000818152600a60209081526040808320805461ffff19811690915561ffff16808452600b909252808320839055519091829184917f487d90e6c0c486fcf4e9b12707215f206056b5371b667b782a65b559a001122b91a35050565b81600003611325576040516381e7376360e01b815260040160405180910390fd5b6001600160a01b03811661134c57604051633efa09af60e01b815260040160405180910390fd5b61135e6006600760088585606461191d565b506040516001600160a01b0382169083907f357d1ebd1dc0d53cc15161206b9a39c9ca30667bd997cf921eb00e4c78a454f590600090a35050565b604080516000808252602082019092526001600160a01b0384169083906040516113c3919061235f565b60006040518083038185875af1925050503d8060008114611400576040519150601f19603f3d011682016040523d82523d6000602084013e611405565b606091505b50509050806109cb57604051632e05b05360e21b815260040160405180910390fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1790529151600092839290871691611483919061235f565b6000604051808303816000865af19150503d80600081146114c0576040519150601f19603f3d011682016040523d82523d6000602084013e6114c5565b606091505b509150915060008280156114f15750815115806114f15750818060200190518101906114f1919061237b565b90508061151157604051632fdb1b7f60e11b815260040160405180910390fd5b505050505050565b60005460ff16610b905760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401611173565b61156a611519565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60048190556040518181527fec9e8f9ec7dd2c5310e5b87c7bedeb6ba1c5943cb4d2da1ee80335508a5bc5a49060200160405180910390a150565b60005460ff1615610b905760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401611173565b6000818152600660205260408120546001600160a01b0316806110ff57604051631a81634560e01b815260040160405180910390fd5b6060600061167b83850185611fef565b60408051600160f01b6020820152602280820193909352815180820390930183526042019052949350505050565b6000546001600160a01b03610100909104163314610b905760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611173565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b61176a6115ef565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586115973390565b6001600160a01b0381163b610bc157604051638c50d7cd60e01b81526001600160a01b0382166004820152602401611173565b600083815260016020908152604080832060029092529091206117f9919084846064611979565b50505050565b6118088161179f565b600980546001600160a01b0319166001600160a01b0383169081179091556040517fc8e81a4efc849969069ec6aae575cf7a6bc5f9d3abac59f4ed190a6f7e05fc6f90600090a250565b80600003611873576040516381e7376360e01b815260040160405180910390fd5b611882600660076008846119a6565b5060405181907feb39225b53386d0eb02af9cf2c6b6a0c345a97654f1e67fb21b0b5aaac81ec4a90600090a250565b60008181526001602090815260409182902080548351818402810184019094528084526060939283018282801561191157602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116118f3575b50505050509050919050565b60008381526020859052604090205460ff1615801561194457611942868686856119ef565b505b600093845260209690965250604090912080546001600160a01b0319166001600160a01b039092169190911790555090919050565b6000826119905761198b868686611a78565b61199c565b61199c86868685611ba0565b9695505050505050565b60008181526020839052604090205460ff1680156119e757600082815260208690526040902080546001600160a01b03191690556119e5848484611c50565b505b949350505050565b60008281526020849052604090205460ff161580156119e75784548211611a295760405163b1655e3360e01b815260040160405180910390fd5b60408051808201825260018082528754602080840191825260008881529881529388209251835460ff191690151517835551918101919091558654908101875595855290932090930155919050565b6001600160a01b0381166000908152602083905260409020805460ff16908115611b985760018082015486549091600091611ab3919061234c565b9050808214611b40576000878281548110611ad057611ad06121bb565b9060005260206000200160009054906101000a90046001600160a01b0316905080888481548110611b0357611b036121bb565b600091825260208083209190910180546001600160a01b0319166001600160a01b0394851617905592909116815290879052604090206001018290555b86805480611b5057611b50612398565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038716825287905260408120805460ff191681556001015550505b509392505050565b6001600160a01b03821660009081526020849052604090205460ff161580156119e75784548211611be45760405163b1655e3360e01b815260040160405180910390fd5b6040805180820182526001808252875460208084019182526001600160a01b039790971660008181529888529388209251835460ff19169015151783555191810191909155865490810187559585529290932090930180546001600160a01b0319169091179055919050565b6000818152602083905260409020805460ff16908115611b985760018082015486549091600091611c81919061234c565b9050808214611ce0576000878281548110611c9e57611c9e6121bb565b9060005260206000200154905080888481548110611cbe57611cbe6121bb565b6000918252602080832090910192909255918252879052604090206001018290555b86805480611cf057611cf0612398565b60008281526020808220830160001990810183905590920190925586825287905260408120805460ff19168155600101555050509392505050565b803561ffff8116811461110557600080fd5b634e487b7160e01b600052604160045260246000fd5b803567ffffffffffffffff8116811461110557600080fd5b60008083601f840112611d7d57600080fd5b50813567ffffffffffffffff811115611d9557600080fd5b602083019150836020828501011115611dad57600080fd5b9250929050565b600080600080600060808688031215611dcc57600080fd5b611dd586611d2b565b9450602086013567ffffffffffffffff80821115611df257600080fd5b818801915088601f830112611e0657600080fd5b813581811115611e1857611e18611d3d565b604051601f8201601f19908116603f01168101908382118183101715611e4057611e40611d3d565b816040528281528b6020848701011115611e5957600080fd5b82602086016020830137600060208483010152809850505050611e7e60408901611d53565b94506060880135915080821115611e9457600080fd5b50611ea188828901611d6b565b969995985093965092949392505050565b60008083601f840112611ec457600080fd5b50813567ffffffffffffffff811115611edc57600080fd5b6020830191508360208260061b8501011115611dad57600080fd5b60008060208385031215611f0a57600080fd5b823567ffffffffffffffff811115611f2157600080fd5b611f2d85828601611eb2565b90969095509350505050565b60008060208385031215611f4c57600080fd5b823567ffffffffffffffff80821115611f6457600080fd5b818501915085601f830112611f7857600080fd5b813581811115611f8757600080fd5b8660208260051b8501011115611f9c57600080fd5b60209290920196919550909350505050565b6001600160a01b0381168114610bc157600080fd5b60008060408385031215611fd657600080fd5b8235611fe181611fae565b946020939093013593505050565b60006020828403121561200157600080fd5b5035919050565b60006020828403121561201a57600080fd5b813561202581611fae565b9392505050565b60008060008060006060868803121561204457600080fd5b85359450602086013567ffffffffffffffff8082111561206357600080fd5b61206f89838a01611d6b565b90965094506040880135915080821115611e9457600080fd5b8015158114610bc157600080fd5b600080604083850312156120a957600080fd5b82356120b481611fae565b915060208301356120c481612088565b809150509250929050565b6020808252825182820181905260009190848201906040850190845b81811015612107578351835292840192918401916001016120eb565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156121075783516001600160a01b03168352928401929184019160010161212f565b60006020828403121561216657600080fd5b61202582611d2b565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b8381526040602082015260006121b260408301848661216f565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016121f9576121f96121d1565b5060010190565b60005b8381101561221b578181015183820152602001612203565b50506000910152565b6000815180845261223c816020860160208601612200565b601f01601f19169290920160200192915050565b61ffff8816815260c06020820152600061226d60c0830189612224565b828103604084015261228081888a61216f565b6001600160a01b0387811660608601528616608085015283810360a085015290506122ab8185612224565b9a9950505050505050505050565b61ffff871681526001600160a01b038616602082015260a0604082018190526000906122e8908301868861216f565b841515606084015282810360808401526123028185612224565b9998505050505050505050565b6000806040838503121561232257600080fd5b505080516020909101519092909150565b60006020828403121561234557600080fd5b5051919050565b818103818111156110ff576110ff6121d1565b60008251612371818460208701612200565b9190910192915050565b60006020828403121561238d57600080fd5b815161202581612088565b634e487b7160e01b600052603160045260246000fdfe6d439300980e333f0256d64be2c9f67e86f4493ce25f82498d6db7f4be3d9e6fa2646970667358221220c1eb3071649c70a6c860f4823f1feced38105d9575bf63bbc96104bdb766ccef64736f6c634300081300330000000000000000000000003c2269811836af69497e5f486a85d7316753cf6200000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000271000000000000000000000000072e28c7f34100afefc399fcc0ae041b8fe5841ae0000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000006500000000000000000000000000000000000000000000000000000000000000380000000000000000000000000000000000000000000000000000000000000066000000000000000000000000000000000000000000000000000000000000a86a000000000000000000000000000000000000000000000000000000000000006a00000000000000000000000000000000000000000000000000000000000000fa00000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000089000000000000000000000000000000000000000000000000000000000000006d000000000000000000000000000000000000000000000000000000000000a4b1000000000000000000000000000000000000000000000000000000000000006e0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000f35dc3505b2b150369bb267ca48a8eac36b9217c
Deployed Bytecode
0x6080604052600436106102035760003560e01c8063786ea0ce11610118578063c84e329e116100a0578063e81ea5951161006f578063e81ea5951461066c578063eca7faab14610681578063eedc966a146106ae578063f2fde38b146106ce578063f3ae2415146106ee57600080fd5b8063c84e329e146105d4578063dbbb41551461060a578063dcd44d711461062a578063e3725b151461064a57600080fd5b80638da5cb5b116100e75780638da5cb5b1461053a578063a5e90eee1461055d578063aa4fc83d1461057d578063bc7881691461059d578063c2c518e1146105bf57600080fd5b8063786ea0ce14610494578063832b5491146104e55780638456cb59146105055780638526690a1461051a57600080fd5b806336c3aaba1161019b5780635c975abb1161016a5780635c975abb146104145780635e280f111461042c578063630eae081461044c5780636ea9cec91461046c578063715018a61461047f57600080fd5b806336c3aaba146103745780633f4ba83a146103b8578063440d7248146103cd5780635a9fab50146103fe57600080fd5b80631fd83e67116101d75780631fd83e67146102f45780632f204e81146103145780632fac88c01461033457806330eb12781461035457600080fd5b80621d356714610208578063093f0e271461022a578063103b739714610271578063109e94cf146102bc575b600080fd5b34801561021457600080fd5b50610228610223366004611db4565b61070e565b005b34801561023657600080fd5b5061025e7f8e1b4d9fa83837c77e7143aff1b7a1a921a3382984267c0eeb8d18dfd3898fca81565b6040519081526020015b60405180910390f35b34801561027d57600080fd5b506000805160206123af83398151915260005260016020527f3c2285c553468ca8f30447b24bb463c127f1b840e23a0cafa23caa79d906669a5461025e565b3480156102c857600080fd5b506005546102dc906001600160a01b031681565b6040516001600160a01b039091168152602001610268565b34801561030057600080fd5b5061022861030f366004611ef7565b61094c565b34801561032057600080fd5b5061022861032f366004611f39565b6109d0565b34801561034057600080fd5b5061022861034f366004611ef7565b610a3a565b34801561036057600080fd5b5061022861036f366004611fc3565b610af6565b34801561038057600080fd5b506103a561038f366004611fef565b600a6020526000908152604090205461ffff1681565b60405161ffff9091168152602001610268565b3480156103c457600080fd5b50610228610b5a565b3480156103d957600080fd5b506103ee6103e8366004612008565b50600090565b6040519015158152602001610268565b34801561040a57600080fd5b5061025e60045481565b34801561042057600080fd5b5060005460ff166103ee565b34801561043857600080fd5b506009546102dc906001600160a01b031681565b34801561045857600080fd5b50610228610467366004611fef565b610b92565b61022861047a36600461202c565b610bc4565b34801561048b57600080fd5b50610228610d06565b3480156104a057600080fd5b506104ce6104af366004611fef565b6008602052600090815260409020805460019091015460ff9091169082565b604080519215158352602083019190915201610268565b3480156104f157600080fd5b5061025e610500366004611fef565b610d18565b34801561051157600080fd5b50610228610d39565b34801561052657600080fd5b50610228610535366004612008565b610d6f565b34801561054657600080fd5b5060005461010090046001600160a01b03166102dc565b34801561056957600080fd5b50610228610578366004612096565b610de8565b34801561058957600080fd5b5061025e61059836600461202c565b610e45565b3480156105a957600080fd5b506105b2610eeb565b60405161026891906120cf565b3480156105cb57600080fd5b50610228610f43565b3480156105e057600080fd5b506102dc6105ef366004611fef565b6006602052600090815260409020546001600160a01b031681565b34801561061657600080fd5b50610228610625366004612008565b610fb0565b34801561063657600080fd5b50610228610645366004611f39565b610fdf565b34801561065657600080fd5b5061065f611050565b6040516102689190612113565b34801561067857600080fd5b5060075461025e565b34801561068d57600080fd5b5061025e61069c366004612154565b600b6020526000908152604090205481565b3480156106ba57600080fd5b5061025e6106c9366004612008565b611069565b3480156106da57600080fd5b506102286106e9366004612008565b61110a565b3480156106fa57600080fd5b506103ee610709366004612008565b611185565b6107166111c5565b6009546001600160a01b031633146107415760405163d9b0b35560e01b815260040160405180910390fd5b60005460ff161561077a576040517febfa14817ead60a20b8a0fc2f6e70025b7414b60eeb0f786c0446e7e543db64b90600090a1610936565b6005546001600160a01b03166107b8576040517fe01ba9b0feb354b2205901cb697991b39ccdfdb7967cd9d28eed6d2b9ab0903490600090a1610936565b61ffff85166000908152600b60205260408120546014860151909182158015906107ea57506001600160a01b03821615155b801561080f57506000838152600660205260409020546001600160a01b038381169116145b905080610854576040516001600160a01b0383169084907fac80426faf130d4151e14cb1e038276f673086f5fc3dd98833115986676840cf90600090a3505050610936565b60008061086260045461121e565b91509150816108a05760405185907f4222f6e215aa16476c9027f9b1025ddb1b27a125d45d40a9e87a76caa5133db890600090a25050505050610936565b60055460405163032ad3cf60e51b81526001600160a01b039091169063655a79e09083906108d69089908c908c90600401612198565b600060405180830381600088803b1580156108f057600080fd5b5087f193505050508015610902575060015b610930576040517f3004b2d8ec75a545f6abc58879cd00cc4fb6c951131a7cf023a21fc01020e78690600090a15b50505050505b6109406001600355565b5050505050565b905090565b61095533611185565b61097257604051637c3ea23f60e01b815260040160405180910390fd5b60005b818110156109cb5736838383818110610990576109906121bb565b90506040020190506109b881600001358260200160208101906109b39190612154565b61124a565b50806109c3816121e7565b915050610975565b505050565b6109d933611185565b6109f657604051637c3ea23f60e01b815260040160405180910390fd5b60005b818110156109cb576000838383818110610a1557610a156121bb565b905060200201359050610a27816112a8565b5080610a32816121e7565b9150506109f9565b610a4333611185565b610a6057604051637c3ea23f60e01b815260040160405180910390fd5b60005b818110156109cb5736838383818110610a7e57610a7e6121bb565b604090810292909201925050813590600090610a9f90840160208501612008565b9050468203610ad6576001600160a01b0381163014610ad157604051631131ed9760e31b815260040160405180910390fd5b610ae0565b610ae08282611304565b5050508080610aee906121e7565b915050610a63565b610aff33611185565b610b1c57604051637c3ea23f60e01b815260040160405180910390fd5b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b03831601610b4f57610b4b3382611399565b5050565b610b4b823383611427565b610b6333611185565b610b8057604051637c3ea23f60e01b815260040160405180910390fd5b610b88611519565b610b90611562565b565b610b9b33611185565b610bb857604051637c3ea23f60e01b815260040160405180910390fd5b610bc1816115b4565b50565b6005546001600160a01b03163314610bef5760405163424029e160e01b815260040160405180910390fd5b610bf76115ef565b6000610c0286611635565b6000878152600a602052604081205491925061ffff90911690819003610c3b5760405163d5a6cc2d60e01b815260040160405180910390fd5b6009546040516bffffffffffffffffffffffff19606085811b8216602084015230901b1660348201526001600160a01b039091169063c5803100903490849060480160408051601f198184030181529190526005548b908b906001600160a01b03166000610ca98d8d61166b565b6040518963ffffffff1660e01b8152600401610ccb9796959493929190612250565b6000604051808303818588803b158015610ce457600080fd5b505af1158015610cf8573d6000803e3d6000fd5b505050505050505050505050565b610d0e6116a9565b610b906000611709565b60078181548110610d2857600080fd5b600091825260209091200154905081565b610d4233611185565b610d5f57604051637c3ea23f60e01b815260040160405180910390fd5b610d676115ef565b610b90611762565b610d7833611185565b610d9557604051637c3ea23f60e01b815260040160405180910390fd5b610d9e8161179f565b600580546001600160a01b0319166001600160a01b0383169081179091556040517f764166c557b419ae9f4bca81c505141ce7017b4bdb4c610ad113a50ec7e578a990600090a250565b610df06116a9565b610e096000805160206123af83398151915283836117d2565b604051811515906001600160a01b038416907fbe9474bb3e78da7e315cdffa5cfa30b767fcc95bbf44a6197da60228eea1028690600090a35050565b6000858152600a602052604081205460095461ffff9091169082906001600160a01b03166340a7bb1083308a8a86610e7d8c8c61166b565b6040518763ffffffff1660e01b8152600401610e9e969594939291906122b9565b6040805180830381865afa158015610eba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ede919061230f565b5098975050505050505050565b60606007805480602002602001604051908101604052809291908181526020018280548015610f3957602002820191906000526020600020905b815481526020019060010190808311610f25575b5050505050905090565b610f4c33611185565b610f6957604051637c3ea23f60e01b815260040160405180910390fd5b610f836000805160206123af8339815191523360006117d2565b60405133907f6cc2c67081f55c2fffb7c008fa995fbbf890f48c7c16fba93d8220f00dc84cc590600090a2565b610fb933611185565b610fd657604051637c3ea23f60e01b815260040160405180910390fd5b610bc1816117ff565b610fe833611185565b61100557604051637c3ea23f60e01b815260040160405180910390fd5b60005b818110156109cb576000838383818110611024576110246121bb565b90506020020135905046811461103d5761103d81611852565b5080611048816121e7565b915050611008565b60606109476000805160206123af8339815191526118b1565b600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b03831601611097575047919050565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa1580156110db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ff9190612333565b92915050565b919050565b6111126116a9565b6001600160a01b03811661117c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b610bc181611709565b6001600160a01b03811660009081527f260b29b219d450563ddb0e5ca806bdadb1e125f7e8c506de0443797dd7122728602052604081205460ff166110ff565b6002600354036112175760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611173565b6002600355565b60008060005a905083811015925082611238576000611242565b611242848261234c565b915050915091565b6000828152600a60209081526040808320805461ffff191661ffff8616908117909155808452600b90925280832085905551909184917fe8b662b513ff40c8ca90e64deacc96541614246ae47724df4d670d6b3ba2e5d79190a35050565b6000818152600a60209081526040808320805461ffff19811690915561ffff16808452600b909252808320839055519091829184917f487d90e6c0c486fcf4e9b12707215f206056b5371b667b782a65b559a001122b91a35050565b81600003611325576040516381e7376360e01b815260040160405180910390fd5b6001600160a01b03811661134c57604051633efa09af60e01b815260040160405180910390fd5b61135e6006600760088585606461191d565b506040516001600160a01b0382169083907f357d1ebd1dc0d53cc15161206b9a39c9ca30667bd997cf921eb00e4c78a454f590600090a35050565b604080516000808252602082019092526001600160a01b0384169083906040516113c3919061235f565b60006040518083038185875af1925050503d8060008114611400576040519150601f19603f3d011682016040523d82523d6000602084013e611405565b606091505b50509050806109cb57604051632e05b05360e21b815260040160405180910390fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1790529151600092839290871691611483919061235f565b6000604051808303816000865af19150503d80600081146114c0576040519150601f19603f3d011682016040523d82523d6000602084013e6114c5565b606091505b509150915060008280156114f15750815115806114f15750818060200190518101906114f1919061237b565b90508061151157604051632fdb1b7f60e11b815260040160405180910390fd5b505050505050565b60005460ff16610b905760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401611173565b61156a611519565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60048190556040518181527fec9e8f9ec7dd2c5310e5b87c7bedeb6ba1c5943cb4d2da1ee80335508a5bc5a49060200160405180910390a150565b60005460ff1615610b905760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401611173565b6000818152600660205260408120546001600160a01b0316806110ff57604051631a81634560e01b815260040160405180910390fd5b6060600061167b83850185611fef565b60408051600160f01b6020820152602280820193909352815180820390930183526042019052949350505050565b6000546001600160a01b03610100909104163314610b905760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611173565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b61176a6115ef565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586115973390565b6001600160a01b0381163b610bc157604051638c50d7cd60e01b81526001600160a01b0382166004820152602401611173565b600083815260016020908152604080832060029092529091206117f9919084846064611979565b50505050565b6118088161179f565b600980546001600160a01b0319166001600160a01b0383169081179091556040517fc8e81a4efc849969069ec6aae575cf7a6bc5f9d3abac59f4ed190a6f7e05fc6f90600090a250565b80600003611873576040516381e7376360e01b815260040160405180910390fd5b611882600660076008846119a6565b5060405181907feb39225b53386d0eb02af9cf2c6b6a0c345a97654f1e67fb21b0b5aaac81ec4a90600090a250565b60008181526001602090815260409182902080548351818402810184019094528084526060939283018282801561191157602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116118f3575b50505050509050919050565b60008381526020859052604090205460ff1615801561194457611942868686856119ef565b505b600093845260209690965250604090912080546001600160a01b0319166001600160a01b039092169190911790555090919050565b6000826119905761198b868686611a78565b61199c565b61199c86868685611ba0565b9695505050505050565b60008181526020839052604090205460ff1680156119e757600082815260208690526040902080546001600160a01b03191690556119e5848484611c50565b505b949350505050565b60008281526020849052604090205460ff161580156119e75784548211611a295760405163b1655e3360e01b815260040160405180910390fd5b60408051808201825260018082528754602080840191825260008881529881529388209251835460ff191690151517835551918101919091558654908101875595855290932090930155919050565b6001600160a01b0381166000908152602083905260409020805460ff16908115611b985760018082015486549091600091611ab3919061234c565b9050808214611b40576000878281548110611ad057611ad06121bb565b9060005260206000200160009054906101000a90046001600160a01b0316905080888481548110611b0357611b036121bb565b600091825260208083209190910180546001600160a01b0319166001600160a01b0394851617905592909116815290879052604090206001018290555b86805480611b5057611b50612398565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038716825287905260408120805460ff191681556001015550505b509392505050565b6001600160a01b03821660009081526020849052604090205460ff161580156119e75784548211611be45760405163b1655e3360e01b815260040160405180910390fd5b6040805180820182526001808252875460208084019182526001600160a01b039790971660008181529888529388209251835460ff19169015151783555191810191909155865490810187559585529290932090930180546001600160a01b0319169091179055919050565b6000818152602083905260409020805460ff16908115611b985760018082015486549091600091611c81919061234c565b9050808214611ce0576000878281548110611c9e57611c9e6121bb565b9060005260206000200154905080888481548110611cbe57611cbe6121bb565b6000918252602080832090910192909255918252879052604090206001018290555b86805480611cf057611cf0612398565b60008281526020808220830160001990810183905590920190925586825287905260408120805460ff19168155600101555050509392505050565b803561ffff8116811461110557600080fd5b634e487b7160e01b600052604160045260246000fd5b803567ffffffffffffffff8116811461110557600080fd5b60008083601f840112611d7d57600080fd5b50813567ffffffffffffffff811115611d9557600080fd5b602083019150836020828501011115611dad57600080fd5b9250929050565b600080600080600060808688031215611dcc57600080fd5b611dd586611d2b565b9450602086013567ffffffffffffffff80821115611df257600080fd5b818801915088601f830112611e0657600080fd5b813581811115611e1857611e18611d3d565b604051601f8201601f19908116603f01168101908382118183101715611e4057611e40611d3d565b816040528281528b6020848701011115611e5957600080fd5b82602086016020830137600060208483010152809850505050611e7e60408901611d53565b94506060880135915080821115611e9457600080fd5b50611ea188828901611d6b565b969995985093965092949392505050565b60008083601f840112611ec457600080fd5b50813567ffffffffffffffff811115611edc57600080fd5b6020830191508360208260061b8501011115611dad57600080fd5b60008060208385031215611f0a57600080fd5b823567ffffffffffffffff811115611f2157600080fd5b611f2d85828601611eb2565b90969095509350505050565b60008060208385031215611f4c57600080fd5b823567ffffffffffffffff80821115611f6457600080fd5b818501915085601f830112611f7857600080fd5b813581811115611f8757600080fd5b8660208260051b8501011115611f9c57600080fd5b60209290920196919550909350505050565b6001600160a01b0381168114610bc157600080fd5b60008060408385031215611fd657600080fd5b8235611fe181611fae565b946020939093013593505050565b60006020828403121561200157600080fd5b5035919050565b60006020828403121561201a57600080fd5b813561202581611fae565b9392505050565b60008060008060006060868803121561204457600080fd5b85359450602086013567ffffffffffffffff8082111561206357600080fd5b61206f89838a01611d6b565b90965094506040880135915080821115611e9457600080fd5b8015158114610bc157600080fd5b600080604083850312156120a957600080fd5b82356120b481611fae565b915060208301356120c481612088565b809150509250929050565b6020808252825182820181905260009190848201906040850190845b81811015612107578351835292840192918401916001016120eb565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156121075783516001600160a01b03168352928401929184019160010161212f565b60006020828403121561216657600080fd5b61202582611d2b565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b8381526040602082015260006121b260408301848661216f565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016121f9576121f96121d1565b5060010190565b60005b8381101561221b578181015183820152602001612203565b50506000910152565b6000815180845261223c816020860160208601612200565b601f01601f19169290920160200192915050565b61ffff8816815260c06020820152600061226d60c0830189612224565b828103604084015261228081888a61216f565b6001600160a01b0387811660608601528616608085015283810360a085015290506122ab8185612224565b9a9950505050505050505050565b61ffff871681526001600160a01b038616602082015260a0604082018190526000906122e8908301868861216f565b841515606084015282810360808401526123028185612224565b9998505050505050505050565b6000806040838503121561232257600080fd5b505080516020909101519092909150565b60006020828403121561234557600080fd5b5051919050565b818103818111156110ff576110ff6121d1565b60008251612371818460208701612200565b9190910192915050565b60006020828403121561238d57600080fd5b815161202581612088565b634e487b7160e01b600052603160045260246000fdfe6d439300980e333f0256d64be2c9f67e86f4493ce25f82498d6db7f4be3d9e6fa2646970667358221220c1eb3071649c70a6c860f4823f1feced38105d9575bf63bbc96104bdb766ccef64736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000003c2269811836af69497e5f486a85d7316753cf6200000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000271000000000000000000000000072e28c7f34100afefc399fcc0ae041b8fe5841ae0000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000006500000000000000000000000000000000000000000000000000000000000000380000000000000000000000000000000000000000000000000000000000000066000000000000000000000000000000000000000000000000000000000000a86a000000000000000000000000000000000000000000000000000000000000006a00000000000000000000000000000000000000000000000000000000000000fa00000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000089000000000000000000000000000000000000000000000000000000000000006d000000000000000000000000000000000000000000000000000000000000a4b1000000000000000000000000000000000000000000000000000000000000006e0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000f35dc3505b2b150369bb267ca48a8eac36b9217c
-----Decoded View---------------
Arg [0] : _endpointAddress (address): 0x3c2269811836af69497E5F486A85D7316753cf62
Arg [1] : _chainIdPairs (tuple[]): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [2] : _targetGasReserve (uint256): 10000
Arg [3] : _owner (address): 0x72E28c7F34100AfefC399fcc0AE041B8fe5841AE
Arg [4] : _managers (address[]): 0xF35dC3505B2b150369BB267ca48a8eAC36B9217c
Arg [5] : _addOwnerToManagers (bool): True
-----Encoded View---------------
21 Constructor Arguments found :
Arg [0] : 0000000000000000000000003c2269811836af69497e5f486a85d7316753cf62
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000002710
Arg [3] : 00000000000000000000000072e28c7f34100afefc399fcc0ae041b8fe5841ae
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000260
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000065
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000038
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000066
Arg [11] : 000000000000000000000000000000000000000000000000000000000000a86a
Arg [12] : 000000000000000000000000000000000000000000000000000000000000006a
Arg [13] : 00000000000000000000000000000000000000000000000000000000000000fa
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000070
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000089
Arg [16] : 000000000000000000000000000000000000000000000000000000000000006d
Arg [17] : 000000000000000000000000000000000000000000000000000000000000a4b1
Arg [18] : 000000000000000000000000000000000000000000000000000000000000006e
Arg [19] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [20] : 000000000000000000000000f35dc3505b2b150369bb267ca48a8eac36b9217c
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
[ 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.