Source Code
Overview
POL Balance
More Info
ContractCreator
Multichain Info
N/A
Latest 11 from a total of 11 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Reporter By ... | 13809793 | 141 days ago | IN | 0 POL | 0.00227415 | ||||
Set Peer | 13809791 | 141 days ago | IN | 0 POL | 0.00097871 | ||||
Set Peer | 13806577 | 141 days ago | IN | 0 POL | 0.00124917 | ||||
Set Reporter By ... | 13806561 | 141 days ago | IN | 0 POL | 0.001915 | ||||
Set Peer | 13806549 | 141 days ago | IN | 0 POL | 0.00128781 | ||||
Set Peer | 13804316 | 141 days ago | IN | 0 POL | 0.00642522 | ||||
Set Reporter By ... | 13804315 | 141 days ago | IN | 0 POL | 0.01299297 | ||||
Set Peer | 13804275 | 141 days ago | IN | 0 POL | 0.00142449 | ||||
Set Reporter By ... | 13804274 | 141 days ago | IN | 0 POL | 0.01334377 | ||||
Set Peer | 13804253 | 141 days ago | IN | 0 POL | 0.00645423 | ||||
Set Reporter By ... | 13804252 | 141 days ago | IN | 0 POL | 0.01456661 |
Loading...
Loading
Contract Name:
LayerZeroAdapter
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 10000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.20; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { OAppCore } from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/OAppCore.sol"; import { BlockHashAdapter } from "../BlockHashAdapter.sol"; import { ILayerZeroReceiver } from "./interfaces/ILayerZeroReceiver.sol"; import { Origin } from "./interfaces/ILayerZeroEndpointV2.sol"; contract LayerZeroAdapter is BlockHashAdapter, Ownable, ILayerZeroReceiver, OAppCore { string public constant PROVIDER = "layer-zero"; address public immutable LAYER_ZERO_ENDPOINT; mapping(uint32 => address) public enabledReporters; mapping(uint32 => uint256) public chainIds; error UnauthorizedLayerZeroReceive(); event ReporterSet(uint256 indexed chainId, uint32 indexed endpointId, address indexed reporter); constructor(address lzEndpoint, address delegate) OAppCore(lzEndpoint, delegate) { LAYER_ZERO_ENDPOINT = lzEndpoint; } function lzReceive( Origin calldata _origin, bytes32 /* _guid*/, bytes calldata _message, address /* _executor*/, bytes calldata /* _extraData*/ ) external payable { if ( msg.sender != LAYER_ZERO_ENDPOINT || enabledReporters[_origin.srcEid] != address(uint160(uint256(_origin.sender))) ) revert UnauthorizedLayerZeroReceive(); (uint256[] memory ids, bytes32[] memory hashes) = abi.decode(_message, (uint256[], bytes32[])); _storeHashes(chainIds[_origin.srcEid], ids, hashes); } function nextNonce(uint32 /*_srcEid*/, bytes32 /*_sender*/) public pure override returns (uint64 nonce) { return 0; } function allowInitializePath(Origin calldata origin) public view override returns (bool) { return peers[origin.srcEid] == origin.sender; } function oAppVersion() public pure virtual override returns (uint64 senderVersion, uint64 receiverVersion) { return (1, 1); } function setReporterByChain(uint256 chainId, uint32 endpointId, address reporter) external onlyOwner { enabledReporters[endpointId] = reporter; chainIds[endpointId] = chainId; emit ReporterSet(chainId, endpointId, reporter); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { ILayerZeroEndpointV2 } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; /** * @title IOAppCore */ interface IOAppCore { // Custom error messages error OnlyPeer(uint32 eid, bytes32 sender); error NoPeer(uint32 eid); error InvalidEndpointCall(); error InvalidDelegate(); // Event emitted when a peer (OApp) is set for a corresponding endpoint event PeerSet(uint32 eid, bytes32 peer); /** * @notice Retrieves the OApp version information. * @return senderVersion The version of the OAppSender.sol contract. * @return receiverVersion The version of the OAppReceiver.sol contract. */ function oAppVersion() external view returns (uint64 senderVersion, uint64 receiverVersion); /** * @notice Retrieves the LayerZero endpoint associated with the OApp. * @return iEndpoint The LayerZero endpoint as an interface. */ function endpoint() external view returns (ILayerZeroEndpointV2 iEndpoint); /** * @notice Retrieves the peer (OApp) associated with a corresponding endpoint. * @param _eid The endpoint ID. * @return peer The peer address (OApp instance) associated with the corresponding endpoint. */ function peers(uint32 _eid) external view returns (bytes32 peer); /** * @notice Sets the peer address (OApp instance) for a corresponding endpoint. * @param _eid The endpoint ID. * @param _peer The address of the peer to be associated with the corresponding endpoint. */ function setPeer(uint32 _eid, bytes32 _peer) external; /** * @notice Sets the delegate address for the OApp Core. * @param _delegate The address of the delegate to be set. */ function setDelegate(address _delegate) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { IOAppCore, ILayerZeroEndpointV2 } from "./interfaces/IOAppCore.sol"; /** * @title OAppCore * @dev Abstract contract implementing the IOAppCore interface with basic OApp configurations. */ abstract contract OAppCore is IOAppCore, Ownable { // The LayerZero endpoint associated with the given OApp ILayerZeroEndpointV2 public immutable endpoint; // Mapping to store peers associated with corresponding endpoints mapping(uint32 eid => bytes32 peer) public peers; /** * @dev Constructor to initialize the OAppCore with the provided endpoint and delegate. * @param _endpoint The address of the LOCAL Layer Zero endpoint. * @param _delegate The delegate capable of making OApp configurations inside of the endpoint. * * @dev The delegate typically should be set as the owner of the contract. */ constructor(address _endpoint, address _delegate) { endpoint = ILayerZeroEndpointV2(_endpoint); if (_delegate == address(0)) revert InvalidDelegate(); endpoint.setDelegate(_delegate); } /** * @notice Sets the peer address (OApp instance) for a corresponding endpoint. * @param _eid The endpoint ID. * @param _peer The address of the peer to be associated with the corresponding endpoint. * * @dev Only the owner/admin of the OApp can call this function. * @dev Indicates that the peer is trusted to send LayerZero messages to this OApp. * @dev Set this to bytes32(0) to remove the peer address. * @dev Peer is a bytes32 to accommodate non-evm chains. */ function setPeer(uint32 _eid, bytes32 _peer) public virtual onlyOwner { _setPeer(_eid, _peer); } /** * @notice Sets the peer address (OApp instance) for a corresponding endpoint. * @param _eid The endpoint ID. * @param _peer The address of the peer to be associated with the corresponding endpoint. * * @dev Indicates that the peer is trusted to send LayerZero messages to this OApp. * @dev Set this to bytes32(0) to remove the peer address. * @dev Peer is a bytes32 to accommodate non-evm chains. */ function _setPeer(uint32 _eid, bytes32 _peer) internal virtual { peers[_eid] = _peer; emit PeerSet(_eid, _peer); } /** * @notice Internal function to get the peer address associated with a specific endpoint; reverts if NOT set. * ie. the peer is set to bytes32(0). * @param _eid The endpoint ID. * @return peer The address of the peer associated with the specified endpoint. */ function _getPeerOrRevert(uint32 _eid) internal view virtual returns (bytes32) { bytes32 peer = peers[_eid]; if (peer == bytes32(0)) revert NoPeer(_eid); return peer; } /** * @notice Sets the delegate address for the OApp. * @param _delegate The address of the delegate to be set. * * @dev Only the owner/admin of the OApp can call this function. * @dev Provides the ability for a delegate to set configs, on behalf of the OApp, directly on the Endpoint contract. */ function setDelegate(address _delegate) public onlyOwner { endpoint.setDelegate(_delegate); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; import { IMessageLibManager } from "./IMessageLibManager.sol"; import { IMessagingComposer } from "./IMessagingComposer.sol"; import { IMessagingChannel } from "./IMessagingChannel.sol"; import { IMessagingContext } from "./IMessagingContext.sol"; struct MessagingParams { uint32 dstEid; bytes32 receiver; bytes message; bytes options; bool payInLzToken; } struct MessagingReceipt { bytes32 guid; uint64 nonce; MessagingFee fee; } struct MessagingFee { uint256 nativeFee; uint256 lzTokenFee; } struct Origin { uint32 srcEid; bytes32 sender; uint64 nonce; } interface ILayerZeroEndpointV2 is IMessageLibManager, IMessagingComposer, IMessagingChannel, IMessagingContext { event PacketSent(bytes encodedPayload, bytes options, address sendLibrary); event PacketVerified(Origin origin, address receiver, bytes32 payloadHash); event PacketDelivered(Origin origin, address receiver); event LzReceiveAlert( address indexed receiver, address indexed executor, Origin origin, bytes32 guid, uint256 gas, uint256 value, bytes message, bytes extraData, bytes reason ); event LzTokenSet(address token); event DelegateSet(address sender, address delegate); function quote(MessagingParams calldata _params, address _sender) external view returns (MessagingFee memory); function send( MessagingParams calldata _params, address _refundAddress ) external payable returns (MessagingReceipt memory); function verify(Origin calldata _origin, address _receiver, bytes32 _payloadHash) external; function verifiable(Origin calldata _origin, address _receiver) external view returns (bool); function initializable(Origin calldata _origin, address _receiver) external view returns (bool); function lzReceive( Origin calldata _origin, address _receiver, bytes32 _guid, bytes calldata _message, bytes calldata _extraData ) external payable; // oapp can burn messages partially by calling this function with its own business logic if messages are verified in order function clear(address _oapp, Origin calldata _origin, bytes32 _guid, bytes calldata _message) external; function setLzToken(address _lzToken) external; function lzToken() external view returns (address); function nativeToken() external view returns (address); function setDelegate(address _delegate) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; struct SetConfigParam { uint32 eid; uint32 configType; bytes config; } interface IMessageLibManager { struct Timeout { address lib; uint256 expiry; } event LibraryRegistered(address newLib); event DefaultSendLibrarySet(uint32 eid, address newLib); event DefaultReceiveLibrarySet(uint32 eid, address newLib); event DefaultReceiveLibraryTimeoutSet(uint32 eid, address oldLib, uint256 expiry); event SendLibrarySet(address sender, uint32 eid, address newLib); event ReceiveLibrarySet(address receiver, uint32 eid, address newLib); event ReceiveLibraryTimeoutSet(address receiver, uint32 eid, address oldLib, uint256 timeout); function registerLibrary(address _lib) external; function isRegisteredLibrary(address _lib) external view returns (bool); function getRegisteredLibraries() external view returns (address[] memory); function setDefaultSendLibrary(uint32 _eid, address _newLib) external; function defaultSendLibrary(uint32 _eid) external view returns (address); function setDefaultReceiveLibrary(uint32 _eid, address _newLib, uint256 _gracePeriod) external; function defaultReceiveLibrary(uint32 _eid) external view returns (address); function setDefaultReceiveLibraryTimeout(uint32 _eid, address _lib, uint256 _expiry) external; function defaultReceiveLibraryTimeout(uint32 _eid) external view returns (address lib, uint256 expiry); function isSupportedEid(uint32 _eid) external view returns (bool); function isValidReceiveLibrary(address _receiver, uint32 _eid, address _lib) external view returns (bool); /// ------------------- OApp interfaces ------------------- function setSendLibrary(address _oapp, uint32 _eid, address _newLib) external; function getSendLibrary(address _sender, uint32 _eid) external view returns (address lib); function isDefaultSendLibrary(address _sender, uint32 _eid) external view returns (bool); function setReceiveLibrary(address _oapp, uint32 _eid, address _newLib, uint256 _gracePeriod) external; function getReceiveLibrary(address _receiver, uint32 _eid) external view returns (address lib, bool isDefault); function setReceiveLibraryTimeout(address _oapp, uint32 _eid, address _lib, uint256 _expiry) external; function receiveLibraryTimeout(address _receiver, uint32 _eid) external view returns (address lib, uint256 expiry); function setConfig(address _oapp, address _lib, SetConfigParam[] calldata _params) external; function getConfig( address _oapp, address _lib, uint32 _eid, uint32 _configType ) external view returns (bytes memory config); }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; interface IMessagingChannel { event InboundNonceSkipped(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce); event PacketNilified(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce, bytes32 payloadHash); event PacketBurnt(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce, bytes32 payloadHash); function eid() external view returns (uint32); // this is an emergency function if a message cannot be verified for some reasons // required to provide _nextNonce to avoid race condition function skip(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce) external; function nilify(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce, bytes32 _payloadHash) external; function burn(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce, bytes32 _payloadHash) external; function nextGuid(address _sender, uint32 _dstEid, bytes32 _receiver) external view returns (bytes32); function inboundNonce(address _receiver, uint32 _srcEid, bytes32 _sender) external view returns (uint64); function outboundNonce(address _sender, uint32 _dstEid, bytes32 _receiver) external view returns (uint64); function inboundPayloadHash( address _receiver, uint32 _srcEid, bytes32 _sender, uint64 _nonce ) external view returns (bytes32); function lazyInboundNonce(address _receiver, uint32 _srcEid, bytes32 _sender) external view returns (uint64); }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; interface IMessagingComposer { event ComposeSent(address from, address to, bytes32 guid, uint16 index, bytes message); event ComposeDelivered(address from, address to, bytes32 guid, uint16 index); event LzComposeAlert( address indexed from, address indexed to, address indexed executor, bytes32 guid, uint16 index, uint256 gas, uint256 value, bytes message, bytes extraData, bytes reason ); function composeQueue( address _from, address _to, bytes32 _guid, uint16 _index ) external view returns (bytes32 messageHash); function sendCompose(address _to, bytes32 _guid, uint16 _index, bytes calldata _message) external; function lzCompose( address _from, address _to, bytes32 _guid, uint16 _index, bytes calldata _message, bytes calldata _extraData ) external payable; }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; interface IMessagingContext { function isSendingMessage() external view returns (bool); function getSendContext() external view returns (uint32 dstEid, address sender); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling 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.9.4) (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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.20; import { IAdapter } from "../interfaces/IAdapter.sol"; abstract contract Adapter is IAdapter { mapping(uint256 => mapping(uint256 => bytes32)) private _hashes; /// @inheritdoc IAdapter function getHash(uint256 domain, uint256 id) public view returns (bytes32) { return _hashes[domain][id]; } function _storeHashes(uint256 domain, uint256[] memory ids, bytes32[] memory hashes) internal { for (uint256 i = 0; i < ids.length; ) { _storeHash(domain, ids[i], hashes[i]); unchecked { ++i; } } } function _storeHash(uint256 domain, uint256 id, bytes32 hash) internal { bytes32 currentHash = _hashes[domain][id]; if (currentHash != hash) { _hashes[domain][id] = hash; emit HashStored(id, hash); } } }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.20; import { RLPReader } from "solidity-rlp/contracts/RLPReader.sol"; import { Adapter } from "./Adapter.sol"; import { IBlockHashAdapter } from "../interfaces/IBlockHashAdapter.sol"; abstract contract BlockHashAdapter is IBlockHashAdapter, Adapter { using RLPReader for RLPReader.RLPItem; /// @inheritdoc IBlockHashAdapter function proveAncestralBlockHashes(uint256 chainId, bytes[] memory blockHeaders) external { for (uint256 i = 0; i < blockHeaders.length; i++) { RLPReader.RLPItem memory blockHeaderRLP = RLPReader.toRlpItem(blockHeaders[i]); if (!blockHeaderRLP.isList()) revert InvalidBlockHeaderRLP(); RLPReader.RLPItem[] memory blockHeaderContent = blockHeaderRLP.toList(); bytes32 blockParent = bytes32(blockHeaderContent[0].toUint()); uint256 blockNumber = uint256(blockHeaderContent[8].toUint()); bytes32 blockHash = keccak256(blockHeaders[i]); bytes32 storedBlockHash = getHash(chainId, blockNumber); if (blockHash != storedBlockHash) revert ConflictingBlockHeader(blockNumber, blockHash, storedBlockHash); _storeHash(chainId, blockNumber - 1, blockParent); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; struct MessagingParams { uint32 dstEid; bytes32 receiver; bytes message; bytes options; bool payInLzToken; } struct MessagingReceipt { bytes32 guid; uint64 nonce; MessagingFee fee; } struct MessagingFee { uint256 nativeFee; uint256 lzTokenFee; } struct Origin { uint32 srcEid; bytes32 sender; uint64 nonce; } interface ILayerZeroEndpointV2 { event PacketSent(bytes encodedPayload, bytes options, address sendLibrary); event PacketVerified(Origin origin, address receiver, bytes32 payloadHash); event PacketDelivered(Origin origin, address receiver); event LzReceiveAlert( address indexed receiver, address indexed executor, Origin origin, bytes32 guid, uint256 gas, uint256 value, bytes message, bytes extraData, bytes reason ); event LzTokenSet(address token); event DelegateSet(address sender, address delegate); function quote(MessagingParams calldata _params, address _sender) external view returns (MessagingFee memory); function send( MessagingParams calldata _params, address _refundAddress ) external payable returns (MessagingReceipt memory); function verify(Origin calldata _origin, address _receiver, bytes32 _payloadHash) external; function verifiable(Origin calldata _origin, address _receiver) external view returns (bool); function initializable(Origin calldata _origin, address _receiver) external view returns (bool); function lzReceive( Origin calldata _origin, address _receiver, bytes32 _guid, bytes calldata _message, bytes calldata _extraData ) external payable; // oapp can burn messages partially by calling this function with its own business logic if messages are verified in order function clear(address _oapp, Origin calldata _origin, bytes32 _guid, bytes calldata _message) external; function setLzToken(address _lzToken) external; function lzToken() external view returns (address); function nativeToken() external view returns (address); function setDelegate(address _delegate) external; }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.20; import { Origin } from "./ILayerZeroEndpointV2.sol"; interface ILayerZeroReceiver { function lzReceive( Origin calldata _origin, bytes32 _guid, bytes calldata _message, address _executor, bytes calldata _extraData ) external payable; function allowInitializePath(Origin calldata _origin) external view returns (bool); function nextNonce(uint32 _eid, bytes32 _sender) external view returns (uint64); }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.0; /** * @title IAdapter */ interface IAdapter { error ConflictingBlockHeader(uint256 blockNumber, bytes32 blockHash, bytes32 storedBlockHash); error InvalidBlockHeaderRLP(); /** * @dev Emitted when a hash is stored. * @param id - The ID of the stored hash. * @param hash - The stored hash as bytes32 values. */ event HashStored(uint256 indexed id, bytes32 indexed hash); /** * @dev Returns the hash for a given ID. * @param domain - Identifier for the domain to query. * @param id - Identifier for the ID to query. * @return hash Bytes32 hash for the given ID on the given domain. * @notice MUST return bytes32(0) if the hash is not present. */ function getHash(uint256 domain, uint256 id) external view returns (bytes32 hash); }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.0; import { IAdapter } from "./IAdapter.sol"; /** * @title IBlockHashAdapter */ interface IBlockHashAdapter is IAdapter { /** * @dev Proves and stores valid ancestral block hashes for a given chain ID. * @param chainId - The ID of the chain to prove block hashes for. * @param blockHeaders - The RLP encoded block headers to prove the hashes for. * @notice Block headers should be ordered by descending block number and should start with a known block header. */ function proveAncestralBlockHashes(uint256 chainId, bytes[] memory blockHeaders) external; }
// SPDX-License-Identifier: Apache-2.0 /* * @author Hamdi Allam [email protected] * Please reach out with any questions or concerns */ pragma solidity >=0.5.10 <0.9.0; library RLPReader { uint8 constant STRING_SHORT_START = 0x80; uint8 constant STRING_LONG_START = 0xb8; uint8 constant LIST_SHORT_START = 0xc0; uint8 constant LIST_LONG_START = 0xf8; uint8 constant WORD_SIZE = 32; struct RLPItem { uint256 len; uint256 memPtr; } struct Iterator { RLPItem item; // Item that's being iterated over. uint256 nextPtr; // Position of the next item in the list. } /* * @dev Returns the next element in the iteration. Reverts if it has not next element. * @param self The iterator. * @return The next element in the iteration. */ function next(Iterator memory self) internal pure returns (RLPItem memory) { require(hasNext(self)); uint256 ptr = self.nextPtr; uint256 itemLength = _itemLength(ptr); self.nextPtr = ptr + itemLength; return RLPItem(itemLength, ptr); } /* * @dev Returns true if the iteration has more elements. * @param self The iterator. * @return true if the iteration has more elements. */ function hasNext(Iterator memory self) internal pure returns (bool) { RLPItem memory item = self.item; return self.nextPtr < item.memPtr + item.len; } /* * @param item RLP encoded bytes */ function toRlpItem(bytes memory item) internal pure returns (RLPItem memory) { uint256 memPtr; assembly { memPtr := add(item, 0x20) } return RLPItem(item.length, memPtr); } /* * @dev Create an iterator. Reverts if item is not a list. * @param self The RLP item. * @return An 'Iterator' over the item. */ function iterator(RLPItem memory self) internal pure returns (Iterator memory) { require(isList(self)); uint256 ptr = self.memPtr + _payloadOffset(self.memPtr); return Iterator(self, ptr); } /* * @param the RLP item. */ function rlpLen(RLPItem memory item) internal pure returns (uint256) { return item.len; } /* * @param the RLP item. * @return (memPtr, len) pair: location of the item's payload in memory. */ function payloadLocation(RLPItem memory item) internal pure returns (uint256, uint256) { uint256 offset = _payloadOffset(item.memPtr); uint256 memPtr = item.memPtr + offset; uint256 len = item.len - offset; // data length return (memPtr, len); } /* * @param the RLP item. */ function payloadLen(RLPItem memory item) internal pure returns (uint256) { (, uint256 len) = payloadLocation(item); return len; } /* * @param the RLP item containing the encoded list. */ function toList(RLPItem memory item) internal pure returns (RLPItem[] memory) { require(isList(item)); uint256 items = numItems(item); RLPItem[] memory result = new RLPItem[](items); uint256 memPtr = item.memPtr + _payloadOffset(item.memPtr); uint256 dataLen; for (uint256 i = 0; i < items; i++) { dataLen = _itemLength(memPtr); result[i] = RLPItem(dataLen, memPtr); memPtr = memPtr + dataLen; } return result; } // @return indicator whether encoded payload is a list. negate this function call for isData. function isList(RLPItem memory item) internal pure returns (bool) { if (item.len == 0) return false; uint8 byte0; uint256 memPtr = item.memPtr; assembly { byte0 := byte(0, mload(memPtr)) } if (byte0 < LIST_SHORT_START) return false; return true; } /* * @dev A cheaper version of keccak256(toRlpBytes(item)) that avoids copying memory. * @return keccak256 hash of RLP encoded bytes. */ function rlpBytesKeccak256(RLPItem memory item) internal pure returns (bytes32) { uint256 ptr = item.memPtr; uint256 len = item.len; bytes32 result; assembly { result := keccak256(ptr, len) } return result; } /* * @dev A cheaper version of keccak256(toBytes(item)) that avoids copying memory. * @return keccak256 hash of the item payload. */ function payloadKeccak256(RLPItem memory item) internal pure returns (bytes32) { (uint256 memPtr, uint256 len) = payloadLocation(item); bytes32 result; assembly { result := keccak256(memPtr, len) } return result; } /** RLPItem conversions into data types **/ // @returns raw rlp encoding in bytes function toRlpBytes(RLPItem memory item) internal pure returns (bytes memory) { bytes memory result = new bytes(item.len); if (result.length == 0) return result; uint256 ptr; assembly { ptr := add(0x20, result) } copy(item.memPtr, ptr, item.len); return result; } // any non-zero byte except "0x80" is considered true function toBoolean(RLPItem memory item) internal pure returns (bool) { require(item.len == 1); uint256 result; uint256 memPtr = item.memPtr; assembly { result := byte(0, mload(memPtr)) } // SEE Github Issue #5. // Summary: Most commonly used RLP libraries (i.e Geth) will encode // "0" as "0x80" instead of as "0". We handle this edge case explicitly // here. if (result == 0 || result == STRING_SHORT_START) { return false; } else { return true; } } function toAddress(RLPItem memory item) internal pure returns (address) { // 1 byte for the length prefix require(item.len == 21); return address(uint160(toUint(item))); } function toUint(RLPItem memory item) internal pure returns (uint256) { require(item.len > 0 && item.len <= 33); (uint256 memPtr, uint256 len) = payloadLocation(item); uint256 result; assembly { result := mload(memPtr) // shift to the correct location if neccesary if lt(len, 32) { result := div(result, exp(256, sub(32, len))) } } return result; } // enforces 32 byte length function toUintStrict(RLPItem memory item) internal pure returns (uint256) { // one byte prefix require(item.len == 33); uint256 result; uint256 memPtr = item.memPtr + 1; assembly { result := mload(memPtr) } return result; } function toBytes(RLPItem memory item) internal pure returns (bytes memory) { require(item.len > 0); (uint256 memPtr, uint256 len) = payloadLocation(item); bytes memory result = new bytes(len); uint256 destPtr; assembly { destPtr := add(0x20, result) } copy(memPtr, destPtr, len); return result; } /* * Private Helpers */ // @return number of payload items inside an encoded list. function numItems(RLPItem memory item) private pure returns (uint256) { if (item.len == 0) return 0; uint256 count = 0; uint256 currPtr = item.memPtr + _payloadOffset(item.memPtr); uint256 endPtr = item.memPtr + item.len; while (currPtr < endPtr) { currPtr = currPtr + _itemLength(currPtr); // skip over an item count++; } return count; } // @return entire rlp item byte length function _itemLength(uint256 memPtr) private pure returns (uint256) { uint256 itemLen; uint256 byte0; assembly { byte0 := byte(0, mload(memPtr)) } if (byte0 < STRING_SHORT_START) { itemLen = 1; } else if (byte0 < STRING_LONG_START) { itemLen = byte0 - STRING_SHORT_START + 1; } else if (byte0 < LIST_SHORT_START) { assembly { let byteLen := sub(byte0, 0xb7) // # of bytes the actual length is memPtr := add(memPtr, 1) // skip over the first byte /* 32 byte word size */ let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to get the len itemLen := add(dataLen, add(byteLen, 1)) } } else if (byte0 < LIST_LONG_START) { itemLen = byte0 - LIST_SHORT_START + 1; } else { assembly { let byteLen := sub(byte0, 0xf7) memPtr := add(memPtr, 1) let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to the correct length itemLen := add(dataLen, add(byteLen, 1)) } } return itemLen; } // @return number of bytes until the data function _payloadOffset(uint256 memPtr) private pure returns (uint256) { uint256 byte0; assembly { byte0 := byte(0, mload(memPtr)) } if (byte0 < STRING_SHORT_START) { return 0; } else if (byte0 < STRING_LONG_START || (byte0 >= LIST_SHORT_START && byte0 < LIST_LONG_START)) { return 1; } else if (byte0 < LIST_SHORT_START) { // being explicit return byte0 - (STRING_LONG_START - 1) + 1; } else { return byte0 - (LIST_LONG_START - 1) + 1; } } /* * @param src Pointer to source * @param dest Pointer to destination * @param len Amount of memory to copy from the source */ function copy(uint256 src, uint256 dest, uint256 len) private pure { if (len == 0) return; // copy as many word sizes as possible for (; len >= WORD_SIZE; len -= WORD_SIZE) { assembly { mstore(dest, mload(src)) } src += WORD_SIZE; dest += WORD_SIZE; } if (len > 0) { // left over bytes. Mask is used to remove unwanted bytes from the word uint256 mask = 256**(WORD_SIZE - len) - 1; assembly { let srcpart := and(mload(src), not(mask)) // zero out src let destpart := and(mload(dest), mask) // retrieve the bytes mstore(dest, or(destpart, srcpart)) } } } }
{ "viaIR": true, "optimizer": { "enabled": true, "runs": 10000 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract ABI
API[{"inputs":[{"internalType":"address","name":"lzEndpoint","type":"address"},{"internalType":"address","name":"delegate","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"internalType":"bytes32","name":"blockHash","type":"bytes32"},{"internalType":"bytes32","name":"storedBlockHash","type":"bytes32"}],"name":"ConflictingBlockHeader","type":"error"},{"inputs":[],"name":"InvalidBlockHeaderRLP","type":"error"},{"inputs":[],"name":"InvalidDelegate","type":"error"},{"inputs":[],"name":"InvalidEndpointCall","type":"error"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"}],"name":"NoPeer","type":"error"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"}],"name":"OnlyPeer","type":"error"},{"inputs":[],"name":"UnauthorizedLayerZeroReceive","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"hash","type":"bytes32"}],"name":"HashStored","type":"event"},{"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":"uint32","name":"eid","type":"uint32"},{"indexed":false,"internalType":"bytes32","name":"peer","type":"bytes32"}],"name":"PeerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":true,"internalType":"uint32","name":"endpointId","type":"uint32"},{"indexed":true,"internalType":"address","name":"reporter","type":"address"}],"name":"ReporterSet","type":"event"},{"inputs":[],"name":"LAYER_ZERO_ENDPOINT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PROVIDER","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"origin","type":"tuple"}],"name":"allowInitializePath","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"}],"name":"chainIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"}],"name":"enabledReporters","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endpoint","outputs":[{"internalType":"contract ILayerZeroEndpointV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"domain","type":"uint256"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"address","name":"","type":"address"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"lzReceive","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"nextNonce","outputs":[{"internalType":"uint64","name":"nonce","type":"uint64"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"oAppVersion","outputs":[{"internalType":"uint64","name":"senderVersion","type":"uint64"},{"internalType":"uint64","name":"receiverVersion","type":"uint64"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"}],"name":"peers","outputs":[{"internalType":"bytes32","name":"peer","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"bytes[]","name":"blockHeaders","type":"bytes[]"}],"name":"proveAncestralBlockHashes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_delegate","type":"address"}],"name":"setDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"bytes32","name":"_peer","type":"bytes32"}],"name":"setPeer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"uint32","name":"endpointId","type":"uint32"},{"internalType":"address","name":"reporter","type":"address"}],"name":"setReporterByChain","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c0346200016f57620015d9906001600160401b03601f38849003908101601f1916830190828211848310176200017457808491604096879485528339810103126200016f576200005e602062000056846200018a565b93016200018a565b60018054336001600160a01b03198216811790925585516000949390926001600160a01b03928392919083167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08880a3818716608052169182156200016057506080511690813b156200015c57839291602484928851968793849263ca5eb5e160e01b845260048401525af1801562000152576200012b575b50505060a052516114399081620001a082396080518181816105c50152610885015260a0518181816103d9015261093a0152f35b82116200013e57508252388080620000f7565b634e487b7160e01b81526041600452602490fd5b85513d84823e3d90fd5b8380fd5b632d618d8160e21b8152600490fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036200016f5756fe6080604052600436101561001257600080fd5b60003560e01c8062d344111461013657806313137d651461013157806317442b701461012c5780631b855044146101275780633400288b146101225780635e280f111461011d5780636558b68114610118578063715018a6146101135780637d25a05e1461010e5780638da5cb5b146101095780639c47520714610104578063a6f03ab0146100ff578063bb0b6a53146100fa578063ca5eb5e1146100f5578063d3710343146100f0578063e81900a6146100eb578063f2fde38b146100e65763ff7bd03d146100e157600080fd5b610b6c565b610a55565b610976565b61090d565b610849565b61080e565b610754565b610703565b6106cf565b6106a8565b610624565b6105e9565b610598565b610529565b6104e1565b6104bf565b610364565b610229565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff811161017e57604052565b61013b565b6040810190811067ffffffffffffffff82111761017e57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761017e57604052565b604051906101ed82610183565b565b67ffffffffffffffff811161017e57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b346102da5760006003193601126102da57604080519061024882610183565b600a825260207f6c617965722d7a65726f00000000000000000000000000000000000000000000818401528151928184928352815191828285015260005b8381106102c4575050600083830185015250601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b8181018301518782018701528694508201610286565b600080fd5b60031960609101126102da57600490565b9181601f840112156102da5782359167ffffffffffffffff83116102da57602083818601950101116102da57565b60a4359073ffffffffffffffffffffffffffffffffffffffff821682036102da57565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036102da57565b60e06003193601126102da57610379366102df565b67ffffffffffffffff906084358281116102da5761039b9036906004016102f0565b9190926103a661031e565b5060c4359081116102da576103bf9036906004016102f0565b505073ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001633149081159161046f575b506104455761043d61041f8461042794610443960190610fdc565b939092610f71565b63ffffffff166000526004602052604060002090565b54611071565b005b60046040517f615a62ea000000000000000000000000000000000000000000000000000000008152fd5b905063ffffffff82356104818161051b565b1660005260036020526104ad604060002073ffffffffffffffffffffffffffffffffffffffff90541690565b90806020840135169116141538610404565b346102da5760006003193601126102da57604080516001815260016020820152f35b346102da5760406003193601126102da57600435600052600060205260406000206024356000526020526020604060002054604051908152f35b63ffffffff8116036102da57565b346102da5760406003193601126102da577f238399d427b947898edb290f5ff0f9109849b1c3ba196a42e35f00c50a54b98b60406004356105698161051b565b63ffffffff6024359161057a610bb2565b169081600052600260205280836000205582519182526020820152a1005b346102da5760006003193601126102da57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102da5760206003193601126102da5763ffffffff60043561060b8161051b565b1660005260046020526020604060002054604051908152f35b346102da576000806003193601126106a55761063e610bb2565b8073ffffffffffffffffffffffffffffffffffffffff6001547fffffffffffffffffffffffff00000000000000000000000000000000000000008116600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b80fd5b346102da5760406003193601126102da576106c460043561051b565b602060405160008152f35b346102da5760006003193601126102da57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b346102da5760206003193601126102da5763ffffffff6004356107258161051b565b166000526003602052602073ffffffffffffffffffffffffffffffffffffffff60406000205416604051908152f35b346102da5760606003193601126102da576004356024356107748161051b565b6044359073ffffffffffffffffffffffffffffffffffffffff82168092036102da5763ffffffff906107a4610bb2565b16600092818452600360205260408420837fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905560046020528060408520557fc6de940cc88a54b9bfcfa9c2dbcf01a09a9ecac32496114d90f12e74476a3f988480a480f35b346102da5760206003193601126102da5763ffffffff6004356108308161051b565b1660005260026020526020604060002054604051908152f35b346102da57600060206003193601126106a557610864610341565b61086c610bb2565b8173ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001692833b15610909576024908360405195869485937fca5eb5e10000000000000000000000000000000000000000000000000000000085521660048401525af180156108fe576108f2575080f35b6108fb9061016a565b80f35b6040513d84823e3d90fd5b8280fd5b346102da5760006003193601126102da57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b67ffffffffffffffff811161017e5760051b60200190565b346102da576040806003193601126102da57602490813567ffffffffffffffff928382116102da57366023830112156102da5781600401356109b78161095e565b936109c48151958661019f565b818552602095838787019360051b860101943686116102da57848101935b8685106109f55761044388600435610dd9565b84358381116102da57820190366043830112156102da578682013590610a1a826101ef565b610a268751918261019f565b828152604493368585830101116102da578c8481969582966000940183860137830101528152019401936109e2565b346102da5760206003193601126102da57610a6e610341565b610a76610bb2565b73ffffffffffffffffffffffffffffffffffffffff809116908115610ae857600154827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b346102da5760606003193601126102da576020610b88366102df565b63ffffffff8135610b988161051b565b166000526002825260406000205482604051920135148152f35b73ffffffffffffffffffffffffffffffffffffffff600154163303610bd357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610c8d5760010190565b610c31565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b805115610cce5760200190565b610c92565b805160081015610cce576101200190565b8051821015610cce5760209160051b010190565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201918211610c8d57565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff408201918211610c8d57565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808201918211610c8d57565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff098201918211610c8d57565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff498201918211610c8d57565b91909160005b8351811015610f0357610dfb610df58286610ce4565b516110c9565b610e0b610e07826111fb565b1590565b610ed957610e189061110a565b610e36610e2a610e30610e2a84610cc1565b51611222565b92610cd3565b610e408387610ce4565b5160208151910120610e6f82610e60876000526000602052604060002090565b90600052602052604060002090565b54808203610e9a575050610e959291610e8a610e9092610cf8565b85610f09565b610c60565b610ddf565b6040517fc442fd2b0000000000000000000000000000000000000000000000000000000081526004810184905260248101929092526044820152606490fd5b60046040517fe4508b9f000000000000000000000000000000000000000000000000000000008152fd5b50509050565b6000818152806020526040812083825260205283604082205403610f2e575b50505050565b7f7c57815e36323391c63e53a2fe2969599eb6dbcf52484a3bd8909aef4a6704d7918152806020526040812083825260205283604082205580a338808080610f28565b35610f7b8161051b565b90565b81601f820112156102da57803591610f958361095e565b92610fa3604051948561019f565b808452602092838086019260051b8201019283116102da578301905b828210610fcd575050505090565b81358152908301908301610fbf565b9190916040818403126102da5767ffffffffffffffff9281358481116102da5782019381601f860112156102da5784356110158161095e565b90611023604051928361019f565b808252602096878084019260051b820101918583116102da5788809201905b8382106110625750505050948301359081116102da57610f7b9201610f7e565b81358152908201908201611042565b92919060005b81518110156110a957806110a361109060019385610ce4565b5161109b8387610ce4565b519088610f09565b01611077565b5050509050565b604051906110bd82610183565b60006020838281520152565b6110d16110b0565b506020815191604051926110e484610183565b835201602082015290565b9060018201809211610c8d57565b91908201809211610c8d57565b611113816111fb565b156102da5761112181611281565b61112a8161095e565b91611138604051938461019f565b8183527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06111658361095e565b0160005b8181106111e457505061118a602080920151611184816113a3565b906110fd565b6000905b83821061119c575050505090565b6111d8816111ac6111de936112e3565b906111b56101e0565b82815281878201526111c7868a610ce4565b526111d28589610ce4565b506110fd565b91610c60565b9061118e565b6020906111ef6110b0565b82828801015201611169565b80511561121c57602060c09101515160001a1061121757600190565b600090565b50600090565b80518015159081611275575b50156102da57602081019061124382516113a3565b915190828201809211610c8d5751918203918211610c8d57519060208110611269575090565b6020036101000a900490565b6021915011153861122e565b80511561121c576000906020810190815161129b816113a3565b8101809111610c8d57915190518101809111610c8d5791905b8281106112c15750905090565b6112ca816112e3565b8101809111610c8d576112dd9091610c60565b906112b4565b805160001a9060808210156112f9575050600190565b60b8821015611314575061130f610f7b91610d52565b6110ef565b60c08210156113555760010151602082900360b7016101000a9004017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4a0190565b60f882101561136b575061130f610f7b91610d25565b60010151602082900360f7016101000a9004017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0a0190565b5160001a60808110156113b65750600090565b60b8811080156113ed575b156113cc5750600190565b60c08110156113e15761130f610f7b91610dac565b61130f610f7b91610d7f565b5060c081101580156113c1575060f881106113c156fea264697066735822122055d7a4551506342ddeafc2b96e53792e793cec477269396c702f0c77827f7f9064736f6c634300081400330000000000000000000000006edce65403992e310a62460808c4b910d972f10f00000000000000000000000067e5855aa4d5786c086b7fc6b4203a5ea50e93f8
Deployed Bytecode
0x6080604052600436101561001257600080fd5b60003560e01c8062d344111461013657806313137d651461013157806317442b701461012c5780631b855044146101275780633400288b146101225780635e280f111461011d5780636558b68114610118578063715018a6146101135780637d25a05e1461010e5780638da5cb5b146101095780639c47520714610104578063a6f03ab0146100ff578063bb0b6a53146100fa578063ca5eb5e1146100f5578063d3710343146100f0578063e81900a6146100eb578063f2fde38b146100e65763ff7bd03d146100e157600080fd5b610b6c565b610a55565b610976565b61090d565b610849565b61080e565b610754565b610703565b6106cf565b6106a8565b610624565b6105e9565b610598565b610529565b6104e1565b6104bf565b610364565b610229565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff811161017e57604052565b61013b565b6040810190811067ffffffffffffffff82111761017e57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761017e57604052565b604051906101ed82610183565b565b67ffffffffffffffff811161017e57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b346102da5760006003193601126102da57604080519061024882610183565b600a825260207f6c617965722d7a65726f00000000000000000000000000000000000000000000818401528151928184928352815191828285015260005b8381106102c4575050600083830185015250601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b8181018301518782018701528694508201610286565b600080fd5b60031960609101126102da57600490565b9181601f840112156102da5782359167ffffffffffffffff83116102da57602083818601950101116102da57565b60a4359073ffffffffffffffffffffffffffffffffffffffff821682036102da57565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036102da57565b60e06003193601126102da57610379366102df565b67ffffffffffffffff906084358281116102da5761039b9036906004016102f0565b9190926103a661031e565b5060c4359081116102da576103bf9036906004016102f0565b505073ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000006edce65403992e310a62460808c4b910d972f10f1633149081159161046f575b506104455761043d61041f8461042794610443960190610fdc565b939092610f71565b63ffffffff166000526004602052604060002090565b54611071565b005b60046040517f615a62ea000000000000000000000000000000000000000000000000000000008152fd5b905063ffffffff82356104818161051b565b1660005260036020526104ad604060002073ffffffffffffffffffffffffffffffffffffffff90541690565b90806020840135169116141538610404565b346102da5760006003193601126102da57604080516001815260016020820152f35b346102da5760406003193601126102da57600435600052600060205260406000206024356000526020526020604060002054604051908152f35b63ffffffff8116036102da57565b346102da5760406003193601126102da577f238399d427b947898edb290f5ff0f9109849b1c3ba196a42e35f00c50a54b98b60406004356105698161051b565b63ffffffff6024359161057a610bb2565b169081600052600260205280836000205582519182526020820152a1005b346102da5760006003193601126102da57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000006edce65403992e310a62460808c4b910d972f10f168152f35b346102da5760206003193601126102da5763ffffffff60043561060b8161051b565b1660005260046020526020604060002054604051908152f35b346102da576000806003193601126106a55761063e610bb2565b8073ffffffffffffffffffffffffffffffffffffffff6001547fffffffffffffffffffffffff00000000000000000000000000000000000000008116600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b80fd5b346102da5760406003193601126102da576106c460043561051b565b602060405160008152f35b346102da5760006003193601126102da57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b346102da5760206003193601126102da5763ffffffff6004356107258161051b565b166000526003602052602073ffffffffffffffffffffffffffffffffffffffff60406000205416604051908152f35b346102da5760606003193601126102da576004356024356107748161051b565b6044359073ffffffffffffffffffffffffffffffffffffffff82168092036102da5763ffffffff906107a4610bb2565b16600092818452600360205260408420837fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905560046020528060408520557fc6de940cc88a54b9bfcfa9c2dbcf01a09a9ecac32496114d90f12e74476a3f988480a480f35b346102da5760206003193601126102da5763ffffffff6004356108308161051b565b1660005260026020526020604060002054604051908152f35b346102da57600060206003193601126106a557610864610341565b61086c610bb2565b8173ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000006edce65403992e310a62460808c4b910d972f10f1692833b15610909576024908360405195869485937fca5eb5e10000000000000000000000000000000000000000000000000000000085521660048401525af180156108fe576108f2575080f35b6108fb9061016a565b80f35b6040513d84823e3d90fd5b8280fd5b346102da5760006003193601126102da57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000006edce65403992e310a62460808c4b910d972f10f168152f35b67ffffffffffffffff811161017e5760051b60200190565b346102da576040806003193601126102da57602490813567ffffffffffffffff928382116102da57366023830112156102da5781600401356109b78161095e565b936109c48151958661019f565b818552602095838787019360051b860101943686116102da57848101935b8685106109f55761044388600435610dd9565b84358381116102da57820190366043830112156102da578682013590610a1a826101ef565b610a268751918261019f565b828152604493368585830101116102da578c8481969582966000940183860137830101528152019401936109e2565b346102da5760206003193601126102da57610a6e610341565b610a76610bb2565b73ffffffffffffffffffffffffffffffffffffffff809116908115610ae857600154827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b346102da5760606003193601126102da576020610b88366102df565b63ffffffff8135610b988161051b565b166000526002825260406000205482604051920135148152f35b73ffffffffffffffffffffffffffffffffffffffff600154163303610bd357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610c8d5760010190565b610c31565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b805115610cce5760200190565b610c92565b805160081015610cce576101200190565b8051821015610cce5760209160051b010190565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201918211610c8d57565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff408201918211610c8d57565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808201918211610c8d57565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff098201918211610c8d57565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff498201918211610c8d57565b91909160005b8351811015610f0357610dfb610df58286610ce4565b516110c9565b610e0b610e07826111fb565b1590565b610ed957610e189061110a565b610e36610e2a610e30610e2a84610cc1565b51611222565b92610cd3565b610e408387610ce4565b5160208151910120610e6f82610e60876000526000602052604060002090565b90600052602052604060002090565b54808203610e9a575050610e959291610e8a610e9092610cf8565b85610f09565b610c60565b610ddf565b6040517fc442fd2b0000000000000000000000000000000000000000000000000000000081526004810184905260248101929092526044820152606490fd5b60046040517fe4508b9f000000000000000000000000000000000000000000000000000000008152fd5b50509050565b6000818152806020526040812083825260205283604082205403610f2e575b50505050565b7f7c57815e36323391c63e53a2fe2969599eb6dbcf52484a3bd8909aef4a6704d7918152806020526040812083825260205283604082205580a338808080610f28565b35610f7b8161051b565b90565b81601f820112156102da57803591610f958361095e565b92610fa3604051948561019f565b808452602092838086019260051b8201019283116102da578301905b828210610fcd575050505090565b81358152908301908301610fbf565b9190916040818403126102da5767ffffffffffffffff9281358481116102da5782019381601f860112156102da5784356110158161095e565b90611023604051928361019f565b808252602096878084019260051b820101918583116102da5788809201905b8382106110625750505050948301359081116102da57610f7b9201610f7e565b81358152908201908201611042565b92919060005b81518110156110a957806110a361109060019385610ce4565b5161109b8387610ce4565b519088610f09565b01611077565b5050509050565b604051906110bd82610183565b60006020838281520152565b6110d16110b0565b506020815191604051926110e484610183565b835201602082015290565b9060018201809211610c8d57565b91908201809211610c8d57565b611113816111fb565b156102da5761112181611281565b61112a8161095e565b91611138604051938461019f565b8183527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06111658361095e565b0160005b8181106111e457505061118a602080920151611184816113a3565b906110fd565b6000905b83821061119c575050505090565b6111d8816111ac6111de936112e3565b906111b56101e0565b82815281878201526111c7868a610ce4565b526111d28589610ce4565b506110fd565b91610c60565b9061118e565b6020906111ef6110b0565b82828801015201611169565b80511561121c57602060c09101515160001a1061121757600190565b600090565b50600090565b80518015159081611275575b50156102da57602081019061124382516113a3565b915190828201809211610c8d5751918203918211610c8d57519060208110611269575090565b6020036101000a900490565b6021915011153861122e565b80511561121c576000906020810190815161129b816113a3565b8101809111610c8d57915190518101809111610c8d5791905b8281106112c15750905090565b6112ca816112e3565b8101809111610c8d576112dd9091610c60565b906112b4565b805160001a9060808210156112f9575050600190565b60b8821015611314575061130f610f7b91610d52565b6110ef565b60c08210156113555760010151602082900360b7016101000a9004017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4a0190565b60f882101561136b575061130f610f7b91610d25565b60010151602082900360f7016101000a9004017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0a0190565b5160001a60808110156113b65750600090565b60b8811080156113ed575b156113cc5750600190565b60c08110156113e15761130f610f7b91610dac565b61130f610f7b91610d7f565b5060c081101580156113c1575060f881106113c156fea264697066735822122055d7a4551506342ddeafc2b96e53792e793cec477269396c702f0c77827f7f9064736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000006edce65403992e310a62460808c4b910d972f10f00000000000000000000000067e5855aa4d5786c086b7fc6b4203a5ea50e93f8
-----Decoded View---------------
Arg [0] : lzEndpoint (address): 0x6EDCE65403992e310A62460808c4b910D972f10f
Arg [1] : delegate (address): 0x67E5855Aa4D5786c086b7FC6B4203a5Ea50E93F8
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000006edce65403992e310a62460808c4b910d972f10f
Arg [1] : 00000000000000000000000067e5855aa4d5786c086b7fc6b4203a5ea50e93f8
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.