Contract

0xB5274a7e2fFc8978895F4978614AE85638A83DDb

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

-

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Send5691062024-12-18 14:58:163 days ago1734533896IN
0xB5274a7e...638A83DDb
0.03672155 S0.000365031.11
Send5690772024-12-18 14:58:063 days ago1734533886IN
0xB5274a7e...638A83DDb
0.07738085 S0.000365811.11
Send5690482024-12-18 14:57:573 days ago1734533877IN
0xB5274a7e...638A83DDb
0.05347425 S0.000354191.11
Send5690172024-12-18 14:57:463 days ago1734533866IN
0xB5274a7e...638A83DDb
0.26056411 S0.000354191.11
Send5689822024-12-18 14:57:363 days ago1734533856IN
0xB5274a7e...638A83DDb
0.04192468 S0.000354191.11
Send5689452024-12-18 14:57:243 days ago1734533844IN
0xB5274a7e...638A83DDb
0.06307464 S0.000374171.11
Set Peer4771462024-12-16 11:18:435 days ago1734347923IN
0xB5274a7e...638A83DDb
0 S0.000052561.1
Set Peer4771422024-12-16 11:18:325 days ago1734347912IN
0xB5274a7e...638A83DDb
0 S0.000052561.1
Set Peer4771372024-12-16 11:18:225 days ago1734347902IN
0xB5274a7e...638A83DDb
0 S0.000052561.1
Set Peer4771332024-12-16 11:18:115 days ago1734347891IN
0xB5274a7e...638A83DDb
0 S0.000052561.1
Set Peer4771292024-12-16 11:18:015 days ago1734347881IN
0xB5274a7e...638A83DDb
0 S0.000052561.1
Set Peer4771252024-12-16 11:17:505 days ago1734347870IN
0xB5274a7e...638A83DDb
0 S0.000052561.1
Set Peer4771212024-12-16 11:17:395 days ago1734347859IN
0xB5274a7e...638A83DDb
0 S0.000052561.1
Set Peer4771152024-12-16 11:17:295 days ago1734347849IN
0xB5274a7e...638A83DDb
0 S0.000052561.1
Set Peer4771102024-12-16 11:17:185 days ago1734347838IN
0xB5274a7e...638A83DDb
0 S0.000052561.1

Latest 6 internal transactions

Parent Transaction Hash Block From To
5691062024-12-18 14:58:163 days ago1734533896
0xB5274a7e...638A83DDb
0.03672155 S
5690772024-12-18 14:58:063 days ago1734533886
0xB5274a7e...638A83DDb
0.07738085 S
5690482024-12-18 14:57:573 days ago1734533877
0xB5274a7e...638A83DDb
0.05347425 S
5690172024-12-18 14:57:463 days ago1734533866
0xB5274a7e...638A83DDb
0.26056411 S
5689822024-12-18 14:57:363 days ago1734533856
0xB5274a7e...638A83DDb
0.04192468 S
5689452024-12-18 14:57:243 days ago1734533844
0xB5274a7e...638A83DDb
0.06307464 S
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
YelBridge

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 0 runs

Other Settings:
paris EvmVersion
File 1 of 22 : YelBridge.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.22;

import { OApp, MessagingFee, Origin } from "@layerzerolabs/oapp-evm/contracts/oapp/OApp.sol";
import { OAppOptionsType3 } from "@layerzerolabs/oapp-evm/contracts/oapp/libs/OAppOptionsType3.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";

interface IERC20 {
    function mint(address to, uint amount) external;
    function burn(uint amount) external;
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
    function transfer(address to, uint256 amount) external;
}

contract YelBridge is OApp, OAppOptionsType3, Pausable {
    IERC20 public BRIDGE_TOKEN;
    uint immutable public DEN = 10000;
    uint public FEE = 30; //0.3%
    bytes public options = hex"000301001101000000000000000000000000000186a0";

    event BridgeSend(address user, uint amount, uint toChain);
    event BridgeReceived(address user, uint amount, uint fromChain);

    /**
     * @dev Constructs a new PingPong contract instance.
     * @param _endpoint The LayerZero endpoint for this contract to interact with.
     * @param _owner The owner address that will be set as the owner of the contract.
     * @param _tokenForBridge The token address that will be bridged.
     */
    constructor(address _endpoint, address _owner, address _tokenForBridge) OApp(_endpoint, _owner) Ownable() {
        BRIDGE_TOKEN = IERC20(_tokenForBridge);
    }

    /**
     * @notice Returns the estimated messaging fee for a given message.
     * @param _dstEid Destination endpoint ID where the message will be sent.
     * @param _user TX sender.
     * @param _bridgeAmount Yel amount for bridge.
     * @return fee The estimated messaging fee.
     */
    function quote(
        uint32 _dstEid,
        uint256 _bridgeAmount,
        address _user
    ) public view returns (MessagingFee memory fee) {
        bytes memory payload = encodeMessage(_user, _bridgeAmount);
        fee = _quote(_dstEid, payload, options, false);
    }

    function send(uint32 _dstEid, uint bridgedAmount, address to) external payable whenNotPaused {
        require(bridgedAmount > 0, 'NO-0');

        BRIDGE_TOKEN.transferFrom(msg.sender, address(this), bridgedAmount);
        uint fee = (bridgedAmount * FEE) / DEN;
        uint amountAfterFee = bridgedAmount - fee;

        BRIDGE_TOKEN.transfer(owner(), fee);
        BRIDGE_TOKEN.burn(amountAfterFee);

        bytes memory _payload = encodeMessage(to, amountAfterFee); // Encodes message as bytes.
        _lzSend(
            _dstEid, // Destination chain's endpoint ID.
            _payload, // Encoded message payload being sent.
            options, // Message execution options (e.g., gas to use on destination).
            MessagingFee(msg.value, 0), // Fee struct containing native gas and ZRO token.
            payable(msg.sender) // The refund address in case the send call reverts.
        );

        emit BridgeSend(msg.sender, bridgedAmount, _dstEid);
    }

    /**
     * @notice Internal function to handle receiving messages from another chain.
     * @dev Decodes and processes the received message based on its type.
     * @param _origin Data about the origin of the received message.
     * @param message The received message content.
     */
    function _lzReceive(
        Origin calldata _origin,
        bytes32 /*guid*/,
        bytes calldata message,
        address,  // Executor address as specified by the OApp.
        bytes calldata  // Any extra data or options to trigger on receipt.
    ) internal override whenNotPaused {
        (address receiver, uint256 bridgedAmount) = decodeMessage(message);

        BRIDGE_TOKEN.mint(receiver, bridgedAmount);

        emit BridgeReceived(receiver, bridgedAmount, _origin.srcEid);
    }

    function decodeMessage(bytes calldata encodedMessage) public pure returns (address receiver, uint256 bridgedAmount) {
        (receiver, bridgedAmount) = abi.decode(encodedMessage, (address, uint256));

        return (receiver, bridgedAmount);
    }

    function encodeMessage(address receiver, uint256 bridgedAmount) public pure returns (bytes memory) {
        return abi.encode(receiver, bridgedAmount);
    }

    function setOptions(bytes memory newOptions) public onlyOwner {
        options = newOptions;
    }

    function setFee(uint fee) public onlyOwner {
        FEE = fee;
    }

    function pause() public onlyOwner {
        _pause();
    }

    function unpause() public onlyOwner {
        _unpause();
    }

    receive() external payable {}
}

File 2 of 22 : 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;
}

enum ExecutionState {
    NotExecutable,
    Executable,
    Executed
}

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);

    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,
        address _receiveLib,
        bytes32 _payloadHash
    ) external view returns (bool);

    function executable(Origin calldata _origin, address _receiver) external view returns (ExecutionState);

    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 22 : 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);

    // todo: move to OAppReceiver? it is just convention for executor. we may can change it in a new Receiver version
    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 22 : 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 oldLib, 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 oldLib, 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);

    /// ------------------- 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 22 : 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);
}

File 6 of 22 : 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 22 : 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 22 : IOAppCore.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

import { ILayerZeroEndpointV2 } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol";

/**
 * @title IOAppCore
 */
interface IOAppCore {
    // Custom error messages
    error OnlyPeer(uint32 eid, bytes32 sender);
    error NoPeer(uint32 eid);
    error InvalidEndpointCall();
    error InvalidDelegate();

    // Event emitted when a peer (OApp) is set for a corresponding endpoint
    event PeerSet(uint32 eid, bytes32 peer);

    /**
     * @notice Retrieves the OApp version information.
     * @return senderVersion The version of the OAppSender.sol contract.
     * @return receiverVersion The version of the OAppReceiver.sol contract.
     */
    function oAppVersion() external view returns (uint64 senderVersion, uint64 receiverVersion);

    /**
     * @notice Retrieves the LayerZero endpoint associated with the OApp.
     * @return iEndpoint The LayerZero endpoint as an interface.
     */
    function endpoint() external view returns (ILayerZeroEndpointV2 iEndpoint);

