ETH Price: $3,340.73 (+4.31%)

Contract

0xd8Dc7e4Ae895472006A08a827Be7d1Fb0C5D6a7B

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
Value
0x608060401214305202024-06-15 13:56:5729 days ago1718459817IN
 Create: LayerZeroV2GatewayEstimateService
0 ETH0.0000035501320.00186213

View more zero value Internal Transactions in Advanced View mode

Advanced mode:

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
LayerZeroV2GatewayEstimateService

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 25 : LayerZeroV2GatewayEstimateService.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

import { ILayerZeroReceiver } from '@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroReceiver.sol';
import { IActionDataStructures } from '../interfaces/IActionDataStructures.sol';
import { IGatewayClient } from '../crosschain/interfaces/IGatewayClient.sol';
import { IGatewayClientProvider } from '../crosschain/interfaces/IGatewayClientProvider.sol';
import { IVariableBalanceRecords } from '../interfaces/IVariableBalanceRecords.sol';
import { IVariableBalanceRecordsProvider } from '../interfaces/IVariableBalanceRecordsProvider.sol';
import { LayerZeroV2EstimateMixin } from './mixins/LayerZeroV2EstimateMixin.sol';

/**
 * @title LayerZeroV2GatewayEstimateService
 * @notice Target chain gas estimation service (specific to LayerZero V2)
 */
contract LayerZeroV2GatewayEstimateService is LayerZeroV2EstimateMixin {
    /**
     * @dev Variable balance records contract reference
     */
    IVariableBalanceRecords public variableBalanceRecords;

    /**
     * @notice Initializes the contract
     * @param _lzReceiver The LayerZero V2 receiver reference
     * @param _owner The address of the initial owner of the contract
     * @param _managers The addresses of initial managers of the contract
     * @param _addOwnerToManagers The flag to optionally add the owner to the list of managers
     */
    constructor(
        ILayerZeroReceiver _lzReceiver,
        address _owner,
        address[] memory _managers,
        bool _addOwnerToManagers
    ) {
        _setLzReceiver(_lzReceiver);

        _initRoles(_owner, _managers, _addOwnerToManagers);
    }

    function _setLzReceiver(
        ILayerZeroReceiver _lzReceiver
    ) internal override(LayerZeroV2EstimateMixin) {
        super._setLzReceiver(_lzReceiver);

        // The _lzReceiver is assumed to be a gateway providing a reference to its "client"
        IGatewayClient gatewayClient = IGatewayClientProvider(address(_lzReceiver)).client();

        // The gateway client is assumed to provide a variable balance records reference
        variableBalanceRecords = IVariableBalanceRecordsProvider(address(gatewayClient))
            .variableBalanceRecords();
    }

    function _beforeEstimateTarget(
        bytes calldata _message
    ) internal view override(LayerZeroV2EstimateMixin) returns (uint256 controlValue) {
        IActionDataStructures.TargetMessage memory targetMessage = abi.decode(
            _message,
            (IActionDataStructures.TargetMessage)
        );

        controlValue = variableBalanceRecords.getAccountBalance(
            targetMessage.targetRecipient,
            targetMessage.vaultType
        );
    }

    function _afterEstimateTarget(
        bytes calldata _message,
        uint256 _controlValue
    ) internal view override(LayerZeroV2EstimateMixin) returns (bool isSuccess) {
        IActionDataStructures.TargetMessage memory targetMessage = abi.decode(
            _message,
            (IActionDataStructures.TargetMessage)
        );

        uint256 currentValue = variableBalanceRecords.getAccountBalance(
            targetMessage.targetRecipient,
            targetMessage.vaultType
        );

        isSuccess = (currentValue == _controlValue);
    }
}

File 2 of 25 : ILayerZeroEndpointV2.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0;

import { IMessageLibManager } from "./IMessageLibManager.sol";
import { IMessagingComposer } from "./IMessagingComposer.sol";
import { IMessagingChannel } from "./IMessagingChannel.sol";
import { IMessagingContext } from "./IMessagingContext.sol";

struct MessagingParams {
    uint32 dstEid;
    bytes32 receiver;
    bytes message;
    bytes options;
    bool payInLzToken;
}

struct MessagingReceipt {
    bytes32 guid;
    uint64 nonce;
    MessagingFee fee;
}

struct MessagingFee {
    uint256 nativeFee;
    uint256 lzTokenFee;
}

struct Origin {
    uint32 srcEid;
    bytes32 sender;
    uint64 nonce;
}

interface ILayerZeroEndpointV2 is IMessageLibManager, IMessagingComposer, IMessagingChannel, IMessagingContext {
    event PacketSent(bytes encodedPayload, bytes options, address sendLibrary);

    event PacketVerified(Origin origin, address receiver, bytes32 payloadHash);

    event PacketDelivered(Origin origin, address receiver);

    event LzReceiveAlert(
        address indexed receiver,
        address indexed executor,
        Origin origin,
        bytes32 guid,
        uint256 gas,
        uint256 value,
        bytes message,
        bytes extraData,
        bytes reason
    );

    event LzTokenSet(address token);

    event DelegateSet(address sender, address delegate);

    function quote(MessagingParams calldata _params, address _sender) external view returns (MessagingFee memory);

    function send(
        MessagingParams calldata _params,
        address _refundAddress
    ) external payable returns (MessagingReceipt memory);

    function verify(Origin calldata _origin, address _receiver, bytes32 _payloadHash) external;

    function verifiable(Origin calldata _origin, address _receiver) external view returns (bool);

    function initializable(Origin calldata _origin, address _receiver) external view returns (bool);

    function lzReceive(
        Origin calldata _origin,
        address _receiver,
        bytes32 _guid,
        bytes calldata _message,
        bytes calldata _extraData
    ) external payable;

    // oapp can burn messages partially by calling this function with its own business logic if messages are verified in order
    function clear(address _oapp, Origin calldata _origin, bytes32 _guid, bytes calldata _message) external;

    function setLzToken(address _lzToken) external;

    function lzToken() external view returns (address);

    function nativeToken() external view returns (address);

    function setDelegate(address _delegate) external;
}

File 3 of 25 : ILayerZeroReceiver.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0;

import { Origin } from "./ILayerZeroEndpointV2.sol";

interface ILayerZeroReceiver {
    function allowInitializePath(Origin calldata _origin) external view returns (bool);

    function nextNonce(uint32 _eid, bytes32 _sender) external view returns (uint64);

    function lzReceive(
        Origin calldata _origin,
        bytes32 _guid,
        bytes calldata _message,
        address _executor,
        bytes calldata _extraData
    ) external payable;
}

File 4 of 25 : IMessageLibManager.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0;

struct SetConfigParam {
    uint32 eid;
    uint32 configType;
    bytes config;
}

interface IMessageLibManager {
    struct Timeout {
        address lib;
        uint256 expiry;
    }

    event LibraryRegistered(address newLib);
    event DefaultSendLibrarySet(uint32 eid, address newLib);
    event DefaultReceiveLibrarySet(uint32 eid, address newLib);
    event DefaultReceiveLibraryTimeoutSet(uint32 eid, address oldLib, uint256 expiry);
    event SendLibrarySet(address sender, uint32 eid, address newLib);
    event ReceiveLibrarySet(address receiver, uint32 eid, address newLib);
    event ReceiveLibraryTimeoutSet(address receiver, uint32 eid, address oldLib, uint256 timeout);

    function registerLibrary(address _lib) external;

    function isRegisteredLibrary(address _lib) external view returns (bool);

