Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 16 from a total of 16 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
Amount
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Execute | 27487576 | 168 days ago | IN | 0 ETH | 0.00000005 | ||||
| Execute | 26417002 | 193 days ago | IN | 0 ETH | 0.00006721 | ||||
| Execute | 25766206 | 208 days ago | IN | 0 ETH | 0.0000011 | ||||
| Execute | 23999401 | 249 days ago | IN | 0 ETH | 0.00000003 | ||||
| Execute | 23999232 | 249 days ago | IN | 0 ETH | 0.0000001 | ||||
| Execute | 22353714 | 287 days ago | IN | 0 ETH | 0.00003245 | ||||
| Execute | 21621355 | 304 days ago | IN | 0 ETH | 0.00000036 | ||||
| Execute | 21595162 | 305 days ago | IN | 0 ETH | 0.00000006 | ||||
| Execute | 21209168 | 314 days ago | IN | 0 ETH | 0.0000212 | ||||
| Execute | 19468679 | 354 days ago | IN | 0 ETH | 0.00000515 | ||||
| Execute | 19380666 | 356 days ago | IN | 0 ETH | 0.00000146 | ||||
| Transfer Ownersh... | 18475337 | 377 days ago | IN | 0 ETH | 0.00000001 | ||||
| Add Timelocks | 18475332 | 377 days ago | IN | 0 ETH | 0.00000013 | ||||
| Set Trusted Remo... | 18475329 | 377 days ago | IN | 0 ETH | 0.00000012 | ||||
| Set Max Daily Re... | 18475327 | 377 days ago | IN | 0 ETH | 0.00000005 | ||||
| Set Min Dst Gas | 18475325 | 377 days ago | IN | 0 ETH | 0.00000006 |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
OmnichainGovernanceExecutor
Compiler Version
v0.8.25+commit.b61c2a91
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;
import { ReentrancyGuard } from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import { BytesLib } from "@layerzerolabs/solidity-examples/contracts/libraries/BytesLib.sol";
import { ExcessivelySafeCall } from "@layerzerolabs/solidity-examples/contracts/libraries/ExcessivelySafeCall.sol";
import { ensureNonzeroAddress } from "@venusprotocol/solidity-utilities/contracts/validators.sol";
import { BaseOmnichainControllerDest } from "./BaseOmnichainControllerDest.sol";
import { ITimelock } from "./interfaces/ITimelock.sol";
/**
* @title OmnichainGovernanceExecutor
* @notice Executes the proposal transactions sent from the main chain
* @dev The owner of this contract controls LayerZero configuration. When used in production the owner will be OmnichainExecutor
* This implementation is non-blocking, meaning the failed messages will not block the future messages from the source.
* For the blocking behavior, derive the contract from LzApp.
* @custom:security-contact https://github.com/VenusProtocol/governance-contracts#discussion
*/
contract OmnichainGovernanceExecutor is ReentrancyGuard, BaseOmnichainControllerDest {
using BytesLib for bytes;
using ExcessivelySafeCall for address;
enum ProposalType {
NORMAL,
FASTTRACK,
CRITICAL
}
struct Proposal {
/** Unique id for looking up a proposal */
uint256 id;
/** The timestamp that the proposal will be available for execution, set once the vote succeeds */
uint256 eta;
/** The ordered list of target addresses for calls to be made */
address[] targets;
/** The ordered list of values (i.e. msg.value) to be passed to the calls to be made */
uint256[] values;
/** The ordered list of function signatures to be called */
string[] signatures;
/** The ordered list of calldata to be passed to each call */
bytes[] calldatas;
/** Flag marking whether the proposal has been canceled */
bool canceled;
/** Flag marking whether the proposal has been executed */
bool executed;
/** The type of the proposal */
uint8 proposalType;
}
/*
* @notice Possible states that a proposal may be in
*/
enum ProposalState {
Canceled,
Queued,
Executed
}
/**
* @notice A privileged role that can cancel any proposal
*/
address public guardian;
/**
* @notice Stores BNB chain layerzero endpoint id
*/
uint16 public srcChainId;
/**
* @notice Last proposal count received
*/
uint256 public lastProposalReceived;
/**
* @notice The official record of all proposals ever proposed
*/
mapping(uint256 => Proposal) public proposals;
/**
* @notice Mapping containing Timelock addresses for each proposal type
*/
mapping(uint256 => ITimelock) public proposalTimelocks;
/**
* @notice Represents queue state of proposal
*/
mapping(uint256 => bool) public queued;
/**
* @notice Emitted when proposal is received
*/
event ProposalReceived(
uint256 indexed proposalId,
address[] targets,
uint256[] values,
string[] signatures,
bytes[] calldatas,
uint8 proposalType
);
/**
* @notice Emitted when proposal is queued
*/
event ProposalQueued(uint256 indexed id, uint256 eta);
/**
* Emitted when proposal executed
*/
event ProposalExecuted(uint256 indexed id);
/**
* @notice Emitted when proposal failed
*/
event ReceivePayloadFailed(uint16 indexed srcChainId, bytes indexed srcAddress, uint64 nonce, bytes reason);
/**
* @notice Emitted when proposal is canceled
*/
event ProposalCanceled(uint256 indexed id);
/**
* @notice Emitted when timelock added
*/
event TimelockAdded(uint8 routeType, address indexed oldTimelock, address indexed newTimelock);
/**
* @notice Emitted when source layerzero endpoint id is updated
*/
event SetSrcChainId(uint16 indexed oldSrcChainId, uint16 indexed newSrcChainId);
/**
* @notice Emitted when new guardian address is set
*/
event NewGuardian(address indexed oldGuardian, address indexed newGuardian);
/**
* @notice Emitted when pending admin of Timelock is updated
*/
event SetTimelockPendingAdmin(address, uint8);
/**
* @notice Thrown when proposal ID is invalid
*/
error InvalidProposalId();
constructor(address endpoint_, address guardian_, uint16 srcChainId_) BaseOmnichainControllerDest(endpoint_) {
ensureNonzeroAddress(guardian_);
guardian = guardian_;
srcChainId = srcChainId_;
}
/**
* @notice Update source layerzero endpoint id
* @param srcChainId_ The new source chain id to be set
* @custom:event Emit SetSrcChainId with old and new source id
* @custom:access Only owner
*/
function setSrcChainId(uint16 srcChainId_) external onlyOwner {
emit SetSrcChainId(srcChainId, srcChainId_);
srcChainId = srcChainId_;
}
/**
* @notice Sets the new executor guardian
* @param newGuardian The address of the new guardian
* @custom:access Must be call by guardian or owner
* @custom:event Emit NewGuardian with old and new guardian address
*/
function setGuardian(address newGuardian) external {
require(
msg.sender == guardian || msg.sender == owner(),
"OmnichainGovernanceExecutor::setGuardian: owner or guardian only"
);
ensureNonzeroAddress(newGuardian);
emit NewGuardian(guardian, newGuardian);
guardian = newGuardian;
}
/**
* @notice Add timelocks to the ProposalTimelocks mapping
* @param timelocks_ Array of addresses of all 3 timelocks
* @custom:access Only owner
* @custom:event Emits TimelockAdded with old and new timelock and route type
*/
function addTimelocks(ITimelock[] memory timelocks_) external onlyOwner {
uint8 length = uint8(type(ProposalType).max) + 1;
require(
timelocks_.length == length,
"OmnichainGovernanceExecutor::addTimelocks:number of timelocks should match the number of governance routes"
);
for (uint8 i; i < length; ++i) {
ensureNonzeroAddress(address(timelocks_[i]));
emit TimelockAdded(i, address(proposalTimelocks[i]), address(timelocks_[i]));
proposalTimelocks[i] = timelocks_[i];
}
}
/**
* @notice Executes a queued proposal if eta has passed
* @param proposalId_ Id of proposal that is to be executed
* @custom:event Emits ProposalExecuted with proposal id of executed proposal
*/
function execute(uint256 proposalId_) external nonReentrant {
require(
state(proposalId_) == ProposalState.Queued,
"OmnichainGovernanceExecutor::execute: proposal can only be executed if it is queued"
);
Proposal storage proposal = proposals[proposalId_];
proposal.executed = true;
ITimelock timelock = proposalTimelocks[proposal.proposalType];
uint256 eta = proposal.eta;
uint256 length = proposal.targets.length;
emit ProposalExecuted(proposalId_);
for (uint256 i; i < length; ++i) {
timelock.executeTransaction(
proposal.targets[i],
proposal.values[i],
proposal.signatures[i],
proposal.calldatas[i],
eta
);
}
delete queued[proposalId_];
}
/**
* @notice Cancels a proposal only if sender is the guardian and proposal is not executed
* @param proposalId_ Id of proposal that is to be canceled
* @custom:access Sender must be the guardian
* @custom:event Emits ProposalCanceled with proposal id of the canceled proposal
*/
function cancel(uint256 proposalId_) external {
require(
state(proposalId_) == ProposalState.Queued,
"OmnichainGovernanceExecutor::cancel: proposal should be queued and not executed"
);
Proposal storage proposal = proposals[proposalId_];
require(msg.sender == guardian, "OmnichainGovernanceExecutor::cancel: sender must be guardian");
proposal.canceled = true;
ITimelock timelock = proposalTimelocks[proposal.proposalType];
uint256 eta = proposal.eta;
uint256 length = proposal.targets.length;
emit ProposalCanceled(proposalId_);
for (uint256 i; i < length; ++i) {
timelock.cancelTransaction(
proposal.targets[i],
proposal.values[i],
proposal.signatures[i],
proposal.calldatas[i],
eta
);
}
delete queued[proposalId_];
}
/**
* @notice Sets the new pending admin of the Timelock
* @param pendingAdmin_ Address of new pending admin
* @param proposalType_ Type of proposal
* @custom:access Only owner
* @custom:event Emits SetTimelockPendingAdmin with new pending admin and proposal type
*/
function setTimelockPendingAdmin(address pendingAdmin_, uint8 proposalType_) external onlyOwner {
uint8 proposalTypeLength = uint8(type(ProposalType).max) + 1;
require(
proposalType_ < proposalTypeLength,
"OmnichainGovernanceExecutor::setTimelockPendingAdmin: invalid proposal type"
);
proposalTimelocks[proposalType_].setPendingAdmin(pendingAdmin_);
emit SetTimelockPendingAdmin(pendingAdmin_, proposalType_);
}
/**
* @notice Resends a previously failed message
* @param srcChainId_ Source chain Id
* @param srcAddress_ Source address => local app address + remote app address
* @param nonce_ Nonce to identify failed message
* @param payload_ The payload of the message to be retried
* @custom:access Only owner
*/
function retryMessage(
uint16 srcChainId_,
bytes calldata srcAddress_,
uint64 nonce_,
bytes calldata payload_
) public payable override onlyOwner nonReentrant {
require(
keccak256(trustedRemoteLookup[srcChainId_]) == keccak256(srcAddress_),
"OmnichainGovernanceExecutor::retryMessage: not a trusted remote"
);
super.retryMessage(srcChainId_, srcAddress_, nonce_, payload_);
}
/**
* @notice Gets the state of a proposal
* @param proposalId_ The id of the proposal
* @return Proposal state
*/
function state(uint256 proposalId_) public view returns (ProposalState) {
Proposal storage proposal = proposals[proposalId_];
if (proposal.canceled) {
return ProposalState.Canceled;
} else if (proposal.executed) {
return ProposalState.Executed;
} else if (queued[proposalId_]) {
// queued only when proposal is received
return ProposalState.Queued;
} else {
revert InvalidProposalId();
}
}
/**
* @notice Process blocking LayerZero receive request
* @param srcChainId_ Source chain Id
* @param srcAddress_ Source address from which payload is received
* @param nonce_ Nonce associated with the payload to prevent replay attacks
* @param payload_ Encoded payload containing proposal information
* @custom:event Emit ReceivePayloadFailed if call fails
*/
function _blockingLzReceive(
uint16 srcChainId_,
bytes memory srcAddress_,
uint64 nonce_,
bytes memory payload_
) internal virtual override {
require(srcChainId_ == srcChainId, "OmnichainGovernanceExecutor::_blockingLzReceive: invalid source chain id");
bytes32 hashedPayload = keccak256(payload_);
bytes memory callData = abi.encodeCall(this.nonblockingLzReceive, (srcChainId_, srcAddress_, nonce_, payload_));
(bool success, bytes memory reason) = address(this).excessivelySafeCall(gasleft() - 30000, 150, callData);
// try-catch all errors/exceptions
if (!success) {
failedMessages[srcChainId_][srcAddress_][nonce_] = hashedPayload;
emit ReceivePayloadFailed(srcChainId_, srcAddress_, nonce_, reason); // Retrieve payload from the src side tx if needed to clear
}
}
/**
* @notice Process non blocking LayerZero receive request
* @param payload_ Encoded payload containing proposal information
* @custom:event Emit ProposalReceived
*/
function _nonblockingLzReceive(
uint16,
bytes memory,
uint64,
bytes memory payload_
) internal virtual override whenNotPaused {
(bytes memory payload, uint256 pId) = abi.decode(payload_, (bytes, uint256));
(
address[] memory targets,
uint256[] memory values,
string[] memory signatures,
bytes[] memory calldatas,
uint8 pType
) = abi.decode(payload, (address[], uint256[], string[], bytes[], uint8));
require(proposals[pId].id == 0, "OmnichainGovernanceExecutor::_nonblockingLzReceive: duplicate proposal");
require(
targets.length == values.length &&
targets.length == signatures.length &&
targets.length == calldatas.length,
"OmnichainGovernanceExecutor::_nonblockingLzReceive: proposal function information arity mismatch"
);
require(
pType < uint8(type(ProposalType).max) + 1,
"OmnichainGovernanceExecutor::_nonblockingLzReceive: invalid proposal type"
);
_isEligibleToReceive(targets.length);
Proposal memory newProposal = Proposal({
id: pId,
eta: 0,
targets: targets,
values: values,
signatures: signatures,
calldatas: calldatas,
canceled: false,
executed: false,
proposalType: pType
});
proposals[pId] = newProposal;
lastProposalReceived = pId;
emit ProposalReceived(newProposal.id, targets, values, signatures, calldatas, pType);
_queue(pId);
}
/**
* @notice Queue proposal for execution
* @param proposalId_ Proposal to be queued
* @custom:event Emit ProposalQueued with proposal id and eta
*/
function _queue(uint256 proposalId_) internal {
Proposal storage proposal = proposals[proposalId_];
uint256 eta = block.timestamp + proposalTimelocks[proposal.proposalType].delay();
proposal.eta = eta;
queued[proposalId_] = true;
uint8 proposalType = proposal.proposalType;
uint256 length = proposal.targets.length;
emit ProposalQueued(proposalId_, eta);
for (uint256 i; i < length; ++i) {
_queueOrRevertInternal(
proposal.targets[i],
proposal.values[i],
proposal.signatures[i],
proposal.calldatas[i],
eta,
proposalType
);
}
}
/**
* @notice Check for unique proposal
* @param target_ Address of the contract with the method to be called
* @param value_ Native token amount sent with the transaction
* @param signature_ Signature of the function to be called
* @param data_ Arguments to be passed to the function when called
* @param eta_ Timestamp after which the transaction can be executed
* @param proposalType_ Type of proposal
*/
function _queueOrRevertInternal(
address target_,
uint256 value_,
string memory signature_,
bytes memory data_,
uint256 eta_,
uint8 proposalType_
) internal {
require(
!proposalTimelocks[proposalType_].queuedTransactions(
keccak256(abi.encode(target_, value_, signature_, data_, eta_))
),
"OmnichainGovernanceExecutor::queueOrRevertInternal: identical proposal action already queued at eta"
);
proposalTimelocks[proposalType_].queueTransaction(target_, value_, signature_, data_, eta_);
}
}// 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 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
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
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.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: 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
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
_paused = false;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
_requireNotPaused();
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
_requirePaused();
_;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Throws if the contract is paused.
*/
function _requireNotPaused() internal view virtual {
require(!paused(), "Pausable: paused");
}
/**
* @dev Throws if the contract is not paused.
*/
function _requirePaused() internal view virtual {
require(paused(), "Pausable: not paused");
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be _NOT_ENTERED
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: BSD-3-Clause
pragma solidity 0.8.25;
/// @notice Thrown if the supplied address is a zero address where it is not allowed
error ZeroAddressNotAllowed();
/// @notice Thrown if the supplied value is 0 where it is not allowed
error ZeroValueNotAllowed();
/// @notice Checks if the provided address is nonzero, reverts otherwise
/// @param address_ Address to check
/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address
function ensureNonzeroAddress(address address_) pure {
if (address_ == address(0)) {
revert ZeroAddressNotAllowed();
}
}
/// @notice Checks if the provided value is nonzero, reverts otherwise
/// @param value_ Value to check
/// @custom:error ZeroValueNotAllowed is thrown if the provided value is 0
function ensureNonzeroValue(uint256 value_) pure {
if (value_ == 0) {
revert ZeroValueNotAllowed();
}
}// SPDX-License-Identifier: BSD-3-Clause
pragma solidity 0.8.25;
import { NonblockingLzApp } from "@layerzerolabs/solidity-examples/contracts/lzApp/NonblockingLzApp.sol";
import { Pausable } from "@openzeppelin/contracts/security/Pausable.sol";
import { ensureNonzeroAddress } from "@venusprotocol/solidity-utilities/contracts/validators.sol";
/**
* @title BaseOmnichainControllerDest
* @author Venus
* @dev This contract is the base for the Omnichain controller destination contract
* It provides functionality related to daily command limits and pausability
* @custom:security-contact https://github.com/VenusProtocol/governance-contracts#discussion
*/
abstract contract BaseOmnichainControllerDest is NonblockingLzApp, Pausable {
/**
* @notice Maximum daily limit for receiving commands from Binance chain
*/
uint256 public maxDailyReceiveLimit;
/**
* @notice Total received commands within the last 24-hour window from Binance chain
*/
uint256 public last24HourCommandsReceived;
/**
* @notice Timestamp when the last 24-hour window started from Binance chain
*/
uint256 public last24HourReceiveWindowStart;
/**
* @notice Emitted when the maximum daily limit for receiving command from Binance chain is modified
*/
event SetMaxDailyReceiveLimit(uint256 oldMaxLimit, uint256 newMaxLimit);
constructor(address endpoint_) NonblockingLzApp(endpoint_) {
ensureNonzeroAddress(endpoint_);
}
/**
* @notice Sets the maximum daily limit for receiving commands
* @param limit_ Number of commands
* @custom:access Only Owner
* @custom:event Emits SetMaxDailyReceiveLimit with old and new limit
*/
function setMaxDailyReceiveLimit(uint256 limit_) external onlyOwner {
emit SetMaxDailyReceiveLimit(maxDailyReceiveLimit, limit_);
maxDailyReceiveLimit = limit_;
}
/**
* @notice Triggers the paused state of the controller
* @custom:access Only owner
*/
function pause() external onlyOwner {
_pause();
}
/**
* @notice Triggers the resume state of the controller
* @custom:access Only owner
*/
function unpause() external onlyOwner {
_unpause();
}
/**
* @notice Empty implementation of renounce ownership to avoid any mishappening
*/
function renounceOwnership() public override {}
/**
* @notice Check eligibility to receive commands
* @param noOfCommands_ Number of commands to be received
*/
function _isEligibleToReceive(uint256 noOfCommands_) internal {
uint256 currentBlockTimestamp = block.timestamp;
// Load values for the 24-hour window checks for receiving
uint256 receivedInWindow = last24HourCommandsReceived;
// Check if the time window has changed (more than 24 hours have passed)
if (currentBlockTimestamp - last24HourReceiveWindowStart > 1 days) {
receivedInWindow = noOfCommands_;
last24HourReceiveWindowStart = currentBlockTimestamp;
} else {
receivedInWindow += noOfCommands_;
}
// Revert if the received amount exceeds the daily limit
require(receivedInWindow <= maxDailyReceiveLimit, "Daily Transaction Limit Exceeded");
// Update the received amount for the 24-hour window
last24HourCommandsReceived = receivedInWindow;
}
}// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.25;
/**
* @title ITimelock
* @author Venus
* @dev Interface for Timelock contract
* @custom:security-contact https://github.com/VenusProtocol/governance-contracts#discussion
*/
interface ITimelock {
/**
* @notice Delay period for the transaction queue
*/
function delay() external view returns (uint256);
/**
* @notice Required period to execute a proposal transaction
*/
function GRACE_PERIOD() external view returns (uint256);
/**
* @notice Method for accepting a proposed admin
*/
function acceptAdmin() external;
/**
* @notice Method to propose a new admin authorized to call timelock functions. This should be the Governor Contract.
*/
function setPendingAdmin(address pendingAdmin) external;
/**
* @notice Show mapping of queued transactions
* @param hash Transaction hash
*/
function queuedTransactions(bytes32 hash) external view returns (bool);
/**
* @notice Called for each action when queuing a proposal
* @param target Address of the contract with the method to be called
* @param value Native token amount sent with the transaction
* @param signature signature of the function to be called
* @param data Arguments to be passed to the function when called
* @param eta Timestamp after which the transaction can be executed
* @return Hash of the queued transaction
*/
function queueTransaction(
address target,
uint256 value,
string calldata signature,
bytes calldata data,
uint256 eta
) external returns (bytes32);
/**
* @notice Called to cancel a queued transaction
* @param target Address of the contract with the method to be called
* @param value Native token amount sent with the transaction
* @param signature signature of the function to be called
* @param data Arguments to be passed to the function when called
* @param eta Timestamp after which the transaction can be executed
*/
function cancelTransaction(
address target,
uint256 value,
string calldata signature,
bytes calldata data,
uint256 eta
) external;
/**
* @notice Called to execute a queued transaction
* @param target Address of the contract with the method to be called
* @param value Native token amount sent with the transaction
* @param signature signature of the function to be called
* @param data Arguments to be passed to the function when called
* @param eta Timestamp after which the transaction can be executed
* @return Result of function call
*/
function executeTransaction(
address target,
uint256 value,
string calldata signature,
bytes calldata data,
uint256 eta
) external payable returns (bytes memory);
}{
"evmVersion": "paris",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs",
"useLiteralContent": true
},
"optimizer": {
"enabled": true,
"runs": 10000
},
"remappings": [],
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract ABI
API[{"inputs":[{"internalType":"address","name":"endpoint_","type":"address"},{"internalType":"address","name":"guardian_","type":"address"},{"internalType":"uint16","name":"srcChainId_","type":"uint16"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidProposalId","type":"error"},{"inputs":[],"name":"ZeroAddressNotAllowed","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":"oldGuardian","type":"address"},{"indexed":true,"internalType":"address","name":"newGuardian","type":"address"}],"name":"NewGuardian","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":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"ProposalCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"ProposalExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"eta","type":"uint256"}],"name":"ProposalQueued","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"targets","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"},{"indexed":false,"internalType":"string[]","name":"signatures","type":"string[]"},{"indexed":false,"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"indexed":false,"internalType":"uint8","name":"proposalType","type":"uint8"}],"name":"ProposalReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint16","name":"srcChainId","type":"uint16"},{"indexed":true,"internalType":"bytes","name":"srcAddress","type":"bytes"},{"indexed":false,"internalType":"uint64","name":"nonce","type":"uint64"},{"indexed":false,"internalType":"bytes","name":"reason","type":"bytes"}],"name":"ReceivePayloadFailed","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":"uint256","name":"oldMaxLimit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMaxLimit","type":"uint256"}],"name":"SetMaxDailyReceiveLimit","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":true,"internalType":"uint16","name":"oldSrcChainId","type":"uint16"},{"indexed":true,"internalType":"uint16","name":"newSrcChainId","type":"uint16"}],"name":"SetSrcChainId","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint8","name":"","type":"uint8"}],"name":"SetTimelockPendingAdmin","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"routeType","type":"uint8"},{"indexed":true,"internalType":"address","name":"oldTimelock","type":"address"},{"indexed":true,"internalType":"address","name":"newTimelock","type":"address"}],"name":"TimelockAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_PAYLOAD_SIZE_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ITimelock[]","name":"timelocks_","type":"address[]"}],"name":"addTimelocks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId_","type":"uint256"}],"name":"cancel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId_","type":"uint256"}],"name":"execute","outputs":[],"stateMutability":"nonpayable","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":[],"name":"guardian","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"last24HourCommandsReceived","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"last24HourReceiveWindowStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastProposalReceived","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[],"name":"maxDailyReceiveLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"proposalTimelocks","outputs":[{"internalType":"contract ITimelock","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"proposals","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"eta","type":"uint256"},{"internalType":"bool","name":"canceled","type":"bool"},{"internalType":"bool","name":"executed","type":"bool"},{"internalType":"uint8","name":"proposalType","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"queued","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"address","name":"newGuardian","type":"address"}],"name":"setGuardian","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"limit_","type":"uint256"}],"name":"setMaxDailyReceiveLimit","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":"srcChainId_","type":"uint16"}],"name":"setSrcChainId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pendingAdmin_","type":"address"},{"internalType":"uint8","name":"proposalType_","type":"uint8"}],"name":"setTimelockPendingAdmin","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":[],"name":"srcChainId","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId_","type":"uint256"}],"name":"state","outputs":[{"internalType":"enum OmnichainGovernanceExecutor.ProposalState","name":"","type":"uint8"}],"stateMutability":"view","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"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60a060405234801561001057600080fd5b50604051614aa5380380614aa583398101604081905261002f91610136565b60016000558280806100403361009e565b6001600160a01b0316608052506007805460ff19169055610060816100f0565b5061006a826100f0565b600b805461ffff909216600160a01b026001600160b01b03199092166001600160a01b039093169290921717905550610184565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038116610117576040516342bcdf7f60e11b815260040160405180910390fd5b50565b80516001600160a01b038116811461013157600080fd5b919050565b60008060006060848603121561014b57600080fd5b6101548461011a565b92506101626020850161011a565b9150604084015161ffff8116811461017957600080fd5b809150509250925092565b6080516148dc6101c960003960008181610804015281816109d501528181610c6101528181610d2f01528181611232015281816118c70152611f7901526148dc6000f3fe6080604052600436106102f15760003560e01c8063876919e81161018f578063c4461834116100e1578063ed66039b1161008a578063f4fcfcca11610064578063f4fcfcca14610972578063f5ecbdbc14610992578063fe0d94c1146109b257600080fd5b8063ed66039b146108ef578063ee9799ee1461090f578063f2fde38b1461095257600080fd5b8063d1deba1f116100bb578063d1deba1f1461089c578063df2a5b3b146108af578063eb8d72b7146108cf57600080fd5b8063c446183414610846578063c8b42e5b1461085c578063cbed8b9c1461087c57600080fd5b8063950c8a7411610143578063a6c3d1651161011d578063a6c3d165146107d2578063b353aaa7146107f2578063baf3292d1461082657600080fd5b8063950c8a74146107555780639f0c3101146107825780639f38369a146107b257600080fd5b80638cfd8f5c116101745780638cfd8f5c146106d25780638da5cb5b1461070a5780639493ffad1461073557600080fd5b8063876919e81461069c5780638a0dac4a146106b257600080fd5b806342d65a8d116102485780635c975abb116101fc578063715018a6116101d6578063715018a61461064e5780637533d7881461065a5780638456cb591461068757600080fd5b80635c975abb1461060057806366ad5c8a1461061857806370f6ad9a1461063857600080fd5b8063452a93201161022d578063452a93201461051957806349d126051461056b5780635b8c41e6146105b157600080fd5b806342d65a8d146104e35780634406baaf1461050357600080fd5b806310ddb137116102aa5780633f1f4fa4116102845780633f1f4fa4146104815780633f4ba83a146104ae57806340e58ee5146104c357600080fd5b806310ddb137146104045780633d8b38f6146104245780633e4f49e61461045457600080fd5b80630435bb56116102db5780630435bb56146103a057806307e0db17146103c45780630df37483146103e457600080fd5b80621d3567146102f6578063013cf08b14610318575b600080fd5b34801561030257600080fd5b506103166103113660046137db565b6109d2565b005b34801561032457600080fd5b5061036a61033336600461386f565b600d6020526000908152604090208054600182015460069092015490919060ff808216916101008104821691620100009091041685565b60408051958652602086019490945291151592840192909252901515606083015260ff16608082015260a0015b60405180910390f35b3480156103ac57600080fd5b506103b660085481565b604051908152602001610397565b3480156103d057600080fd5b506103166103df366004613888565b610c27565b3480156103f057600080fd5b506103166103ff3660046138a3565b610cd6565b34801561041057600080fd5b5061031661041f366004613888565b610cf5565b34801561043057600080fd5b5061044461043f3660046138cd565b610d73565b6040519015158152602001610397565b34801561046057600080fd5b5061047461046f36600461386f565b610e40565b604051610397919061394f565b34801561048d57600080fd5b506103b661049c366004613888565b60046020526000908152604090205481565b3480156104ba57600080fd5b50610316610ed7565b3480156104cf57600080fd5b506103166104de36600461386f565b610ee9565b3480156104ef57600080fd5b506103166104fe3660046138cd565b6111ed565b34801561050f57600080fd5b506103b6600c5481565b34801561052557600080fd5b50600b546105469073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610397565b34801561057757600080fd5b50600b5461059e9074010000000000000000000000000000000000000000900461ffff1681565b60405161ffff9091168152602001610397565b3480156105bd57600080fd5b506103b66105cc366004613a18565b6006602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b34801561060c57600080fd5b5060075460ff16610444565b34801561062457600080fd5b506103166106333660046137db565b611299565b34801561064457600080fd5b506103b660095481565b34801561031657600080fd5b34801561066657600080fd5b5061067a610675366004613888565b61138c565b6040516103979190613b09565b34801561069357600080fd5b50610316611426565b3480156106a857600080fd5b506103b6600a5481565b3480156106be57600080fd5b506103166106cd366004613b3e565b611436565b3480156106de57600080fd5b506103b66106ed366004613b5b565b600360209081526000928352604080842090915290825290205481565b34801561071657600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff16610546565b34801561074157600080fd5b5061031661075036600461386f565b61157e565b34801561076157600080fd5b506005546105469073ffffffffffffffffffffffffffffffffffffffff1681565b34801561078e57600080fd5b5061044461079d36600461386f565b600f6020526000908152604090205460ff1681565b3480156107be57600080fd5b5061067a6107cd366004613888565b6115c7565b3480156107de57600080fd5b506103166107ed3660046138cd565b6116d6565b3480156107fe57600080fd5b506105467f000000000000000000000000000000000000000000000000000000000000000081565b34801561083257600080fd5b50610316610841366004613b3e565b61175f565b34801561085257600080fd5b506103b661271081565b34801561086857600080fd5b50610316610877366004613888565b6117e0565b34801561088857600080fd5b50610316610897366004613b8e565b611882565b6103166108aa3660046137db565b61193d565b3480156108bb57600080fd5b506103166108ca366004613bfd565b611a19565b3480156108db57600080fd5b506103166108ea3660046138cd565b611a83565b3480156108fb57600080fd5b5061031661090a366004613c5d565b611add565b34801561091b57600080fd5b5061054661092a36600461386f565b600e6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b34801561095e57600080fd5b5061031661096d366004613b3e565b611cf4565b34801561097e57600080fd5b5061031661098d366004613d06565b611d91565b34801561099e57600080fd5b5061067a6109ad366004613d3f565b611f2f565b3480156109be57600080fd5b506103166109cd36600461386f565b612006565b337f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614610a5c5760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff861660009081526002602052604081208054610a7a90613d8c565b80601f0160208091040260200160405190810160405280929190818152602001828054610aa690613d8c565b8015610af35780601f10610ac857610100808354040283529160200191610af3565b820191906000526020600020905b815481529060010190602001808311610ad657829003601f168201915b50505050509050805186869050148015610b0e575060008151115b8015610b36575080516020820120604051610b2c9088908890613dd9565b6040518091039020145b610ba85760405162461bcd60e51b815260206004820152602660248201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401610a53565b610c1e8787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a9350915088908890819084018382808284376000920191909152506122bf92505050565b50505050505050565b610c2f6124b9565b6040517f07e0db1700000000000000000000000000000000000000000000000000000000815261ffff821660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906307e0db17906024015b600060405180830381600087803b158015610cbb57600080fd5b505af1158015610ccf573d6000803e3d6000fd5b5050505050565b610cde6124b9565b61ffff909116600090815260046020526040902055565b610cfd6124b9565b6040517f10ddb13700000000000000000000000000000000000000000000000000000000815261ffff821660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906310ddb13790602401610ca1565b61ffff831660009081526002602052604081208054829190610d9490613d8c565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc090613d8c565b8015610e0d5780601f10610de257610100808354040283529160200191610e0d565b820191906000526020600020905b815481529060010190602001808311610df057829003601f168201915b505050505090508383604051610e24929190613dd9565b60405180910390208180519060200120149150505b9392505050565b6000818152600d60205260408120600681015460ff1615610e645750600092915050565b6006810154610100900460ff1615610e7f5750600292915050565b6000838152600f602052604090205460ff1615610e9f5750600192915050565b6040517f0992f7ad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50919050565b610edf6124b9565b610ee7612520565b565b6001610ef482610e40565b6002811115610f0557610f05613920565b14610f9e5760405162461bcd60e51b815260206004820152604f60248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a63616e60448201527f63656c3a2070726f706f73616c2073686f756c6420626520717565756564206160648201527f6e64206e6f742065786563757465640000000000000000000000000000000000608482015260a401610a53565b6000818152600d60205260409020600b5473ffffffffffffffffffffffffffffffffffffffff1633146110395760405162461bcd60e51b815260206004820152603c60248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a63616e60448201527f63656c3a2073656e646572206d75737420626520677561726469616e000000006064820152608401610a53565b60068101805460ff19166001908117918290556201000090910460ff166000908152600e602052604080822054928401546002850154915173ffffffffffffffffffffffffffffffffffffffff90941693909286917f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c9190a260005b818110156111d0578373ffffffffffffffffffffffffffffffffffffffff1663591fcdfe8660020183815481106110ee576110ee613de9565b60009182526020909120015460038801805473ffffffffffffffffffffffffffffffffffffffff909216918590811061112957611129613de9565b906000526020600020015488600401858154811061114957611149613de9565b9060005260206000200189600501868154811061116857611168613de9565b90600052602060002001886040518663ffffffff1660e01b8152600401611193959493929190613e95565b600060405180830381600087803b1580156111ad57600080fd5b505af11580156111c1573d6000803e3d6000fd5b505050508060010190506110b5565b50505060009283525050600f60205260409020805460ff19169055565b6111f56124b9565b6040517f42d65a8d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d9061126b90869086908690600401613f1a565b600060405180830381600087803b15801561128557600080fd5b505af1158015610c1e573d6000803e3d6000fd5b33301461130e5760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d75737420626560448201527f204c7a41707000000000000000000000000000000000000000000000000000006064820152608401610a53565b6113848686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f89018190048102820181019092528781528993509150879087908190840183828082843760009201919091525061257f92505050565b505050505050565b600260205260009081526040902080546113a590613d8c565b80601f01602080910402602001604051908101604052809291908181526020018280546113d190613d8c565b801561141e5780601f106113f35761010080835404028352916020019161141e565b820191906000526020600020905b81548152906001019060200180831161140157829003601f168201915b505050505081565b61142e6124b9565b610ee76129b1565b600b5473ffffffffffffffffffffffffffffffffffffffff16331480611473575060015473ffffffffffffffffffffffffffffffffffffffff1633145b6114e7576040805162461bcd60e51b81526020600482015260248101919091527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a73657460448201527f477561726469616e3a206f776e6572206f7220677561726469616e206f6e6c796064820152608401610a53565b6114f0816129ee565b600b5460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f08fdaf06427a2010e5958f4329b566993472d14ce81d3f16ce7f2a2660da98e390600090a3600b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6115866124b9565b60085460408051918252602082018390527f0a653bb1a57e62cfd43f0dc557c7223e8b58896238b5f9b300ef646d37b82d1b910160405180910390a1600855565b61ffff81166000908152600260205260408120805460609291906115ea90613d8c565b80601f016020809104026020016040519081016040528092919081815260200182805461161690613d8c565b80156116635780601f1061163857610100808354040283529160200191611663565b820191906000526020600020905b81548152906001019060200180831161164657829003601f168201915b5050505050905080516000036116bb5760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152606401610a53565b610e396000601483516116ce9190613f67565b839190612a3b565b6116de6124b9565b8181306040516020016116f393929190613f80565b60408051601f1981840301815291815261ffff851660009081526002602052209061171e9082614001565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce83838360405161175293929190613f1a565b60405180910390a1505050565b6117676124b9565b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b9060200160405180910390a150565b6117e86124b9565b600b5460405161ffff8084169274010000000000000000000000000000000000000000900416907fb17c58d5977290696b6eea77c81c725f3dc83e426252bd9ece6287c1b8d0e96890600090a3600b805461ffff90921674010000000000000000000000000000000000000000027fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b61188a6124b9565b6040517fcbed8b9c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c9061190490889088908890889088906004016140fd565b600060405180830381600087803b15801561191e57600080fd5b505af1158015611932573d6000803e3d6000fd5b505050505050505050565b6119456124b9565b61194d612b63565b848460405161195d929190613dd9565b6040805191829003822061ffff891660009081526002602052919091209091611986919061412b565b604051809103902014611a015760405162461bcd60e51b815260206004820152603f60248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a72657460448201527f72794d6573736167653a206e6f74206120747275737465642072656d6f7465006064820152608401610a53565b611a0f868686868686612bbc565b6113846001600055565b611a216124b9565b61ffff83811660008181526003602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001611752565b611a8b6124b9565b61ffff83166000908152600260205260409020611aa98284836141a1565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab83838360405161175293929190613f1a565b611ae56124b9565b6000611af36002600161429d565b90508060ff16825114611bba5760405162461bcd60e51b815260206004820152606a60248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a61646460448201527f54696d656c6f636b733a6e756d626572206f662074696d656c6f636b7320736860648201527f6f756c64206d6174636820746865206e756d626572206f6620676f7665726e6160848201527f6e636520726f757465730000000000000000000000000000000000000000000060a482015260c401610a53565b60005b8160ff168160ff161015611cef57611bf0838260ff1681518110611be357611be3613de9565b60200260200101516129ee565b828160ff1681518110611c0557611c05613de9565b60209081029190910181015160ff83166000818152600e845260409081902054905191825273ffffffffffffffffffffffffffffffffffffffff928316939216917ffc45ae51ac4893a3f843d030fbfd4037c0c196109c9e667645b8f144c83c16ea910160405180910390a3828160ff1681518110611c8657611c86613de9565b60209081029190910181015160ff83166000908152600e909252604090912080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055600101611bbd565b505050565b611cfc6124b9565b73ffffffffffffffffffffffffffffffffffffffff8116611d855760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610a53565b611d8e81612e0a565b50565b611d996124b9565b6000611da76002600161429d565b90508060ff168260ff1610611e4a5760405162461bcd60e51b815260206004820152604b60248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a73657460448201527f54696d656c6f636b50656e64696e6741646d696e3a20696e76616c696420707260648201527f6f706f73616c2074797065000000000000000000000000000000000000000000608482015260a401610a53565b60ff82166000908152600e6020526040908190205490517f4dd18bf500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116600483015290911690634dd18bf590602401600060405180830381600087803b158015611ec857600080fd5b505af1158015611edc573d6000803e3d6000fd5b50506040805173ffffffffffffffffffffffffffffffffffffffff8716815260ff861660208201527f6ac0b2c896b49975f12891f83c573bdf05490fe6b707cbaa2ba84c36094cbaec9350019050611752565b6040517ff5ecbdbc00000000000000000000000000000000000000000000000000000000815261ffff808616600483015284166024820152306044820152606481018290526060907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063f5ecbdbc90608401600060405180830381865afa158015611fd5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611ffd9190810190614306565b95945050505050565b61200e612b63565b600161201982610e40565b600281111561202a5761202a613920565b146120c35760405162461bcd60e51b815260206004820152605360248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a65786560448201527f637574653a2070726f706f73616c2063616e206f6e6c7920626520657865637560648201527f7465642069662069742069732071756575656400000000000000000000000000608482015260a401610a53565b6000818152600d602090815260408083206006810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100179081905562010000900460ff168452600e90925280832054600183015460028401549251939473ffffffffffffffffffffffffffffffffffffffff9092169390929186917f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f9190a260005b81811015612299578373ffffffffffffffffffffffffffffffffffffffff16630825f38f8660020183815481106121a4576121a4613de9565b60009182526020909120015460038801805473ffffffffffffffffffffffffffffffffffffffff90921691859081106121df576121df613de9565b90600052602060002001548860040185815481106121ff576121ff613de9565b9060005260206000200189600501868154811061221e5761221e613de9565b90600052602060002001886040518663ffffffff1660e01b8152600401612249959493929190613e95565b6000604051808303816000875af1158015612268573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526122909190810190614306565b5060010161216b565b5050506000838152600f60205260409020805460ff1916905550611d8e90506001600055565b600b5461ffff85811674010000000000000000000000000000000000000000909204161461237b5760405162461bcd60e51b815260206004820152604860248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a5f626c60448201527f6f636b696e674c7a526563656976653a20696e76616c696420736f757263652060648201527f636861696e206964000000000000000000000000000000000000000000000000608482015260a401610a53565b8051602082012060405160009030906366ad5c8a906123a4908990899089908990602401614343565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506000806124066175305a6123fc9190613f67565b3090609686612e81565b91509150816124af5761ffff8816600090815260066020526040908190209051859190612434908a90614382565b90815260408051918290036020908101832067ffffffffffffffff8b16600090815291522091909155612468908890614382565b60405180910390208861ffff167f41d73ce7be31a588d59fe9013cdcfe583bc0aab25093d042b64cade0df73065688846040516124a692919061439e565b60405180910390a35b5050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610ee75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a53565b612528612f0c565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b612587612f5e565b6000808280602001905181019061259e91906143c1565b915091506000806000806000868060200190518101906125be9190614592565b60008b8152600d602052604090205494995092975090955093509150156126735760405162461bcd60e51b815260206004820152604660248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a5f6e6f60448201527f6e626c6f636b696e674c7a526563656976653a206475706c696361746520707260648201527f6f706f73616c0000000000000000000000000000000000000000000000000000608482015260a401610a53565b83518551148015612685575082518551145b8015612692575081518551145b61272a5760405162461bcd60e51b815260206004820152606060248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a5f6e6f60448201527f6e626c6f636b696e674c7a526563656976653a2070726f706f73616c2066756e60648201527f6374696f6e20696e666f726d6174696f6e206172697479206d69736d61746368608482015260a401610a53565b6127366002600161429d565b60ff168160ff16106127d65760405162461bcd60e51b815260206004820152604960248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a5f6e6f60448201527f6e626c6f636b696e674c7a526563656976653a20696e76616c69642070726f7060648201527f6f73616c20747970650000000000000000000000000000000000000000000000608482015260a401610a53565b6127e08551612fb1565b6040805161012081018252878152600060208083018281528385018a8152606085018a90526080850189905260a0850188905260c0850184905260e0850184905260ff87166101008601528b8452600d835294909220835181559151600183015592518051929384936128599260028501920190613571565b50606082015180516128759160038401916020909101906135fb565b5060808201518051612891916004840191602090910190613636565b5060a082015180516128ad916005840191602090910190613688565b5060c08201516006909101805460e08401516101009485015160ff1662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff9115159095027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff941515949094167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909216919091179290921791909116919091179055600c87905580516040517fc37d19c9a6a9a568b5071658f9b5082ff8f142df3cf090385c5621ab1193806590612992908990899089908990899061470b565b60405180910390a26129a387613041565b505050505050505050505050565b6129b9612f5e565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586125553390565b73ffffffffffffffffffffffffffffffffffffffff8116611d8e576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606081612a4981601f6147d5565b1015612a975760405162461bcd60e51b815260206004820152600e60248201527f736c6963655f6f766572666c6f770000000000000000000000000000000000006044820152606401610a53565b612aa182846147d5565b84511015612af15760405162461bcd60e51b815260206004820152601160248201527f736c6963655f6f75744f66426f756e64730000000000000000000000000000006044820152606401610a53565b606082158015612b105760405191506000825260208201604052612b5a565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612b49578051835260209283019201612b31565b5050858452601f01601f1916604052505b50949350505050565b600260005403612bb55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a53565b6002600055565b61ffff86166000908152600660205260408082209051612bdf9088908890613dd9565b908152604080516020928190038301902067ffffffffffffffff871660009081529252902054905080612c7a5760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201527f61676500000000000000000000000000000000000000000000000000000000006064820152608401610a53565b808383604051612c8b929190613dd9565b604051809103902014612d065760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f6160448201527f64000000000000000000000000000000000000000000000000000000000000006064820152608401610a53565b61ffff87166000908152600660205260408082209051612d299089908990613dd9565b908152604080516020928190038301812067ffffffffffffffff8916600090815290845282902093909355601f88018290048202830182019052868252612dc2918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061257f92505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e58787878785604051612df99594939291906147e8565b60405180910390a150505050505050565b6001805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000606060008060008661ffff1667ffffffffffffffff811115612ea757612ea7613990565b6040519080825280601f01601f191660200182016040528015612ed1576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115612ef3578692505b828152826000602083013e909890975095505050505050565b60075460ff16610ee75760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610a53565b60075460ff1615610ee75760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610a53565b600954600a544291906201518090612fc99084613f67565b1115612fdb5750600a81905581612fe8565b612fe583826147d5565b90505b60085481111561303a5760405162461bcd60e51b815260206004820181905260248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656465646044820152606401610a53565b6009555050565b6000818152600d60209081526040808320600681015462010000900460ff168452600e83528184205482517f6a42b8f8000000000000000000000000000000000000000000000000000000008152925191949373ffffffffffffffffffffffffffffffffffffffff90911692636a42b8f892600480830193928290030181865afa1580156130d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130f79190614824565b61310190426147d5565b60018084018290556000858152600f602052604090819020805460ff191690921790915560068401546002850154915192935062010000900460ff169185907f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda28929061316f9086815260200190565b60405180910390a260005b818110156113845761333785600201828154811061319a5761319a613de9565b60009182526020909120015460038701805473ffffffffffffffffffffffffffffffffffffffff90921691849081106131d5576131d5613de9565b90600052602060002001548760040184815481106131f5576131f5613de9565b90600052602060002001805461320a90613d8c565b80601f016020809104026020016040519081016040528092919081815260200182805461323690613d8c565b80156132835780601f1061325857610100808354040283529160200191613283565b820191906000526020600020905b81548152906001019060200180831161326657829003601f168201915b505050505088600501858154811061329d5761329d613de9565b9060005260206000200180546132b290613d8c565b80601f01602080910402602001604051908101604052809291908181526020018280546132de90613d8c565b801561332b5780601f106133005761010080835404028352916020019161332b565b820191906000526020600020905b81548152906001019060200180831161330e57829003601f168201915b5050505050888861333f565b60010161317a565b60ff81166000908152600e602090815260409182902054915173ffffffffffffffffffffffffffffffffffffffff9092169163f2b065379161338b918a918a918a918a918a910161483d565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016133bf91815260200190565b602060405180830381865afa1580156133dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134009190614884565b156134bf5760405162461bcd60e51b815260206004820152606360248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a71756560448201527f75654f72526576657274496e7465726e616c3a206964656e746963616c20707260648201527f6f706f73616c20616374696f6e20616c7265616479207175657565642061742060848201527f657461000000000000000000000000000000000000000000000000000000000060a482015260c401610a53565b60ff81166000908152600e6020526040908190205490517f3a66f90100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690633a66f9019061352e908990899089908990899060040161483d565b6020604051808303816000875af115801561354d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1e9190614824565b8280548282559060005260206000209081019282156135eb579160200282015b828111156135eb57825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602090920191600190910190613591565b506135f79291506136da565b5090565b8280548282559060005260206000209081019282156135eb579160200282015b828111156135eb57825182559160200191906001019061361b565b82805482825590600052602060002090810192821561367c579160200282015b8281111561367c578251829061366c9082614001565b5091602001919060010190613656565b506135f79291506136ef565b8280548282559060005260206000209081019282156136ce579160200282015b828111156136ce57825182906136be9082614001565b50916020019190600101906136a8565b506135f792915061370c565b5b808211156135f757600081556001016136db565b808211156135f75760006137038282613729565b506001016136ef565b808211156135f75760006137208282613729565b5060010161370c565b50805461373590613d8c565b6000825580601f10613745575050565b601f016020900490600052602060002090810190611d8e91906136da565b803561ffff8116811461377557600080fd5b919050565b60008083601f84011261378c57600080fd5b50813567ffffffffffffffff8111156137a457600080fd5b6020830191508360208285010111156137bc57600080fd5b9250929050565b803567ffffffffffffffff8116811461377557600080fd5b600080600080600080608087890312156137f457600080fd5b6137fd87613763565b9550602087013567ffffffffffffffff8082111561381a57600080fd5b6138268a838b0161377a565b909750955085915061383a60408a016137c3565b9450606089013591508082111561385057600080fd5b5061385d89828a0161377a565b979a9699509497509295939492505050565b60006020828403121561388157600080fd5b5035919050565b60006020828403121561389a57600080fd5b610e3982613763565b600080604083850312156138b657600080fd5b6138bf83613763565b946020939093013593505050565b6000806000604084860312156138e257600080fd5b6138eb84613763565b9250602084013567ffffffffffffffff81111561390757600080fd5b6139138682870161377a565b9497909650939450505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b602081016003831061398a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156139e8576139e8613990565b604052919050565b600067ffffffffffffffff821115613a0a57613a0a613990565b50601f01601f191660200190565b600080600060608486031215613a2d57600080fd5b613a3684613763565b9250602084013567ffffffffffffffff811115613a5257600080fd5b8401601f81018613613a6357600080fd5b8035613a76613a71826139f0565b6139bf565b818152876020838501011115613a8b57600080fd5b81602084016020830137600060208383010152809450505050613ab0604085016137c3565b90509250925092565b60005b83811015613ad4578181015183820152602001613abc565b50506000910152565b60008151808452613af5816020860160208601613ab9565b601f01601f19169290920160200192915050565b602081526000610e396020830184613add565b73ffffffffffffffffffffffffffffffffffffffff81168114611d8e57600080fd5b600060208284031215613b5057600080fd5b8135610e3981613b1c565b60008060408385031215613b6e57600080fd5b613b7783613763565b9150613b8560208401613763565b90509250929050565b600080600080600060808688031215613ba657600080fd5b613baf86613763565b9450613bbd60208701613763565b935060408601359250606086013567ffffffffffffffff811115613be057600080fd5b613bec8882890161377a565b969995985093965092949392505050565b600080600060608486031215613c1257600080fd5b613c1b84613763565b9250613c2960208501613763565b9150604084013590509250925092565b600067ffffffffffffffff821115613c5357613c53613990565b5060051b60200190565b60006020808385031215613c7057600080fd5b823567ffffffffffffffff811115613c8757600080fd5b8301601f81018513613c9857600080fd5b8035613ca6613a7182613c39565b81815260059190911b82018301908381019087831115613cc557600080fd5b928401925b82841015613cec578335613cdd81613b1c565b82529284019290840190613cca565b979650505050505050565b60ff81168114611d8e57600080fd5b60008060408385031215613d1957600080fd5b8235613d2481613b1c565b91506020830135613d3481613cf7565b809150509250929050565b60008060008060808587031215613d5557600080fd5b613d5e85613763565b9350613d6c60208601613763565b92506040850135613d7c81613b1c565b9396929550929360600135925050565b600181811c90821680613da057607f821691505b602082108103610ed1577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b8183823760009101908152919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008154613e2581613d8c565b808552602060018381168015613e425760018114613e5c57613e8a565b60ff198516838901528284151560051b8901019550613e8a565b866000528260002060005b85811015613e825781548a8201860152908301908401613e67565b890184019650505b505050505092915050565b73ffffffffffffffffffffffffffffffffffffffff8616815284602082015260a060408201526000613eca60a0830186613e18565b8281036060840152613edc8186613e18565b9150508260808301529695505050505050565b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b61ffff84168152604060208201526000611ffd604083018486613eef565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115613f7a57613f7a613f38565b92915050565b8284823760609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000169101908152601401919050565b601f821115611cef576000816000526020600020601f850160051c81016020861015613fe25750805b601f850160051c820191505b8181101561138457828155600101613fee565b815167ffffffffffffffff81111561401b5761401b613990565b61402f816140298454613d8c565b84613fb9565b602080601f831160018114614082576000841561404c5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555611384565b600085815260208120601f198616915b828110156140b157888601518255948401946001909101908401614092565b50858210156140ed57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600061ffff808816835280871660208401525084604083015260806060830152613cec608083018486613eef565b600080835461413981613d8c565b60018281168015614151576001811461416657614195565b60ff1984168752821515830287019450614195565b8760005260208060002060005b8581101561418c5781548a820152908401908201614173565b50505082870194505b50929695505050505050565b67ffffffffffffffff8311156141b9576141b9613990565b6141cd836141c78354613d8c565b83613fb9565b6000601f84116001811461421f57600085156141e95750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355610ccf565b600083815260209020601f19861690835b828110156142505786850135825560209485019460019092019101614230565b508682101561428b577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b60ff8181168382160190811115613f7a57613f7a613f38565b60006142c4613a71846139f0565b90508281528383830111156142d857600080fd5b610e39836020830184613ab9565b600082601f8301126142f757600080fd5b610e39838351602085016142b6565b60006020828403121561431857600080fd5b815167ffffffffffffffff81111561432f57600080fd5b61433b848285016142e6565b949350505050565b61ffff851681526080602082015260006143606080830186613add565b67ffffffffffffffff851660408401528281036060840152613cec8185613add565b60008251614394818460208701613ab9565b9190910192915050565b67ffffffffffffffff8316815260406020820152600061433b6040830184613add565b600080604083850312156143d457600080fd5b825167ffffffffffffffff8111156143eb57600080fd5b6143f7858286016142e6565b925050602083015190509250929050565b600082601f83011261441957600080fd5b81516020614429613a7183613c39565b8083825260208201915060208460051b87010193508684111561444b57600080fd5b602086015b848110156144675780518352918301918301614450565b509695505050505050565b600082601f83011261448357600080fd5b81516020614493613a7183613c39565b82815260059290921b840181019181810190868411156144b257600080fd5b8286015b8481101561446757805167ffffffffffffffff8111156144d65760008081fd5b8701603f810189136144e85760008081fd5b6144f98986830151604084016142b6565b8452509183019183016144b6565b600082601f83011261451857600080fd5b81516020614528613a7183613c39565b82815260059290921b8401810191818101908684111561454757600080fd5b8286015b8481101561446757805167ffffffffffffffff81111561456b5760008081fd5b6145798986838b01016142e6565b84525091830191830161454b565b805161377581613cf7565b600080600080600060a086880312156145aa57600080fd5b855167ffffffffffffffff808211156145c257600080fd5b818801915088601f8301126145d657600080fd5b815160206145e6613a7183613c39565b82815260059290921b8401810191818101908c84111561460557600080fd5b948201945b8386101561462c57855161461d81613b1c565b8252948201949082019061460a565b918b015191995090935050508082111561464557600080fd5b61465189838a01614408565b9550604088015191508082111561466757600080fd5b61467389838a01614472565b9450606088015191508082111561468957600080fd5b5061469688828901614507565b9250506146a560808701614587565b90509295509295909350565b60008282518085526020808601955060208260051b8401016020860160005b848110156146fe57601f198684030189526146ec838351613add565b988401989250908301906001016146d0565b5090979650505050505050565b60a0808252865190820181905260009060209060c0840190828a01845b8281101561475a57815173ffffffffffffffffffffffffffffffffffffffff1684529284019290840190600101614728565b5050508381038285015287518082528883019183019060005b8181101561478f57835183529284019291840191600101614773565b505084810360408601526147a381896146b1565b9250505082810360608401526147b981866146b1565b9150506147cb608083018460ff169052565b9695505050505050565b80820180821115613f7a57613f7a613f38565b61ffff86168152608060208201526000614806608083018688613eef565b67ffffffffffffffff94909416604083015250606001529392505050565b60006020828403121561483657600080fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff8616815284602082015260a06040820152600061487260a0830186613add565b8281036060840152613edc8186613add565b60006020828403121561489657600080fd5b81518015158114610e3957600080fdfea26469706673582212206e9b4e0e8423ddd67a12f6b1a136938a978661714c282ede340b91a73060ecf464736f6c6343000819003300000000000000000000000055370e0fbb5f5b8daed978ba1c075a499eb107b8000000000000000000000000df3b635d2b535f906bb02abb22aed71346e36a000000000000000000000000000000000000000000000000000000000000002776
Deployed Bytecode
0x6080604052600436106102f15760003560e01c8063876919e81161018f578063c4461834116100e1578063ed66039b1161008a578063f4fcfcca11610064578063f4fcfcca14610972578063f5ecbdbc14610992578063fe0d94c1146109b257600080fd5b8063ed66039b146108ef578063ee9799ee1461090f578063f2fde38b1461095257600080fd5b8063d1deba1f116100bb578063d1deba1f1461089c578063df2a5b3b146108af578063eb8d72b7146108cf57600080fd5b8063c446183414610846578063c8b42e5b1461085c578063cbed8b9c1461087c57600080fd5b8063950c8a7411610143578063a6c3d1651161011d578063a6c3d165146107d2578063b353aaa7146107f2578063baf3292d1461082657600080fd5b8063950c8a74146107555780639f0c3101146107825780639f38369a146107b257600080fd5b80638cfd8f5c116101745780638cfd8f5c146106d25780638da5cb5b1461070a5780639493ffad1461073557600080fd5b8063876919e81461069c5780638a0dac4a146106b257600080fd5b806342d65a8d116102485780635c975abb116101fc578063715018a6116101d6578063715018a61461064e5780637533d7881461065a5780638456cb591461068757600080fd5b80635c975abb1461060057806366ad5c8a1461061857806370f6ad9a1461063857600080fd5b8063452a93201161022d578063452a93201461051957806349d126051461056b5780635b8c41e6146105b157600080fd5b806342d65a8d146104e35780634406baaf1461050357600080fd5b806310ddb137116102aa5780633f1f4fa4116102845780633f1f4fa4146104815780633f4ba83a146104ae57806340e58ee5146104c357600080fd5b806310ddb137146104045780633d8b38f6146104245780633e4f49e61461045457600080fd5b80630435bb56116102db5780630435bb56146103a057806307e0db17146103c45780630df37483146103e457600080fd5b80621d3567146102f6578063013cf08b14610318575b600080fd5b34801561030257600080fd5b506103166103113660046137db565b6109d2565b005b34801561032457600080fd5b5061036a61033336600461386f565b600d6020526000908152604090208054600182015460069092015490919060ff808216916101008104821691620100009091041685565b60408051958652602086019490945291151592840192909252901515606083015260ff16608082015260a0015b60405180910390f35b3480156103ac57600080fd5b506103b660085481565b604051908152602001610397565b3480156103d057600080fd5b506103166103df366004613888565b610c27565b3480156103f057600080fd5b506103166103ff3660046138a3565b610cd6565b34801561041057600080fd5b5061031661041f366004613888565b610cf5565b34801561043057600080fd5b5061044461043f3660046138cd565b610d73565b6040519015158152602001610397565b34801561046057600080fd5b5061047461046f36600461386f565b610e40565b604051610397919061394f565b34801561048d57600080fd5b506103b661049c366004613888565b60046020526000908152604090205481565b3480156104ba57600080fd5b50610316610ed7565b3480156104cf57600080fd5b506103166104de36600461386f565b610ee9565b3480156104ef57600080fd5b506103166104fe3660046138cd565b6111ed565b34801561050f57600080fd5b506103b6600c5481565b34801561052557600080fd5b50600b546105469073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610397565b34801561057757600080fd5b50600b5461059e9074010000000000000000000000000000000000000000900461ffff1681565b60405161ffff9091168152602001610397565b3480156105bd57600080fd5b506103b66105cc366004613a18565b6006602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b34801561060c57600080fd5b5060075460ff16610444565b34801561062457600080fd5b506103166106333660046137db565b611299565b34801561064457600080fd5b506103b660095481565b34801561031657600080fd5b34801561066657600080fd5b5061067a610675366004613888565b61138c565b6040516103979190613b09565b34801561069357600080fd5b50610316611426565b3480156106a857600080fd5b506103b6600a5481565b3480156106be57600080fd5b506103166106cd366004613b3e565b611436565b3480156106de57600080fd5b506103b66106ed366004613b5b565b600360209081526000928352604080842090915290825290205481565b34801561071657600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff16610546565b34801561074157600080fd5b5061031661075036600461386f565b61157e565b34801561076157600080fd5b506005546105469073ffffffffffffffffffffffffffffffffffffffff1681565b34801561078e57600080fd5b5061044461079d36600461386f565b600f6020526000908152604090205460ff1681565b3480156107be57600080fd5b5061067a6107cd366004613888565b6115c7565b3480156107de57600080fd5b506103166107ed3660046138cd565b6116d6565b3480156107fe57600080fd5b506105467f00000000000000000000000055370e0fbb5f5b8daed978ba1c075a499eb107b881565b34801561083257600080fd5b50610316610841366004613b3e565b61175f565b34801561085257600080fd5b506103b661271081565b34801561086857600080fd5b50610316610877366004613888565b6117e0565b34801561088857600080fd5b50610316610897366004613b8e565b611882565b6103166108aa3660046137db565b61193d565b3480156108bb57600080fd5b506103166108ca366004613bfd565b611a19565b3480156108db57600080fd5b506103166108ea3660046138cd565b611a83565b3480156108fb57600080fd5b5061031661090a366004613c5d565b611add565b34801561091b57600080fd5b5061054661092a36600461386f565b600e6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b34801561095e57600080fd5b5061031661096d366004613b3e565b611cf4565b34801561097e57600080fd5b5061031661098d366004613d06565b611d91565b34801561099e57600080fd5b5061067a6109ad366004613d3f565b611f2f565b3480156109be57600080fd5b506103166109cd36600461386f565b612006565b337f00000000000000000000000055370e0fbb5f5b8daed978ba1c075a499eb107b873ffffffffffffffffffffffffffffffffffffffff1614610a5c5760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff861660009081526002602052604081208054610a7a90613d8c565b80601f0160208091040260200160405190810160405280929190818152602001828054610aa690613d8c565b8015610af35780601f10610ac857610100808354040283529160200191610af3565b820191906000526020600020905b815481529060010190602001808311610ad657829003601f168201915b50505050509050805186869050148015610b0e575060008151115b8015610b36575080516020820120604051610b2c9088908890613dd9565b6040518091039020145b610ba85760405162461bcd60e51b815260206004820152602660248201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401610a53565b610c1e8787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a9350915088908890819084018382808284376000920191909152506122bf92505050565b50505050505050565b610c2f6124b9565b6040517f07e0db1700000000000000000000000000000000000000000000000000000000815261ffff821660048201527f00000000000000000000000055370e0fbb5f5b8daed978ba1c075a499eb107b873ffffffffffffffffffffffffffffffffffffffff16906307e0db17906024015b600060405180830381600087803b158015610cbb57600080fd5b505af1158015610ccf573d6000803e3d6000fd5b5050505050565b610cde6124b9565b61ffff909116600090815260046020526040902055565b610cfd6124b9565b6040517f10ddb13700000000000000000000000000000000000000000000000000000000815261ffff821660048201527f00000000000000000000000055370e0fbb5f5b8daed978ba1c075a499eb107b873ffffffffffffffffffffffffffffffffffffffff16906310ddb13790602401610ca1565b61ffff831660009081526002602052604081208054829190610d9490613d8c565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc090613d8c565b8015610e0d5780601f10610de257610100808354040283529160200191610e0d565b820191906000526020600020905b815481529060010190602001808311610df057829003601f168201915b505050505090508383604051610e24929190613dd9565b60405180910390208180519060200120149150505b9392505050565b6000818152600d60205260408120600681015460ff1615610e645750600092915050565b6006810154610100900460ff1615610e7f5750600292915050565b6000838152600f602052604090205460ff1615610e9f5750600192915050565b6040517f0992f7ad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50919050565b610edf6124b9565b610ee7612520565b565b6001610ef482610e40565b6002811115610f0557610f05613920565b14610f9e5760405162461bcd60e51b815260206004820152604f60248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a63616e60448201527f63656c3a2070726f706f73616c2073686f756c6420626520717565756564206160648201527f6e64206e6f742065786563757465640000000000000000000000000000000000608482015260a401610a53565b6000818152600d60205260409020600b5473ffffffffffffffffffffffffffffffffffffffff1633146110395760405162461bcd60e51b815260206004820152603c60248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a63616e60448201527f63656c3a2073656e646572206d75737420626520677561726469616e000000006064820152608401610a53565b60068101805460ff19166001908117918290556201000090910460ff166000908152600e602052604080822054928401546002850154915173ffffffffffffffffffffffffffffffffffffffff90941693909286917f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c9190a260005b818110156111d0578373ffffffffffffffffffffffffffffffffffffffff1663591fcdfe8660020183815481106110ee576110ee613de9565b60009182526020909120015460038801805473ffffffffffffffffffffffffffffffffffffffff909216918590811061112957611129613de9565b906000526020600020015488600401858154811061114957611149613de9565b9060005260206000200189600501868154811061116857611168613de9565b90600052602060002001886040518663ffffffff1660e01b8152600401611193959493929190613e95565b600060405180830381600087803b1580156111ad57600080fd5b505af11580156111c1573d6000803e3d6000fd5b505050508060010190506110b5565b50505060009283525050600f60205260409020805460ff19169055565b6111f56124b9565b6040517f42d65a8d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000055370e0fbb5f5b8daed978ba1c075a499eb107b816906342d65a8d9061126b90869086908690600401613f1a565b600060405180830381600087803b15801561128557600080fd5b505af1158015610c1e573d6000803e3d6000fd5b33301461130e5760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d75737420626560448201527f204c7a41707000000000000000000000000000000000000000000000000000006064820152608401610a53565b6113848686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f89018190048102820181019092528781528993509150879087908190840183828082843760009201919091525061257f92505050565b505050505050565b600260205260009081526040902080546113a590613d8c565b80601f01602080910402602001604051908101604052809291908181526020018280546113d190613d8c565b801561141e5780601f106113f35761010080835404028352916020019161141e565b820191906000526020600020905b81548152906001019060200180831161140157829003601f168201915b505050505081565b61142e6124b9565b610ee76129b1565b600b5473ffffffffffffffffffffffffffffffffffffffff16331480611473575060015473ffffffffffffffffffffffffffffffffffffffff1633145b6114e7576040805162461bcd60e51b81526020600482015260248101919091527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a73657460448201527f477561726469616e3a206f776e6572206f7220677561726469616e206f6e6c796064820152608401610a53565b6114f0816129ee565b600b5460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f08fdaf06427a2010e5958f4329b566993472d14ce81d3f16ce7f2a2660da98e390600090a3600b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6115866124b9565b60085460408051918252602082018390527f0a653bb1a57e62cfd43f0dc557c7223e8b58896238b5f9b300ef646d37b82d1b910160405180910390a1600855565b61ffff81166000908152600260205260408120805460609291906115ea90613d8c565b80601f016020809104026020016040519081016040528092919081815260200182805461161690613d8c565b80156116635780601f1061163857610100808354040283529160200191611663565b820191906000526020600020905b81548152906001019060200180831161164657829003601f168201915b5050505050905080516000036116bb5760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152606401610a53565b610e396000601483516116ce9190613f67565b839190612a3b565b6116de6124b9565b8181306040516020016116f393929190613f80565b60408051601f1981840301815291815261ffff851660009081526002602052209061171e9082614001565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce83838360405161175293929190613f1a565b60405180910390a1505050565b6117676124b9565b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b9060200160405180910390a150565b6117e86124b9565b600b5460405161ffff8084169274010000000000000000000000000000000000000000900416907fb17c58d5977290696b6eea77c81c725f3dc83e426252bd9ece6287c1b8d0e96890600090a3600b805461ffff90921674010000000000000000000000000000000000000000027fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b61188a6124b9565b6040517fcbed8b9c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000055370e0fbb5f5b8daed978ba1c075a499eb107b8169063cbed8b9c9061190490889088908890889088906004016140fd565b600060405180830381600087803b15801561191e57600080fd5b505af1158015611932573d6000803e3d6000fd5b505050505050505050565b6119456124b9565b61194d612b63565b848460405161195d929190613dd9565b6040805191829003822061ffff891660009081526002602052919091209091611986919061412b565b604051809103902014611a015760405162461bcd60e51b815260206004820152603f60248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a72657460448201527f72794d6573736167653a206e6f74206120747275737465642072656d6f7465006064820152608401610a53565b611a0f868686868686612bbc565b6113846001600055565b611a216124b9565b61ffff83811660008181526003602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001611752565b611a8b6124b9565b61ffff83166000908152600260205260409020611aa98284836141a1565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab83838360405161175293929190613f1a565b611ae56124b9565b6000611af36002600161429d565b90508060ff16825114611bba5760405162461bcd60e51b815260206004820152606a60248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a61646460448201527f54696d656c6f636b733a6e756d626572206f662074696d656c6f636b7320736860648201527f6f756c64206d6174636820746865206e756d626572206f6620676f7665726e6160848201527f6e636520726f757465730000000000000000000000000000000000000000000060a482015260c401610a53565b60005b8160ff168160ff161015611cef57611bf0838260ff1681518110611be357611be3613de9565b60200260200101516129ee565b828160ff1681518110611c0557611c05613de9565b60209081029190910181015160ff83166000818152600e845260409081902054905191825273ffffffffffffffffffffffffffffffffffffffff928316939216917ffc45ae51ac4893a3f843d030fbfd4037c0c196109c9e667645b8f144c83c16ea910160405180910390a3828160ff1681518110611c8657611c86613de9565b60209081029190910181015160ff83166000908152600e909252604090912080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055600101611bbd565b505050565b611cfc6124b9565b73ffffffffffffffffffffffffffffffffffffffff8116611d855760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610a53565b611d8e81612e0a565b50565b611d996124b9565b6000611da76002600161429d565b90508060ff168260ff1610611e4a5760405162461bcd60e51b815260206004820152604b60248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a73657460448201527f54696d656c6f636b50656e64696e6741646d696e3a20696e76616c696420707260648201527f6f706f73616c2074797065000000000000000000000000000000000000000000608482015260a401610a53565b60ff82166000908152600e6020526040908190205490517f4dd18bf500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116600483015290911690634dd18bf590602401600060405180830381600087803b158015611ec857600080fd5b505af1158015611edc573d6000803e3d6000fd5b50506040805173ffffffffffffffffffffffffffffffffffffffff8716815260ff861660208201527f6ac0b2c896b49975f12891f83c573bdf05490fe6b707cbaa2ba84c36094cbaec9350019050611752565b6040517ff5ecbdbc00000000000000000000000000000000000000000000000000000000815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000055370e0fbb5f5b8daed978ba1c075a499eb107b873ffffffffffffffffffffffffffffffffffffffff169063f5ecbdbc90608401600060405180830381865afa158015611fd5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611ffd9190810190614306565b95945050505050565b61200e612b63565b600161201982610e40565b600281111561202a5761202a613920565b146120c35760405162461bcd60e51b815260206004820152605360248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a65786560448201527f637574653a2070726f706f73616c2063616e206f6e6c7920626520657865637560648201527f7465642069662069742069732071756575656400000000000000000000000000608482015260a401610a53565b6000818152600d602090815260408083206006810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100179081905562010000900460ff168452600e90925280832054600183015460028401549251939473ffffffffffffffffffffffffffffffffffffffff9092169390929186917f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f9190a260005b81811015612299578373ffffffffffffffffffffffffffffffffffffffff16630825f38f8660020183815481106121a4576121a4613de9565b60009182526020909120015460038801805473ffffffffffffffffffffffffffffffffffffffff90921691859081106121df576121df613de9565b90600052602060002001548860040185815481106121ff576121ff613de9565b9060005260206000200189600501868154811061221e5761221e613de9565b90600052602060002001886040518663ffffffff1660e01b8152600401612249959493929190613e95565b6000604051808303816000875af1158015612268573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526122909190810190614306565b5060010161216b565b5050506000838152600f60205260409020805460ff1916905550611d8e90506001600055565b600b5461ffff85811674010000000000000000000000000000000000000000909204161461237b5760405162461bcd60e51b815260206004820152604860248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a5f626c60448201527f6f636b696e674c7a526563656976653a20696e76616c696420736f757263652060648201527f636861696e206964000000000000000000000000000000000000000000000000608482015260a401610a53565b8051602082012060405160009030906366ad5c8a906123a4908990899089908990602401614343565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506000806124066175305a6123fc9190613f67565b3090609686612e81565b91509150816124af5761ffff8816600090815260066020526040908190209051859190612434908a90614382565b90815260408051918290036020908101832067ffffffffffffffff8b16600090815291522091909155612468908890614382565b60405180910390208861ffff167f41d73ce7be31a588d59fe9013cdcfe583bc0aab25093d042b64cade0df73065688846040516124a692919061439e565b60405180910390a35b5050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610ee75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a53565b612528612f0c565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b612587612f5e565b6000808280602001905181019061259e91906143c1565b915091506000806000806000868060200190518101906125be9190614592565b60008b8152600d602052604090205494995092975090955093509150156126735760405162461bcd60e51b815260206004820152604660248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a5f6e6f60448201527f6e626c6f636b696e674c7a526563656976653a206475706c696361746520707260648201527f6f706f73616c0000000000000000000000000000000000000000000000000000608482015260a401610a53565b83518551148015612685575082518551145b8015612692575081518551145b61272a5760405162461bcd60e51b815260206004820152606060248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a5f6e6f60448201527f6e626c6f636b696e674c7a526563656976653a2070726f706f73616c2066756e60648201527f6374696f6e20696e666f726d6174696f6e206172697479206d69736d61746368608482015260a401610a53565b6127366002600161429d565b60ff168160ff16106127d65760405162461bcd60e51b815260206004820152604960248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a5f6e6f60448201527f6e626c6f636b696e674c7a526563656976653a20696e76616c69642070726f7060648201527f6f73616c20747970650000000000000000000000000000000000000000000000608482015260a401610a53565b6127e08551612fb1565b6040805161012081018252878152600060208083018281528385018a8152606085018a90526080850189905260a0850188905260c0850184905260e0850184905260ff87166101008601528b8452600d835294909220835181559151600183015592518051929384936128599260028501920190613571565b50606082015180516128759160038401916020909101906135fb565b5060808201518051612891916004840191602090910190613636565b5060a082015180516128ad916005840191602090910190613688565b5060c08201516006909101805460e08401516101009485015160ff1662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff9115159095027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff941515949094167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909216919091179290921791909116919091179055600c87905580516040517fc37d19c9a6a9a568b5071658f9b5082ff8f142df3cf090385c5621ab1193806590612992908990899089908990899061470b565b60405180910390a26129a387613041565b505050505050505050505050565b6129b9612f5e565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586125553390565b73ffffffffffffffffffffffffffffffffffffffff8116611d8e576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606081612a4981601f6147d5565b1015612a975760405162461bcd60e51b815260206004820152600e60248201527f736c6963655f6f766572666c6f770000000000000000000000000000000000006044820152606401610a53565b612aa182846147d5565b84511015612af15760405162461bcd60e51b815260206004820152601160248201527f736c6963655f6f75744f66426f756e64730000000000000000000000000000006044820152606401610a53565b606082158015612b105760405191506000825260208201604052612b5a565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612b49578051835260209283019201612b31565b5050858452601f01601f1916604052505b50949350505050565b600260005403612bb55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a53565b6002600055565b61ffff86166000908152600660205260408082209051612bdf9088908890613dd9565b908152604080516020928190038301902067ffffffffffffffff871660009081529252902054905080612c7a5760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201527f61676500000000000000000000000000000000000000000000000000000000006064820152608401610a53565b808383604051612c8b929190613dd9565b604051809103902014612d065760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f6160448201527f64000000000000000000000000000000000000000000000000000000000000006064820152608401610a53565b61ffff87166000908152600660205260408082209051612d299089908990613dd9565b908152604080516020928190038301812067ffffffffffffffff8916600090815290845282902093909355601f88018290048202830182019052868252612dc2918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061257f92505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e58787878785604051612df99594939291906147e8565b60405180910390a150505050505050565b6001805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000606060008060008661ffff1667ffffffffffffffff811115612ea757612ea7613990565b6040519080825280601f01601f191660200182016040528015612ed1576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115612ef3578692505b828152826000602083013e909890975095505050505050565b60075460ff16610ee75760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610a53565b60075460ff1615610ee75760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610a53565b600954600a544291906201518090612fc99084613f67565b1115612fdb5750600a81905581612fe8565b612fe583826147d5565b90505b60085481111561303a5760405162461bcd60e51b815260206004820181905260248201527f4461696c79205472616e73616374696f6e204c696d69742045786365656465646044820152606401610a53565b6009555050565b6000818152600d60209081526040808320600681015462010000900460ff168452600e83528184205482517f6a42b8f8000000000000000000000000000000000000000000000000000000008152925191949373ffffffffffffffffffffffffffffffffffffffff90911692636a42b8f892600480830193928290030181865afa1580156130d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130f79190614824565b61310190426147d5565b60018084018290556000858152600f602052604090819020805460ff191690921790915560068401546002850154915192935062010000900460ff169185907f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda28929061316f9086815260200190565b60405180910390a260005b818110156113845761333785600201828154811061319a5761319a613de9565b60009182526020909120015460038701805473ffffffffffffffffffffffffffffffffffffffff90921691849081106131d5576131d5613de9565b90600052602060002001548760040184815481106131f5576131f5613de9565b90600052602060002001805461320a90613d8c565b80601f016020809104026020016040519081016040528092919081815260200182805461323690613d8c565b80156132835780601f1061325857610100808354040283529160200191613283565b820191906000526020600020905b81548152906001019060200180831161326657829003601f168201915b505050505088600501858154811061329d5761329d613de9565b9060005260206000200180546132b290613d8c565b80601f01602080910402602001604051908101604052809291908181526020018280546132de90613d8c565b801561332b5780601f106133005761010080835404028352916020019161332b565b820191906000526020600020905b81548152906001019060200180831161330e57829003601f168201915b5050505050888861333f565b60010161317a565b60ff81166000908152600e602090815260409182902054915173ffffffffffffffffffffffffffffffffffffffff9092169163f2b065379161338b918a918a918a918a918a910161483d565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016133bf91815260200190565b602060405180830381865afa1580156133dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134009190614884565b156134bf5760405162461bcd60e51b815260206004820152606360248201527f4f6d6e69636861696e476f7665726e616e63654578656375746f723a3a71756560448201527f75654f72526576657274496e7465726e616c3a206964656e746963616c20707260648201527f6f706f73616c20616374696f6e20616c7265616479207175657565642061742060848201527f657461000000000000000000000000000000000000000000000000000000000060a482015260c401610a53565b60ff81166000908152600e6020526040908190205490517f3a66f90100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690633a66f9019061352e908990899089908990899060040161483d565b6020604051808303816000875af115801561354d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1e9190614824565b8280548282559060005260206000209081019282156135eb579160200282015b828111156135eb57825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602090920191600190910190613591565b506135f79291506136da565b5090565b8280548282559060005260206000209081019282156135eb579160200282015b828111156135eb57825182559160200191906001019061361b565b82805482825590600052602060002090810192821561367c579160200282015b8281111561367c578251829061366c9082614001565b5091602001919060010190613656565b506135f79291506136ef565b8280548282559060005260206000209081019282156136ce579160200282015b828111156136ce57825182906136be9082614001565b50916020019190600101906136a8565b506135f792915061370c565b5b808211156135f757600081556001016136db565b808211156135f75760006137038282613729565b506001016136ef565b808211156135f75760006137208282613729565b5060010161370c565b50805461373590613d8c565b6000825580601f10613745575050565b601f016020900490600052602060002090810190611d8e91906136da565b803561ffff8116811461377557600080fd5b919050565b60008083601f84011261378c57600080fd5b50813567ffffffffffffffff8111156137a457600080fd5b6020830191508360208285010111156137bc57600080fd5b9250929050565b803567ffffffffffffffff8116811461377557600080fd5b600080600080600080608087890312156137f457600080fd5b6137fd87613763565b9550602087013567ffffffffffffffff8082111561381a57600080fd5b6138268a838b0161377a565b909750955085915061383a60408a016137c3565b9450606089013591508082111561385057600080fd5b5061385d89828a0161377a565b979a9699509497509295939492505050565b60006020828403121561388157600080fd5b5035919050565b60006020828403121561389a57600080fd5b610e3982613763565b600080604083850312156138b657600080fd5b6138bf83613763565b946020939093013593505050565b6000806000604084860312156138e257600080fd5b6138eb84613763565b9250602084013567ffffffffffffffff81111561390757600080fd5b6139138682870161377a565b9497909650939450505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b602081016003831061398a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156139e8576139e8613990565b604052919050565b600067ffffffffffffffff821115613a0a57613a0a613990565b50601f01601f191660200190565b600080600060608486031215613a2d57600080fd5b613a3684613763565b9250602084013567ffffffffffffffff811115613a5257600080fd5b8401601f81018613613a6357600080fd5b8035613a76613a71826139f0565b6139bf565b818152876020838501011115613a8b57600080fd5b81602084016020830137600060208383010152809450505050613ab0604085016137c3565b90509250925092565b60005b83811015613ad4578181015183820152602001613abc565b50506000910152565b60008151808452613af5816020860160208601613ab9565b601f01601f19169290920160200192915050565b602081526000610e396020830184613add565b73ffffffffffffffffffffffffffffffffffffffff81168114611d8e57600080fd5b600060208284031215613b5057600080fd5b8135610e3981613b1c565b60008060408385031215613b6e57600080fd5b613b7783613763565b9150613b8560208401613763565b90509250929050565b600080600080600060808688031215613ba657600080fd5b613baf86613763565b9450613bbd60208701613763565b935060408601359250606086013567ffffffffffffffff811115613be057600080fd5b613bec8882890161377a565b969995985093965092949392505050565b600080600060608486031215613c1257600080fd5b613c1b84613763565b9250613c2960208501613763565b9150604084013590509250925092565b600067ffffffffffffffff821115613c5357613c53613990565b5060051b60200190565b60006020808385031215613c7057600080fd5b823567ffffffffffffffff811115613c8757600080fd5b8301601f81018513613c9857600080fd5b8035613ca6613a7182613c39565b81815260059190911b82018301908381019087831115613cc557600080fd5b928401925b82841015613cec578335613cdd81613b1c565b82529284019290840190613cca565b979650505050505050565b60ff81168114611d8e57600080fd5b60008060408385031215613d1957600080fd5b8235613d2481613b1c565b91506020830135613d3481613cf7565b809150509250929050565b60008060008060808587031215613d5557600080fd5b613d5e85613763565b9350613d6c60208601613763565b92506040850135613d7c81613b1c565b9396929550929360600135925050565b600181811c90821680613da057607f821691505b602082108103610ed1577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b8183823760009101908152919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008154613e2581613d8c565b808552602060018381168015613e425760018114613e5c57613e8a565b60ff198516838901528284151560051b8901019550613e8a565b866000528260002060005b85811015613e825781548a8201860152908301908401613e67565b890184019650505b505050505092915050565b73ffffffffffffffffffffffffffffffffffffffff8616815284602082015260a060408201526000613eca60a0830186613e18565b8281036060840152613edc8186613e18565b9150508260808301529695505050505050565b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b61ffff84168152604060208201526000611ffd604083018486613eef565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115613f7a57613f7a613f38565b92915050565b8284823760609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000169101908152601401919050565b601f821115611cef576000816000526020600020601f850160051c81016020861015613fe25750805b601f850160051c820191505b8181101561138457828155600101613fee565b815167ffffffffffffffff81111561401b5761401b613990565b61402f816140298454613d8c565b84613fb9565b602080601f831160018114614082576000841561404c5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555611384565b600085815260208120601f198616915b828110156140b157888601518255948401946001909101908401614092565b50858210156140ed57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600061ffff808816835280871660208401525084604083015260806060830152613cec608083018486613eef565b600080835461413981613d8c565b60018281168015614151576001811461416657614195565b60ff1984168752821515830287019450614195565b8760005260208060002060005b8581101561418c5781548a820152908401908201614173565b50505082870194505b50929695505050505050565b67ffffffffffffffff8311156141b9576141b9613990565b6141cd836141c78354613d8c565b83613fb9565b6000601f84116001811461421f57600085156141e95750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355610ccf565b600083815260209020601f19861690835b828110156142505786850135825560209485019460019092019101614230565b508682101561428b577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b60ff8181168382160190811115613f7a57613f7a613f38565b60006142c4613a71846139f0565b90508281528383830111156142d857600080fd5b610e39836020830184613ab9565b600082601f8301126142f757600080fd5b610e39838351602085016142b6565b60006020828403121561431857600080fd5b815167ffffffffffffffff81111561432f57600080fd5b61433b848285016142e6565b949350505050565b61ffff851681526080602082015260006143606080830186613add565b67ffffffffffffffff851660408401528281036060840152613cec8185613add565b60008251614394818460208701613ab9565b9190910192915050565b67ffffffffffffffff8316815260406020820152600061433b6040830184613add565b600080604083850312156143d457600080fd5b825167ffffffffffffffff8111156143eb57600080fd5b6143f7858286016142e6565b925050602083015190509250929050565b600082601f83011261441957600080fd5b81516020614429613a7183613c39565b8083825260208201915060208460051b87010193508684111561444b57600080fd5b602086015b848110156144675780518352918301918301614450565b509695505050505050565b600082601f83011261448357600080fd5b81516020614493613a7183613c39565b82815260059290921b840181019181810190868411156144b257600080fd5b8286015b8481101561446757805167ffffffffffffffff8111156144d65760008081fd5b8701603f810189136144e85760008081fd5b6144f98986830151604084016142b6565b8452509183019183016144b6565b600082601f83011261451857600080fd5b81516020614528613a7183613c39565b82815260059290921b8401810191818101908684111561454757600080fd5b8286015b8481101561446757805167ffffffffffffffff81111561456b5760008081fd5b6145798986838b01016142e6565b84525091830191830161454b565b805161377581613cf7565b600080600080600060a086880312156145aa57600080fd5b855167ffffffffffffffff808211156145c257600080fd5b818801915088601f8301126145d657600080fd5b815160206145e6613a7183613c39565b82815260059290921b8401810191818101908c84111561460557600080fd5b948201945b8386101561462c57855161461d81613b1c565b8252948201949082019061460a565b918b015191995090935050508082111561464557600080fd5b61465189838a01614408565b9550604088015191508082111561466757600080fd5b61467389838a01614472565b9450606088015191508082111561468957600080fd5b5061469688828901614507565b9250506146a560808701614587565b90509295509295909350565b60008282518085526020808601955060208260051b8401016020860160005b848110156146fe57601f198684030189526146ec838351613add565b988401989250908301906001016146d0565b5090979650505050505050565b60a0808252865190820181905260009060209060c0840190828a01845b8281101561475a57815173ffffffffffffffffffffffffffffffffffffffff1684529284019290840190600101614728565b5050508381038285015287518082528883019183019060005b8181101561478f57835183529284019291840191600101614773565b505084810360408601526147a381896146b1565b9250505082810360608401526147b981866146b1565b9150506147cb608083018460ff169052565b9695505050505050565b80820180821115613f7a57613f7a613f38565b61ffff86168152608060208201526000614806608083018688613eef565b67ffffffffffffffff94909416604083015250606001529392505050565b60006020828403121561483657600080fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff8616815284602082015260a06040820152600061487260a0830186613add565b8281036060840152613edc8186613add565b60006020828403121561489657600080fd5b81518015158114610e3957600080fdfea26469706673582212206e9b4e0e8423ddd67a12f6b1a136938a978661714c282ede340b91a73060ecf464736f6c63430008190033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000055370e0fbb5f5b8daed978ba1c075a499eb107b8000000000000000000000000df3b635d2b535f906bb02abb22aed71346e36a000000000000000000000000000000000000000000000000000000000000002776
-----Decoded View---------------
Arg [0] : endpoint_ (address): 0x55370E0fBB5f5b8dAeD978BA1c075a499eB107B8
Arg [1] : guardian_ (address): 0xdf3b635d2b535f906BB02abb22AED71346E36a00
Arg [2] : srcChainId_ (uint16): 10102
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000055370e0fbb5f5b8daed978ba1c075a499eb107b8
Arg [1] : 000000000000000000000000df3b635d2b535f906bb02abb22aed71346e36a00
Arg [2] : 0000000000000000000000000000000000000000000000000000000000002776
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.