    /**
     * @notice Retrieves the peer (OApp) associated with a corresponding endpoint.
     * @param _eid The endpoint ID.
     * @return peer The peer address (OApp instance) associated with the corresponding endpoint.
     */
    function peers(uint32 _eid) external view returns (bytes32 peer);

    /**
     * @notice Sets the peer address (OApp instance) for a corresponding endpoint.
     * @param _eid The endpoint ID.
     * @param _peer The address of the peer to be associated with the corresponding endpoint.
     */
    function setPeer(uint32 _eid, bytes32 _peer) external;

    /**
     * @notice Sets the delegate address for the OApp Core.
     * @param _delegate The address of the delegate to be set.
     */
    function setDelegate(address _delegate) external;
}

File 9 of 22 : IOAppOptionsType3.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

/**
 * @dev Struct representing enforced option parameters.
 */
struct EnforcedOptionParam {
    uint32 eid; // Endpoint ID
    uint16 msgType; // Message Type
    bytes options; // Additional options
}

/**
 * @title IOAppOptionsType3
 * @dev Interface for the OApp with Type 3 Options, allowing the setting and combining of enforced options.
 */
interface IOAppOptionsType3 {
    // Custom error message for invalid options
    error InvalidOptions(bytes options);

    // Event emitted when enforced options are set
    event EnforcedOptionSet(EnforcedOptionParam[] _enforcedOptions);

    /**
     * @notice Sets enforced options for specific endpoint and message type combinations.
     * @param _enforcedOptions An array of EnforcedOptionParam structures specifying enforced options.
     */
    function setEnforcedOptions(EnforcedOptionParam[] calldata _enforcedOptions) external;

    /**
     * @notice Combines options for a given endpoint and message type.
     * @param _eid The endpoint ID.
     * @param _msgType The OApp message type.
     * @param _extraOptions Additional options passed by the caller.
     * @return options The combination of caller specified options AND enforced options.
     */
    function combineOptions(
        uint32 _eid,
        uint16 _msgType,
        bytes calldata _extraOptions
    ) external view returns (bytes memory options);
}

File 10 of 22 : IOAppReceiver.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import { ILayerZeroReceiver, Origin } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroReceiver.sol";

interface IOAppReceiver is ILayerZeroReceiver {
    /**
     * @notice Indicates whether an address is an approved composeMsg sender to the Endpoint.
     * @param _origin The origin information containing the source endpoint and sender address.
     *  - srcEid: The source chain endpoint ID.
     *  - sender: The sender address on the src chain.
     *  - nonce: The nonce of the message.
     * @param _message The lzReceive payload.
     * @param _sender The sender address.
     * @return isSender Is a valid sender.
     *
     * @dev Applications can optionally choose to implement a separate composeMsg sender that is NOT the bridging layer.
     * @dev The default sender IS the OAppReceiver implementer.
     */
    function isComposeMsgSender(
        Origin calldata _origin,
        bytes calldata _message,
        address _sender
    ) external view returns (bool isSender);
}

File 11 of 22 : OAppOptionsType3.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { IOAppOptionsType3, EnforcedOptionParam } from "../interfaces/IOAppOptionsType3.sol";

/**
 * @title OAppOptionsType3
 * @dev Abstract contract implementing the IOAppOptionsType3 interface with type 3 options.
 */
abstract contract OAppOptionsType3 is IOAppOptionsType3, Ownable {
    uint16 internal constant OPTION_TYPE_3 = 3;

    // @dev The "msgType" should be defined in the child contract.
    mapping(uint32 eid => mapping(uint16 msgType => bytes enforcedOption)) public enforcedOptions;

    /**
     * @dev Sets the enforced options for specific endpoint and message type combinations.
     * @param _enforcedOptions An array of EnforcedOptionParam structures specifying enforced options.
     *
     * @dev Only the owner/admin of the OApp can call this function.
     * @dev Provides a way for the OApp to enforce things like paying for PreCrime, AND/OR minimum dst lzReceive gas amounts etc.
     * @dev These enforced options can vary as the potential options/execution on the remote may differ as per the msgType.
     * eg. Amount of lzReceive() gas necessary to deliver a lzCompose() message adds overhead you dont want to pay
     * if you are only making a standard LayerZero message ie. lzReceive() WITHOUT sendCompose().
     */
    function setEnforcedOptions(EnforcedOptionParam[] calldata _enforcedOptions) public virtual onlyOwner {
        _setEnforcedOptions(_enforcedOptions);
    }

    /**
     * @dev Sets the enforced options for specific endpoint and message type combinations.
     * @param _enforcedOptions An array of EnforcedOptionParam structures specifying enforced options.
     *
     * @dev Provides a way for the OApp to enforce things like paying for PreCrime, AND/OR minimum dst lzReceive gas amounts etc.
     * @dev These enforced options can vary as the potential options/execution on the remote may differ as per the msgType.
     * eg. Amount of lzReceive() gas necessary to deliver a lzCompose() message adds overhead you dont want to pay
     * if you are only making a standard LayerZero message ie. lzReceive() WITHOUT sendCompose().
     */
    function _setEnforcedOptions(EnforcedOptionParam[] memory _enforcedOptions) internal virtual {
        for (uint256 i = 0; i < _enforcedOptions.length; i++) {
            // @dev Enforced options are only available for optionType 3, as type 1 and 2 dont support combining.
            _assertOptionsType3(_enforcedOptions[i].options);
            enforcedOptions[_enforcedOptions[i].eid][_enforcedOptions[i].msgType] = _enforcedOptions[i].options;
        }

        emit EnforcedOptionSet(_enforcedOptions);
    }

    /**
     * @notice Combines options for a given endpoint and message type.
     * @param _eid The endpoint ID.
     * @param _msgType The OAPP message type.
     * @param _extraOptions Additional options passed by the caller.
     * @return options The combination of caller specified options AND enforced options.
     *
     * @dev If there is an enforced lzReceive option:
     * - {gasLimit: 200k, msg.value: 1 ether} AND a caller supplies a lzReceive option: {gasLimit: 100k, msg.value: 0.5 ether}
     * - The resulting options will be {gasLimit: 300k, msg.value: 1.5 ether} when the message is executed on the remote lzReceive() function.
     * @dev This presence of duplicated options is handled off-chain in the verifier/executor.
     */
    function combineOptions(
        uint32 _eid,
        uint16 _msgType,
        bytes calldata _extraOptions
    ) public view virtual returns (bytes memory) {
        bytes memory enforced = enforcedOptions[_eid][_msgType];

        // No enforced options, pass whatever the caller supplied, even if it's empty or legacy type 1/2 options.
        if (enforced.length == 0) return _extraOptions;

        // No caller options, return enforced
        if (_extraOptions.length == 0) return enforced;

        // @dev If caller provided _extraOptions, must be type 3 as its the ONLY type that can be combined.
        if (_extraOptions.length >= 2) {
            _assertOptionsType3(_extraOptions);
            // @dev Remove the first 2 bytes containing the type from the _extraOptions and combine with enforced.
            return bytes.concat(enforced, _extraOptions[2:]);
        }

        // No valid set of options was found.
        revert InvalidOptions(_extraOptions);
    }

    /**
     * @dev Internal function to assert that options are of type 3.
     * @param _options The options to be checked.
     */
    function _assertOptionsType3(bytes memory _options) internal pure virtual {
        uint16 optionsType;
        assembly {
            optionsType := mload(add(_options, 2))
        }
        if (optionsType != OPTION_TYPE_3) revert InvalidOptions(_options);
    }
}

File 12 of 22 : OApp.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

// @dev Import the 'MessagingFee' and 'MessagingReceipt' so it's exposed to OApp implementers
// solhint-disable-next-line no-unused-import
import { OAppSender, MessagingFee, MessagingReceipt } from "./OAppSender.sol";
// @dev Import the 'Origin' so it's exposed to OApp implementers
// solhint-disable-next-line no-unused-import
import { OAppReceiver, Origin } from "./OAppReceiver.sol";
import { OAppCore } from "./OAppCore.sol";

/**
 * @title OApp
 * @dev Abstract contract serving as the base for OApp implementation, combining OAppSender and OAppReceiver functionality.
 */
abstract contract OApp is OAppSender, OAppReceiver {
    /**
     * @dev Constructor to initialize the OApp with the provided endpoint and owner.
     * @param _endpoint The address of the LOCAL LayerZero endpoint.
     * @param _delegate The delegate capable of making OApp configurations inside of the endpoint.
     */
    constructor(address _endpoint, address _delegate) OAppCore(_endpoint, _delegate) {}

    /**
     * @notice Retrieves the OApp version information.
     * @return senderVersion The version of the OAppSender.sol implementation.
     * @return receiverVersion The version of the OAppReceiver.sol implementation.
     */
    function oAppVersion()
        public
        pure
        virtual
        override(OAppSender, OAppReceiver)
        returns (uint64 senderVersion, uint64 receiverVersion)
    {
        return (SENDER_VERSION, RECEIVER_VERSION);
    }
}