    function getRegisteredLibraries() external view returns (address[] memory);

    function setDefaultSendLibrary(uint32 _eid, address _newLib) external;

    function defaultSendLibrary(uint32 _eid) external view returns (address);

    function setDefaultReceiveLibrary(uint32 _eid, address _newLib, uint256 _timeout) external;

    function defaultReceiveLibrary(uint32 _eid) external view returns (address);

    function setDefaultReceiveLibraryTimeout(uint32 _eid, address _lib, uint256 _expiry) external;

    function defaultReceiveLibraryTimeout(uint32 _eid) external view returns (address lib, uint256 expiry);

    function isSupportedEid(uint32 _eid) external view returns (bool);

    function isValidReceiveLibrary(address _receiver, uint32 _eid, address _lib) external view returns (bool);

    /// ------------------- OApp interfaces -------------------
    function setSendLibrary(address _oapp, uint32 _eid, address _newLib) external;

    function getSendLibrary(address _sender, uint32 _eid) external view returns (address lib);

    function isDefaultSendLibrary(address _sender, uint32 _eid) external view returns (bool);

    function setReceiveLibrary(address _oapp, uint32 _eid, address _newLib, uint256 _gracePeriod) external;

    function getReceiveLibrary(address _receiver, uint32 _eid) external view returns (address lib, bool isDefault);

    function setReceiveLibraryTimeout(address _oapp, uint32 _eid, address _lib, uint256 _gracePeriod) external;

    function receiveLibraryTimeout(address _receiver, uint32 _eid) external view returns (address lib, uint256 expiry);

    function setConfig(address _oapp, address _lib, SetConfigParam[] calldata _params) external;

    function getConfig(
        address _oapp,
        address _lib,
        uint32 _eid,
        uint32 _configType
    ) external view returns (bytes memory config);
}

File 5 of 25 : IMessagingChannel.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0;

interface IMessagingChannel {
    event InboundNonceSkipped(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce);
    event PacketNilified(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce, bytes32 payloadHash);
    event PacketBurnt(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce, bytes32 payloadHash);

    function eid() external view returns (uint32);

    // this is an emergency function if a message cannot be verified for some reasons
    // required to provide _nextNonce to avoid race condition
    function skip(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce) external;

    function nilify(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce, bytes32 _payloadHash) external;

    function burn(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce, bytes32 _payloadHash) external;

    function nextGuid(address _sender, uint32 _dstEid, bytes32 _receiver) external view returns (bytes32);

    function inboundNonce(address _receiver, uint32 _srcEid, bytes32 _sender) external view returns (uint64);

    function outboundNonce(address _sender, uint32 _dstEid, bytes32 _receiver) external view returns (uint64);

    function inboundPayloadHash(
        address _receiver,
        uint32 _srcEid,
        bytes32 _sender,
        uint64 _nonce
    ) external view returns (bytes32);

    function lazyInboundNonce(address _receiver, uint32 _srcEid, bytes32 _sender) external view returns (uint64);
}

File 6 of 25 : IMessagingComposer.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0;

interface IMessagingComposer {
    event ComposeSent(address from, address to, bytes32 guid, uint16 index, bytes message);
    event ComposeDelivered(address from, address to, bytes32 guid, uint16 index);
    event LzComposeAlert(
        address indexed from,
        address indexed to,
        address indexed executor,
        bytes32 guid,
        uint16 index,
        uint256 gas,
        uint256 value,
        bytes message,
        bytes extraData,
        bytes reason
    );

    function composeQueue(
        address _from,
        address _to,
        bytes32 _guid,
        uint16 _index
    ) external view returns (bytes32 messageHash);

    function sendCompose(address _to, bytes32 _guid, uint16 _index, bytes calldata _message) external;

    function lzCompose(
        address _from,
        address _to,
        bytes32 _guid,
        uint16 _index,
        bytes calldata _message,
        bytes calldata _extraData
    ) external payable;
}

File 7 of 25 : IMessagingContext.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0;

interface IMessagingContext {
    function isSendingMessage() external view returns (bool);

    function getSendContext() external view returns (uint32 dstEid, address sender);
}

File 8 of 25 : Ownable.sol
// 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);
    }
}

File 9 of 25 : Pausable.sol
// 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());
    }
}

File 10 of 25 : Context.sol
// 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;
    }
}

File 11 of 25 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 12 of 25 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 13 of 25 : Constants.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

/**
 * @dev The default token decimals value
 */
uint256 constant DECIMALS_DEFAULT = 18;

/**
 * @dev The maximum uint256 value for swap amount limit settings
 */
uint256 constant INFINITY = type(uint256).max;

/**
 * @dev The default limit of account list size
 */
uint256 constant LIST_SIZE_LIMIT_DEFAULT = 100;

/**
 * @dev The limit of swap router list size
 */
uint256 constant LIST_SIZE_LIMIT_ROUTERS = 200;

/**
 * @dev The factor for percentage settings. Example: 100 is 0.1%
 */
uint256 constant MILLIPERCENT_FACTOR = 100_000;

/**
 * @dev The de facto standard address to denote the native token
 */
address constant NATIVE_TOKEN_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

File 14 of 25 : IGatewayClient.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

/**
 * @title IGatewayClient
 * @notice Cross-chain gateway client interface
 */
interface IGatewayClient {
    /**
     * @notice Cross-chain message handler on the target chain
     * @dev The function is called by cross-chain gateways
     * @param _messageSourceChainId The ID of the message source chain
     * @param _payloadData The content of the cross-chain message
     */
    function handleExecutionPayload(
        uint256 _messageSourceChainId,
        bytes calldata _payloadData
    ) external;

    /**
     * @notice The standard "receive" function
     */
    receive() external payable;
}

File 15 of 25 : IGatewayClientProvider.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

import { IGatewayClient } from './IGatewayClient.sol';

/**
 * @title IGatewayClientProvider
 * @notice Cross-chain gateway client provider interface
 */
interface IGatewayClientProvider {
    /**
     * @notice Getter of the cross-chain gateway client reference
     * @return The cross-chain gateway client reference
     */
    function client() external view returns (IGatewayClient);
}

File 16 of 25 : DataStructures.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

/**
 * @notice Optional value structure
 * @dev Is used in mappings to allow zero values
 * @param isSet Value presence flag
 * @param value Numeric value
 */
struct OptionalValue {
    bool isSet;
    uint256 value;
}

/**
 * @notice Key-to-value structure
 * @dev Is used as an array parameter item to perform multiple key-value settings
 * @param key Numeric key
 * @param value Numeric value
 */
struct KeyToValue {
    uint256 key;
    uint256 value;
}

/**
 * @notice Key-to-value structure for address values
 * @dev Is used as an array parameter item to perform multiple key-value settings with address values
 * @param key Numeric key
 * @param value Address value
 */
struct KeyToAddressValue {
    uint256 key;
    address value;
}

/**
 * @notice Address-to-flag structure
 * @dev Is used as an array parameter item to perform multiple settings
 * @param account Account address
 * @param flag Flag value
 */
struct AccountToFlag {
    address account;
    bool flag;
}

/**
 * @notice Emitted when a list exceeds the size limit
 */
error ListSizeLimitError();

/**
 * @notice Sets or updates a value in a combined map (a mapping with a key list and key index mapping)
 * @param _map The mapping reference
 * @param _keyList The key list reference
 * @param _keyIndexMap The key list index mapping reference
 * @param _key The numeric key
 * @param _value The address value
 * @param _sizeLimit The map and list size limit
 * @return isNewKey True if the key was just added, otherwise false
 */
