Overview
CELO Balance
CELO Value
$0.00Multichain Info
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
ProposalReceiver
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "oz/utils/ReentrancyGuard.sol";
import "lz/lzApp/NonblockingLzApp.sol";
import "./utils/Errors.sol";
/// @title ProposalReceiver
/// @author LayerZero Labs
/// @notice Executes proposal transactions sent from the main chain
/// @dev The owner of this contract controls LayerZero configuration. When used in production the owner
/// should be set to a Timelock or this contract itself.
/// @dev This implementation is non-blocking meaning the failed messages will not block the future messages
/// from the source.
/// @dev Full fork from:
/// https://github.com/LayerZero-Labs/omnichain-governance-executor/blob/main/contracts/OmnichainGovernanceExecutor.sol
contract ProposalReceiver is NonblockingLzApp, ReentrancyGuard {
using BytesLib for bytes;
using ExcessivelySafeCall for address;
event ProposalExecuted(bytes payload);
event ProposalFailed(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _reason);
constructor(address _endpoint) NonblockingLzApp(_endpoint) Ownable(msg.sender) {}
// overriding the virtual function in LzReceiver
function _blockingLzReceive(
uint16 _srcChainId,
bytes memory _srcAddress,
uint64 _nonce,
bytes memory _payload
) internal virtual override {
bytes32 hashedPayload = keccak256(_payload);
uint256 gasToStoreAndEmit = 30000; // enough gas to ensure we can store the payload and emit the event
(bool success, bytes memory reason) = address(this).excessivelySafeCall(
gasleft() - gasToStoreAndEmit,
150,
abi.encodeWithSelector(this.nonblockingLzReceive.selector, _srcChainId, _srcAddress, _nonce, _payload)
);
// try-catch all errors/exceptions
if (!success) {
failedMessages[_srcChainId][_srcAddress][_nonce] = hashedPayload;
// Retrieve payload from the src side tx if needed to clear
emit ProposalFailed(_srcChainId, _srcAddress, _nonce, reason);
}
}
/// @notice Executes the proposal
/// @dev Called by LayerZero Endpoint when a message from the source is received
function _nonblockingLzReceive(uint16, bytes memory, uint64, bytes memory _payload) internal virtual override {
(address[] memory targets, uint256[] memory values, string[] memory signatures, bytes[] memory calldatas) = abi
.decode(_payload, (address[], uint[], string[], bytes[]));
for (uint256 i = 0; i < targets.length; i++) {
_executeTransaction(targets[i], values[i], signatures[i], calldatas[i]);
}
emit ProposalExecuted(_payload);
}
function _executeTransaction(
address target,
uint256 value,
string memory signature,
bytes memory data
) private nonReentrant {
bytes memory callData = bytes(signature).length == 0
? data
: abi.encodePacked(bytes4(keccak256(bytes(signature))), data);
// solium-disable-next-line security/no-call-value
(bool success, ) = target.call{ value: value }(callData);
if (!success) revert OmnichainGovernanceExecutorTxExecReverted();
}
receive() external payable {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)
pragma solidity ^0.8.20;
/**
* @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;
/**
* @dev Unauthorized reentrant call.
*/
error ReentrancyGuardReentrantCall();
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
if (_status == ENTERED) {
revert ReentrancyGuardReentrantCall();
}
// 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;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == ENTERED;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./LzApp.sol";
import "../libraries/ExcessivelySafeCall.sol";
/*
* the default LayerZero messaging behaviour is blocking, i.e. any failed message will block the channel
* this abstract class try-catch all fail messages and store locally for future retry. hence, non-blocking
* NOTE: if the srcAddress is not configured properly, it will still block the message pathway from (srcChainId, srcAddress)
*/
abstract contract NonblockingLzApp is LzApp {
using ExcessivelySafeCall for address;
constructor(address _endpoint) LzApp(_endpoint) {}
mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32))) public failedMessages;
event MessageFailed(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _payload, bytes _reason);
event RetryMessageSuccess(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _payloadHash);
// overriding the virtual function in LzReceiver
function _blockingLzReceive(
uint16 _srcChainId,
bytes memory _srcAddress,
uint64 _nonce,
bytes memory _payload
) internal virtual override {
(bool success, bytes memory reason) = address(this).excessivelySafeCall(
gasleft(),
150,
abi.encodeWithSelector(this.nonblockingLzReceive.selector, _srcChainId, _srcAddress, _nonce, _payload)
);
if (!success) {
_storeFailedMessage(_srcChainId, _srcAddress, _nonce, _payload, reason);
}
}
function _storeFailedMessage(
uint16 _srcChainId,
bytes memory _srcAddress,
uint64 _nonce,
bytes memory _payload,
bytes memory _reason
) internal virtual {
failedMessages[_srcChainId][_srcAddress][_nonce] = keccak256(_payload);
emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload, _reason);
}
function nonblockingLzReceive(
uint16 _srcChainId,
bytes calldata _srcAddress,
uint64 _nonce,
bytes calldata _payload
) public virtual {
// only internal transaction
require(_msgSender() == address(this), "NonblockingLzApp: caller must be LzApp");
_nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);
}
//@notice override this function
function _nonblockingLzReceive(
uint16 _srcChainId,
bytes memory _srcAddress,
uint64 _nonce,
bytes memory _payload
) internal virtual;
function retryMessage(
uint16 _srcChainId,
bytes calldata _srcAddress,
uint64 _nonce,
bytes calldata _payload
) public payable virtual {
// assert there is message to retry
bytes32 payloadHash = failedMessages[_srcChainId][_srcAddress][_nonce];
require(payloadHash != bytes32(0), "NonblockingLzApp: no stored message");
require(keccak256(_payload) == payloadHash, "NonblockingLzApp: invalid payload");
// clear the stored message
failedMessages[_srcChainId][_srcAddress][_nonce] = bytes32(0);
// execute the message. revert if it fails again
_nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);
emit RetryMessageSuccess(_srcChainId, _srcAddress, _nonce, payloadHash);
}
}// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; error GovernorCountingFractionalVoteWouldExceedWeight(); error GovernorCountingFractionalInvalidSupportValueNotVoteType(); error GovernorCountingFractionalInvalidVoteData(); error GovernorCountingFractionalVoteExceedWeight(); error GovernorCountingFractionalNoWeight(); error GovernorCountingFractionalAllWeightCast(); error InvalidTimepoint(); error NotExecutor(); error OmnichainGovernanceExecutorTxExecReverted(); error OmnichainProposalSenderDestinationChainNotTrustedSource(); error OmnichainProposalSenderInvalidEndpoint(); error OmnichainProposalSenderInvalidExecParams(); error OmnichainProposalSenderNoStoredPayload(); error ShortCircuitNumeratorGreaterThanQuorumDenominator(); error ZeroAddress();
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "./interfaces/ILayerZeroReceiver.sol";
import "./interfaces/ILayerZeroUserApplicationConfig.sol";
import "./interfaces/ILayerZeroEndpoint.sol";
import "../libraries/BytesLib.sol";
/*
* a generic LzReceiver implementation
*/
abstract contract LzApp is Ownable, ILayerZeroReceiver, ILayerZeroUserApplicationConfig {
using BytesLib for bytes;
// ua can not send payload larger than this by default, but it can be changed by the ua owner
uint public constant DEFAULT_PAYLOAD_SIZE_LIMIT = 10000;
ILayerZeroEndpoint public immutable lzEndpoint;
mapping(uint16 => bytes) public trustedRemoteLookup;
mapping(uint16 => mapping(uint16 => uint)) public minDstGasLookup;
mapping(uint16 => uint) public payloadSizeLimitLookup;
address public precrime;
event SetPrecrime(address precrime);
event SetTrustedRemote(uint16 _remoteChainId, bytes _path);
event SetTrustedRemoteAddress(uint16 _remoteChainId, bytes _remoteAddress);
event SetMinDstGas(uint16 _dstChainId, uint16 _type, uint _minDstGas);
constructor(address _endpoint) {
lzEndpoint = ILayerZeroEndpoint(_endpoint);
}
function lzReceive(
uint16 _srcChainId,
bytes calldata _srcAddress,
uint64 _nonce,
bytes calldata _payload
) public virtual override {
// lzReceive must be called by the endpoint for security
require(_msgSender() == address(lzEndpoint), "LzApp: invalid endpoint caller");
bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];
// if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.
require(
_srcAddress.length == trustedRemote.length && trustedRemote.length > 0 && keccak256(_srcAddress) == keccak256(trustedRemote),
"LzApp: invalid source sending contract"
);
_blockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);
}
// abstract function - the default behaviour of LayerZero is blocking. See: NonblockingLzApp if you dont need to enforce ordered messaging
function _blockingLzReceive(
uint16 _srcChainId,
bytes memory _srcAddress,
uint64 _nonce,
bytes memory _payload
) internal virtual;
function _lzSend(
uint16 _dstChainId,
bytes memory _payload,
address payable _refundAddress,
address _zroPaymentAddress,
bytes memory _adapterParams,
uint _nativeFee
) internal virtual {
bytes memory trustedRemote = trustedRemoteLookup[_dstChainId];
require(trustedRemote.length != 0, "LzApp: destination chain is not a trusted source");
_checkPayloadSize(_dstChainId, _payload.length);
lzEndpoint.send{value: _nativeFee}(_dstChainId, trustedRemote, _payload, _refundAddress, _zroPaymentAddress, _adapterParams);
}
function _checkGasLimit(
uint16 _dstChainId,
uint16 _type,
bytes memory _adapterParams,
uint _extraGas
) internal view virtual {
uint providedGasLimit = _getGasLimit(_adapterParams);
uint minGasLimit = minDstGasLookup[_dstChainId][_type];
require(minGasLimit > 0, "LzApp: minGasLimit not set");
require(providedGasLimit >= minGasLimit + _extraGas, "LzApp: gas limit is too low");
}
function _getGasLimit(bytes memory _adapterParams) internal pure virtual returns (uint gasLimit) {
require(_adapterParams.length >= 34, "LzApp: invalid adapterParams");
assembly {
gasLimit := mload(add(_adapterParams, 34))
}
}
function _checkPayloadSize(uint16 _dstChainId, uint _payloadSize) internal view virtual {
uint payloadSizeLimit = payloadSizeLimitLookup[_dstChainId];
if (payloadSizeLimit == 0) {
// use default if not set
payloadSizeLimit = DEFAULT_PAYLOAD_SIZE_LIMIT;
}
require(_payloadSize <= payloadSizeLimit, "LzApp: payload size is too large");
}
//---------------------------UserApplication config----------------------------------------
function getConfig(
uint16 _version,
uint16 _chainId,
address,
uint _configType
) external view returns (bytes memory) {
return lzEndpoint.getConfig(_version, _chainId, address(this), _configType);
}
// generic config for LayerZero user Application
function setConfig(
uint16 _version,
uint16 _chainId,
uint _configType,
bytes calldata _config
) external override onlyOwner {
lzEndpoint.setConfig(_version, _chainId, _configType, _config);
}
function setSendVersion(uint16 _version) external override onlyOwner {
lzEndpoint.setSendVersion(_version);
}
function setReceiveVersion(uint16 _version) external override onlyOwner {
lzEndpoint.setReceiveVersion(_version);
}
function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override onlyOwner {
lzEndpoint.forceResumeReceive(_srcChainId, _srcAddress);
}
// _path = abi.encodePacked(remoteAddress, localAddress)
// this function set the trusted path for the cross-chain communication
function setTrustedRemote(uint16 _remoteChainId, bytes calldata _path) external onlyOwner {
trustedRemoteLookup[_remoteChainId] = _path;
emit SetTrustedRemote(_remoteChainId, _path);
}
function setTrustedRemoteAddress(uint16 _remoteChainId, bytes calldata _remoteAddress) external onlyOwner {
trustedRemoteLookup[_remoteChainId] = abi.encodePacked(_remoteAddress, address(this));
emit SetTrustedRemoteAddress(_remoteChainId, _remoteAddress);
}
function getTrustedRemoteAddress(uint16 _remoteChainId) external view returns (bytes memory) {
bytes memory path = trustedRemoteLookup[_remoteChainId];
require(path.length != 0, "LzApp: no trusted path record");
return path.slice(0, path.length - 20); // the last 20 bytes should be address(this)
}
function setPrecrime(address _precrime) external onlyOwner {
precrime = _precrime;
emit SetPrecrime(_precrime);
}
function setMinDstGas(
uint16 _dstChainId,
uint16 _packetType,
uint _minGas
) external onlyOwner {
minDstGasLookup[_dstChainId][_packetType] = _minGas;
emit SetMinDstGas(_dstChainId, _packetType, _minGas);
}
// if the size is 0, it means default size limit
function setPayloadSizeLimit(uint16 _dstChainId, uint _size) external onlyOwner {
payloadSizeLimitLookup[_dstChainId] = _size;
}
//--------------------------- VIEW FUNCTION ----------------------------------------
function isTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool) {
bytes memory trustedSource = trustedRemoteLookup[_srcChainId];
return keccak256(trustedSource) == keccak256(_srcAddress);
}
}// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.7.6;
library ExcessivelySafeCall {
uint constant LOW_28_MASK = 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
/// @notice Use when you _really_ really _really_ don't trust the called
/// contract. This prevents the called contract from causing reversion of
/// the caller in as many ways as we can.
/// @dev The main difference between this and a solidity low-level call is
/// that we limit the number of bytes that the callee can cause to be
/// copied to caller memory. This prevents stupid things like malicious
/// contracts returning 10,000,000 bytes causing a local OOG when copying
/// to memory.
/// @param _target The address to call
/// @param _gas The amount of gas to forward to the remote contract
/// @param _maxCopy The maximum number of bytes of returndata to copy
/// to memory.
/// @param _calldata The data to send to the remote contract
/// @return success and returndata, as `.call()`. Returndata is capped to
/// `_maxCopy` bytes.
function excessivelySafeCall(
address _target,
uint _gas,
uint16 _maxCopy,
bytes memory _calldata
) internal returns (bool, bytes memory) {
// set up for assembly call
uint _toCopy;
bool _success;
bytes memory _returnData = new bytes(_maxCopy);
// dispatch message to recipient
// by assembly calling "handle" function
// we call via assembly to avoid memcopying a very large returndata
// returned by a malicious contract
assembly {
_success := call(
_gas, // gas
_target, // recipient
0, // ether value
add(_calldata, 0x20), // inloc
mload(_calldata), // inlen
0, // outloc
0 // outlen
)
// limit our copy to 256 bytes
_toCopy := returndatasize()
if gt(_toCopy, _maxCopy) {
_toCopy := _maxCopy
}
// Store the length of the copied bytes
mstore(_returnData, _toCopy)
// copy the bytes from returndata[0:_toCopy]
returndatacopy(add(_returnData, 0x20), 0, _toCopy)
}
return (_success, _returnData);
}
/// @notice Use when you _really_ really _really_ don't trust the called
/// contract. This prevents the called contract from causing reversion of
/// the caller in as many ways as we can.
/// @dev The main difference between this and a solidity low-level call is
/// that we limit the number of bytes that the callee can cause to be
/// copied to caller memory. This prevents stupid things like malicious
/// contracts returning 10,000,000 bytes causing a local OOG when copying
/// to memory.
/// @param _target The address to call
/// @param _gas The amount of gas to forward to the remote contract
/// @param _maxCopy The maximum number of bytes of returndata to copy
/// to memory.
/// @param _calldata The data to send to the remote contract
/// @return success and returndata, as `.call()`. Returndata is capped to
/// `_maxCopy` bytes.
function excessivelySafeStaticCall(
address _target,
uint _gas,
uint16 _maxCopy,
bytes memory _calldata
) internal view returns (bool, bytes memory) {
// set up for assembly call
uint _toCopy;
bool _success;
bytes memory _returnData = new bytes(_maxCopy);
// dispatch message to recipient
// by assembly calling "handle" function
// we call via assembly to avoid memcopying a very large returndata
// returned by a malicious contract
assembly {
_success := staticcall(
_gas, // gas
_target, // recipient
add(_calldata, 0x20), // inloc
mload(_calldata), // inlen
0, // outloc
0 // outlen
)
// limit our copy to 256 bytes
_toCopy := returndatasize()
if gt(_toCopy, _maxCopy) {
_toCopy := _maxCopy
}
// Store the length of the copied bytes
mstore(_returnData, _toCopy)
// copy the bytes from returndata[0:_toCopy]
returndatacopy(add(_returnData, 0x20), 0, _toCopy)
}
return (_success, _returnData);
}
/**
* @notice Swaps function selectors in encoded contract calls
* @dev Allows reuse of encoded calldata for functions with identical
* argument types but different names. It simply swaps out the first 4 bytes
* for the new selector. This function modifies memory in place, and should
* only be used with caution.
* @param _newSelector The new 4-byte selector
* @param _buf The encoded contract args
*/
function swapSelector(bytes4 _newSelector, bytes memory _buf) internal pure {
require(_buf.length >= 4);
uint _mask = LOW_28_MASK;
assembly {
// load the first word of
let _word := mload(add(_buf, 0x20))
// mask out the top 4 bytes
// /x
_word := and(_word, _mask)
_word := or(_newSelector, _word)
mstore(add(_buf, 0x20), _word)
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../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.
*
* The initial owner is set to the address provided by the deployer. 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;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @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 {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @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 {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_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
pragma solidity >=0.5.0;
interface ILayerZeroReceiver {
// @notice LayerZero endpoint will invoke this function to deliver the message on the destination
// @param _srcChainId - the source endpoint identifier
// @param _srcAddress - the source sending contract address from the source chain
// @param _nonce - the ordered message nonce
// @param _payload - the signed payload is the UA bytes has encoded to be sent
function lzReceive(
uint16 _srcChainId,
bytes calldata _srcAddress,
uint64 _nonce,
bytes calldata _payload
) external;
}// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;
interface ILayerZeroUserApplicationConfig {
// @notice set the configuration of the LayerZero messaging library of the specified version
// @param _version - messaging library version
// @param _chainId - the chainId for the pending config change
// @param _configType - type of configuration. every messaging library has its own convention.
// @param _config - configuration in the bytes. can encode arbitrary content.
function setConfig(
uint16 _version,
uint16 _chainId,
uint _configType,
bytes calldata _config
) external;
// @notice set the send() LayerZero messaging library version to _version
// @param _version - new messaging library version
function setSendVersion(uint16 _version) external;
// @notice set the lzReceive() LayerZero messaging library version to _version
// @param _version - new messaging library version
function setReceiveVersion(uint16 _version) external;
// @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload
// @param _srcChainId - the chainId of the source chain
// @param _srcAddress - the contract address of the source contract at the source chain
function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;
}// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;
import "./ILayerZeroUserApplicationConfig.sol";
interface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {
// @notice send a LayerZero message to the specified address at a LayerZero endpoint.
// @param _dstChainId - the destination chain identifier
// @param _destination - the address on destination chain (in bytes). address length/format may vary by chains
// @param _payload - a custom bytes payload to send to the destination contract
// @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address
// @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction
// @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination
function send(
uint16 _dstChainId,
bytes calldata _destination,
bytes calldata _payload,
address payable _refundAddress,
address _zroPaymentAddress,
bytes calldata _adapterParams
) external payable;
// @notice used by the messaging library to publish verified payload
// @param _srcChainId - the source chain identifier
// @param _srcAddress - the source contract (as bytes) at the source chain
// @param _dstAddress - the address on destination chain
// @param _nonce - the unbound message ordering nonce
// @param _gasLimit - the gas limit for external contract execution
// @param _payload - verified payload to send to the destination contract
function receivePayload(
uint16 _srcChainId,
bytes calldata _srcAddress,
address _dstAddress,
uint64 _nonce,
uint _gasLimit,
bytes calldata _payload
) external;
// @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain
// @param _srcChainId - the source chain identifier
// @param _srcAddress - the source chain contract address
function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);
// @notice get the outboundNonce from this source chain which, consequently, is always an EVM
// @param _srcAddress - the source chain contract address
function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);
// @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery
// @param _dstChainId - the destination chain identifier
// @param _userApplication - the user app address on this EVM chain
// @param _payload - the custom message to send over LayerZero
// @param _payInZRO - if false, user app pays the protocol fee in native token
// @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain
function estimateFees(
uint16 _dstChainId,
address _userApplication,
bytes calldata _payload,
bool _payInZRO,
bytes calldata _adapterParam
) external view returns (uint nativeFee, uint zroFee);
// @notice get this Endpoint's immutable source identifier
function getChainId() external view returns (uint16);
// @notice the interface to retry failed message on this Endpoint destination
// @param _srcChainId - the source chain identifier
// @param _srcAddress - the source chain contract address
// @param _payload - the payload to be retried
function retryPayload(
uint16 _srcChainId,
bytes calldata _srcAddress,
bytes calldata _payload
) external;
// @notice query if any STORED payload (message blocking) at the endpoint.
// @param _srcChainId - the source chain identifier
// @param _srcAddress - the source chain contract address
function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);
// @notice query if the _libraryAddress is valid for sending msgs.
// @param _userApplication - the user app address on this EVM chain
function getSendLibraryAddress(address _userApplication) external view returns (address);
// @notice query if the _libraryAddress is valid for receiving msgs.
// @param _userApplication - the user app address on this EVM chain
function getReceiveLibraryAddress(address _userApplication) external view returns (address);
// @notice query if the non-reentrancy guard for send() is on
// @return true if the guard is on. false otherwise
function isSendingPayload() external view returns (bool);
// @notice query if the non-reentrancy guard for receive() is on
// @return true if the guard is on. false otherwise
function isReceivingPayload() external view returns (bool);
// @notice get the configuration of the LayerZero messaging library of the specified version
// @param _version - messaging library version
// @param _chainId - the chainId for the pending config change
// @param _userApplication - the contract address of the user application
// @param _configType - type of configuration. every messaging library has its own convention.
function getConfig(
uint16 _version,
uint16 _chainId,
address _userApplication,
uint _configType
) external view returns (bytes memory);
// @notice get the send() LayerZero messaging library version
// @param _userApplication - the contract address of the user application
function getSendVersion(address _userApplication) external view returns (uint16);
// @notice get the lzReceive() LayerZero messaging library version
// @param _userApplication - the contract address of the user application
function getReceiveVersion(address _userApplication) external view returns (uint16);
}// SPDX-License-Identifier: Unlicense /* * @title Solidity Bytes Arrays Utils * @author Gonçalo Sá <[email protected]> * * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity. * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage. */ pragma solidity >=0.8.0 <0.9.0; library BytesLib { function concat(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bytes memory) { bytes memory tempBytes; assembly { // Get a location of some free memory and store it in tempBytes as // Solidity does for memory variables. tempBytes := mload(0x40) // Store the length of the first bytes array at the beginning of // the memory for tempBytes. let length := mload(_preBytes) mstore(tempBytes, length) // Maintain a memory counter for the current write location in the // temp bytes array by adding the 32 bytes for the array length to // the starting location. let mc := add(tempBytes, 0x20) // Stop copying when the memory counter reaches the length of the // first bytes array. let end := add(mc, length) for { // Initialize a copy counter to the start of the _preBytes data, // 32 bytes into its memory. let cc := add(_preBytes, 0x20) } lt(mc, end) { // Increase both counters by 32 bytes each iteration. mc := add(mc, 0x20) cc := add(cc, 0x20) } { // Write the _preBytes data into the tempBytes memory 32 bytes // at a time. mstore(mc, mload(cc)) } // Add the length of _postBytes to the current length of tempBytes // and store it as the new length in the first 32 bytes of the // tempBytes memory. length := mload(_postBytes) mstore(tempBytes, add(length, mload(tempBytes))) // Move the memory counter back from a multiple of 0x20 to the // actual end of the _preBytes data. mc := end // Stop copying when the memory counter reaches the new combined // length of the arrays. end := add(mc, length) for { let cc := add(_postBytes, 0x20) } lt(mc, end) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { mstore(mc, mload(cc)) } // Update the free-memory pointer by padding our last write location // to 32 bytes: add 31 bytes to the end of tempBytes to move to the // next 32 byte block, then round down to the nearest multiple of // 32. If the sum of the length of the two arrays is zero then add // one before rounding down to leave a blank 32 bytes (the length block with 0). mstore( 0x40, and( add(add(end, iszero(add(length, mload(_preBytes)))), 31), not(31) // Round down to the nearest 32 bytes. ) ) } return tempBytes; } function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal { assembly { // Read the first 32 bytes of _preBytes storage, which is the length // of the array. (We don't need to use the offset into the slot // because arrays use the entire slot.) let fslot := sload(_preBytes.slot) // Arrays of 31 bytes or less have an even value in their slot, // while longer arrays have an odd value. The actual length is // the slot divided by two for odd values, and the lowest order // byte divided by two for even values. // If the slot is even, bitwise and the slot with 255 and divide by // two to get the length. If the slot is odd, bitwise and the slot // with -1 and divide by two. let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2) let mlength := mload(_postBytes) let newlength := add(slength, mlength) // slength can contain both the length and contents of the array // if length < 32 bytes so let's prepare for that // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage switch add(lt(slength, 32), lt(newlength, 32)) case 2 { // Since the new array still fits in the slot, we just need to // update the contents of the slot. // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length sstore( _preBytes.slot, // all the modifications to the slot are inside this // next block add( // we can just add to the slot contents because the // bytes we want to change are the LSBs fslot, add( mul( div( // load the bytes from memory mload(add(_postBytes, 0x20)), // zero all bytes to the right exp(0x100, sub(32, mlength)) ), // and now shift left the number of bytes to // leave space for the length in the slot exp(0x100, sub(32, newlength)) ), // increase length by the double of the memory // bytes length mul(mlength, 2) ) ) ) } case 1 { // The stored value fits in the slot, but the combined value // will exceed it. // get the keccak hash to get the contents of the array mstore(0x0, _preBytes.slot) let sc := add(keccak256(0x0, 0x20), div(slength, 32)) // save new length sstore(_preBytes.slot, add(mul(newlength, 2), 1)) // The contents of the _postBytes array start 32 bytes into // the structure. Our first read should obtain the `submod` // bytes that can fit into the unused space in the last word // of the stored array. To get this, we read 32 bytes starting // from `submod`, so the data we read overlaps with the array // contents by `submod` bytes. Masking the lowest-order // `submod` bytes allows us to add that value directly to the // stored value. let submod := sub(32, slength) let mc := add(_postBytes, submod) let end := add(_postBytes, mlength) let mask := sub(exp(0x100, submod), 1) sstore(sc, add(and(fslot, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00), and(mload(mc), mask))) for { mc := add(mc, 0x20) sc := add(sc, 1) } lt(mc, end) { sc := add(sc, 1) mc := add(mc, 0x20) } { sstore(sc, mload(mc)) } mask := exp(0x100, sub(mc, end)) sstore(sc, mul(div(mload(mc), mask), mask)) } default { // get the keccak hash to get the contents of the array mstore(0x0, _preBytes.slot) // Start copying to the last used word of the stored array. let sc := add(keccak256(0x0, 0x20), div(slength, 32)) // save new length sstore(_preBytes.slot, add(mul(newlength, 2), 1)) // Copy over the first `submod` bytes of the new data as in // case 1 above. let slengthmod := mod(slength, 32) let mlengthmod := mod(mlength, 32) let submod := sub(32, slengthmod) let mc := add(_postBytes, submod) let end := add(_postBytes, mlength) let mask := sub(exp(0x100, submod), 1) sstore(sc, add(sload(sc), and(mload(mc), mask))) for { sc := add(sc, 1) mc := add(mc, 0x20) } lt(mc, end) { sc := add(sc, 1) mc := add(mc, 0x20) } { sstore(sc, mload(mc)) } mask := exp(0x100, sub(mc, end)) sstore(sc, mul(div(mload(mc), mask), mask)) } } } function slice( bytes memory _bytes, uint _start, uint _length ) internal pure returns (bytes memory) { require(_length + 31 >= _length, "slice_overflow"); require(_bytes.length >= _start + _length, "slice_outOfBounds"); bytes memory tempBytes; assembly { switch iszero(_length) case 0 { // Get a location of some free memory and store it in tempBytes as // Solidity does for memory variables. tempBytes := mload(0x40) // The first word of the slice result is potentially a partial // word read from the original array. To read it, we calculate // the length of that partial word and start copying that many // bytes into the array. The first word we copy will start with // data we don't care about, but the last `lengthmod` bytes will // land at the beginning of the contents of the new array. When // we're done copying, we overwrite the full first word with // the actual length of the slice. let lengthmod := and(_length, 31) // The multiplication in the next line is necessary // because when slicing multiples of 32 bytes (lengthmod == 0) // the following copy loop was copying the origin's length // and then ending prematurely not copying everything it should. let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod))) let end := add(mc, _length) for { // The multiplication in the next line has the same exact purpose // as the one above. let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start) } lt(mc, end) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { mstore(mc, mload(cc)) } mstore(tempBytes, _length) //update free-memory pointer //allocating the array padded to 32 bytes like the compiler does now mstore(0x40, and(add(mc, 31), not(31))) } //if we want a zero-length slice let's just return a zero-length array default { tempBytes := mload(0x40) //zero out the 32 bytes slice we are about to return //we need to do it because Solidity does not garbage collect mstore(tempBytes, 0) mstore(0x40, add(tempBytes, 0x20)) } } return tempBytes; } function toAddress(bytes memory _bytes, uint _start) internal pure returns (address) { require(_bytes.length >= _start + 20, "toAddress_outOfBounds"); address tempAddress; assembly { tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000) } return tempAddress; } function toUint8(bytes memory _bytes, uint _start) internal pure returns (uint8) { require(_bytes.length >= _start + 1, "toUint8_outOfBounds"); uint8 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x1), _start)) } return tempUint; } function toUint16(bytes memory _bytes, uint _start) internal pure returns (uint16) { require(_bytes.length >= _start + 2, "toUint16_outOfBounds"); uint16 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x2), _start)) } return tempUint; } function toUint32(bytes memory _bytes, uint _start) internal pure returns (uint32) { require(_bytes.length >= _start + 4, "toUint32_outOfBounds"); uint32 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x4), _start)) } return tempUint; } function toUint64(bytes memory _bytes, uint _start) internal pure returns (uint64) { require(_bytes.length >= _start + 8, "toUint64_outOfBounds"); uint64 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x8), _start)) } return tempUint; } function toUint96(bytes memory _bytes, uint _start) internal pure returns (uint96) { require(_bytes.length >= _start + 12, "toUint96_outOfBounds"); uint96 tempUint; assembly { tempUint := mload(add(add(_bytes, 0xc), _start)) } return tempUint; } function toUint128(bytes memory _bytes, uint _start) internal pure returns (uint128) { require(_bytes.length >= _start + 16, "toUint128_outOfBounds"); uint128 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x10), _start)) } return tempUint; } function toUint256(bytes memory _bytes, uint _start) internal pure returns (uint) { require(_bytes.length >= _start + 32, "toUint256_outOfBounds"); uint tempUint; assembly { tempUint := mload(add(add(_bytes, 0x20), _start)) } return tempUint; } function toBytes32(bytes memory _bytes, uint _start) internal pure returns (bytes32) { require(_bytes.length >= _start + 32, "toBytes32_outOfBounds"); bytes32 tempBytes32; assembly { tempBytes32 := mload(add(add(_bytes, 0x20), _start)) } return tempBytes32; } function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) { bool success = true; assembly { let length := mload(_preBytes) // if lengths don't match the arrays are not equal switch eq(length, mload(_postBytes)) case 1 { // cb is a circuit breaker in the for loop since there's // no said feature for inline assembly loops // cb = 1 - don't breaker // cb = 0 - break let cb := 1 let mc := add(_preBytes, 0x20) let end := add(mc, length) for { let cc := add(_postBytes, 0x20) // the next line is the loop condition: // while(uint256(mc < end) + cb == 2) } eq(add(lt(mc, end), cb), 2) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { // if any of these checks fails then arrays are not equal if iszero(eq(mload(mc), mload(cc))) { // unsuccess: success := 0 cb := 0 } } } default { // unsuccess: success := 0 } } return success; } function equalStorage(bytes storage _preBytes, bytes memory _postBytes) internal view returns (bool) { bool success = true; assembly { // we know _preBytes_offset is 0 let fslot := sload(_preBytes.slot) // Decode the length of the stored array like in concatStorage(). let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2) let mlength := mload(_postBytes) // if lengths don't match the arrays are not equal switch eq(slength, mlength) case 1 { // slength can contain both the length and contents of the array // if length < 32 bytes so let's prepare for that // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage if iszero(iszero(slength)) { switch lt(slength, 32) case 1 { // blank the last byte which is the length fslot := mul(div(fslot, 0x100), 0x100) if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) { // unsuccess: success := 0 } } default { // cb is a circuit breaker in the for loop since there's // no said feature for inline assembly loops // cb = 1 - don't breaker // cb = 0 - break let cb := 1 // get the keccak hash to get the contents of the array mstore(0x0, _preBytes.slot) let sc := keccak256(0x0, 0x20) let mc := add(_postBytes, 0x20) let end := add(mc, mlength) // the next line is the loop condition: // while(uint256(mc < end) + cb == 2) for { } eq(add(lt(mc, end), cb), 2) { sc := add(sc, 1) mc := add(mc, 0x20) } { if iszero(eq(sload(sc), mload(mc))) { // unsuccess: success := 0 cb := 0 } } } } } default { // unsuccess: success := 0 } } return success; } }
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @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;
}
}{
"remappings": [
"ds-test/=lib/forge-std/lib/ds-test/src/",
"forge-std/=lib/forge-std/src/",
"oz/=lib/openzeppelin-contracts/contracts/",
"oz-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
"lz/=lib/solidity-examples/contracts/",
"stringutils/=lib/solidity-stringutils/",
"@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
"solidity-examples/=lib/solidity-examples/contracts/",
"solidity-stringutils/=lib/solidity-stringutils/"
],
"optimizer": {
"enabled": true,
"runs": 1000
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "paris",
"viaIR": true,
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_endpoint","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"OmnichainGovernanceExecutorTxExecReverted","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"indexed":false,"internalType":"uint64","name":"_nonce","type":"uint64"},{"indexed":false,"internalType":"bytes","name":"_payload","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"_reason","type":"bytes"}],"name":"MessageFailed","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":"bytes","name":"payload","type":"bytes"}],"name":"ProposalExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"indexed":false,"internalType":"uint64","name":"_nonce","type":"uint64"},{"indexed":false,"internalType":"bytes","name":"_reason","type":"bytes"}],"name":"ProposalFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"indexed":false,"internalType":"uint64","name":"_nonce","type":"uint64"},{"indexed":false,"internalType":"bytes32","name":"_payloadHash","type":"bytes32"}],"name":"RetryMessageSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"_type","type":"uint16"},{"indexed":false,"internalType":"uint256","name":"_minDstGas","type":"uint256"}],"name":"SetMinDstGas","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"precrime","type":"address"}],"name":"SetPrecrime","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_remoteChainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"_path","type":"bytes"}],"name":"SetTrustedRemote","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_remoteChainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"_remoteAddress","type":"bytes"}],"name":"SetTrustedRemoteAddress","type":"event"},{"inputs":[],"name":"DEFAULT_PAYLOAD_SIZE_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"uint64","name":"","type":"uint64"}],"name":"failedMessages","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"}],"name":"forceResumeReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"},{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"_configType","type":"uint256"}],"name":"getConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_remoteChainId","type":"uint16"}],"name":"getTrustedRemoteAddress","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"}],"name":"isTrustedRemote","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lzEndpoint","outputs":[{"internalType":"contract ILayerZeroEndpoint","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"lzReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"uint16","name":"","type":"uint16"}],"name":"minDstGasLookup","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":"_nonce","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"nonblockingLzReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"payloadSizeLimitLookup","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"precrime","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"retryMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"},{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"uint256","name":"_configType","type":"uint256"},{"internalType":"bytes","name":"_config","type":"bytes"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"internalType":"uint16","name":"_packetType","type":"uint16"},{"internalType":"uint256","name":"_minGas","type":"uint256"}],"name":"setMinDstGas","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"internalType":"uint256","name":"_size","type":"uint256"}],"name":"setPayloadSizeLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_precrime","type":"address"}],"name":"setPrecrime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"}],"name":"setReceiveVersion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"}],"name":"setSendVersion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_remoteChainId","type":"uint16"},{"internalType":"bytes","name":"_path","type":"bytes"}],"name":"setTrustedRemote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_remoteChainId","type":"uint16"},{"internalType":"bytes","name":"_remoteAddress","type":"bytes"}],"name":"setTrustedRemoteAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"trustedRemoteLookup","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60a0346100f757601f61203438819003918201601f19168301916001600160401b038311848410176100fc578084926020946040528339810103126100f757516001600160a01b0390818116908190036100f75733156100de576000543360018060a01b0319821617600055604051923391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a36080526001600655611f2190816101138239608051818181610289015281816103ab0152818161049c015281816105e901528181610ef70152818161101701526115240152f35b604051631e4fbdf760e01b815260006004820152602490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c80621d3567146101aa57806307e0db17146101a55780630df37483146101a057806310ddb1371461019b5780633d8b38f6146101965780633f1f4fa41461019157806342d65a8d1461018c5780635b8c41e61461018757806366ad5c8a14610182578063715018a61461017d5780637533d788146101785780638cfd8f5c146101735780638da5cb5b1461016e578063950c8a74146101695780639f38369a14610164578063a6c3d1651461015f578063b353aaa71461015a578063baf3292d14610155578063c446183414610150578063cbed8b9c1461014b578063d1deba1f14610146578063df2a5b3b14610141578063eb8d72b71461013c578063f2fde38b146101375763f5ecbdbc0361000e576114a1565b6113f1565b6112a6565b611213565b6110c0565b610fc2565b610fa5565b610f2c565b610ed7565b610d47565b610c9d565b610c76565b610c4f565b610bfc565b610bb3565b610a34565b610818565b61076a565b6105c7565b610592565b610547565b61046e565b610433565b61037d565b61026c565b6004359061ffff821682036101c057565b600080fd5b6024359061ffff821682036101c057565b9181601f840112156101c05782359167ffffffffffffffff83116101c057602083818601950101116101c057565b9060806003198301126101c05760043561ffff811681036101c0579167ffffffffffffffff906024358281116101c05781610241916004016101d6565b9390939260443581811681036101c057926064359182116101c057610268916004016101d6565b9091565b346101c05761027a36610204565b91929493906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163303610339576102fe61030692610019976102f76102dd6102d88a61ffff166000526001602052604060002090565b610ad5565b805190818414918261032f575b508161030c575b50611588565b36916106ea565b9236916106ea565b92611822565b90506103193684866106ea565b60208151910120906020815191012014386102f1565b15159150386102ea565b606460405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c657200006044820152fd5b346101c05760006020366003190112610430576103986101af565b6103a061193b565b816001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691823b1561042c57602461ffff918360405195869485937f07e0db170000000000000000000000000000000000000000000000000000000085521660048401525af180156104275761041b575080f35b61042490610677565b80f35b6115f9565b5080fd5b80fd5b346101c05760403660031901126101c05761ffff61044f6101af565b61045761193b565b166000526003602052602435604060002055600080f35b346101c05760006020366003190112610430576104896101af565b61049161193b565b816001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691823b1561042c57602461ffff918360405195869485937f10ddb1370000000000000000000000000000000000000000000000000000000085521660048401525af180156104275761041b575080f35b9060406003198301126101c05760043561ffff811681036101c057916024359067ffffffffffffffff82116101c057610268916004016101d6565b346101c057602061ffff61058361055d3661050c565b93909116600052600184526105756040600020610ad5565b8481519101209236916106ea565b82815191012014604051908152f35b346101c05760203660031901126101c05761ffff6105ae6101af565b1660005260036020526020604060002054604051908152f35b346101c0576105d53661050c565b91906105df61193b565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691823b156101c057604051928380927f42d65a8d0000000000000000000000000000000000000000000000000000000082528161064f6000988997889460048501611626565b03925af180156104275761041b575080f35b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff811161068b57604052565b610661565b60c0810190811067ffffffffffffffff82111761068b57604052565b90601f8019910116810190811067ffffffffffffffff82111761068b57604052565b67ffffffffffffffff811161068b57601f01601f191660200190565b9291926106f6826106ce565b9161070460405193846106ac565b8294818452818301116101c0578281602093846000960137010152565b60005b8381106107345750506000910152565b8181015183820152602001610724565b60209061075e928260405194838680955193849201610721565b82019081520301902090565b346101c05760603660031901126101c0576107836101af565b67ffffffffffffffff6024358181116101c057366023820112156101c0576107b59036906024816004013591016106ea565b9060443590811681036101c0576107ea610803926107e46108149561ffff166000526005602052604060002090565b90610744565b9067ffffffffffffffff16600052602052604060002090565b546040519081529081906020820190565b0390f35b346101c05761082636610204565b9291509293503033036109bf5761084a936108429136916106ea565b5036916106ea565b805160209082016080838383019203126101c057818301519167ffffffffffffffff928381116101c05784019282603f850112156101c05781840151936108908561197f565b9461089e60405196876106ac565b80865260408487019160051b830101918583116101c0576040859101915b8383106109a5575050505060408501518181116101c05783836108e192880101611997565b9260608601518281116101c05781846108fc928901016119f8565b9260808701519283116101c05761091592870101611a8c565b9060005b8451811015610970578061096a61094261093560019489611b0c565b516001600160a01b031690565b61094c8388611b0c565b516109578487611b0c565b51906109638589611b0c565b5192611dc3565b01610919565b6040517f5f1c84a01d3bb49fae8cd2b12e5cbc6b36654a70f3ae95106da35a58753a711190806109a08982610b9f565b0390a1005b819083516109b281610f1b565b81520191019084906108bc565b608460405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d75737420626560448201527f204c7a41707000000000000000000000000000000000000000000000000000006064820152fd5b60009103126101c057565b346101c05760008060031936011261043057610a4e61193b565b806001600160a01b03815473ffffffffffffffffffffffffffffffffffffffff1981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b90600182811c92168015610acb575b6020831014610ab557565b634e487b7160e01b600052602260045260246000fd5b91607f1691610aaa565b90604051918260008254610ae881610a9b565b90818452602094600191600181169081600014610b585750600114610b19575b505050610b17925003836106ac565b565b600090815285812095935091905b818310610b40575050610b179350820101388080610b08565b85548884018501529485019487945091830191610b27565b92505050610b1794925060ff191682840152151560051b820101388080610b08565b90602091610b9381518092818552858086019101610721565b601f01601f1916010190565b906020610bb0928181520190610b7a565b90565b346101c05760203660031901126101c05761ffff610bcf6101af565b166000526001602052610814610be86040600020610ad5565b604051918291602083526020830190610b7a565b346101c05760403660031901126101c0576020610c46610c1a6101af565b61ffff610c256101c5565b91166000526002835260406000209061ffff16600052602052604060002090565b54604051908152f35b346101c05760003660031901126101c05760206001600160a01b0360005416604051908152f35b346101c05760003660031901126101c05760206001600160a01b0360045416604051908152f35b346101c05760203660031901126101c05761ffff610cb96101af565b166000526001602052610ccf6040600020610ad5565b805115610d03578051601319810191908211610cfe5761081491610cf291611d43565b60405191829182610b9f565b611641565b606460405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152fd5b346101c057610d553661050c565b9190610d5f61193b565b60405191602092848385830137610d8b6034828781013060601b888201520360148101845201826106ac565b60009361ffff8316855260019060018152604086209280519267ffffffffffffffff841161068b57610dc784610dc18754610a9b565b87611657565b82601f8511600114610e3f57505082879893610e2e9593610e1f937f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce9a92610e34575b50508160011b916000199060031b1c19161790565b90555b60405193849384611626565b0390a180f35b015190503880610e0a565b929190601f19851690610e5787600052602060002090565b948a915b838310610ec0575050509260019285927f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce9a9b96610e2e989610610ea7575b505050811b019055610e22565b015160001960f88460031b161c19169055388080610e9a565b848601518755958601959481019491810191610e5b565b346101c05760003660031901126101c05760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b6001600160a01b038116036101c057565b346101c05760203660031901126101c0577f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b60206001600160a01b03600435610f7481610f1b565b610f7c61193b565b168073ffffffffffffffffffffffffffffffffffffffff196004541617600455604051908152a1005b346101c05760003660031901126101c05760206040516127108152f35b346101c05760803660031901126101c057610fdb6101af565b610fe36101c5565b60643567ffffffffffffffff81116101c0576110039036906004016101d6565b909261100d61193b565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690813b156101c0576000809461109d604051978896879586947fcbed8b9c00000000000000000000000000000000000000000000000000000000865261ffff80921660048701521660248501526044356044850152608060648501526084840191611605565b03925af18015610427576110ad57005b806110ba61001992610677565b80610a29565b6110c936610204565b9161ffff8694929616600052600560205261111181604060002060206040518092878b8337878201908152030190209067ffffffffffffffff16600052602052604060002090565b549182156111a9577fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e5966109a09461119d9161119891600061118c876107ea8d896111868f6111728f611165368c8e6106ea565b60208151910120146116c6565b61ffff166000526005602052604060002090565b916116ad565b5561084236868c6106ea565b611b36565b60405195869586611737565b608460405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201527f61676500000000000000000000000000000000000000000000000000000000006064820152fd5b346101c05760603660031901126101c0577f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac0606061124f6101af565b6112576101c5565b906044359061126461193b565b61ffff80911692836000526002602052826112918260406000209061ffff16600052602052604060002090565b556040519384521660208301526040820152a1005b346101c0576112b43661050c565b91906112be61193b565b60009161ffff81168352600160206001602052604085209167ffffffffffffffff871161068b576112f9876112f38554610a9b565b85611657565b8591601f881160011461135b57505094610e2e91610e1f828088997ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab9991611350575b508160011b916000199060031b1c19161790565b90508701353861133c565b9190601f1988169061137285600052602060002090565b9388915b8383106113da5750505091610e2e9391887ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab989994106113c0575b5050600182811b019055610e22565b860135600019600385901b60f8161c1916905538806113b1565b888501358655948501949381019391810191611376565b346101c05760203660031901126101c05760043561140e81610f1b565b61141661193b565b6001600160a01b0380911680156114705760009182548273ffffffffffffffffffffffffffffffffffffffff198216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b60246040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152fd5b346101c05760803660031901126101c0576114ba6101af565b6114c26101c5565b906114ce604435610f1b565b604051917ff5ecbdbc00000000000000000000000000000000000000000000000000000000835261ffff809216600484015216602482015230604482015260643560648201526000816084816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa80156104275761081491600091611565575b5060405191829182610b9f565b61158291503d806000833e61157a81836106ac565b8101906117be565b38611558565b1561158f57565b608460405162461bcd60e51b815260206004820152602660248201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152fd5b6040513d6000823e3d90fd5b908060209392818452848401376000828201840152601f01601f1916010190565b60409061ffff610bb095931681528160208201520191611605565b634e487b7160e01b600052601160045260246000fd5b90601f811161166557505050565b6000916000526020600020906020601f850160051c830194106116a3575b601f0160051c01915b82811061169857505050565b81815560010161168c565b9092508290611683565b6020919283604051948593843782019081520301902090565b156116cd57565b608460405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f6160448201527f64000000000000000000000000000000000000000000000000000000000000006064820152fd5b916117649060609461ffff67ffffffffffffffff9499989799168552608060208601526080850191611605565b951660408201520152565b9092919261177c816106ce565b9161178a60405193846106ac565b8294828452828201116101c0576020610b17930190610721565b9080601f830112156101c0578151610bb09260200161176f565b906020828203126101c057815167ffffffffffffffff81116101c057610bb092016117a4565b9061180e610bb0959361ffff67ffffffffffffffff93168452608060208501526080840190610b7a565b931660408201526060818403910152610b7a565b90919280516020820120905a61752f198101908111610cfe57604051906118888261187a60208201957f66ad5c8a0000000000000000000000000000000000000000000000000000000087528a8a8a602486016117e4565b03601f1981018452836106ac565b600080916040519461189986610690565b6096865282602087019560a036883751923090f1903d9060968211611932575b6000908285523e156118cd575b5050505050565b84611925926119187f9c8956b55a8d2adbd435a058f8e11a447b2bf5c72abb98457e20050587ba9b96976107ea6119128861ffff166000526005602052604060002090565b89610744565b55604051948594856117e4565b0390a138808080806118c6565b609691506118b9565b6001600160a01b0360005416330361194f57565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fd5b67ffffffffffffffff811161068b5760051b60200190565b9080601f830112156101c0578151906020916119b28161197f565b936119c060405195866106ac565b81855260208086019260051b8201019283116101c057602001905b8282106119e9575050505090565b815181529083019083016119db565b9080601f830112156101c057815191602091611a138461197f565b936040611a2360405196876106ac565b818652848087019260051b850101938385116101c057858101925b858410611a4f575050505050505090565b835167ffffffffffffffff81116101c057820185603f820112156101c0578791611a818783878680960151910161176f565b815201930192611a3e565b81601f820112156101c057805191602091611aa68461197f565b93611ab460405195866106ac565b808552838086019160051b830101928084116101c057848301915b848310611adf5750505050505090565b825167ffffffffffffffff81116101c0578691611b01848480948901016117a4565b815201920191611acf565b8051821015611b205760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b8051916020928201926080838286019503126101c0578083015167ffffffffffffffff908181116101c05784019085603f830112156101c0578282015191611b7d8361197f565b92611b8b60405194856106ac565b80845260408585019160051b830101918883116101c0576040869101915b838310611c85575050505060408501518181116101c0578684611bce92880101611997565b9560608601518281116101c0578185611be9928901016119f8565b9360808701519283116101c057611c0292870101611a8c565b9260005b8251811015611c495780611c43611c2261093560019487611b0c565b611c2c838b611b0c565b51611c378489611b0c565b5190610963858b611b0c565b01611c06565b509450505050611c807f5f1c84a01d3bb49fae8cd2b12e5cbc6b36654a70f3ae95106da35a58753a71119160405191829182610b9f565b0390a1565b81908351611c9281610f1b565b8152019101908590611ba9565b90601f8201809211610cfe57565b15611cb457565b606460405162461bcd60e51b815260206004820152600e60248201527f736c6963655f6f766572666c6f770000000000000000000000000000000000006044820152fd5b15611cff57565b606460405162461bcd60e51b815260206004820152601160248201527f736c6963655f6f75744f66426f756e64730000000000000000000000000000006044820152fd5b611d5782611d5081611c9f565b1015611cad565b611d648282511015611cf8565b81611d7c575050604051600081526020810160405290565b60405191601f811691821560051b808486010193838501920101905b808410611db05750508252601f01601f191660405290565b9092835181526020809101930190611d98565b600260065414611e915760009384936002600655805180158614611e30575050915b602083519301915af1611df6611ebb565b5015611e0657610b176001600655565b60046040517fb7bfed8c000000000000000000000000000000000000000000000000000000008152fd5b7fffffffff000000000000000000000000000000000000000000000000000000006024916020611e8b940120166040519384916020830152611e7b8151809260208686019101610721565b81010360048101845201826106ac565b91611de5565b60046040517f3ee5aeb5000000000000000000000000000000000000000000000000000000008152fd5b3d15611ee6573d90611ecc826106ce565b91611eda60405193846106ac565b82523d6000602084013e565b60609056fea264697066735822122083c261228f179b8fe9964de49d4626b97dc1415ef28924b9f38cc0aa8cd5995364736f6c634300081700330000000000000000000000003a73033c0b1407574c76bdbac67f126f6b4a9aa9
Deployed Bytecode
0x6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c80621d3567146101aa57806307e0db17146101a55780630df37483146101a057806310ddb1371461019b5780633d8b38f6146101965780633f1f4fa41461019157806342d65a8d1461018c5780635b8c41e61461018757806366ad5c8a14610182578063715018a61461017d5780637533d788146101785780638cfd8f5c146101735780638da5cb5b1461016e578063950c8a74146101695780639f38369a14610164578063a6c3d1651461015f578063b353aaa71461015a578063baf3292d14610155578063c446183414610150578063cbed8b9c1461014b578063d1deba1f14610146578063df2a5b3b14610141578063eb8d72b71461013c578063f2fde38b146101375763f5ecbdbc0361000e576114a1565b6113f1565b6112a6565b611213565b6110c0565b610fc2565b610fa5565b610f2c565b610ed7565b610d47565b610c9d565b610c76565b610c4f565b610bfc565b610bb3565b610a34565b610818565b61076a565b6105c7565b610592565b610547565b61046e565b610433565b61037d565b61026c565b6004359061ffff821682036101c057565b600080fd5b6024359061ffff821682036101c057565b9181601f840112156101c05782359167ffffffffffffffff83116101c057602083818601950101116101c057565b9060806003198301126101c05760043561ffff811681036101c0579167ffffffffffffffff906024358281116101c05781610241916004016101d6565b9390939260443581811681036101c057926064359182116101c057610268916004016101d6565b9091565b346101c05761027a36610204565b91929493906001600160a01b037f0000000000000000000000003a73033c0b1407574c76bdbac67f126f6b4a9aa9163303610339576102fe61030692610019976102f76102dd6102d88a61ffff166000526001602052604060002090565b610ad5565b805190818414918261032f575b508161030c575b50611588565b36916106ea565b9236916106ea565b92611822565b90506103193684866106ea565b60208151910120906020815191012014386102f1565b15159150386102ea565b606460405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c657200006044820152fd5b346101c05760006020366003190112610430576103986101af565b6103a061193b565b816001600160a01b037f0000000000000000000000003a73033c0b1407574c76bdbac67f126f6b4a9aa91691823b1561042c57602461ffff918360405195869485937f07e0db170000000000000000000000000000000000000000000000000000000085521660048401525af180156104275761041b575080f35b61042490610677565b80f35b6115f9565b5080fd5b80fd5b346101c05760403660031901126101c05761ffff61044f6101af565b61045761193b565b166000526003602052602435604060002055600080f35b346101c05760006020366003190112610430576104896101af565b61049161193b565b816001600160a01b037f0000000000000000000000003a73033c0b1407574c76bdbac67f126f6b4a9aa91691823b1561042c57602461ffff918360405195869485937f10ddb1370000000000000000000000000000000000000000000000000000000085521660048401525af180156104275761041b575080f35b9060406003198301126101c05760043561ffff811681036101c057916024359067ffffffffffffffff82116101c057610268916004016101d6565b346101c057602061ffff61058361055d3661050c565b93909116600052600184526105756040600020610ad5565b8481519101209236916106ea565b82815191012014604051908152f35b346101c05760203660031901126101c05761ffff6105ae6101af565b1660005260036020526020604060002054604051908152f35b346101c0576105d53661050c565b91906105df61193b565b6001600160a01b037f0000000000000000000000003a73033c0b1407574c76bdbac67f126f6b4a9aa91691823b156101c057604051928380927f42d65a8d0000000000000000000000000000000000000000000000000000000082528161064f6000988997889460048501611626565b03925af180156104275761041b575080f35b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff811161068b57604052565b610661565b60c0810190811067ffffffffffffffff82111761068b57604052565b90601f8019910116810190811067ffffffffffffffff82111761068b57604052565b67ffffffffffffffff811161068b57601f01601f191660200190565b9291926106f6826106ce565b9161070460405193846106ac565b8294818452818301116101c0578281602093846000960137010152565b60005b8381106107345750506000910152565b8181015183820152602001610724565b60209061075e928260405194838680955193849201610721565b82019081520301902090565b346101c05760603660031901126101c0576107836101af565b67ffffffffffffffff6024358181116101c057366023820112156101c0576107b59036906024816004013591016106ea565b9060443590811681036101c0576107ea610803926107e46108149561ffff166000526005602052604060002090565b90610744565b9067ffffffffffffffff16600052602052604060002090565b546040519081529081906020820190565b0390f35b346101c05761082636610204565b9291509293503033036109bf5761084a936108429136916106ea565b5036916106ea565b805160209082016080838383019203126101c057818301519167ffffffffffffffff928381116101c05784019282603f850112156101c05781840151936108908561197f565b9461089e60405196876106ac565b80865260408487019160051b830101918583116101c0576040859101915b8383106109a5575050505060408501518181116101c05783836108e192880101611997565b9260608601518281116101c05781846108fc928901016119f8565b9260808701519283116101c05761091592870101611a8c565b9060005b8451811015610970578061096a61094261093560019489611b0c565b516001600160a01b031690565b61094c8388611b0c565b516109578487611b0c565b51906109638589611b0c565b5192611dc3565b01610919565b6040517f5f1c84a01d3bb49fae8cd2b12e5cbc6b36654a70f3ae95106da35a58753a711190806109a08982610b9f565b0390a1005b819083516109b281610f1b565b81520191019084906108bc565b608460405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d75737420626560448201527f204c7a41707000000000000000000000000000000000000000000000000000006064820152fd5b60009103126101c057565b346101c05760008060031936011261043057610a4e61193b565b806001600160a01b03815473ffffffffffffffffffffffffffffffffffffffff1981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b90600182811c92168015610acb575b6020831014610ab557565b634e487b7160e01b600052602260045260246000fd5b91607f1691610aaa565b90604051918260008254610ae881610a9b565b90818452602094600191600181169081600014610b585750600114610b19575b505050610b17925003836106ac565b565b600090815285812095935091905b818310610b40575050610b179350820101388080610b08565b85548884018501529485019487945091830191610b27565b92505050610b1794925060ff191682840152151560051b820101388080610b08565b90602091610b9381518092818552858086019101610721565b601f01601f1916010190565b906020610bb0928181520190610b7a565b90565b346101c05760203660031901126101c05761ffff610bcf6101af565b166000526001602052610814610be86040600020610ad5565b604051918291602083526020830190610b7a565b346101c05760403660031901126101c0576020610c46610c1a6101af565b61ffff610c256101c5565b91166000526002835260406000209061ffff16600052602052604060002090565b54604051908152f35b346101c05760003660031901126101c05760206001600160a01b0360005416604051908152f35b346101c05760003660031901126101c05760206001600160a01b0360045416604051908152f35b346101c05760203660031901126101c05761ffff610cb96101af565b166000526001602052610ccf6040600020610ad5565b805115610d03578051601319810191908211610cfe5761081491610cf291611d43565b60405191829182610b9f565b611641565b606460405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152fd5b346101c057610d553661050c565b9190610d5f61193b565b60405191602092848385830137610d8b6034828781013060601b888201520360148101845201826106ac565b60009361ffff8316855260019060018152604086209280519267ffffffffffffffff841161068b57610dc784610dc18754610a9b565b87611657565b82601f8511600114610e3f57505082879893610e2e9593610e1f937f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce9a92610e34575b50508160011b916000199060031b1c19161790565b90555b60405193849384611626565b0390a180f35b015190503880610e0a565b929190601f19851690610e5787600052602060002090565b948a915b838310610ec0575050509260019285927f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce9a9b96610e2e989610610ea7575b505050811b019055610e22565b015160001960f88460031b161c19169055388080610e9a565b848601518755958601959481019491810191610e5b565b346101c05760003660031901126101c05760206040516001600160a01b037f0000000000000000000000003a73033c0b1407574c76bdbac67f126f6b4a9aa9168152f35b6001600160a01b038116036101c057565b346101c05760203660031901126101c0577f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b60206001600160a01b03600435610f7481610f1b565b610f7c61193b565b168073ffffffffffffffffffffffffffffffffffffffff196004541617600455604051908152a1005b346101c05760003660031901126101c05760206040516127108152f35b346101c05760803660031901126101c057610fdb6101af565b610fe36101c5565b60643567ffffffffffffffff81116101c0576110039036906004016101d6565b909261100d61193b565b6001600160a01b037f0000000000000000000000003a73033c0b1407574c76bdbac67f126f6b4a9aa91690813b156101c0576000809461109d604051978896879586947fcbed8b9c00000000000000000000000000000000000000000000000000000000865261ffff80921660048701521660248501526044356044850152608060648501526084840191611605565b03925af18015610427576110ad57005b806110ba61001992610677565b80610a29565b6110c936610204565b9161ffff8694929616600052600560205261111181604060002060206040518092878b8337878201908152030190209067ffffffffffffffff16600052602052604060002090565b549182156111a9577fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e5966109a09461119d9161119891600061118c876107ea8d896111868f6111728f611165368c8e6106ea565b60208151910120146116c6565b61ffff166000526005602052604060002090565b916116ad565b5561084236868c6106ea565b611b36565b60405195869586611737565b608460405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201527f61676500000000000000000000000000000000000000000000000000000000006064820152fd5b346101c05760603660031901126101c0577f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac0606061124f6101af565b6112576101c5565b906044359061126461193b565b61ffff80911692836000526002602052826112918260406000209061ffff16600052602052604060002090565b556040519384521660208301526040820152a1005b346101c0576112b43661050c565b91906112be61193b565b60009161ffff81168352600160206001602052604085209167ffffffffffffffff871161068b576112f9876112f38554610a9b565b85611657565b8591601f881160011461135b57505094610e2e91610e1f828088997ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab9991611350575b508160011b916000199060031b1c19161790565b90508701353861133c565b9190601f1988169061137285600052602060002090565b9388915b8383106113da5750505091610e2e9391887ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab989994106113c0575b5050600182811b019055610e22565b860135600019600385901b60f8161c1916905538806113b1565b888501358655948501949381019391810191611376565b346101c05760203660031901126101c05760043561140e81610f1b565b61141661193b565b6001600160a01b0380911680156114705760009182548273ffffffffffffffffffffffffffffffffffffffff198216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b60246040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152fd5b346101c05760803660031901126101c0576114ba6101af565b6114c26101c5565b906114ce604435610f1b565b604051917ff5ecbdbc00000000000000000000000000000000000000000000000000000000835261ffff809216600484015216602482015230604482015260643560648201526000816084816001600160a01b037f0000000000000000000000003a73033c0b1407574c76bdbac67f126f6b4a9aa9165afa80156104275761081491600091611565575b5060405191829182610b9f565b61158291503d806000833e61157a81836106ac565b8101906117be565b38611558565b1561158f57565b608460405162461bcd60e51b815260206004820152602660248201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152fd5b6040513d6000823e3d90fd5b908060209392818452848401376000828201840152601f01601f1916010190565b60409061ffff610bb095931681528160208201520191611605565b634e487b7160e01b600052601160045260246000fd5b90601f811161166557505050565b6000916000526020600020906020601f850160051c830194106116a3575b601f0160051c01915b82811061169857505050565b81815560010161168c565b9092508290611683565b6020919283604051948593843782019081520301902090565b156116cd57565b608460405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f6160448201527f64000000000000000000000000000000000000000000000000000000000000006064820152fd5b916117649060609461ffff67ffffffffffffffff9499989799168552608060208601526080850191611605565b951660408201520152565b9092919261177c816106ce565b9161178a60405193846106ac565b8294828452828201116101c0576020610b17930190610721565b9080601f830112156101c0578151610bb09260200161176f565b906020828203126101c057815167ffffffffffffffff81116101c057610bb092016117a4565b9061180e610bb0959361ffff67ffffffffffffffff93168452608060208501526080840190610b7a565b931660408201526060818403910152610b7a565b90919280516020820120905a61752f198101908111610cfe57604051906118888261187a60208201957f66ad5c8a0000000000000000000000000000000000000000000000000000000087528a8a8a602486016117e4565b03601f1981018452836106ac565b600080916040519461189986610690565b6096865282602087019560a036883751923090f1903d9060968211611932575b6000908285523e156118cd575b5050505050565b84611925926119187f9c8956b55a8d2adbd435a058f8e11a447b2bf5c72abb98457e20050587ba9b96976107ea6119128861ffff166000526005602052604060002090565b89610744565b55604051948594856117e4565b0390a138808080806118c6565b609691506118b9565b6001600160a01b0360005416330361194f57565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fd5b67ffffffffffffffff811161068b5760051b60200190565b9080601f830112156101c0578151906020916119b28161197f565b936119c060405195866106ac565b81855260208086019260051b8201019283116101c057602001905b8282106119e9575050505090565b815181529083019083016119db565b9080601f830112156101c057815191602091611a138461197f565b936040611a2360405196876106ac565b818652848087019260051b850101938385116101c057858101925b858410611a4f575050505050505090565b835167ffffffffffffffff81116101c057820185603f820112156101c0578791611a818783878680960151910161176f565b815201930192611a3e565b81601f820112156101c057805191602091611aa68461197f565b93611ab460405195866106ac565b808552838086019160051b830101928084116101c057848301915b848310611adf5750505050505090565b825167ffffffffffffffff81116101c0578691611b01848480948901016117a4565b815201920191611acf565b8051821015611b205760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b8051916020928201926080838286019503126101c0578083015167ffffffffffffffff908181116101c05784019085603f830112156101c0578282015191611b7d8361197f565b92611b8b60405194856106ac565b80845260408585019160051b830101918883116101c0576040869101915b838310611c85575050505060408501518181116101c0578684611bce92880101611997565b9560608601518281116101c0578185611be9928901016119f8565b9360808701519283116101c057611c0292870101611a8c565b9260005b8251811015611c495780611c43611c2261093560019487611b0c565b611c2c838b611b0c565b51611c378489611b0c565b5190610963858b611b0c565b01611c06565b509450505050611c807f5f1c84a01d3bb49fae8cd2b12e5cbc6b36654a70f3ae95106da35a58753a71119160405191829182610b9f565b0390a1565b81908351611c9281610f1b565b8152019101908590611ba9565b90601f8201809211610cfe57565b15611cb457565b606460405162461bcd60e51b815260206004820152600e60248201527f736c6963655f6f766572666c6f770000000000000000000000000000000000006044820152fd5b15611cff57565b606460405162461bcd60e51b815260206004820152601160248201527f736c6963655f6f75744f66426f756e64730000000000000000000000000000006044820152fd5b611d5782611d5081611c9f565b1015611cad565b611d648282511015611cf8565b81611d7c575050604051600081526020810160405290565b60405191601f811691821560051b808486010193838501920101905b808410611db05750508252601f01601f191660405290565b9092835181526020809101930190611d98565b600260065414611e915760009384936002600655805180158614611e30575050915b602083519301915af1611df6611ebb565b5015611e0657610b176001600655565b60046040517fb7bfed8c000000000000000000000000000000000000000000000000000000008152fd5b7fffffffff000000000000000000000000000000000000000000000000000000006024916020611e8b940120166040519384916020830152611e7b8151809260208686019101610721565b81010360048101845201826106ac565b91611de5565b60046040517f3ee5aeb5000000000000000000000000000000000000000000000000000000008152fd5b3d15611ee6573d90611ecc826106ce565b91611eda60405193846106ac565b82523d6000602084013e565b60609056fea264697066735822122083c261228f179b8fe9964de49d4626b97dc1415ef28924b9f38cc0aa8cd5995364736f6c63430008170033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000003a73033c0b1407574c76bdbac67f126f6b4a9aa9
-----Decoded View---------------
Arg [0] : _endpoint (address): 0x3A73033C0b1407574C76BdBAc67f126f6b4a9AA9
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000003a73033c0b1407574c76bdbac67f126f6b4a9aa9
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.