File 13 of 22 : OAppCore.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { IOAppCore, ILayerZeroEndpointV2 } from "./interfaces/IOAppCore.sol";

/**
 * @title OAppCore
 * @dev Abstract contract implementing the IOAppCore interface with basic OApp configurations.
 */
abstract contract OAppCore is IOAppCore, Ownable {
    // The LayerZero endpoint associated with the given OApp
    ILayerZeroEndpointV2 public immutable endpoint;

    // Mapping to store peers associated with corresponding endpoints
    mapping(uint32 eid => bytes32 peer) public peers;

    /**
     * @dev Constructor to initialize the OAppCore with the provided endpoint and delegate.
     * @param _endpoint The address of the LOCAL Layer Zero endpoint.
     * @param _delegate The delegate capable of making OApp configurations inside of the endpoint.
     *
     * @dev The delegate typically should be set as the owner of the contract.
     */
    constructor(address _endpoint, address _delegate) {
        endpoint = ILayerZeroEndpointV2(_endpoint);

        if (_delegate == address(0)) revert InvalidDelegate();
        endpoint.setDelegate(_delegate);
    }

    /**
     * @notice Sets the peer address (OApp instance) for a corresponding endpoint.
     * @param _eid The endpoint ID.
     * @param _peer The address of the peer to be associated with the corresponding endpoint.
     *
     * @dev Only the owner/admin of the OApp can call this function.
     * @dev Indicates that the peer is trusted to send LayerZero messages to this OApp.
     * @dev Set this to bytes32(0) to remove the peer address.
     * @dev Peer is a bytes32 to accommodate non-evm chains.
     */
    function setPeer(uint32 _eid, bytes32 _peer) public virtual onlyOwner {
        _setPeer(_eid, _peer);
    }

    /**
     * @notice Sets the peer address (OApp instance) for a corresponding endpoint.
     * @param _eid The endpoint ID.
     * @param _peer The address of the peer to be associated with the corresponding endpoint.
     *
     * @dev Indicates that the peer is trusted to send LayerZero messages to this OApp.
     * @dev Set this to bytes32(0) to remove the peer address.
     * @dev Peer is a bytes32 to accommodate non-evm chains.
     */
    function _setPeer(uint32 _eid, bytes32 _peer) internal virtual {
        peers[_eid] = _peer;
        emit PeerSet(_eid, _peer);
    }

    /**
     * @notice Internal function to get the peer address associated with a specific endpoint; reverts if NOT set.
     * ie. the peer is set to bytes32(0).
     * @param _eid The endpoint ID.
     * @return peer The address of the peer associated with the specified endpoint.
     */
    function _getPeerOrRevert(uint32 _eid) internal view virtual returns (bytes32) {
        bytes32 peer = peers[_eid];
        if (peer == bytes32(0)) revert NoPeer(_eid);
        return peer;
    }

    /**
     * @notice Sets the delegate address for the OApp.
     * @param _delegate The address of the delegate to be set.
     *
     * @dev Only the owner/admin of the OApp can call this function.
     * @dev Provides the ability for a delegate to set configs, on behalf of the OApp, directly on the Endpoint contract.
     */
    function setDelegate(address _delegate) public onlyOwner {
        endpoint.setDelegate(_delegate);
    }
}

File 14 of 22 : OAppReceiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

import { IOAppReceiver, Origin } from "./interfaces/IOAppReceiver.sol";
import { OAppCore } from "./OAppCore.sol";

/**
 * @title OAppReceiver
 * @dev Abstract contract implementing the ILayerZeroReceiver interface and extending OAppCore for OApp receivers.
 */
abstract contract OAppReceiver is IOAppReceiver, OAppCore {
    // Custom error message for when the caller is not the registered endpoint/
    error OnlyEndpoint(address addr);

    // @dev The version of the OAppReceiver implementation.
    // @dev Version is bumped when changes are made to this contract.
    uint64 internal constant RECEIVER_VERSION = 2;

    /**
     * @notice Retrieves the OApp version information.
     * @return senderVersion The version of the OAppSender.sol contract.
     * @return receiverVersion The version of the OAppReceiver.sol contract.
     *
     * @dev Providing 0 as the default for OAppSender version. Indicates that the OAppSender is not implemented.
     * ie. this is a RECEIVE only OApp.
     * @dev If the OApp uses both OAppSender and OAppReceiver, then this needs to be override returning the correct versions.
     */
    function oAppVersion() public view virtual returns (uint64 senderVersion, uint64 receiverVersion) {
        return (0, RECEIVER_VERSION);
    }

    /**
     * @notice Indicates whether an address is an approved composeMsg sender to the Endpoint.
     * @dev _origin The origin information containing the source endpoint and sender address.
     *  - srcEid: The source chain endpoint ID.
     *  - sender: The sender address on the src chain.
     *  - nonce: The nonce of the message.
     * @dev _message The lzReceive payload.
     * @param _sender The sender address.
     * @return isSender Is a valid sender.
     *
     * @dev Applications can optionally choose to implement separate composeMsg senders that are NOT the bridging layer.
     * @dev The default sender IS the OAppReceiver implementer.
     */
    function isComposeMsgSender(
        Origin calldata /*_origin*/,
        bytes calldata /*_message*/,
        address _sender
    ) public view virtual returns (bool) {
        return _sender == address(this);
    }

    /**
     * @notice Checks if the path initialization is allowed based on the provided origin.
     * @param origin The origin information containing the source endpoint and sender address.
     * @return Whether the path has been initialized.
     *
     * @dev This indicates to the endpoint that the OApp has enabled msgs for this particular path to be received.
     * @dev This defaults to assuming if a peer has been set, its initialized.
     * Can be overridden by the OApp if there is other logic to determine this.
     */
    function allowInitializePath(Origin calldata origin) public view virtual returns (bool) {
        return peers[origin.srcEid] == origin.sender;
    }

    /**
     * @notice Retrieves the next nonce for a given source endpoint and sender address.
     * @dev _srcEid The source endpoint ID.
     * @dev _sender The sender address.
     * @return nonce The next nonce.
     *
     * @dev The path nonce starts from 1. If 0 is returned it means that there is NO nonce ordered enforcement.
     * @dev Is required by the off-chain executor to determine the OApp expects msg execution is ordered.
     * @dev This is also enforced by the OApp.
     * @dev By default this is NOT enabled. ie. nextNonce is hardcoded to return 0.
     */
    function nextNonce(uint32 /*_srcEid*/, bytes32 /*_sender*/) public view virtual returns (uint64 nonce) {
        return 0;
    }

    /**
     * @dev Entry point for receiving messages or packets from the endpoint.
     * @param _origin The origin information containing the source endpoint and sender address.
     *  - srcEid: The source chain endpoint ID.
     *  - sender: The sender address on the src chain.
     *  - nonce: The nonce of the message.
     * @param _guid The unique identifier for the received LayerZero message.
     * @param _message The payload of the received message.
     * @param _executor The address of the executor for the received message.
     * @param _extraData Additional arbitrary data provided by the corresponding executor.
     *
     * @dev Entry point for receiving msg/packet from the LayerZero endpoint.
     */
    function lzReceive(
        Origin calldata _origin,
        bytes32 _guid,
        bytes calldata _message,
        address _executor,
        bytes calldata _extraData
    ) public payable virtual {
        // Ensures that only the endpoint can attempt to lzReceive() messages to this OApp.
        if (address(endpoint) != msg.sender) revert OnlyEndpoint(msg.sender);

        // Ensure that the sender matches the expected peer for the source endpoint.
        if (_getPeerOrRevert(_origin.srcEid) != _origin.sender) revert OnlyPeer(_origin.srcEid, _origin.sender);

        // Call the internal OApp implementation of lzReceive.
        _lzReceive(_origin, _guid, _message, _executor, _extraData);
    }

    /**
     * @dev Internal function to implement lzReceive logic without needing to copy the basic parameter validation.
     */
    function _lzReceive(
        Origin calldata _origin,
        bytes32 _guid,
        bytes calldata _message,
        address _executor,
        bytes calldata _extraData
    ) internal virtual;
}

File 15 of 22 : OAppSender.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