function combinedMapSet(
    mapping(uint256 => address) storage _map,
    uint256[] storage _keyList,
    mapping(uint256 => OptionalValue) storage _keyIndexMap,
    uint256 _key,
    address _value,
    uint256 _sizeLimit
) returns (bool isNewKey) {
    isNewKey = !_keyIndexMap[_key].isSet;

    if (isNewKey) {
        uniqueListAdd(_keyList, _keyIndexMap, _key, _sizeLimit);
    }

    _map[_key] = _value;
}

/**
 * @notice Removes a value from a combined map (a mapping with a key list and key index mapping)
 * @param _map The mapping reference
 * @param _keyList The key list reference
 * @param _keyIndexMap The key list index mapping reference
 * @param _key The numeric key
 * @return isChanged True if the combined map was changed, otherwise false
 */
function combinedMapRemove(
    mapping(uint256 => address) storage _map,
    uint256[] storage _keyList,
    mapping(uint256 => OptionalValue) storage _keyIndexMap,
    uint256 _key
) returns (bool isChanged) {
    isChanged = _keyIndexMap[_key].isSet;

    if (isChanged) {
        delete _map[_key];
        uniqueListRemove(_keyList, _keyIndexMap, _key);
    }
}

/**
 * @notice Adds a value to a unique value list (a list with value index mapping)
 * @param _list The list reference
 * @param _indexMap The value index mapping reference
 * @param _value The numeric value
 * @param _sizeLimit The list size limit
 * @return isChanged True if the list was changed, otherwise false
 */
function uniqueListAdd(
    uint256[] storage _list,
    mapping(uint256 => OptionalValue) storage _indexMap,
    uint256 _value,
    uint256 _sizeLimit
) returns (bool isChanged) {
    isChanged = !_indexMap[_value].isSet;

    if (isChanged) {
        if (_list.length >= _sizeLimit) {
            revert ListSizeLimitError();
        }

        _indexMap[_value] = OptionalValue(true, _list.length);
        _list.push(_value);
    }
}

/**
 * @notice Removes a value from a unique value list (a list with value index mapping)
 * @param _list The list reference
 * @param _indexMap The value index mapping reference
 * @param _value The numeric value
 * @return isChanged True if the list was changed, otherwise false
 */
function uniqueListRemove(
    uint256[] storage _list,
    mapping(uint256 => OptionalValue) storage _indexMap,
    uint256 _value
) returns (bool isChanged) {
    OptionalValue storage indexItem = _indexMap[_value];

    isChanged = indexItem.isSet;

    if (isChanged) {
        uint256 itemIndex = indexItem.value;
        uint256 lastIndex = _list.length - 1;

        if (itemIndex != lastIndex) {
            uint256 lastValue = _list[lastIndex];
            _list[itemIndex] = lastValue;
            _indexMap[lastValue].value = itemIndex;
        }

        _list.pop();
        delete _indexMap[_value];
    }
}

/**
 * @notice Adds a value to a unique address value list (a list with value index mapping)
 * @param _list The list reference
 * @param _indexMap The value index mapping reference
 * @param _value The address value
 * @param _sizeLimit The list size limit
 * @return isChanged True if the list was changed, otherwise false
 */
function uniqueAddressListAdd(
    address[] storage _list,
    mapping(address => OptionalValue) storage _indexMap,
    address _value,
    uint256 _sizeLimit
) returns (bool isChanged) {
    isChanged = !_indexMap[_value].isSet;

    if (isChanged) {
        if (_list.length >= _sizeLimit) {
            revert ListSizeLimitError();
        }

        _indexMap[_value] = OptionalValue(true, _list.length);
        _list.push(_value);
    }
}

/**
 * @notice Removes a value from a unique address value list (a list with value index mapping)
 * @param _list The list reference
 * @param _indexMap The value index mapping reference
 * @param _value The address value
 * @return isChanged True if the list was changed, otherwise false
 */
function uniqueAddressListRemove(
    address[] storage _list,
    mapping(address => OptionalValue) storage _indexMap,
    address _value
) returns (bool isChanged) {
    OptionalValue storage indexItem = _indexMap[_value];

    isChanged = indexItem.isSet;

    if (isChanged) {
        uint256 itemIndex = indexItem.value;
        uint256 lastIndex = _list.length - 1;

        if (itemIndex != lastIndex) {
            address lastValue = _list[lastIndex];
            _list[itemIndex] = lastValue;
            _indexMap[lastValue].value = itemIndex;
        }

        _list.pop();
        delete _indexMap[_value];
    }
}

/**
 * @notice Adds or removes a value to/from a unique address value list (a list with value index mapping)
 * @dev The list size limit is checked on items adding only
 * @param _list The list reference
 * @param _indexMap The value index mapping reference
 * @param _value The address value
 * @param _flag The value inclusion flag
 * @param _sizeLimit The list size limit
 * @return isChanged True if the list was changed, otherwise false
 */
function uniqueAddressListUpdate(
    address[] storage _list,
    mapping(address => OptionalValue) storage _indexMap,
    address _value,
    bool _flag,
    uint256 _sizeLimit
) returns (bool isChanged) {
    return
        _flag
            ? uniqueAddressListAdd(_list, _indexMap, _value, _sizeLimit)
            : uniqueAddressListRemove(_list, _indexMap, _value);
}

File 17 of 25 : LayerZeroV2EstimateMixin.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

import { ERC165 } from '@openzeppelin/contracts/utils/introspection/ERC165.sol';
import { ILayerZeroReceiver } from '@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroReceiver.sol';
import { Origin } from '@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol';
import { IFailureNotificationReceiver } from '../../interfaces/IFailureNotificationReceiver.sol';
import { Pausable } from '../../Pausable.sol';
import '../../helpers/AddressHelper.sol' as AddressHelper;

/**
 * @title LayerZeroV2EstimateMixin
 * @notice Target chain gas estimation mixin (specific to LayerZero V2)
 */