import { SafeERC20, IERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { MessagingParams, MessagingFee, MessagingReceipt } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol";
import { OAppCore } from "./OAppCore.sol";

/**
 * @title OAppSender
 * @dev Abstract contract implementing the OAppSender functionality for sending messages to a LayerZero endpoint.
 */
abstract contract OAppSender is OAppCore {
    using SafeERC20 for IERC20;

    // Custom error messages
    error NotEnoughNative(uint256 msgValue);
    error LzTokenUnavailable();

    // @dev The version of the OAppSender implementation.
    // @dev Version is bumped when changes are made to this contract.
    uint64 internal constant SENDER_VERSION = 1;

    /**
     * @notice Retrieves the OApp version information.
     * @return senderVersion The version of the OAppSender.sol contract.
     * @return receiverVersion The version of the OAppReceiver.sol contract.
     *
     * @dev Providing 0 as the default for OAppReceiver version. Indicates that the OAppReceiver is not implemented.
     * ie. this is a SEND only OApp.
     * @dev If the OApp uses both OAppSender and OAppReceiver, then this needs to be override returning the correct versions
     */
    function oAppVersion() public view virtual returns (uint64 senderVersion, uint64 receiverVersion) {
        return (SENDER_VERSION, 0);
    }

    /**
     * @dev Internal function to interact with the LayerZero EndpointV2.quote() for fee calculation.
     * @param _dstEid The destination endpoint ID.
     * @param _message The message payload.
     * @param _options Additional options for the message.
     * @param _payInLzToken Flag indicating whether to pay the fee in LZ tokens.
     * @return fee The calculated MessagingFee for the message.
     *      - nativeFee: The native fee for the message.
     *      - lzTokenFee: The LZ token fee for the message.
     */
    function _quote(
        uint32 _dstEid,
        bytes memory _message,
        bytes memory _options,
        bool _payInLzToken
    ) internal view virtual returns (MessagingFee memory fee) {
        return
            endpoint.quote(
                MessagingParams(_dstEid, _getPeerOrRevert(_dstEid), _message, _options, _payInLzToken),
                address(this)
            );
    }

    /**
     * @dev Internal function to interact with the LayerZero EndpointV2.send() for sending a message.
     * @param _dstEid The destination endpoint ID.
     * @param _message The message payload.
     * @param _options Additional options for the message.
     * @param _fee The calculated LayerZero fee for the message.
     *      - nativeFee: The native fee.
     *      - lzTokenFee: The lzToken fee.
     * @param _refundAddress The address to receive any excess fee values sent to the endpoint.
     * @return receipt The receipt for the sent message.
     *      - guid: The unique identifier for the sent message.
     *      - nonce: The nonce of the sent message.
     *      - fee: The LayerZero fee incurred for the message.
     */
    function _lzSend(
        uint32 _dstEid,
        bytes memory _message,
        bytes memory _options,
        MessagingFee memory _fee,
        address _refundAddress
    ) internal virtual returns (MessagingReceipt memory receipt) {
        // @dev Push corresponding fees to the endpoint, any excess is sent back to the _refundAddress from the endpoint.
        uint256 messageValue = _payNative(_fee.nativeFee);
        if (_fee.lzTokenFee > 0) _payLzToken(_fee.lzTokenFee);

        return
            // solhint-disable-next-line check-send-result
            endpoint.send{ value: messageValue }(
                MessagingParams(_dstEid, _getPeerOrRevert(_dstEid), _message, _options, _fee.lzTokenFee > 0),
                _refundAddress
            );
    }

    /**
     * @dev Internal function to pay the native fee associated with the message.
     * @param _nativeFee The native fee to be paid.
     * @return nativeFee The amount of native currency paid.
     *
     * @dev If the OApp needs to initiate MULTIPLE LayerZero messages in a single transaction,
     * this will need to be overridden because msg.value would contain multiple lzFees.
     * @dev Should be overridden in the event the LayerZero endpoint requires a different native currency.
     * @dev Some EVMs use an ERC20 as a method for paying transactions/gasFees.
     * @dev The endpoint is EITHER/OR, ie. it will NOT support both types of native payment at a time.
     */
    function _payNative(uint256 _nativeFee) internal virtual returns (uint256 nativeFee) {
        if (msg.value != _nativeFee) revert NotEnoughNative(msg.value);
        return _nativeFee;
    }

    /**
     * @dev Internal function to pay the LZ token fee associated with the message.
     * @param _lzTokenFee The LZ token fee to be paid.
     *
     * @dev If the caller is trying to pay in the specified lzToken, then the lzTokenFee is passed to the endpoint.
     * @dev Any excess sent, is passed back to the specified _refundAddress in the _lzSend().
     */
    function _payLzToken(uint256 _lzTokenFee) internal virtual {
        // @dev Cannot cache the token because it is not immutable in the endpoint.
        address lzToken = endpoint.lzToken();
        if (lzToken == address(0)) revert LzTokenUnavailable();

        // Pay LZ token fee by sending tokens to the endpoint.
        IERC20(lzToken).safeTransferFrom(msg.sender, address(endpoint), _lzTokenFee);
    }
}

File 16 of 22 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 17 of 22 : 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 18 of 22 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 19 of 22 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}

File 20 of 22 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/IERC20Permit.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return
            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
    }
}

File 21 of 22 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 22 of 22 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 0,
    "details": {
      "yul": true,
      "yulDetails": {
        "optimizerSteps": "dhfoDgvulfnTUtnIf [xa[r]scLM cCTUtTOntnfDIul Lcul Vcul [j] Tpeul xa[rul] xa[r]cL gvif CTUca[r]LsTOtfDnca[r]Iulc] jmul[jul] VcTOcul jmul"
      }
    }
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_endpoint","type":"address"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_tokenForBridge","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidDelegate","type":"error"},{"inputs":[],"name":"InvalidEndpointCall","type":"error"},{"inputs":[{"internalType":"bytes","name":"options","type":"bytes"}],"name":"InvalidOptions","type":"error"},{"inputs":[],"name":"LzTokenUnavailable","type":"error"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"}],"name":"NoPeer","type":"error"},{"inputs":[{"internalType":"uint256","name":"msgValue","type":"uint256"}],"name":"NotEnoughNative","type":"error"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"OnlyEndpoint","type":"error"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"}],"name":"OnlyPeer","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fromChain","type":"uint256"}],"name":"BridgeReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toChain","type":"uint256"}],"name":"BridgeSend","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"uint16","name":"msgType","type":"uint16"},{"internalType":"bytes","name":"options","type":"bytes"}],"indexed":false,"internalType":"struct EnforcedOptionParam[]","name":"_enforcedOptions","type":"tuple[]"}],"name":"EnforcedOptionSet","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":false,"internalType":"uint32","name":"eid","type":"uint32"},{"indexed":false,"internalType":"bytes32","name":"peer","type":"bytes32"}],"name":"PeerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"BRIDGE_TOKEN","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"origin","type":"tuple"}],"name":"allowInitializePath","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"uint16","name":"_msgType","type":"uint16"},{"internalType":"bytes","name":"_extraOptions","type":"bytes"}],"name":"combineOptions","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"encodedMessage","type":"bytes"}],"name":"decodeMessage","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"bridgedAmount","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"bridgedAmount","type":"uint256"}],"name":"encodeMessage","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"endpoint","outputs":[{"internalType":"contract ILayerZeroEndpointV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"uint16","name":"msgType","type":"uint16"}],"name":"enforcedOptions","outputs":[{"internalType":"bytes","name":"enforcedOption","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"","type":"tuple"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"address","name":"_sender","type":"address"}],"name":"isComposeMsgSender","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"address","name":"_executor","type":"address"},{"internalType":"bytes","name":"_extraData","type":"bytes"}],"name":"lzReceive","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"nextNonce","outputs":[{"internalType":"uint64","name":"nonce","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oAppVersion","outputs":[{"internalType":"uint64","name":"senderVersion","type":"uint64"},{"internalType":"uint64","name":"receiverVersion","type":"uint64"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"options","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"}],"name":"peers","outputs":[{"internalType":"bytes32","name":"peer","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_dstEid","type":"uint32"},{"internalType":"uint256","name":"_bridgeAmount","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"quote","outputs":[{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"fee","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_dstEid","type":"uint32"},{"internalType":"uint256","name":"bridgedAmount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"send","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_delegate","type":"address"}],"name":"setDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"uint16","name":"msgType","type":"uint16"},{"internalType":"bytes","name":"options","type":"bytes"}],"internalType":"struct EnforcedOptionParam[]","name":"_enforcedOptions","type":"tuple[]"}],"name":"setEnforcedOptions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"newOptions","type":"bytes"}],"name":"setOptions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"bytes32","name":"_peer","type":"bytes32"}],"name":"setPeer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

61271060a052601e600455610100604052601660c09081527e0301001101000000000000000000000000000186a00000000000000000000060e05260059062000049908262000242565b503480156200005757600080fd5b50604051620026b1380380620026b18339810160408190526200007a916200032b565b8282818162000089336200014b565b6001600160a01b038083166080528116620000b757604051632d618d8160e21b815260040160405180910390fd5b60805160405163ca5eb5e160e01b81526001600160a01b0383811660048301529091169063ca5eb5e190602401600060405180830381600087803b158015620000ff57600080fd5b505af115801562000114573d6000803e3d6000fd5b5050600380546001600160a01b03909816610100026001600160a81b03199098169790971790965550620003759650505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620001c657607f821691505b602082108103620001e757634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200023d576000816000526020600020601f850160051c81016020861015620002185750805b601f850160051c820191505b81811015620002395782815560010162000224565b5050505b505050565b81516001600160401b038111156200025e576200025e6200019b565b62000276816200026f8454620001b1565b84620001ed565b602080601f831160018114620002ae5760008415620002955750858301515b600019600386901b1c1916600185901b17855562000239565b600085815260208120601f198616915b82811015620002df57888601518255948401946001909101908401620002be565b5085821015620002fe5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80516001600160a01b03811681146200032657600080fd5b919050565b6000806000606084860312156200034157600080fd5b6200034c846200030e565b92506200035c602085016200030e565b91506200036c604085016200030e565b90509250925092565b60805160a0516122e5620003cc600039600081816102300152610688015260008181610306015281816108a001528181610ca801528181610e7a015281816111700152818161142901526114e201526122e56000f3fe60806040526004361061014b5760003560e01c80630d1ec495146101575780631069143a1461019257806312788d85146101b457806313137d65146101c957806317442b70146101dc5780633400288b146101fe5780633c9a07001461021e5780633f4ba83a1461026057806353a5cccf146102755780635535d461146102b05780635c975abb146102d05780635e280f11146102f4578063634d45b21461032857806369fe0e2d14610356578063715018a6146103765780637d25a05e1461038b57806382413eac146103c35780638456cb59146103e35780638da5cb5b146103f8578063b98bd0701461040d578063bb0b6a531461042d578063bc70b3541461045a578063c57981b51461047a578063ca5eb5e114610490578063f2fde38b146104b0578063f340bc85146104d0578063f5984cff146104f0578063ff7bd03d1461051057600080fd5b3661015257005b600080fd5b34801561016357600080fd5b5060035461017c9061010090046001600160a01b031681565b60405161018991906117d9565b60405180910390f35b34801561019e57600080fd5b506101a7610530565b604051610189919061183d565b6101c76101c2366004611885565b6105be565b005b6101c76101d736600461191e565b61089e565b3480156101e857600080fd5b5060408051600181526002602082015201610189565b34801561020a57600080fd5b506101c76102193660046119bd565b61094d565b34801561022a57600080fd5b506102527f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610189565b34801561026c57600080fd5b506101c7610963565b34801561028157600080fd5b50610295610290366004611885565b610975565b60408051825181526020928301519281019290925201610189565b3480156102bc57600080fd5b506101a76102cb3660046119f9565b610a2b565b3480156102dc57600080fd5b5060035460ff165b6040519015158152602001610189565b34801561030057600080fd5b5061017c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561033457600080fd5b50610348610343366004611a2c565b610a4f565b604051610189929190611a6d565b34801561036257600080fd5b506101c7610371366004611a86565b610a6b565b34801561038257600080fd5b506101c7610a78565b34801561039757600080fd5b506103ab6103a63660046119bd565b610a8a565b6040516001600160401b039091168152602001610189565b3480156103cf57600080fd5b506102e46103de366004611a9f565b610a93565b3480156103ef57600080fd5b506101c7610aa8565b34801561040457600080fd5b5061017c610ab8565b34801561041957600080fd5b506101c7610428366004611b05565b610ac7565b34801561043957600080fd5b50610252610448366004611b79565b60016020526000908152604090205481565b34801561046657600080fd5b506101a7610475366004611b94565b610ae1565b34801561048657600080fd5b5061025260045481565b34801561049c57600080fd5b506101c76104ab366004611bf4565b610c89565b3480156104bc57600080fd5b506101c76104cb366004611bf4565b610d12565b3480156104dc57600080fd5b506101a76104eb366004611c11565b610d8b565b3480156104fc57600080fd5b506101c761050b366004611ce4565b610db7565b34801561051c57600080fd5b506102e461052b366004611d18565b610dcb565b6005805461053d90611d34565b80601f016020809104026020016040519081016040528092919081815260200182805461056990611d34565b80156105b65780601f1061058b576101008083540402835291602001916105b6565b820191906000526020600020905b81548152906001019060200180831161059957829003601f168201915b505050505081565b6105c6610e01565b600082116106085760405162461bcd60e51b81526004016105ff9060208082526004908201526304e4f2d360e41b604082015260600190565b60405180910390fd5b6003546040516323b872dd60e01b81526101009091046001600160a01b0316906323b872dd9061064090339030908790600401611d68565b6020604051808303816000875af115801561065f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106839190611d8c565b5060007f0000000000000000000000000000000000000000000000000000000000000000600454846106b59190611dc4565b6106bf9190611ddb565b905060006106cd8285611dfd565b60035490915061010090046001600160a01b031663a9059cbb6106ee610ab8565b846040518363ffffffff1660e01b815260040161070c929190611a6d565b600060405180830381600087803b15801561072657600080fd5b505af115801561073a573d6000803e3d6000fd5b5050600354604051630852cd8d60e31b8152600481018590526101009091046001600160a01b031692506342966c689150602401600060405180830381600087803b15801561078857600080fd5b505af115801561079c573d6000803e3d6000fd5b5050505060006107ac8483610d8b565b905061085a8682600580546107c090611d34565b80601f01602080910402602001604051908101604052809291908181526020018280546107ec90611d34565b80156108395780601f1061080e57610100808354040283529160200191610839565b820191906000526020600020905b81548152906001019060200180831161081c57829003601f168201915b50505050506040518060400160405280348152602001600081525033610e47565b507f77a5a5e99b49a34103ef03e6bc7dc71cb95770f07d6c7afcf75eba2ead8eebae33868860405161088e93929190611e10565b60405180910390a1505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633146108e957336040516391ac5e4f60e01b81526004016105ff91906117d9565b60208701803590610903906108fe908a611b79565b610f52565b14610935576109156020880188611b79565b876020013560405163309afaf360e21b81526004016105ff929190611e37565b61094487878787878787610f8e565b50505050505050565b610955611065565b61095f82826110c4565b5050565b61096b611065565b61097361111a565b565b61097d61179b565b60006109898385610d8b565b9050610a2285826005805461099d90611d34565b80601f01602080910402602001604051908101604052809291908181526020018280546109c990611d34565b8015610a165780601f106109eb57610100808354040283529160200191610a16565b820191906000526020600020905b8154815290600101906020018083116109f957829003601f168201915b50505050506000611166565b95945050505050565b60026020908152600092835260408084209091529082529020805461053d90611d34565b600080610a5e83850185611c11565b90925090505b9250929050565b610a73611065565b600455565b610a80611065565b6109736000611232565b60005b92915050565b6001600160a01b03811630145b949350505050565b610ab0611065565b610973611282565b6000546001600160a01b031690565b610acf611065565b61095f610adc8284611e4d565b6112bf565b63ffffffff8416600090815260026020908152604080832061ffff87168452909152812080546060929190610b1590611d34565b80601f0160208091040260200160405190810160405280929190818152602001828054610b4190611d34565b8015610b8e5780601f10610b6357610100808354040283529160200191610b8e565b820191906000526020600020905b815481529060010190602001808311610b7157829003601f168201915b505050505090508051600003610bde5783838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929450610aa09350505050565b6000839003610bee579050610aa0565b60028310610c6c57610c3584848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506113d192505050565b80610c438460028188611f26565b604051602001610c5593929190611f50565b604051602081830303815290604052915050610aa0565b8383604051639a6d49cd60e01b81526004016105ff929190611f78565b610c91611065565b60405163ca5eb5e160e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ca5eb5e190610cdd9084906004016117d9565b600060405180830381600087803b158015610cf757600080fd5b505af1158015610d0b573d6000803e3d6000fd5b5050505050565b610d1a611065565b6001600160a01b038116610d7f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105ff565b610d8881611232565b50565b60608282604051602001610da0929190611a6d565b604051602081830303815290604052905092915050565b610dbf611065565b600561095f8282611ff7565b6000602082018035906001908390610de39086611b79565b63ffffffff1681526020810191909152604001600020541492915050565b60035460ff16156109735760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105ff565b610e4f6117b5565b6000610e5e84600001516113fd565b602085015190915015610e7857610e788460200151611425565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632637a450826040518060a001604052808b63ffffffff168152602001610ec88c610f52565b81526020018a815260200189815260200160008960200151111515815250866040518463ffffffff1660e01b8152600401610f049291906120b6565b60806040518083038185885af1158015610f22573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f479190612161565b979650505050505050565b63ffffffff811660009081526001602052604081205480610a8d5760405163f6ff4fb760e01b815263ffffffff841660048201526024016105ff565b610f96610e01565b600080610fa38787610a4f565b6003546040516340c10f1960e01b815292945090925061010090046001600160a01b0316906340c10f1990610fde9085908590600401611a6d565b600060405180830381600087803b158015610ff857600080fd5b505af115801561100c573d6000803e3d6000fd5b507f3ab7fd9d84c4b2f3d606d747db8b64b49a2f5a2622d82482026da9fafbcd1797925084915083905061104360208d018d611b79565b60405161105293929190611e10565b60405180910390a1505050505050505050565b3361106e610ab8565b6001600160a01b0316146109735760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105ff565b63ffffffff821660009081526001602052604090819020829055517f238399d427b947898edb290f5ff0f9109849b1c3ba196a42e35f00c50a54b98b9061110e9084908490611e37565b60405180910390a15050565b611122611507565b6003805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405161115c91906117d9565b60405180910390a1565b61116e61179b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ddc28c586040518060a001604052808863ffffffff1681526020016111bd89610f52565b8152602001878152602001868152602001851515815250306040518363ffffffff1660e01b81526004016111f29291906120b6565b6040805180830381865afa15801561120e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2291906121b9565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61128a610e01565b6003805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861114f3390565b60005b8151811015611396576112f18282815181106112e0576112e06121d5565b6020026020010151604001516113d1565b818181518110611303576113036121d5565b60200260200101516040015160026000848481518110611325576113256121d5565b60200260200101516000015163ffffffff1663ffffffff168152602001908152602001600020600084848151811061135f5761135f6121d5565b60200260200101516020015161ffff1661ffff168152602001908152602001600020908161138d9190611ff7565b506001016112c2565b507fbe4864a8e820971c0247f5992e2da559595f7bf076a21cb5928d443d2a13b674816040516113c691906121eb565b60405180910390a150565b600281015161ffff811660031461095f5781604051639a6d49cd60e01b81526004016105ff919061183d565b6000813414611421576040516304fb820960e51b81523460048201526024016105ff565b5090565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e4fe1d946040518163ffffffff1660e01b8152600401602060405180830381865afa158015611485573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a99190612276565b90506001600160a01b0381166114d2576040516329b99a9560e11b815260040160405180910390fd5b61095f6001600160a01b038216337f000000000000000000000000000000000000000000000000000000000000000085611550565b60035460ff166109735760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105ff565b6115a8846323b872dd60e01b85858560405160240161157193929190611d68565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526115ae565b50505050565b6000611603826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166116889092919063ffffffff16565b90508051600014806116245750808060200190518101906116249190611d8c565b6116835760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105ff565b505050565b6060610aa0848460008585600080866001600160a01b031685876040516116af9190612293565b60006040518083038185875af1925050503d80600081146116ec576040519150601f19603f3d011682016040523d82523d6000602084013e6116f1565b606091505b5091509150610f47878383876060831561176c578251600003611765576001600160a01b0385163b6117655760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105ff565b5081610aa0565b610aa083838151156117815781518083602001fd5b8060405162461bcd60e51b81526004016105ff919061183d565b604051806040016040528060008152602001600081525090565b60408051606081018252600080825260208201529081016117d461179b565b905290565b6001600160a01b0391909116815260200190565b60005b838110156118085781810151838201526020016117f0565b50506000910152565b600081518084526118298160208601602086016117ed565b601f01601f19169290920160200192915050565b6020815260006118506020830184611811565b9392505050565b803563ffffffff8116811461186b57600080fd5b919050565b6001600160a01b0381168114610d8857600080fd5b60008060006060848603121561189a57600080fd5b6118a384611857565b92506020840135915060408401356118ba81611870565b809150509250925092565b6000606082840312156118d757600080fd5b50919050565b60008083601f8401126118ef57600080fd5b5081356001600160401b0381111561190657600080fd5b602083019150836020828501011115610a6457600080fd5b600080600080600080600060e0888a03121561193957600080fd5b61194389896118c5565b96506060880135955060808801356001600160401b038082111561196657600080fd5b6119728b838c016118dd565b909750955060a08a0135915061198782611870565b90935060c0890135908082111561199d57600080fd5b506119aa8a828b016118dd565b989b979a50959850939692959293505050565b600080604083850312156119d057600080fd5b6119d983611857565b946020939093013593505050565b803561ffff8116811461186b57600080fd5b60008060408385031215611a0c57600080fd5b611a1583611857565b9150611a23602084016119e7565b90509250929050565b60008060208385031215611a3f57600080fd5b82356001600160401b03811115611a5557600080fd5b611a61858286016118dd565b90969095509350505050565b6001600160a01b03929092168252602082015260400190565b600060208284031215611a9857600080fd5b5035919050565b60008060008060a08587031215611ab557600080fd5b611abf86866118c5565b935060608501356001600160401b03811115611ada57600080fd5b611ae6878288016118dd565b9094509250506080850135611afa81611870565b939692955090935050565b60008060208385031215611b1857600080fd5b82356001600160401b0380821115611b2f57600080fd5b818501915085601f830112611b4357600080fd5b813581811115611b5257600080fd5b8660208260051b8501011115611b6757600080fd5b60209290920196919550909350505050565b600060208284031215611b8b57600080fd5b61185082611857565b60008060008060608587031215611baa57600080fd5b611bb385611857565b9350611bc1602086016119e7565b925060408501356001600160401b03811115611bdc57600080fd5b611be8878288016118dd565b95989497509550505050565b600060208284031215611c0657600080fd5b813561185081611870565b60008060408385031215611c2457600080fd5b82356119d981611870565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715611c6d57611c6d611c2f565b604052919050565b600082601f830112611c8657600080fd5b81356001600160401b03811115611c9f57611c9f611c2f565b611cb2601f8201601f1916602001611c45565b818152846020838601011115611cc757600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215611cf657600080fd5b81356001600160401b03811115611d0c57600080fd5b610aa084828501611c75565b600060608284031215611d2a57600080fd5b61185083836118c5565b600181811c90821680611d4857607f821691505b6020821081036118d757634e487b7160e01b600052602260045260246000fd5b6001600160a01b039384168152919092166020820152604081019190915260600190565b600060208284031215611d9e57600080fd5b8151801515811461185057600080fd5b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610a8d57610a8d611dae565b600082611df857634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610a8d57610a8d611dae565b6001600160a01b03939093168352602083019190915263ffffffff16604082015260600190565b63ffffffff929092168252602082015260400190565b60006001600160401b0380841115611e6757611e67611c2f565b8360051b6020611e78818301611c45565b868152918501918181019036841115611e9057600080fd5b865b84811015611f1a57803586811115611eaa5760008081fd5b8801606036829003811315611ebf5760008081fd5b611ec881611c45565b9050611ed382611857565b8152611ee08683016119e7565b8682015260408083013589811115611ef85760008081fd5b611f0436828601611c75565b9183019190915250845250918301918301611e92565b50979650505050505050565b60008085851115611f3657600080fd5b83861115611f4357600080fd5b5050820193919092039150565b60008451611f628184602089016117ed565b8201838582376000930192835250909392505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b601f821115611683576000816000526020600020601f850160051c81016020861015611fd05750805b601f850160051c820191505b81811015611fef57828155600101611fdc565b505050505050565b81516001600160401b0381111561201057612010611c2f565b6120248161201e8454611d34565b84611fa7565b602080601f83116001811461205957600084156120415750858301515b600019600386901b1c1916600185901b178555611fef565b600085815260208120601f198616915b8281101561208857888601518255948401946001909101908401612069565b50858210156120a65787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6040815263ffffffff8351166040820152602083015160608201526000604084015160a060808401526120ec60e0840182611811565b90506060850151603f198483030160a08501526121098282611811565b60809690960151151560c08501525050506001600160a01b039190911660209091015290565b60006040828403121561214157600080fd5b61214b6040611c45565b9050815181526020820151602082015292915050565b60006080828403121561217357600080fd5b61217d6060611c45565b8251815260208301516001600160401b038116811461219b57600080fd5b60208201526121ad846040850161212f565b60408201529392505050565b6000604082840312156121cb57600080fd5b611850838361212f565b634e487b7160e01b600052603260045260246000fd5b600060208083018184528085518083526040925060408601915060408160051b87010184880160005b8381101561226857888303603f190185528151805163ffffffff1684528781015161ffff1688850152860151606087850181905261225481860183611811565b968901969450505090860190600101612214565b509098975050505050505050565b60006020828403121561228857600080fd5b815161185081611870565b600082516122a58184602087016117ed565b919091019291505056fea2646970667358221220c9100cb85e34de31f518c80b35d59cd5f2f67d8b4334c26a4695a47ad9b9c05964736f6c634300081800330000000000000000000000006f475642a6e85809b1c36fa62763669b1b48dd5b0000000000000000000000007ed6fd046ef71e2a71092d1597bcebe578a57a76000000000000000000000000949185d3be66775ea648f4a306740ea9eff9c567