abstract contract LayerZeroV2EstimateMixin is Pausable, ERC165, IFailureNotificationReceiver {
    /**
     * @dev ILayerZeroReceiver instance
     */
    ILayerZeroReceiver public lzReceiver;

    bool internal isFailureNotified;

    address internal constant ESTIMATOR_ADDRESS = 0xaAaAaAaaAaAaAaaAaAAAAAAAAaaaAaAaAaaAaaAa;
    address internal constant ESTIMATE_EXECUTOR_ARGUMENT =
        address(uint160(uint256(keccak256('Executor Argument'))));
    bytes32 internal constant ESTIMATE_GUID_ARGUMENT = keccak256('GUID Argument');

    /**
     * @notice Emitted when the LayerZero V2 receiver reference is set
     */
    event SetLzReceiver(ILayerZeroReceiver indexed lzReceiver);

    /**
     * @notice Emitted to use the result of a warm-up expression
     */
    event WarmUp(uint256 data);

    /**
     * @notice Emitted when the result info value is returned from estimateTarget
     * @param isSuccess The status of the action execution
     * @param gasUsed The amount of gas used
     */
    error ResultInfo(bool isSuccess, uint256 gasUsed);

    /**
     * @notice Emitted when the caller is not the estimator account
     */
    error OnlyEstimatorError();

    /**
     * @notice Emitted when the failure notification caller is not the expected account
     */
    error NotifyFailureCallerError();

    /**
     * @dev Modifier to check if the caller is the estimator account
     */
    modifier onlyEstimator() {
        if (msg.sender != ESTIMATOR_ADDRESS) {
            revert OnlyEstimatorError();
        }

        _;
    }

    /**
     * @notice Gas consumption estimate on the target chain
     * @param _origin The cross-chain message origin data
     * @param _message The content of the cross-chain message
     * @dev Always reverts and provides data in ResultInfo arguments for use in static calls
     */
    function estimateTarget(
        Origin calldata _origin,
        bytes calldata _message,
        uint8 testMode
    ) external virtual onlyEstimator whenNotPaused {
        isFailureNotified = false;

        bool callSuccess = true;
        uint256 controlValue = _beforeEstimateTarget(_message);

        ILayerZeroReceiver lzReceiverRef = lzReceiver;

        if (testMode == 1) {
            address(lzReceiver).balance;
        } else if (testMode == 2) {
            address(lzReceiverRef).balance;
        } else if (testMode == 3) {
            emit WarmUp(address(lzReceiver).balance); // storage slot and address warm-up
        } else if (testMode == 4) {
            emit WarmUp(address(lzReceiverRef).balance); // storage slot and address warm-up
        }

        uint256 gasBefore = gasleft();

        // - - - Target chain actions - - -

        try
            lzReceiverRef.lzReceive(
                _origin,
                ESTIMATE_GUID_ARGUMENT,
                _message,
                ESTIMATE_EXECUTOR_ARGUMENT,
                ''
            )
        {} catch {
            callSuccess = false;
        }

        // - - -

        uint256 gasUsed = gasBefore - gasleft();

        bool isSuccess = callSuccess &&
            !isFailureNotified &&
            _afterEstimateTarget(_message, controlValue);

        revert ResultInfo(isSuccess, gasUsed);
    }

    /**
     * @notice Sets the LayerZero V2 receiver reference
     * @param _lzReceiver The LayerZero V2 receiver reference
     */
    function setLzReceiver(ILayerZeroReceiver _lzReceiver) external virtual onlyManager {
        _setLzReceiver(_lzReceiver);
    }

    /**
     * @notice Failure notification
     */
    function notifyFailure() external virtual override(IFailureNotificationReceiver) {
        if (msg.sender != address(lzReceiver)) {
            revert NotifyFailureCallerError();
        }

        isFailureNotified = true;
    }

    /**
     * @notice ERC-165 interface detection
     */
    function supportsInterface(
        bytes4 _interfaceId
    ) public view virtual override(ERC165) returns (bool) {
        return
            _interfaceId == type(IFailureNotificationReceiver).interfaceId ||
            super.supportsInterface(_interfaceId);
    }

    function _setLzReceiver(ILayerZeroReceiver _lzReceiver) internal virtual {
        AddressHelper.requireContract(address(_lzReceiver));

        lzReceiver = _lzReceiver;

        emit SetLzReceiver(_lzReceiver);
    }

    function _beforeEstimateTarget(
        bytes calldata /*_message*/
    ) internal virtual returns (uint256 controlValue) {
        // returns 0 by default
    }

    function _afterEstimateTarget(
        bytes calldata /*_message*/,
        uint256 /*_controlValue*/
    ) internal virtual returns (bool isSuccess) {
        isSuccess = true;
    }
}

File 18 of 25 : AddressHelper.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

/**
 * @notice Emitted when the account is not a contract
 * @param account The account address
 */
error NonContractAddressError(address account);

/**
 * @notice Function to check if the account is a contract
 * @return The account contract status flag
 */
function isContract(address _account) view returns (bool) {
    return _account.code.length > 0;
}

/**
 * @notice Function to require an account to be a contract
 */
function requireContract(address _account) view {
    if (!isContract(_account)) {
        revert NonContractAddressError(_account);
    }
}

/**
 * @notice Function to require an account to be a contract or a zero address
 */
function requireContractOrZeroAddress(address _account) view {
    if (_account != address(0)) {
        requireContract(_account);
    }
}

File 19 of 25 : IActionDataStructures.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

/**
 * @title IActionDataStructures
 * @notice Action data structure declarations
 */
interface IActionDataStructures {
    /**
     * @notice Single-chain action data structure
     * @param fromTokenAddress The address of the input token
     * @param toTokenAddress The address of the output token
     * @param swapInfo The data for the single-chain swap
     * @param recipient The address of the recipient
     */
    struct LocalAction {
        address fromTokenAddress;
        address toTokenAddress;
        SwapInfo swapInfo;
        address recipient;
    }

    /**
     * @notice Cross-chain action data structure
     * @param gatewayType The numeric type of the cross-chain gateway
     * @param vaultType The numeric type of the vault
     * @param sourceTokenAddress The address of the input token on the source chain
     * @param sourceSwapInfo The data for the source chain swap
     * @param targetChainId The action target chain ID
     * @param targetTokenAddress The address of the output token on the destination chain
     * @param targetSwapInfoOptions The list of data options for the target chain swap
     * @param targetRecipient The address of the recipient on the target chain
     * @param gatewaySettings The gateway-specific settings data
     */
    struct Action {
        uint256 gatewayType;
        uint256 vaultType;
        address sourceTokenAddress;
        SwapInfo sourceSwapInfo;
        uint256 targetChainId;
        address targetTokenAddress;
        SwapInfo[] targetSwapInfoOptions;
        address targetRecipient;
        bytes gatewaySettings;
    }

    /**
     * @notice Token swap data structure
     * @param fromAmount The quantity of the token
     * @param routerType The numeric type of the swap router
     * @param routerData The data for the swap router call
     */
    struct SwapInfo {
        uint256 fromAmount;
        uint256 routerType;
        bytes routerData;
    }

    /**
     * @notice Cross-chain message data structure
     * @param actionId The unique identifier of the cross-chain action
     * @param sourceSender The address of the sender on the source chain
     * @param vaultType The numeric type of the vault
     * @param targetTokenAddress The address of the output token on the target chain
     * @param targetSwapInfo The data for the target chain swap
     * @param targetRecipient The address of the recipient on the target chain
     */
    struct TargetMessage {
        uint256 actionId;
        address sourceSender;
        uint256 vaultType;
        address targetTokenAddress;
        SwapInfo targetSwapInfo;
        address targetRecipient;
    }
}

File 20 of 25 : IFailureNotificationReceiver.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

/**
 * @title IFailureNotificationReceiver
 * @notice Failure notification receiver interface
 */
interface IFailureNotificationReceiver {
    /**
     * @notice Failure notification
     */
    function notifyFailure() external;
}

File 21 of 25 : IVariableBalanceRecords.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

/**
 * @title IVariableBalanceRecords
 * @notice Variable balance records interface
 */
interface IVariableBalanceRecords {
    /**
     * @notice Increases the variable balance for the account
     * @param _account The account address
     * @param _vaultType The vault type
     * @param _amount The amount by which to increase the variable balance
     */
    function increaseBalance(address _account, uint256 _vaultType, uint256 _amount) external;

    /**
     * @notice Clears the variable balance for the account
     * @param _account The account address
     * @param _vaultType The vault type
     */
    function clearBalance(address _account, uint256 _vaultType) external;

    /**
     * @notice Getter of the variable balance by the account
     * @param _account The account address
     * @param _vaultType The vault type
     */
    function getAccountBalance(
        address _account,
        uint256 _vaultType
    ) external view returns (uint256);
}

File 22 of 25 : IVariableBalanceRecordsProvider.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

import { IVariableBalanceRecords } from './IVariableBalanceRecords.sol';

/**
 * @title IVariableBalanceRecordsProvider
 * @notice The variable balance records provider interface
 */
interface IVariableBalanceRecordsProvider {
    /**
     * @notice Getter of the variable balance records contract reference
     * @return The variable balance records contract reference
     */
    function variableBalanceRecords() external view returns (IVariableBalanceRecords);
}

File 23 of 25 : Pausable.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

import { Pausable as PausableBase } from '@openzeppelin/contracts/security/Pausable.sol';
import { ManagerRole } from './roles/ManagerRole.sol';

/**
 * @title Pausable
 * @notice Base contract that implements the emergency pause mechanism
 */
abstract contract Pausable is PausableBase, ManagerRole {
    /**
     * @notice Enter pause state
     */
    function pause() external onlyManager whenNotPaused {
        _pause();
    }

    /**
     * @notice Exit pause state
     */
    function unpause() external onlyManager whenPaused {
        _unpause();
    }
}

File 24 of 25 : ManagerRole.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

import { Ownable } from '@openzeppelin/contracts/access/Ownable.sol';
import { RoleBearers } from './RoleBearers.sol';

/**
 * @title ManagerRole
 * @notice Base contract that implements the Manager role.
 * The manager role is a high-permission role for core team members only.
 * Managers can set vaults and routers addresses, fees, cross-chain protocols,
 * and other parameters for Interchain (cross-chain) swaps and single-network swaps.
 * Please note, the manager role is unique for every contract,
 * hence different addresses may be assigned as managers for different contracts.
 */
abstract contract ManagerRole is Ownable, RoleBearers {
    bytes32 private constant ROLE_KEY = keccak256('Manager');

    /**
     * @notice Emitted when the Manager role status for the account is updated
     * @param account The account address
     * @param value The Manager role status flag
     */
    event SetManager(address indexed account, bool indexed value);

    /**
     * @notice Emitted when the Manager role status for the account is renounced
     * @param account The account address
     */
    event RenounceManagerRole(address indexed account);

    /**
     * @notice Emitted when the caller is not a Manager role bearer
     */
    error OnlyManagerError();

    /**
     * @dev Modifier to check if the caller is a Manager role bearer
     */
    modifier onlyManager() {
        if (!isManager(msg.sender)) {
            revert OnlyManagerError();
        }

        _;
    }

    /**
     * @notice Updates the Manager role status for the account
     * @param _account The account address
     * @param _value The Manager role status flag
     */
    function setManager(address _account, bool _value) public onlyOwner {
        _setRoleBearer(ROLE_KEY, _account, _value);

        emit SetManager(_account, _value);
    }

    /**
     * @notice Renounces the Manager role
     */
    function renounceManagerRole() external onlyManager {
        _setRoleBearer(ROLE_KEY, msg.sender, false);

        emit RenounceManagerRole(msg.sender);
    }

    /**
     * @notice Getter of the Manager role bearer count
     * @return The Manager role bearer count
     */
    function managerCount() external view returns (uint256) {
        return _roleBearerCount(ROLE_KEY);
    }

    /**
     * @notice Getter of the complete list of the Manager role bearers
     * @return The complete list of the Manager role bearers
     */
    function fullManagerList() external view returns (address[] memory) {
        return _fullRoleBearerList(ROLE_KEY);
    }

    /**
     * @notice Getter of the Manager role bearer status
     * @param _account The account address
     */
    function isManager(address _account) public view returns (bool) {
        return _isRoleBearer(ROLE_KEY, _account);
    }

    function _initRoles(
        address _owner,
        address[] memory _managers,
        bool _addOwnerToManagers
    ) internal {
        address ownerAddress = _owner == address(0) ? msg.sender : _owner;

        for (uint256 index; index < _managers.length; index++) {
            setManager(_managers[index], true);
        }

        if (_addOwnerToManagers && !isManager(ownerAddress)) {
            setManager(ownerAddress, true);
        }

        if (ownerAddress != msg.sender) {
            transferOwnership(ownerAddress);
        }
    }
}

File 25 of 25 : RoleBearers.sol
// SPDX-License-Identifier: AGPL-3.0-only

pragma solidity 0.8.19;

import '../Constants.sol' as Constants;
import '../DataStructures.sol' as DataStructures;

/**
 * @title RoleBearers
 * @notice Base contract that implements role-based access control
 * @dev A custom implementation providing full role bearer lists
 */