Deployed Bytecode

0x60806040526004361061014b5760003560e01c80630d1ec495146101575780631069143a1461019257806312788d85146101b457806313137d65146101c957806317442b70146101dc5780633400288b146101fe5780633c9a07001461021e5780633f4ba83a1461026057806353a5cccf146102755780635535d461146102b05780635c975abb146102d05780635e280f11146102f4578063634d45b21461032857806369fe0e2d14610356578063715018a6146103765780637d25a05e1461038b57806382413eac146103c35780638456cb59146103e35780638da5cb5b146103f8578063b98bd0701461040d578063bb0b6a531461042d578063bc70b3541461045a578063c57981b51461047a578063ca5eb5e114610490578063f2fde38b146104b0578063f340bc85146104d0578063f5984cff146104f0578063ff7bd03d1461051057600080fd5b3661015257005b600080fd5b34801561016357600080fd5b5060035461017c9061010090046001600160a01b031681565b60405161018991906117d9565b60405180910390f35b34801561019e57600080fd5b506101a7610530565b604051610189919061183d565b6101c76101c2366004611885565b6105be565b005b6101c76101d736600461191e565b61089e565b3480156101e857600080fd5b5060408051600181526002602082015201610189565b34801561020a57600080fd5b506101c76102193660046119bd565b61094d565b34801561022a57600080fd5b506102527f000000000000000000000000000000000000000000000000000000000000271081565b604051908152602001610189565b34801561026c57600080fd5b506101c7610963565b34801561028157600080fd5b50610295610290366004611885565b610975565b60408051825181526020928301519281019290925201610189565b3480156102bc57600080fd5b506101a76102cb3660046119f9565b610a2b565b3480156102dc57600080fd5b5060035460ff165b6040519015158152602001610189565b34801561030057600080fd5b5061017c7f0000000000000000000000006f475642a6e85809b1c36fa62763669b1b48dd5b81565b34801561033457600080fd5b50610348610343366004611a2c565b610a4f565b604051610189929190611a6d565b34801561036257600080fd5b506101c7610371366004611a86565b610a6b565b34801561038257600080fd5b506101c7610a78565b34801561039757600080fd5b506103ab6103a63660046119bd565b610a8a565b6040516001600160401b039091168152602001610189565b3480156103cf57600080fd5b506102e46103de366004611a9f565b610a93565b3480156103ef57600080fd5b506101c7610aa8565b34801561040457600080fd5b5061017c610ab8565b34801561041957600080fd5b506101c7610428366004611b05565b610ac7565b34801561043957600080fd5b50610252610448366004611b79565b60016020526000908152604090205481565b34801561046657600080fd5b506101a7610475366004611b94565b610ae1565b34801561048657600080fd5b5061025260045481565b34801561049c57600080fd5b506101c76104ab366004611bf4565b610c89565b3480156104bc57600080fd5b506101c76104cb366004611bf4565b610d12565b3480156104dc57600080fd5b506101a76104eb366004611c11565b610d8b565b3480156104fc57600080fd5b506101c761050b366004611ce4565b610db7565b34801561051c57600080fd5b506102e461052b366004611d18565b610dcb565b6005805461053d90611d34565b80601f016020809104026020016040519081016040528092919081815260200182805461056990611d34565b80156105b65780601f1061058b576101008083540402835291602001916105b6565b820191906000526020600020905b81548152906001019060200180831161059957829003601f168201915b505050505081565b6105c6610e01565b600082116106085760405162461bcd60e51b81526004016105ff9060208082526004908201526304e4f2d360e41b604082015260600190565b60405180910390fd5b6003546040516323b872dd60e01b81526101009091046001600160a01b0316906323b872dd9061064090339030908790600401611d68565b6020604051808303816000875af115801561065f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106839190611d8c565b5060007f0000000000000000000000000000000000000000000000000000000000002710600454846106b59190611dc4565b6106bf9190611ddb565b905060006106cd8285611dfd565b60035490915061010090046001600160a01b031663a9059cbb6106ee610ab8565b846040518363ffffffff1660e01b815260040161070c929190611a6d565b600060405180830381600087803b15801561072657600080fd5b505af115801561073a573d6000803e3d6000fd5b5050600354604051630852cd8d60e31b8152600481018590526101009091046001600160a01b031692506342966c689150602401600060405180830381600087803b15801561078857600080fd5b505af115801561079c573d6000803e3d6000fd5b5050505060006107ac8483610d8b565b905061085a8682600580546107c090611d34565b80601f01602080910402602001604051908101604052809291908181526020018280546107ec90611d34565b80156108395780601f1061080e57610100808354040283529160200191610839565b820191906000526020600020905b81548152906001019060200180831161081c57829003601f168201915b50505050506040518060400160405280348152602001600081525033610e47565b507f77a5a5e99b49a34103ef03e6bc7dc71cb95770f07d6c7afcf75eba2ead8eebae33868860405161088e93929190611e10565b60405180910390a1505050505050565b7f0000000000000000000000006f475642a6e85809b1c36fa62763669b1b48dd5b6001600160a01b031633146108e957336040516391ac5e4f60e01b81526004016105ff91906117d9565b60208701803590610903906108fe908a611b79565b610f52565b14610935576109156020880188611b79565b876020013560405163309afaf360e21b81526004016105ff929190611e37565b61094487878787878787610f8e565b50505050505050565b610955611065565b61095f82826110c4565b5050565b61096b611065565b61097361111a565b565b61097d61179b565b60006109898385610d8b565b9050610a2285826005805461099d90611d34565b80601f01602080910402602001604051908101604052809291908181526020018280546109c990611d34565b8015610a165780601f106109eb57610100808354040283529160200191610a16565b820191906000526020600020905b8154815290600101906020018083116109f957829003601f168201915b50505050506000611166565b95945050505050565b60026020908152600092835260408084209091529082529020805461053d90611d34565b600080610a5e83850185611c11565b90925090505b9250929050565b610a73611065565b600455565b610a80611065565b6109736000611232565b60005b92915050565b6001600160a01b03811630145b949350505050565b610ab0611065565b610973611282565b6000546001600160a01b031690565b610acf611065565b61095f610adc8284611e4d565b6112bf565b63ffffffff8416600090815260026020908152604080832061ffff87168452909152812080546060929190610b1590611d34565b80601f0160208091040260200160405190810160405280929190818152602001828054610b4190611d34565b8015610b8e5780601f10610b6357610100808354040283529160200191610b8e565b820191906000526020600020905b815481529060010190602001808311610b7157829003601f168201915b505050505090508051600003610bde5783838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929450610aa09350505050565b6000839003610bee579050610aa0565b60028310610c6c57610c3584848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506113d192505050565b80610c438460028188611f26565b604051602001610c5593929190611f50565b604051602081830303815290604052915050610aa0565b8383604051639a6d49cd60e01b81526004016105ff929190611f78565b610c91611065565b60405163ca5eb5e160e01b81526001600160a01b037f0000000000000000000000006f475642a6e85809b1c36fa62763669b1b48dd5b169063ca5eb5e190610cdd9084906004016117d9565b600060405180830381600087803b158015610cf757600080fd5b505af1158015610d0b573d6000803e3d6000fd5b5050505050565b610d1a611065565b6001600160a01b038116610d7f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105ff565b610d8881611232565b50565b60608282604051602001610da0929190611a6d565b604051602081830303815290604052905092915050565b610dbf611065565b600561095f8282611ff7565b6000602082018035906001908390610de39086611b79565b63ffffffff1681526020810191909152604001600020541492915050565b60035460ff16156109735760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105ff565b610e4f6117b5565b6000610e5e84600001516113fd565b602085015190915015610e7857610e788460200151611425565b7f0000000000000000000000006f475642a6e85809b1c36fa62763669b1b48dd5b6001600160a01b0316632637a450826040518060a001604052808b63ffffffff168152602001610ec88c610f52565b81526020018a815260200189815260200160008960200151111515815250866040518463ffffffff1660e01b8152600401610f049291906120b6565b60806040518083038185885af1158015610f22573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f479190612161565b979650505050505050565b63ffffffff811660009081526001602052604081205480610a8d5760405163f6ff4fb760e01b815263ffffffff841660048201526024016105ff565b610f96610e01565b600080610fa38787610a4f565b6003546040516340c10f1960e01b815292945090925061010090046001600160a01b0316906340c10f1990610fde9085908590600401611a6d565b600060405180830381600087803b158015610ff857600080fd5b505af115801561100c573d6000803e3d6000fd5b507f3ab7fd9d84c4b2f3d606d747db8b64b49a2f5a2622d82482026da9fafbcd1797925084915083905061104360208d018d611b79565b60405161105293929190611e10565b60405180910390a1505050505050505050565b3361106e610ab8565b6001600160a01b0316146109735760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105ff565b63ffffffff821660009081526001602052604090819020829055517f238399d427b947898edb290f5ff0f9109849b1c3ba196a42e35f00c50a54b98b9061110e9084908490611e37565b60405180910390a15050565b611122611507565b6003805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405161115c91906117d9565b60405180910390a1565b61116e61179b565b7f0000000000000000000000006f475642a6e85809b1c36fa62763669b1b48dd5b6001600160a01b031663ddc28c586040518060a001604052808863ffffffff1681526020016111bd89610f52565b8152602001878152602001868152602001851515815250306040518363ffffffff1660e01b81526004016111f29291906120b6565b6040805180830381865afa15801561120e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2291906121b9565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61128a610e01565b6003805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861114f3390565b60005b8151811015611396576112f18282815181106112e0576112e06121d5565b6020026020010151604001516113d1565b818181518110611303576113036121d5565b60200260200101516040015160026000848481518110611325576113256121d5565b60200260200101516000015163ffffffff1663ffffffff168152602001908152602001600020600084848151811061135f5761135f6121d5565b60200260200101516020015161ffff1661ffff168152602001908152602001600020908161138d9190611ff7565b506001016112c2565b507fbe4864a8e820971c0247f5992e2da559595f7bf076a21cb5928d443d2a13b674816040516113c691906121eb565b60405180910390a150565b600281015161ffff811660031461095f5781604051639a6d49cd60e01b81526004016105ff919061183d565b6000813414611421576040516304fb820960e51b81523460048201526024016105ff565b5090565b60007f0000000000000000000000006f475642a6e85809b1c36fa62763669b1b48dd5b6001600160a01b031663e4fe1d946040518163ffffffff1660e01b8152600401602060405180830381865afa158015611485573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a99190612276565b90506001600160a01b0381166114d2576040516329b99a9560e11b815260040160405180910390fd5b61095f6001600160a01b038216337f0000000000000000000000006f475642a6e85809b1c36fa62763669b1b48dd5b85611550565b60035460ff166109735760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105ff565b6115a8846323b872dd60e01b85858560405160240161157193929190611d68565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526115ae565b50505050565b6000611603826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166116889092919063ffffffff16565b90508051600014806116245750808060200190518101906116249190611d8c565b6116835760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105ff565b505050565b6060610aa0848460008585600080866001600160a01b031685876040516116af9190612293565b60006040518083038185875af1925050503d80600081146116ec576040519150601f19603f3d011682016040523d82523d6000602084013e6116f1565b606091505b5091509150610f47878383876060831561176c578251600003611765576001600160a01b0385163b6117655760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105ff565b5081610aa0565b610aa083838151156117815781518083602001fd5b8060405162461bcd60e51b81526004016105ff919061183d565b604051806040016040528060008152602001600081525090565b60408051606081018252600080825260208201529081016117d461179b565b905290565b6001600160a01b0391909116815260200190565b60005b838110156118085781810151838201526020016117f0565b50506000910152565b600081518084526118298160208601602086016117ed565b601f01601f19169290920160200192915050565b6020815260006118506020830184611811565b9392505050565b803563ffffffff8116811461186b57600080fd5b919050565b6001600160a01b0381168114610d8857600080fd5b60008060006060848603121561189a57600080fd5b6118a384611857565b92506020840135915060408401356118ba81611870565b809150509250925092565b6000606082840312156118d757600080fd5b50919050565b60008083601f8401126118ef57600080fd5b5081356001600160401b0381111561190657600080fd5b602083019150836020828501011115610a6457600080fd5b600080600080600080600060e0888a03121561193957600080fd5b61194389896118c5565b96506060880135955060808801356001600160401b038082111561196657600080fd5b6119728b838c016118dd565b909750955060a08a0135915061198782611870565b90935060c0890135908082111561199d57600080fd5b506119aa8a828b016118dd565b989b979a50959850939692959293505050565b600080604083850312156119d057600080fd5b6119d983611857565b946020939093013593505050565b803561ffff8116811461186b57600080fd5b60008060408385031215611a0c57600080fd5b611a1583611857565b9150611a23602084016119e7565b90509250929050565b60008060208385031215611a3f57600080fd5b82356001600160401b03811115611a5557600080fd5b611a61858286016118dd565b90969095509350505050565b6001600160a01b03929092168252602082015260400190565b600060208284031215611a9857600080fd5b5035919050565b60008060008060a08587031215611ab557600080fd5b611abf86866118c5565b935060608501356001600160401b03811115611ada57600080fd5b611ae6878288016118dd565b9094509250506080850135611afa81611870565b939692955090935050565b60008060208385031215611b1857600080fd5b82356001600160401b0380821115611b2f57600080fd5b818501915085601f830112611b4357600080fd5b813581811115611b5257600080fd5b8660208260051b8501011115611b6757600080fd5b60209290920196919550909350505050565b600060208284031215611b8b57600080fd5b61185082611857565b60008060008060608587031215611baa57600080fd5b611bb385611857565b9350611bc1602086016119e7565b925060408501356001600160401b03811115611bdc57600080fd5b611be8878288016118dd565b95989497509550505050565b600060208284031215611c0657600080fd5b813561185081611870565b60008060408385031215611c2457600080fd5b82356119d981611870565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715611c6d57611c6d611c2f565b604052919050565b600082601f830112611c8657600080fd5b81356001600160401b03811115611c9f57611c9f611c2f565b611cb2601f8201601f1916602001611c45565b818152846020838601011115611cc757600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215611cf657600080fd5b81356001600160401b03811115611d0c57600080fd5b610aa084828501611c75565b600060608284031215611d2a57600080fd5b61185083836118c5565b600181811c90821680611d4857607f821691505b6020821081036118d757634e487b7160e01b600052602260045260246000fd5b6001600160a01b039384168152919092166020820152604081019190915260600190565b600060208284031215611d9e57600080fd5b8151801515811461185057600080fd5b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610a8d57610a8d611dae565b600082611df857634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610a8d57610a8d611dae565b6001600160a01b03939093168352602083019190915263ffffffff16604082015260600190565b63ffffffff929092168252602082015260400190565b60006001600160401b0380841115611e6757611e67611c2f565b8360051b6020611e78818301611c45565b868152918501918181019036841115611e9057600080fd5b865b84811015611f1a57803586811115611eaa5760008081fd5b8801606036829003811315611ebf5760008081fd5b611ec881611c45565b9050611ed382611857565b8152611ee08683016119e7565b8682015260408083013589811115611ef85760008081fd5b611f0436828601611c75565b9183019190915250845250918301918301611e92565b50979650505050505050565b60008085851115611f3657600080fd5b83861115611f4357600080fd5b5050820193919092039150565b60008451611f628184602089016117ed565b8201838582376000930192835250909392505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b601f821115611683576000816000526020600020601f850160051c81016020861015611fd05750805b601f850160051c820191505b81811015611fef57828155600101611fdc565b505050505050565b81516001600160401b0381111561201057612010611c2f565b6120248161201e8454611d34565b84611fa7565b602080601f83116001811461205957600084156120415750858301515b600019600386901b1c1916600185901b178555611fef565b600085815260208120601f198616915b8281101561208857888601518255948401946001909101908401612069565b50858210156120a65787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6040815263ffffffff8351166040820152602083015160608201526000604084015160a060808401526120ec60e0840182611811565b90506060850151603f198483030160a08501526121098282611811565b60809690960151151560c08501525050506001600160a01b039190911660209091015290565b60006040828403121561214157600080fd5b61214b6040611c45565b9050815181526020820151602082015292915050565b60006080828403121561217357600080fd5b61217d6060611c45565b8251815260208301516001600160401b038116811461219b57600080fd5b60208201526121ad846040850161212f565b60408201529392505050565b6000604082840312156121cb57600080fd5b611850838361212f565b634e487b7160e01b600052603260045260246000fd5b600060208083018184528085518083526040925060408601915060408160051b87010184880160005b8381101561226857888303603f190185528151805163ffffffff1684528781015161ffff1688850152860151606087850181905261225481860183611811565b968901969450505090860190600101612214565b509098975050505050505050565b60006020828403121561228857600080fd5b815161185081611870565b600082516122a58184602087016117ed565b919091019291505056fea2646970667358221220c9100cb85e34de31f518c80b35d59cd5f2f67d8b4334c26a4695a47ad9b9c05964736f6c63430008180033

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

0000000000000000000000006f475642a6e85809b1c36fa62763669b1b48dd5b0000000000000000000000007ed6fd046ef71e2a71092d1597bcebe578a57a76000000000000000000000000949185d3be66775ea648f4a306740ea9eff9c567

-----Decoded View---------------
Arg [0] : _endpoint (address): 0x6F475642a6e85809B1c36Fa62763669b1b48DD5B
Arg [1] : _owner (address): 0x7eD6FD046ef71e2A71092D1597Bcebe578A57a76
Arg [2] : _tokenForBridge (address): 0x949185D3BE66775Ea648F4a306740EA9eFF9C567

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000006f475642a6e85809b1c36fa62763669b1b48dd5b
Arg [1] : 0000000000000000000000007ed6fd046ef71e2a71092d1597bcebe578a57a76
Arg [2] : 000000000000000000000000949185d3be66775ea648f4a306740ea9eff9c567


Block Transaction 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  ]
[ 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.