abstract contract RoleBearers {
    mapping(bytes32 /*roleKey*/ => address[] /*roleBearers*/) private roleBearerTable;
    mapping(bytes32 /*roleKey*/ => mapping(address /*account*/ => DataStructures.OptionalValue /*status*/))
        private roleBearerIndexTable;

    function _setRoleBearer(bytes32 _roleKey, address _account, bool _value) internal {
        DataStructures.uniqueAddressListUpdate(
            roleBearerTable[_roleKey],
            roleBearerIndexTable[_roleKey],
            _account,
            _value,
            Constants.LIST_SIZE_LIMIT_DEFAULT
        );
    }

    function _isRoleBearer(bytes32 _roleKey, address _account) internal view returns (bool) {
        return roleBearerIndexTable[_roleKey][_account].isSet;
    }

    function _roleBearerCount(bytes32 _roleKey) internal view returns (uint256) {
        return roleBearerTable[_roleKey].length;
    }

    function _fullRoleBearerList(bytes32 _roleKey) internal view returns (address[] memory) {
        return roleBearerTable[_roleKey];
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract ILayerZeroReceiver","name":"_lzReceiver","type":"address"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address[]","name":"_managers","type":"address[]"},{"internalType":"bool","name":"_addOwnerToManagers","type":"bool"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ListSizeLimitError","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"NonContractAddressError","type":"error"},{"inputs":[],"name":"NotifyFailureCallerError","type":"error"},{"inputs":[],"name":"OnlyEstimatorError","type":"error"},{"inputs":[],"name":"OnlyManagerError","type":"error"},{"inputs":[{"internalType":"bool","name":"isSuccess","type":"bool"},{"internalType":"uint256","name":"gasUsed","type":"uint256"}],"name":"ResultInfo","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"RenounceManagerRole","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract ILayerZeroReceiver","name":"lzReceiver","type":"address"}],"name":"SetLzReceiver","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"bool","name":"value","type":"bool"}],"name":"SetManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"data","type":"uint256"}],"name":"WarmUp","type":"event"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"uint8","name":"testMode","type":"uint8"}],"name":"estimateTarget","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fullManagerList","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"isManager","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lzReceiver","outputs":[{"internalType":"contract ILayerZeroReceiver","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"managerCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"notifyFailure","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":[],"name":"renounceManagerRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ILayerZeroReceiver","name":"_lzReceiver","type":"address"}],"name":"setLzReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"bool","name":"_value","type":"bool"}],"name":"setManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"variableBalanceRecords","outputs":[{"internalType":"contract IVariableBalanceRecords","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b5060405162001c9438038062001c94833981016040819052620000349162000730565b6000805460ff1916905562000049336200006b565b6200005484620000c4565b62000061838383620001c1565b50505050620008de565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b620000cf816200027b565b6000816001600160a01b031663109e94cf6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000110573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000136919062000843565b9050806001600160a01b031663f6b3fe1d6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000177573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200019d919062000843565b600480546001600160a01b0319166001600160a01b03929092169190911790555050565b60006001600160a01b03841615620001da5783620001dc565b335b905060005b83518110156200022f576200021a8482815181106200020457620002046200086a565b60200260200101516001620002d060201b60201c565b80620002268162000896565b915050620001e1565b50818015620002465750620002448162000343565b155b15620002595762000259816001620002d0565b6001600160a01b03811633146200027557620002758162000385565b50505050565b620002868162000408565b600380546001600160a01b0319166001600160a01b0383169081179091556040517fdd8c46f415be00339781d5b5b83c875e90b1e4bca6a5234fb517f63deaa0277390600090a250565b620002da6200043d565b620003077f6d439300980e333f0256d64be2c9f67e86f4493ce25f82498d6db7f4be3d9e6f8383620004a1565b604051811515906001600160a01b038416907fbe9474bb3e78da7e315cdffa5cfa30b767fcc95bbf44a6197da60228eea1028690600090a35050565b6001600160a01b03811660009081527f260b29b219d450563ddb0e5ca806bdadb1e125f7e8c506de0443797dd7122728602052604081205460ff165b92915050565b6200038f6200043d565b6001600160a01b038116620003fa5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b62000405816200006b565b50565b6001600160a01b0381163b6200040557604051638c50d7cd60e01b81526001600160a01b0382166004820152602401620003f1565b6000546001600160a01b036101009091041633146200049f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620003f1565b565b6000838152600160209081526040808320600290925290912062000275919084846064600082620004df57620004d9868686620004f7565b620004ed565b620004ed868686856200062c565b9695505050505050565b6001600160a01b0381166000908152602083905260409020805460ff16908115620006245760018082015486549091600091620005359190620008b2565b9050808214620005c95760008782815481106200055657620005566200086a565b9060005260206000200160009054906101000a90046001600160a01b03169050808884815481106200058c576200058c6200086a565b600091825260208083209190910180546001600160a01b0319166001600160a01b0394851617905592909116815290879052604090206001018290555b86805480620005dc57620005dc620008c8565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038716825287905260408120805460ff191681556001015550505b509392505050565b6001600160a01b03821660009081526020849052604090205460ff16158015620006d95784548211620006725760405163b1655e3360e01b815260040160405180910390fd5b6040805180820182526001808252875460208084019182526001600160a01b03881660008181528a83529586209451855460ff1916901515178555915193830193909355885491820189558884529190922090910180546001600160a01b03191690911790555b949350505050565b6001600160a01b03811681146200040557600080fd5b80516200070481620006e1565b919050565b634e487b7160e01b600052604160045260246000fd5b805180151581146200070457600080fd5b600080600080608085870312156200074757600080fd5b84516200075481620006e1565b809450506020808601516200076981620006e1565b60408701519094506001600160401b03808211156200078757600080fd5b818801915088601f8301126200079c57600080fd5b815181811115620007b157620007b162000709565b8060051b604051601f19603f83011681018181108582111715620007d957620007d962000709565b60405291825284820192508381018501918b831115620007f857600080fd5b938501935b8285101562000821576200081185620006f7565b84529385019392850192620007fd565b80975050505050505062000838606086016200071f565b905092959194509250565b6000602082840312156200085657600080fd5b81516200086381620006e1565b9392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201620008ab57620008ab62000880565b5060010190565b818103818111156200037f576200037f62000880565b634e487b7160e01b600052603160045260246000fd5b6113a680620008ee6000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c80638da5cb5b116100a2578063d84d730b11610071578063d84d730b14610217578063e3725b151461022a578063f2fde38b1461023f578063f3ae241514610252578063f6b3fe1d1461026557600080fd5b80638da5cb5b146101bf578063a5e90eee146101e9578063aa7d2650146101fc578063c2c518e11461020f57600080fd5b80635c975abb116100de5780635c975abb1461019c578063602b970d146101a7578063715018a6146101af5780638456cb59146101b757600080fd5b806301ffc9a7146101105780630c16153714610138578063103b73971461014d5780633f4ba83a14610194575b600080fd5b61012361011e366004610ea2565b610278565b60405190151581526020015b60405180910390f35b61014b610146366004610ed3565b6102af565b005b60008051602061135183398151915260005260016020527f3c2285c553468ca8f30447b24bb463c127f1b840e23a0cafa23caa79d906669a5460405190815260200161012f565b61014b6104de565b60005460ff16610123565b61014b610516565b61014b610556565b61014b610568565b60005461010090046001600160a01b03165b6040516001600160a01b03909116815260200161012f565b61014b6101f7366004610f9c565b61059e565b61014b61020a366004610fda565b6105fb565b61014b61062d565b6003546101d1906001600160a01b031681565b61023261069a565b60405161012f9190610ff7565b61014b61024d366004610fda565b6106b3565b610123610260366004610fda565b610729565b6004546101d1906001600160a01b031681565b60006001600160e01b0319821663602b970d60e01b14806102a957506301ffc9a760e01b6001600160e01b03198316145b92915050565b3373aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa146102e35760405163744cbb2360e11b815260040160405180910390fd5b6102eb610769565b6003805460ff60a01b191690556001600061030685856107af565b6003549091506001600160a01b0316600160ff8516146103c557600260ff8516146103c5578360ff1660030361037c576003546040516001600160a01b039091163181527f3a94f2a2f24e3ca808779cb2207ff167494f7e99a7cb878fb24160e5162e41e99060200160405180910390a16103c5565b8360ff166004036103c5576040516001600160a01b0382163181527f3a94f2a2f24e3ca808779cb2207ff167494f7e99a7cb878fb24160e5162e41e99060200160405180910390a15b60005a6040516313137d6560e01b81529091506001600160a01b038316906313137d659061043f908b907f95465546629f52a2ced7bd7516c519ba7ce0a8f702d00687c15030421204cde7908c908c907fd867565f3c107b4f3708dae1cc4f23de80863f77b63305d159dd5d0e38eba51690600401611044565b600060405180830381600087803b15801561045957600080fd5b505af192505050801561046a575060015b61047357600093505b60005a61048090836110f0565b9050600085801561049b5750600354600160a01b900460ff16155b80156104ad57506104ad898987610856565b60405163e9ea012960e01b81528115156004820152602481018490529091506044015b60405180910390fd5b905090565b6104e733610729565b61050457604051637c3ea23f60e01b815260040160405180910390fd5b61050c6108f6565b61051461093f565b565b6003546001600160a01b03163314610541576040516360e317a760e11b815260040160405180910390fd5b6003805460ff60a01b1916600160a01b179055565b61055e610991565b61051460006109f1565b61057133610729565b61058e57604051637c3ea23f60e01b815260040160405180910390fd5b610596610769565b610514610a4a565b6105a6610991565b6105bf6000805160206113518339815191528383610a87565b604051811515906001600160a01b038416907fbe9474bb3e78da7e315cdffa5cfa30b767fcc95bbf44a6197da60228eea1028690600090a35050565b61060433610729565b61062157604051637c3ea23f60e01b815260040160405180910390fd5b61062a81610ab4565b50565b61063633610729565b61065357604051637c3ea23f60e01b815260040160405180910390fd5b61066d600080516020611351833981519152336000610a87565b60405133907f6cc2c67081f55c2fffb7c008fa995fbbf890f48c7c16fba93d8220f00dc84cc590600090a2565b60606104d9600080516020611351833981519152610ba9565b6106bb610991565b6001600160a01b0381166107205760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104d0565b61062a816109f1565b6001600160a01b03811660009081527f260b29b219d450563ddb0e5ca806bdadb1e125f7e8c506de0443797dd7122728602052604081205460ff166102a9565b60005460ff16156105145760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016104d0565b6000806107be838501856111a4565b6004805460a08301516040808501519051638758e33960e01b81529495506001600160a01b0390921693638758e3399361080d9391016001600160a01b03929092168252602082015260400190565b602060405180830381865afa15801561082a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084e91906112ee565b949350505050565b600080610865848601866111a4565b6004805460a08301516040808501519051638758e33960e01b81526001600160a01b039283169481019490945260248401529293506000921690638758e33990604401602060405180830381865afa1580156108c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e991906112ee565b9390931495945050505050565b60005460ff166105145760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016104d0565b6109476108f6565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000546001600160a01b036101009091041633146105145760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d0565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b610a52610769565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586109743390565b60008381526001602090815260408083206002909252909120610aae919084846064610c15565b50505050565b610abd81610c42565b6000816001600160a01b031663109e94cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610afd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b219190611307565b9050806001600160a01b031663f6b3fe1d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b859190611307565b600480546001600160a01b0319166001600160a01b03929092169190911790555050565b600081815260016020908152604091829020805483518184028101840190945280845260609392830182828015610c0957602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610beb575b50505050509050919050565b600082610c2c57610c27868686610c95565b610c38565b610c3886868685610dbd565b9695505050505050565b610c4b81610e6f565b600380546001600160a01b0319166001600160a01b0383169081179091556040517fdd8c46f415be00339781d5b5b83c875e90b1e4bca6a5234fb517f63deaa0277390600090a250565b6001600160a01b0381166000908152602083905260409020805460ff16908115610db55760018082015486549091600091610cd091906110f0565b9050808214610d5d576000878281548110610ced57610ced611324565b9060005260206000200160009054906101000a90046001600160a01b0316905080888481548110610d2057610d20611324565b600091825260208083209190910180546001600160a01b0319166001600160a01b0394851617905592909116815290879052604090206001018290555b86805480610d6d57610d6d61133a565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038716825287905260408120805460ff191681556001015550505b509392505050565b6001600160a01b03821660009081526020849052604090205460ff1615801561084e5784548211610e015760405163b1655e3360e01b815260040160405180910390fd5b6040805180820182526001808252875460208084019182526001600160a01b03881660008181528a83529586209451855460ff1916901515178555915193830193909355885491820189558884529190922090910180546001600160a01b0319169091179055949350505050565b6001600160a01b0381163b61062a57604051638c50d7cd60e01b81526001600160a01b03821660048201526024016104d0565b600060208284031215610eb457600080fd5b81356001600160e01b031981168114610ecc57600080fd5b9392505050565b60008060008084860360a0811215610eea57600080fd5b6060811215610ef857600080fd5b50849350606085013567ffffffffffffffff80821115610f1757600080fd5b818701915087601f830112610f2b57600080fd5b813581811115610f3a57600080fd5b886020828501011115610f4c57600080fd5b602083019550809450505050608085013560ff81168114610f6c57600080fd5b939692955090935050565b6001600160a01b038116811461062a57600080fd5b8035610f9781610f77565b919050565b60008060408385031215610faf57600080fd5b8235610fba81610f77565b915060208301358015158114610fcf57600080fd5b809150509250929050565b600060208284031215610fec57600080fd5b8135610ecc81610f77565b6020808252825182820181905260009190848201906040850190845b818110156110385783516001600160a01b031683529284019291840191600101611013565b50909695505050505050565b6000863563ffffffff811680821461105b57600080fd5b83525060208781013590830152604087013567ffffffffffffffff811680821461108457600080fd5b806040850152505085606083015260e060808301528360e083015261010084868285013760008584018201526001600160a01b03841660a0840152601f19601f8601168301818482030160c08501526110e38282016000815260200190565b9998505050505050505050565b818103818111156102a957634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60405160c0810167ffffffffffffffff8111828210171561114a5761114a611111565b60405290565b6040516060810167ffffffffffffffff8111828210171561114a5761114a611111565b604051601f8201601f1916810167ffffffffffffffff8111828210171561119c5761119c611111565b604052919050565b600060208083850312156111b757600080fd5b823567ffffffffffffffff808211156111cf57600080fd5b9084019060c082870312156111e357600080fd5b6111eb611127565b82358152838301356111fc81610f77565b8185015260408381013590820152606083013561121881610f77565b606082015260808301358281111561122f57600080fd5b83016060818903121561124157600080fd5b611249611150565b81358152858201358682015260408201358481111561126757600080fd5b80830192505088601f83011261127c57600080fd5b81358481111561128e5761128e611111565b6112a0601f8201601f19168801611173565b945080855289878285010111156112b657600080fd5b80878401888701376000908501870152604081018490526080830152506112df60a08401610f8c565b60a08201529695505050505050565b60006020828403121561130057600080fd5b5051919050565b60006020828403121561131957600080fd5b8151610ecc81610f77565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fdfe6d439300980e333f0256d64be2c9f67e86f4493ce25f82498d6db7f4be3d9e6fa2646970667358221220dfdf5fb81e8937027704b5eb2c89fc34c4bba9a318560d449b189226f63018af64736f6c63430008130033000000000000000000000000237f6ed01f9d2273dfe5a72b41df470419a70abb00000000000000000000000072e28c7f34100afefc399fcc0ae041b8fe5841ae000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061010b5760003560e01c80638da5cb5b116100a2578063d84d730b11610071578063d84d730b14610217578063e3725b151461022a578063f2fde38b1461023f578063f3ae241514610252578063f6b3fe1d1461026557600080fd5b80638da5cb5b146101bf578063a5e90eee146101e9578063aa7d2650146101fc578063c2c518e11461020f57600080fd5b80635c975abb116100de5780635c975abb1461019c578063602b970d146101a7578063715018a6146101af5780638456cb59146101b757600080fd5b806301ffc9a7146101105780630c16153714610138578063103b73971461014d5780633f4ba83a14610194575b600080fd5b61012361011e366004610ea2565b610278565b60405190151581526020015b60405180910390f35b61014b610146366004610ed3565b6102af565b005b60008051602061135183398151915260005260016020527f3c2285c553468ca8f30447b24bb463c127f1b840e23a0cafa23caa79d906669a5460405190815260200161012f565b61014b6104de565b60005460ff16610123565b61014b610516565b61014b610556565b61014b610568565b60005461010090046001600160a01b03165b6040516001600160a01b03909116815260200161012f565b61014b6101f7366004610f9c565b61059e565b61014b61020a366004610fda565b6105fb565b61014b61062d565b6003546101d1906001600160a01b031681565b61023261069a565b60405161012f9190610ff7565b61014b61024d366004610fda565b6106b3565b610123610260366004610fda565b610729565b6004546101d1906001600160a01b031681565b60006001600160e01b0319821663602b970d60e01b14806102a957506301ffc9a760e01b6001600160e01b03198316145b92915050565b3373aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa146102e35760405163744cbb2360e11b815260040160405180910390fd5b6102eb610769565b6003805460ff60a01b191690556001600061030685856107af565b6003549091506001600160a01b0316600160ff8516146103c557600260ff8516146103c5578360ff1660030361037c576003546040516001600160a01b039091163181527f3a94f2a2f24e3ca808779cb2207ff167494f7e99a7cb878fb24160e5162e41e99060200160405180910390a16103c5565b8360ff166004036103c5576040516001600160a01b0382163181527f3a94f2a2f24e3ca808779cb2207ff167494f7e99a7cb878fb24160e5162e41e99060200160405180910390a15b60005a6040516313137d6560e01b81529091506001600160a01b038316906313137d659061043f908b907f95465546629f52a2ced7bd7516c519ba7ce0a8f702d00687c15030421204cde7908c908c907fd867565f3c107b4f3708dae1cc4f23de80863f77b63305d159dd5d0e38eba51690600401611044565b600060405180830381600087803b15801561045957600080fd5b505af192505050801561046a575060015b61047357600093505b60005a61048090836110f0565b9050600085801561049b5750600354600160a01b900460ff16155b80156104ad57506104ad898987610856565b60405163e9ea012960e01b81528115156004820152602481018490529091506044015b60405180910390fd5b905090565b6104e733610729565b61050457604051637c3ea23f60e01b815260040160405180910390fd5b61050c6108f6565b61051461093f565b565b6003546001600160a01b03163314610541576040516360e317a760e11b815260040160405180910390fd5b6003805460ff60a01b1916600160a01b179055565b61055e610991565b61051460006109f1565b61057133610729565b61058e57604051637c3ea23f60e01b815260040160405180910390fd5b610596610769565b610514610a4a565b6105a6610991565b6105bf6000805160206113518339815191528383610a87565b604051811515906001600160a01b038416907fbe9474bb3e78da7e315cdffa5cfa30b767fcc95bbf44a6197da60228eea1028690600090a35050565b61060433610729565b61062157604051637c3ea23f60e01b815260040160405180910390fd5b61062a81610ab4565b50565b61063633610729565b61065357604051637c3ea23f60e01b815260040160405180910390fd5b61066d600080516020611351833981519152336000610a87565b60405133907f6cc2c67081f55c2fffb7c008fa995fbbf890f48c7c16fba93d8220f00dc84cc590600090a2565b60606104d9600080516020611351833981519152610ba9565b6106bb610991565b6001600160a01b0381166107205760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104d0565b61062a816109f1565b6001600160a01b03811660009081527f260b29b219d450563ddb0e5ca806bdadb1e125f7e8c506de0443797dd7122728602052604081205460ff166102a9565b60005460ff16156105145760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016104d0565b6000806107be838501856111a4565b6004805460a08301516040808501519051638758e33960e01b81529495506001600160a01b0390921693638758e3399361080d9391016001600160a01b03929092168252602082015260400190565b602060405180830381865afa15801561082a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084e91906112ee565b949350505050565b600080610865848601866111a4565b6004805460a08301516040808501519051638758e33960e01b81526001600160a01b039283169481019490945260248401529293506000921690638758e33990604401602060405180830381865afa1580156108c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e991906112ee565b9390931495945050505050565b60005460ff166105145760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016104d0565b6109476108f6565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000546001600160a01b036101009091041633146105145760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d0565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b610a52610769565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586109743390565b60008381526001602090815260408083206002909252909120610aae919084846064610c15565b50505050565b610abd81610c42565b6000816001600160a01b031663109e94cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610afd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b219190611307565b9050806001600160a01b031663f6b3fe1d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b859190611307565b600480546001600160a01b0319166001600160a01b03929092169190911790555050565b600081815260016020908152604091829020805483518184028101840190945280845260609392830182828015610c0957602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610beb575b50505050509050919050565b600082610c2c57610c27868686610c95565b610c38565b610c3886868685610dbd565b9695505050505050565b610c4b81610e6f565b600380546001600160a01b0319166001600160a01b0383169081179091556040517fdd8c46f415be00339781d5b5b83c875e90b1e4bca6a5234fb517f63deaa0277390600090a250565b6001600160a01b0381166000908152602083905260409020805460ff16908115610db55760018082015486549091600091610cd091906110f0565b9050808214610d5d576000878281548110610ced57610ced611324565b9060005260206000200160009054906101000a90046001600160a01b0316905080888481548110610d2057610d20611324565b600091825260208083209190910180546001600160a01b0319166001600160a01b0394851617905592909116815290879052604090206001018290555b86805480610d6d57610d6d61133a565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038716825287905260408120805460ff191681556001015550505b509392505050565b6001600160a01b03821660009081526020849052604090205460ff1615801561084e5784548211610e015760405163b1655e3360e01b815260040160405180910390fd5b6040805180820182526001808252875460208084019182526001600160a01b03881660008181528a83529586209451855460ff1916901515178555915193830193909355885491820189558884529190922090910180546001600160a01b0319169091179055949350505050565b6001600160a01b0381163b61062a57604051638c50d7cd60e01b81526001600160a01b03821660048201526024016104d0565b600060208284031215610eb457600080fd5b81356001600160e01b031981168114610ecc57600080fd5b9392505050565b60008060008084860360a0811215610eea57600080fd5b6060811215610ef857600080fd5b50849350606085013567ffffffffffffffff80821115610f1757600080fd5b818701915087601f830112610f2b57600080fd5b813581811115610f3a57600080fd5b886020828501011115610f4c57600080fd5b602083019550809450505050608085013560ff81168114610f6c57600080fd5b939692955090935050565b6001600160a01b038116811461062a57600080fd5b8035610f9781610f77565b919050565b60008060408385031215610faf57600080fd5b8235610fba81610f77565b915060208301358015158114610fcf57600080fd5b809150509250929050565b600060208284031215610fec57600080fd5b8135610ecc81610f77565b6020808252825182820181905260009190848201906040850190845b818110156110385783516001600160a01b031683529284019291840191600101611013565b50909695505050505050565b6000863563ffffffff811680821461105b57600080fd5b83525060208781013590830152604087013567ffffffffffffffff811680821461108457600080fd5b806040850152505085606083015260e060808301528360e083015261010084868285013760008584018201526001600160a01b03841660a0840152601f19601f8601168301818482030160c08501526110e38282016000815260200190565b9998505050505050505050565b818103818111156102a957634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60405160c0810167ffffffffffffffff8111828210171561114a5761114a611111565b60405290565b6040516060810167ffffffffffffffff8111828210171561114a5761114a611111565b604051601f8201601f1916810167ffffffffffffffff8111828210171561119c5761119c611111565b604052919050565b600060208083850312156111b757600080fd5b823567ffffffffffffffff808211156111cf57600080fd5b9084019060c082870312156111e357600080fd5b6111eb611127565b82358152838301356111fc81610f77565b8185015260408381013590820152606083013561121881610f77565b606082015260808301358281111561122f57600080fd5b83016060818903121561124157600080fd5b611249611150565b81358152858201358682015260408201358481111561126757600080fd5b80830192505088601f83011261127c57600080fd5b81358481111561128e5761128e611111565b6112a0601f8201601f19168801611173565b945080855289878285010111156112b657600080fd5b80878401888701376000908501870152604081018490526080830152506112df60a08401610f8c565b60a08201529695505050505050565b60006020828403121561130057600080fd5b5051919050565b60006020828403121561131957600080fd5b8151610ecc81610f77565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fdfe6d439300980e333f0256d64be2c9f67e86f4493ce25f82498d6db7f4be3d9e6fa2646970667358221220dfdf5fb81e8937027704b5eb2c89fc34c4bba9a318560d449b189226f63018af64736f6c63430008130033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000237f6ed01f9d2273dfe5a72b41df470419a70abb00000000000000000000000072e28c7f34100afefc399fcc0ae041b8fe5841ae000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _lzReceiver (address): 0x237f6Ed01f9d2273dFe5a72b41dF470419A70ABB
Arg [1] : _owner (address): 0x72E28c7F34100AfefC399fcc0AE041B8fe5841AE

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000237f6ed01f9d2273dfe5a72b41df470419a70abb
Arg [1] : 00000000000000000000000072e28c7f34100afefc399fcc0ae041b8fe5841ae
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.