Contract 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd675 8

 

Contract Overview

Balance:
253,168.570668226267087134 MATIC

MATIC Value:
$197,901.87 (@ $0.78/MATIC)

Token:
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x79f3e0c0ad7657ac9a9da3a7364542c53cf524f183481ee8f65bbe2f59442fbeTransfer308346182022-07-17 19:50:1132 days 17 hrs ago0x27f988b5e8e3ebf7f2b49ffecb751843e9398fe5 IN  0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750.00111001 MATIC0.000706619394 33.574997361
0x429f9b2b35d4813d2556539286b80310a16cf6c744154991a6d890506928fcd2Transfer Ownersh...264818282022-03-29 1:19:08143 days 12 hrs ago0x9f403140bc0574d7d36ea472b82daa1bbd4ef327 IN  0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750 MATIC0.001121247151 39.090999937
0x997cfa827475399acade88dd6e2c87949593c404f4638e079cc4a1cecb145dc2Set Default Conf...264422452022-03-28 1:09:04144 days 12 hrs ago0x9f403140bc0574d7d36ea472b82daa1bbd4ef327 IN  0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750 MATIC0.005672565 135
0xfb70ab3a5b39af548ef55ca9e43dd431305b53d176496d21cbdaaae3e30d1630Add Inbound Proo...264422432022-03-28 1:08:56144 days 12 hrs ago0x9f403140bc0574d7d36ea472b82daa1bbd4ef327 IN  0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750 MATIC0.0071901 135
0x88e04a1755841b3413315b1394336e5246fcc1dd001d38763d538e452296b950Set Default Conf...264422412022-03-28 1:08:48144 days 12 hrs ago0x9f403140bc0574d7d36ea472b82daa1bbd4ef327 IN  0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750 MATIC0.005672565 135
0x993438d3bb8a591c4236feaecd10b4a767eaa5f3e910adf4388ebce1739dd78aAdd Inbound Proo...264422392022-03-28 1:08:36144 days 12 hrs ago0x9f403140bc0574d7d36ea472b82daa1bbd4ef327 IN  0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750 MATIC0.0071901 135
0xa5cd3bd3616fd679814370921e28c1f3a978675cca7e6e295d1651037160ba30Set Default Conf...264422372022-03-28 1:08:28144 days 12 hrs ago0x9f403140bc0574d7d36ea472b82daa1bbd4ef327 IN  0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750 MATIC0.005672565 135
0x9b12f003333658047901924a6c1e3e90a3ad9d8f9c2d77c56c7092a75a7f6f20Add Inbound Proo...264422352022-03-28 1:08:20144 days 12 hrs ago0x9f403140bc0574d7d36ea472b82daa1bbd4ef327 IN  0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750 MATIC0.0071901 135
0x18bb475ce45103a99c3e8b1465a149a31c65bcfeadb2b1eb025f439bf2c97ddaSet Default Conf...264422332022-03-28 1:08:12144 days 12 hrs ago0x9f403140bc0574d7d36ea472b82daa1bbd4ef327 IN  0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750 MATIC0.005672565 135
0x7f65d083c57b72d68d803b09324209022005e7a850a3351e2fa1134c937cddd6Add Inbound Proo...264422312022-03-28 1:08:04144 days 12 hrs ago0x9f403140bc0574d7d36ea472b82daa1bbd4ef327 IN  0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750 MATIC0.0071901 135
0x440afa914ddaa679a4d314b6765726a2a7802b740bf675609cc1abbcf4652038Set Default Conf...264422282022-03-28 1:07:52144 days 12 hrs ago0x9f403140bc0574d7d36ea472b82daa1bbd4ef327 IN  0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750 MATIC0.005672565 135
0x2cc52bfc9a1f7f4b0227c47514181201a42c686c695fb99be6c03a13e1bd109aAdd Inbound Proo...264422262022-03-28 1:07:44144 days 12 hrs ago0x9f403140bc0574d7d36ea472b82daa1bbd4ef327 IN  0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750 MATIC0.0071901 135
0x3f1ee57f07e5928b9ef153ca85fcecda46c1c4016cb4848d21d0361d451f81b3Set Default Conf...264422242022-03-28 1:07:36144 days 12 hrs ago0x9f403140bc0574d7d36ea472b82daa1bbd4ef327 IN  0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750 MATIC0.005672565 135
0xe39a3b2b59769a8a5deadfcba6591b2f3b64d21e477b7e40cd11af74e061e126Add Inbound Proo...264422222022-03-28 1:07:28144 days 12 hrs ago0x9f403140bc0574d7d36ea472b82daa1bbd4ef327 IN  0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750 MATIC0.0071901 135
0x91610bd4418278adbaa97511cbae5a86bb2f6a119b6f324c8d975c32d21be0d5Set Default Conf...264411132022-03-28 0:27:48144 days 13 hrs ago0x9f403140bc0574d7d36ea472b82daa1bbd4ef327 IN  0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750 MATIC0.005672565 135
0x1e5d51b6eb7bb840393ec15e078d1e2a09dd68f7633af633a74e6cd803874c7aAdd Inbound Proo...264411072022-03-28 0:27:36144 days 13 hrs ago0x9f403140bc0574d7d36ea472b82daa1bbd4ef327 IN  0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750 MATIC0.0071901 135
0xfd5263cfff10a2e5509dc5f67fcfac80e487a82732870395fde05be8e522c933Add Inbound Proo...264411072022-03-28 0:27:36144 days 13 hrs ago0x9f403140bc0574d7d36ea472b82daa1bbd4ef327 IN  0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750 MATIC0.0042608 80
0x47f1d6712fc445abc865ff3a024c09b4881bd70b755e8a0acd9b23defa4393afSet Treasury264392812022-03-27 23:18:24144 days 14 hrs ago0x9f403140bc0574d7d36ea472b82daa1bbd4ef327 IN  0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750 MATIC0.001752192 64
0xfcb203d22c4ec8435e9f28f855f8c5265c5fa7192ff3ba0fdc296925098123d7Set Default Conf...260442562022-03-17 15:56:47154 days 21 hrs ago0x9f403140bc0574d7d36ea472b82daa1bbd4ef327 IN  0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750 MATIC0.00336152 80
0xf6fde1a2c56f8d357fc164283bf6880d334625b8157ed24b9f3bf7c205ad2f6dSet Default Conf...259772642022-03-15 18:17:15156 days 19 hrs ago0x9f403140bc0574d7d36ea472b82daa1bbd4ef327 IN  0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750 MATIC0.00358552 80
0xdd54d7935b2a50b8f18e5c267eabc66289eb012de218f5c856212eaf357f2674Set Default Conf...259772552022-03-15 18:16:57156 days 19 hrs ago0x9f403140bc0574d7d36ea472b82daa1bbd4ef327 IN  0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750 MATIC0.00358552 80
0x39432d3289798f737b234803ec368c4f376be4d5ef9a6660a9c7453fe753b993Set Default Conf...259772512022-03-15 18:16:49156 days 19 hrs ago0x9f403140bc0574d7d36ea472b82daa1bbd4ef327 IN  0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750 MATIC0.00358552 80
0xc84fa669d9985eb6b8c227b492d804bbde74b3aa9f72d7d925f5ae6cec033d41Set Default Conf...259772472022-03-15 18:16:41156 days 19 hrs ago0x9f403140bc0574d7d36ea472b82daa1bbd4ef327 IN  0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750 MATIC0.00358552 80
0xe98bd5dde1c7d105f57a6af5f5bb31d4d0d6d6c88d37005eb27df7454a788db6Set Default Conf...259772422022-03-15 18:16:31156 days 19 hrs ago0x9f403140bc0574d7d36ea472b82daa1bbd4ef327 IN  0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750 MATIC0.00358552 80
0x63305ea0f5e8f141b417504c9bfa4a99c952ca32dce211a36b643793954551adSet Default Conf...259772372022-03-15 18:16:21156 days 19 hrs ago0x9f403140bc0574d7d36ea472b82daa1bbd4ef327 IN  0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750 MATIC0.00358552 80
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x448f7270badb678cdd06fec6ee68add5f6eb66ed9f80daa9bedbd746b0f2c835320725412022-08-19 13:08:5430 mins ago 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750xa7bc9d8d90d0512b0cc929fcccd438f91a1d33290.00002893729571504 MATIC
0x448f7270badb678cdd06fec6ee68add5f6eb66ed9f80daa9bedbd746b0f2c835320725412022-08-19 13:08:5430 mins ago LayerZero: Polygon Endpoint 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6751.511409423845543781 MATIC
0x29dd9f807a4af0cfc50125ecd91de10e4dc0b078d7afdfd95625840c0d9bed48320717902022-08-19 12:42:5556 mins ago 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750x745b69b6075d900ce18333089b54d5d8573f2bf30.487824566206445828 MATIC
0x29dd9f807a4af0cfc50125ecd91de10e4dc0b078d7afdfd95625840c0d9bed48320717902022-08-19 12:42:5556 mins ago LayerZero: Polygon Endpoint 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6755.366070228270904112 MATIC
0x65dda0aa9019e11b3b8b38887f73f0e59f2862f2178cb21d3a98337beb7a434b320716212022-08-19 12:37:091 hr 2 mins ago LayerZero: Polygon Endpoint 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6751.11394959319684504 MATIC
0x791160016ebd4399706006b0fa1a6ec0d6cc056afe94f97238abca35a7c60760320714762022-08-19 12:32:071 hr 7 mins ago 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750xe1d1ac921a3a48e96d764658e9bdd0654dce38df0.245141882513884985 MATIC
0x791160016ebd4399706006b0fa1a6ec0d6cc056afe94f97238abca35a7c60760320714762022-08-19 12:32:071 hr 7 mins ago LayerZero: Polygon Endpoint 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6752.69656070765273484 MATIC
0x20d25faa52baf88033a0af36920116b2fa69482710b154ed3c910b7d6af51e4c320712752022-08-19 12:25:131 hr 14 mins ago LayerZero: Polygon Endpoint 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750.565839880412321861 MATIC
0x6da16f8575040def32b0a618c6c6c34e9db920e112b4ffd1a925a036b60a4889320712302022-08-19 12:23:391 hr 15 mins ago LayerZero: Polygon Endpoint 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6751.14409104626991443 MATIC
0xadc7a46b2c18248c3167ed70dd58be92cf2cd0c74c35804c6648fe016703d59a320711712022-08-19 12:21:411 hr 17 mins ago LayerZero: Polygon Endpoint 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750.565839880412321861 MATIC
0x255fbbe442561f30fed1a0b9d300d6ca14af4ea9fdec1c8f78d8355d8556434a320711502022-08-19 12:20:551 hr 18 mins ago 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750xb75af6aac0b676857bd1e0953849593b25f6adec0.018011960926136843 MATIC
0x255fbbe442561f30fed1a0b9d300d6ca14af4ea9fdec1c8f78d8355d8556434a320711502022-08-19 12:20:551 hr 18 mins ago LayerZero: Polygon Endpoint 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750.021802117872573746 MATIC
0xbacf69b49bd9225933f4a5d046036b32ea4c933c4b3f88f8d45c6683899c5490320707912022-08-19 12:08:371 hr 30 mins ago LayerZero: Polygon Endpoint 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6751.14409104626991443 MATIC
0x85941b4fcf5af7f693a38e92827ef1200eaa10d90d215d67058cc17f4ee951b1320705852022-08-19 12:01:291 hr 37 mins ago LayerZero: Polygon Endpoint 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750.011826060118112708 MATIC
0xe33c55508fa8d62efa7a8156f73211249e690ad347b8c9eed6c31be24a041b87320705472022-08-19 12:00:131 hr 39 mins ago LayerZero: Polygon Endpoint 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6751.11394959319684504 MATIC
0x4d90ba9b866a8d2fc88c7d6a9a010c3d9009292a1ceb0475fb4e7df34f66213f320705112022-08-19 11:58:571 hr 40 mins ago LayerZero: Polygon Endpoint 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6751.11394959319684504 MATIC
0xa7e5ecd00e609111e9f0e3188dcb1d63672d68b5ebe2a8a2c14acac9e263bf4e320695072022-08-19 11:22:202 hrs 16 mins ago 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750x186db2d5d8def9d7211f37f1892e207d8545b4430.412889237363672313 MATIC
0xa7e5ecd00e609111e9f0e3188dcb1d63672d68b5ebe2a8a2c14acac9e263bf4e320695072022-08-19 11:22:202 hrs 16 mins ago LayerZero: Polygon Endpoint 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6754.541781611000395451 MATIC
0x95562d928ee9fcc83ef6825028133664c8cbad667ed4a00943d516440523fa31320694222022-08-19 11:19:222 hrs 19 mins ago 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750xc83e26cf74266106bdc1ba7842653f12d94d58560.140297722540435924 MATIC
0x95562d928ee9fcc83ef6825028133664c8cbad667ed4a00943d516440523fa31320694222022-08-19 11:19:222 hrs 19 mins ago LayerZero: Polygon Endpoint 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6751.543274947944795164 MATIC
0x30010ca5216210109373dabc5004baa184011168cbcede2b8e93442d71a248ea320693922022-08-19 11:18:222 hrs 20 mins ago 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750x9b3530fac07165d11f61b41d9d9783464806dd300.140297722540435924 MATIC
0x30010ca5216210109373dabc5004baa184011168cbcede2b8e93442d71a248ea320693922022-08-19 11:18:222 hrs 20 mins ago LayerZero: Polygon Endpoint 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6751.543274947944795164 MATIC
0x698d5a43263fcffeb0eab5cc5e5be4100fc7b85400d3543bad27d6a5fdb22bcd320689552022-08-19 11:03:202 hrs 35 mins ago LayerZero: Polygon Endpoint 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6751.11394959319684504 MATIC
0xf8d82b445a637378430efd8561b2f02bb2fa76caf99ded9c0bea79eeb81cb2d3320689532022-08-19 11:03:162 hrs 35 mins ago 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750x521cf86848e5a240232bbc6678aa4aa89a28a43d0.140297722540435924 MATIC
0xf8d82b445a637378430efd8561b2f02bb2fa76caf99ded9c0bea79eeb81cb2d3320689532022-08-19 11:03:162 hrs 35 mins ago LayerZero: Polygon Endpoint 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd6751.543274947944795164 MATIC
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
UltraLightNode

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 30000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 19 : UltraLightNode.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.7.6;
pragma abicoder v2;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";

import "@layerzerolabs/proof-evm/contracts/ILayerZeroValidationLibrary.sol";

import "./interfaces/ILayerZeroMessagingLibrary.sol";
import "./interfaces/ILayerZeroReceiver.sol";
import "./interfaces/ILayerZeroRelayer.sol";
import "./interfaces/ILayerZeroTreasury.sol";
import "./interfaces/ILayerZeroOracle.sol";
import "./interfaces/ILayerZeroUltraLightNodeV1.sol";
import "./interfaces/ILayerZeroEndpoint.sol";

contract UltraLightNode is ILayerZeroMessagingLibrary, ILayerZeroUltraLightNodeV1, ReentrancyGuard, Ownable {
    using SafeERC20 for IERC20;
    using SafeMath for uint;

    struct BlockData {
        uint confirmations;
        bytes32 data;
    }

    // Application config
    uint public constant CONFIG_TYPE_INBOUND_PROOF_LIBRARY_VERSION = 1;
    uint public constant CONFIG_TYPE_INBOUND_BLOCK_CONFIRMATIONS = 2;
    uint public constant CONFIG_TYPE_RELAYER = 3;
    uint public constant CONFIG_TYPE_OUTBOUND_PROOF_TYPE = 4;
    uint public constant CONFIG_TYPE_OUTBOUND_BLOCK_CONFIRMATIONS = 5;
    uint public constant CONFIG_TYPE_ORACLE = 6;

    struct ApplicationConfiguration {
        uint16 inboundProofLibraryVersion;
        uint64 inboundBlockConfirmations;
        address relayer;
        uint16 outboundProofType;
        uint64 outboundBlockConfirmations;
        address oracle;
    }

    // Token and Contracts
    IERC20 public layerZeroToken;
    ILayerZeroTreasury public treasuryContract;

    // Fee management
    uint public constant BP_DENOMINATOR = 10000;
    // treasury and relayer share the protocol fee, either in native token or ZRO
    uint8 public constant WITHDRAW_TYPE_TREASURY_PROTOCOL_FEES = 0;
    uint8 public constant WITHDRAW_TYPE_ORACLE_QUOTED_FEES = 1; // quoted fee refers to the fee in block relaying
    uint8 public constant WITHDRAW_TYPE_RELAYER_QUOTED_FEES = 2; //quoted fee refers the fee in msg relaying

    mapping(address => uint) public oracleQuotedFees;
    mapping(address => uint) public relayerQuotedFees;
    uint public treasuryNativeFees;
    uint public treasuryZROFees;

    // User Application
    mapping(address => mapping(uint16 => ApplicationConfiguration)) public appConfig; // app address => chainId => config
    mapping(uint16 => ApplicationConfiguration) public defaultAppConfig; // default UA settings if no version specified
    mapping(uint16 => mapping(uint16 => bytes)) public defaultAdapterParams;

    // Validation
    mapping(uint16 => mapping(uint16 => address)) public inboundProofLibrary; // chainId => library Id => inboundProofLibrary contract
    mapping(uint16 => uint16) public maxInboundProofLibrary; // chainId => inboundProofLibrary
    mapping(uint16 => mapping(uint16 => bool)) public supportedOutboundProof; // chainId => outboundProofType => enabled
    mapping(uint16 => uint) public chainAddressSizeMap;
    mapping(address => mapping(uint16 => mapping(bytes32 => BlockData))) public hashLookup;
    mapping(uint16 => bytes32) public ulnLookup; // remote ulns

    ILayerZeroEndpoint public immutable endpoint;

    // Events
    event AppConfigUpdated(address userApplication, uint configType, bytes newConfig);
    event AddInboundProofLibraryForChain(uint16 chainId, address lib);
    event EnableSupportedOutboundProof(uint16 chainId, uint16 proofType);
    event HashReceived(uint16 srcChainId, address oracle, uint confirmations, bytes32 blockhash);
    event Packet(uint16 chainId, bytes payload);
    event RelayerParams(uint16 chainId, uint64 nonce, uint16 outboundProofType, bytes adapterParams);
    event SetChainAddressSize(uint16 chainId, uint size);
    event SetDefaultConfigForChainId(uint16 chainId, uint16 inboundProofLib, uint64 inboundBlockConfirm, address relayer, uint16 outboundProofType, uint16 outboundBlockConfirm, address oracle);
    event SetDefaultAdapterParamsForChainId(uint16 chainId, uint16 proofType, bytes adapterParams);
    event SetLayerZeroToken(address tokenAddress);
    event SetRelayerFeeContract(address relayerFeeContract);
    event SetRemoteUln(uint16 chainId, bytes32 uln);
    event SetTreasury(address treasuryAddress);
    event WithdrawZRO(address _msgSender, address _to, uint _amount);
    event WithdrawNative(uint8 _type, address _owner, address _msgSender, address _to, uint _amount);

    constructor(address _endpoint) {
        require(_endpoint != address(0x0), "LayerZero: endpoint cannot be zero address");
        endpoint = ILayerZeroEndpoint(_endpoint);
    }

    // only the endpoint can call SEND() and setConfig()
    modifier onlyEndpoint() {
        require(address(endpoint) == msg.sender, "LayerZero: only endpoint");
        _;
    }

    //----------------------------------------------------------------------------------
    // PROTOCOL

    // This function completes delivery of a LayerZero message.
    //
    // In order to deliver the message, this function:
    // (a) takes the _transactionProof submitted by UA's relayer, and
    // (b) retrieve UA's validation library
    // (c) takes the _blockData submitted by the UA's oracle given the their configuration (and blockConfirmations),
    // (d) decodes using UA's validation library using (a) and (c)
    //  then, this functions asserts that
    // (e) the payload originated from the known Ultra Light Node from source chain, and
    // (f) the _dstAddress the specified destination contract
    function validateTransactionProof(uint16 _srcChainId, address _dstAddress, uint _gasLimit, bytes32 _lookupHash, bytes calldata _transactionProof) external override {
        // retrieve UA's configuration using the _dstAddress from arguments.
        ApplicationConfiguration memory uaConfig = getAppConfig(_srcChainId, _dstAddress);

        // (a) assert that the caller == UA's relayer
        require(uaConfig.relayer == msg.sender, "LayerZero: invalid relayer");

        LayerZeroPacket.Packet memory _packet;
        {
            // (b) retrieve UA's validation library
            address inboundProofLib = inboundProofLibrary[_srcChainId][uaConfig.inboundProofLibraryVersion];

            // (c) assert that the data submitted by UA's oracle have no fewer confirmations than UA's configuration
            BlockData storage blockData = hashLookup[uaConfig.oracle][_srcChainId][_lookupHash];
            require(blockData.confirmations >= uaConfig.inboundBlockConfirmations, "LayerZero: not enough block confirmations");

            // (d) decode
            uint remoteAddressSize = chainAddressSizeMap[_srcChainId];
            _packet = ILayerZeroValidationLibrary(inboundProofLib).validateProof(blockData.data, _transactionProof, remoteAddressSize);
        }

        // (e) assert that the packet was emitted by the source ultra light node
        require(ulnLookup[_srcChainId] == _packet.ulnAddress, "LayerZero: _packet.ulnAddress is invalid");

        // (f) assert that the _packet._dstAddress == the _dstAddress specified by the UAs message
        require(_packet.dstAddress == _dstAddress, "LayerZero: invalid dst address");

        // publish the payload and _gasLimit to the endpoint for calling lzReceive at _dstAddress
        endpoint.receivePayload(_packet.srcChainId, _packet.srcAddress, _packet.dstAddress, _packet.nonce, _gasLimit, _packet.payload);
    }

    // Called (by the Endpoint) with the information required to send a LayerZero message for a User Application.
    // This function:
    // (a) pays the protocol (native token or ZRO), oracle (native token) and relayer (native token) for their roles in sending the message.
    // (b) generates the message payload and emits events of the message and adapterParams
    // (c) notifies the oracle
    function send(address _ua, uint64 _nonce, uint16 _chainId, bytes calldata _destination, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable override onlyEndpoint {
        ApplicationConfiguration memory uaConfig = getAppConfig(_chainId, _ua);
        address ua = _ua;
        uint64 nonce = _nonce;
        uint16 chainId = _chainId;
        require(ulnLookup[chainId] != bytes32(0), "LayerZero: chainId does not exist");

        uint totalNativeFee;
        {
            uint oracleFee;
            // (a - 1), pay the oracle
            {
                oracleFee = ILayerZeroOracle(uaConfig.oracle).getPrice(chainId, uaConfig.outboundProofType);
                oracleQuotedFees[uaConfig.oracle] = oracleQuotedFees[uaConfig.oracle].add(oracleFee);
            }

            // (a - 2), pay the relayer
            {
                uint payloadSize = _payload.length;
                ILayerZeroRelayer relayer = ILayerZeroRelayer(uaConfig.relayer);
                if (_adapterParams.length == 0) {
                    bytes memory defaultAdaptorParam = defaultAdapterParams[chainId][uaConfig.outboundProofType];
                    totalNativeFee = relayer.getPrice(chainId, uaConfig.outboundProofType, ua, payloadSize, defaultAdaptorParam);
                    relayer.notifyRelayer(chainId, uaConfig.outboundProofType, defaultAdaptorParam);
                } else {
                    totalNativeFee = relayer.getPrice(chainId, uaConfig.outboundProofType, ua, payloadSize, _adapterParams);
                    relayer.notifyRelayer(chainId, uaConfig.outboundProofType, _adapterParams);
                }
                relayerQuotedFees[uaConfig.relayer] = relayerQuotedFees[uaConfig.relayer].add(totalNativeFee); // totalNativeFee == relayerFee here

                // emit the param events
                emit RelayerParams(chainId, nonce, uaConfig.outboundProofType, _adapterParams);
            }

            // (a - 3), pay the protocol
            {
                // if no ZRO token or not specifying a payment address, pay in native token
                bool payInNative = _zroPaymentAddress == address(0x0) || address(layerZeroToken) == address(0x0);
                uint protocolFee = treasuryContract.getFees(!payInNative, totalNativeFee, oracleFee); // totalNativeFee == relayerFee here

                if (protocolFee > 0) {
                    if (payInNative) {
                        treasuryNativeFees = treasuryNativeFees.add(protocolFee);
                        totalNativeFee = totalNativeFee.add(protocolFee);
                    } else {
                        // zro payment address must equal the _ua or the tx.origin otherwise the transaction reverts
                        require(_zroPaymentAddress == ua || _zroPaymentAddress == tx.origin, "LayerZero: must be paid by sender or origin");

                        // transfer the LayerZero token to this contract from the payee
                        layerZeroToken.safeTransferFrom(_zroPaymentAddress, address(this), protocolFee);

                        treasuryZROFees = treasuryZROFees.add(protocolFee);
                    }
                }
            }

            totalNativeFee = totalNativeFee.add(oracleFee);
        }

        // (b) emit payload and the adapterParams if any
        {
            bytes memory encodedPayload = abi.encodePacked(nonce, ua, _destination, _payload);
            emit Packet(chainId, encodedPayload);
            // (c) notify the oracle
            ILayerZeroOracle(uaConfig.oracle).notifyOracle(chainId, uaConfig.outboundProofType, uaConfig.outboundBlockConfirmations);
        }

        require(totalNativeFee <= msg.value, "LayerZero: not enough native for fees");
        // refund if they send too much
        uint amount = msg.value.sub(totalNativeFee);
        if (amount > 0) {
            (bool success, ) = _refundAddress.call{value: amount}("");
            require(success, "LayerZero: failed to refund");
        }
    }

    // Can be called by any address to update a block header
    // can only upload new block data or the same block data with more confirmations
    function updateHash(uint16 _srcChainId, bytes32 _lookupHash, uint _confirmations, bytes32 _data) external override {
        // this function may revert with a default message if the oracle address is not an ILayerZeroOracle
        BlockData storage bd = hashLookup[msg.sender][_srcChainId][_lookupHash];
        // if it has a record, requires a larger confirmation.
        require(bd.confirmations < _confirmations, "LayerZero: oracle data can only update if it has more confirmations");

        // set the new information into storage
        bd.confirmations = _confirmations;
        bd.data = _data;

        emit HashReceived(_srcChainId, msg.sender, _confirmations, _lookupHash);
    }

    //----------------------------------------------------------------------------------
    // Other Library Interfaces

    // default to DEFAULT setting if ZERO value
    function getAppConfig(uint16 _chainId, address userApplicationAddress) public view returns (ApplicationConfiguration memory) {
        ApplicationConfiguration memory config = appConfig[userApplicationAddress][_chainId];
        ApplicationConfiguration storage defaultConfig = defaultAppConfig[_chainId];

        if (config.inboundProofLibraryVersion == 0) {
            config.inboundProofLibraryVersion = defaultConfig.inboundProofLibraryVersion;
        }

        if (config.inboundBlockConfirmations == 0) {
            config.inboundBlockConfirmations = defaultConfig.inboundBlockConfirmations;
        }

        if (config.relayer == address(0x0)) {
            config.relayer = defaultConfig.relayer;
        }

        if (config.outboundProofType == 0) {
            config.outboundProofType = defaultConfig.outboundProofType;
        }

        if (config.outboundBlockConfirmations == 0) {
            config.outboundBlockConfirmations = defaultConfig.outboundBlockConfirmations;
        }

        if (config.oracle == address(0x0)) {
            config.oracle = defaultConfig.oracle;
        }

        return config;
    }

    function setConfig(uint16 chainId, address _ua, uint _configType, bytes calldata _config) external override onlyEndpoint {
        ApplicationConfiguration storage uaConfig = appConfig[_ua][chainId];
        if (_configType == CONFIG_TYPE_INBOUND_PROOF_LIBRARY_VERSION) {
            uint16 inboundProofLibraryVersion = abi.decode(_config, (uint16));
            require(inboundProofLibraryVersion <= maxInboundProofLibrary[chainId], "LayerZero: invalid inbound proof library version");
            uaConfig.inboundProofLibraryVersion = inboundProofLibraryVersion;
        } else if (_configType == CONFIG_TYPE_INBOUND_BLOCK_CONFIRMATIONS) {
            uint64 blockConfirmations = abi.decode(_config, (uint64));
            uaConfig.inboundBlockConfirmations = blockConfirmations;
        } else if (_configType == CONFIG_TYPE_RELAYER) {
            address relayer = abi.decode(_config, (address));
            uaConfig.relayer = relayer;
        } else if (_configType == CONFIG_TYPE_OUTBOUND_PROOF_TYPE) {
            uint16 outboundProofType = abi.decode(_config, (uint16));
            require(supportedOutboundProof[chainId][outboundProofType] || outboundProofType == 0, "LayerZero: invalid outbound proof type");
            uaConfig.outboundProofType = outboundProofType;
        } else if (_configType == CONFIG_TYPE_OUTBOUND_BLOCK_CONFIRMATIONS) {
            uint64 blockConfirmations = abi.decode(_config, (uint64));
            uaConfig.outboundBlockConfirmations = blockConfirmations;
        } else if (_configType == CONFIG_TYPE_ORACLE) {
            address oracle = abi.decode(_config, (address));
            uaConfig.oracle = oracle;
        } else {
            revert("LayerZero: Invalid config type");
        }

        emit AppConfigUpdated(_ua, _configType, _config);
    }

    function getConfig(uint16 _chainId, address userApplicationAddress, uint _configType) external view override returns (bytes memory) {
        ApplicationConfiguration storage uaConfig = appConfig[userApplicationAddress][_chainId];

        if (_configType == CONFIG_TYPE_INBOUND_PROOF_LIBRARY_VERSION) {
            if (uaConfig.inboundProofLibraryVersion == 0) {
                return abi.encode(defaultAppConfig[_chainId].inboundProofLibraryVersion);
            }
            return abi.encode(uaConfig.inboundProofLibraryVersion);
        } else if (_configType == CONFIG_TYPE_INBOUND_BLOCK_CONFIRMATIONS) {
            if (uaConfig.inboundBlockConfirmations == 0) {
                return abi.encode(defaultAppConfig[_chainId].inboundBlockConfirmations);
            }
            return abi.encode(uaConfig.inboundBlockConfirmations);
        } else if (_configType == CONFIG_TYPE_RELAYER) {
            if (uaConfig.relayer == address(0x0)) {
                return abi.encode(defaultAppConfig[_chainId].relayer);
            }
            return abi.encode(uaConfig.relayer);
        } else if (_configType == CONFIG_TYPE_OUTBOUND_PROOF_TYPE) {
            if (uaConfig.outboundProofType == 0) {
                return abi.encode(defaultAppConfig[_chainId].outboundProofType);
            }
            return abi.encode(uaConfig.outboundProofType);
        } else if (_configType == CONFIG_TYPE_OUTBOUND_BLOCK_CONFIRMATIONS) {
            if (uaConfig.outboundBlockConfirmations == 0) {
                return abi.encode(defaultAppConfig[_chainId].outboundBlockConfirmations);
            }
            return abi.encode(uaConfig.outboundBlockConfirmations);
        } else if (_configType == CONFIG_TYPE_ORACLE) {
            if (uaConfig.oracle == address(0x0)) {
                return abi.encode(defaultAppConfig[_chainId].oracle);
            }
            return abi.encode(uaConfig.oracle);
        } else {
            revert("LayerZero: Invalid config type");
        }
    }

    // returns the native fee the UA pays to cover fees
    function estimateFees(uint16 _chainId, address _ua, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParams) external view override returns (uint nativeFee, uint zroFee) {
        uint16 chainId = _chainId;
        address ua = _ua;
        uint payloadSize = _payload.length;
        bytes memory adapterParam = _adapterParams;

        ApplicationConfiguration memory uaConfig = getAppConfig(chainId, ua);

        // Relayer Fee
        uint relayerFee;
        {
            if (adapterParam.length == 0) {
                bytes memory defaultAdaptorParam = defaultAdapterParams[chainId][uaConfig.outboundProofType];
                relayerFee = ILayerZeroRelayer(uaConfig.relayer).getPrice(chainId, uaConfig.outboundProofType, ua, payloadSize, defaultAdaptorParam);
            } else {
                relayerFee = ILayerZeroRelayer(uaConfig.relayer).getPrice(chainId, uaConfig.outboundProofType, ua, payloadSize, adapterParam);
            }
        }

        // Oracle Fee
        uint oracleFee = ILayerZeroOracle(uaConfig.oracle).getPrice(chainId, uaConfig.outboundProofType);

        // LayerZero Fee
        {
            uint protocolFee = treasuryContract.getFees(_payInZRO, relayerFee, oracleFee);
            _payInZRO ? zroFee = protocolFee : nativeFee = protocolFee;
        }

        // return the sum of fees
        nativeFee = nativeFee.add(relayerFee).add(oracleFee);
    }

    //---------------------------------------------------------------------------
    // Claim Fees

    // universal withdraw ZRO token function
    function withdrawZRO(address _to, uint _amount) external override nonReentrant {
        require(msg.sender == address(treasuryContract), "LayerZero: only treasury");
        treasuryZROFees = treasuryZROFees.sub(_amount);
        layerZeroToken.safeTransfer(_to, _amount);
        emit WithdrawZRO(msg.sender, _to, _amount);
    }

    // universal withdraw native token function.
    // the source contract should perform all the authentication control
    // safemath overflow if the amount is not enough
    function withdrawNative(uint8 _type, address _owner, address payable _to, uint _amount) external override nonReentrant {
        if (_type == WITHDRAW_TYPE_TREASURY_PROTOCOL_FEES) {
            require(msg.sender == address(treasuryContract), "LayerZero:only treasury");
            treasuryNativeFees = treasuryNativeFees.sub(_amount);
        } else if (_type == WITHDRAW_TYPE_ORACLE_QUOTED_FEES) {
            oracleQuotedFees[msg.sender] = oracleQuotedFees[msg.sender].sub(_amount);
        } else if (_type == WITHDRAW_TYPE_RELAYER_QUOTED_FEES) {
            relayerQuotedFees[msg.sender] = relayerQuotedFees[msg.sender].sub(_amount);
        } else {
            revert("LayerZero: unsupported withdraw type");
        }

        (bool success, ) = _to.call{value: _amount}("");
        require(success, "LayerZero: withdraw failed");
        emit WithdrawNative(_type, _owner, msg.sender, _to, _amount);
    }

    //---------------------------------------------------------------------------
    // Owner calls, configuration only.
    function setLayerZeroToken(address _layerZeroToken) external onlyOwner {
        require(_layerZeroToken != address(0x0), "LayerZero: _layerZeroToken cannot be zero address");
        layerZeroToken = IERC20(_layerZeroToken);
        emit SetLayerZeroToken(_layerZeroToken);
    }

    function setTreasury(address _treasury) external onlyOwner {
        require(_treasury != address(0x0), "LayerZero: treasury cannot be zero address");
        treasuryContract = ILayerZeroTreasury(_treasury);
        emit SetTreasury(_treasury);
    }

    function addInboundProofLibraryForChain(uint16 _chainId, address _library) external onlyOwner {
        require(_library != address(0x0), "LayerZero: library cannot be zero address");
        require(maxInboundProofLibrary[_chainId] < 65535, "LayerZero: can not add new library");
        maxInboundProofLibrary[_chainId]++;
        inboundProofLibrary[_chainId][maxInboundProofLibrary[_chainId]] = _library;
        emit AddInboundProofLibraryForChain(_chainId, _library);
    }

    function enableSupportedOutboundProof(uint16 _chainId, uint16 _proofType) external onlyOwner {
        supportedOutboundProof[_chainId][_proofType] = true;
        emit EnableSupportedOutboundProof(_chainId, _proofType);
    }

    function setDefaultConfigForChainId(uint16 _chainId, uint16 _inboundProofLibraryVersion, uint64 _inboundBlockConfirmations, address _relayer, uint16 _outboundProofType, uint16 _outboundBlockConfirmations, address _oracle) external onlyOwner {
        require(_inboundProofLibraryVersion <= maxInboundProofLibrary[_chainId] && _inboundProofLibraryVersion > 0, "LayerZero: invalid inbound proof library version");
        require(_inboundBlockConfirmations > 0, "LayerZero: invalid inbound block confirmation");
        require(_relayer != address(0x0), "LayerZero: invalid relayer address");
        require(supportedOutboundProof[_chainId][_outboundProofType], "LayerZero: invalid outbound proof type");
        require(_outboundBlockConfirmations > 0, "LayerZero: invalid outbound block confirmation");
        require(_oracle != address(0x0), "LayerZero: invalid oracle address");
        defaultAppConfig[_chainId] = ApplicationConfiguration(_inboundProofLibraryVersion, _inboundBlockConfirmations, _relayer, _outboundProofType, _outboundBlockConfirmations, _oracle);
        emit SetDefaultConfigForChainId(_chainId, _inboundProofLibraryVersion, _inboundBlockConfirmations, _relayer, _outboundProofType, _outboundBlockConfirmations, _oracle);
    }

    function setDefaultAdapterParamsForChainId(uint16 _chainId, uint16 _proofType, bytes calldata _adapterParams) external onlyOwner {
        defaultAdapterParams[_chainId][_proofType] = _adapterParams;
        emit SetDefaultAdapterParamsForChainId(_chainId, _proofType, _adapterParams);
    }

    function setRemoteUln(uint16 _remoteChainId, bytes32 _remoteUln) external onlyOwner {
        require(ulnLookup[_remoteChainId] == bytes32(0), "LayerZero: remote uln already set");
        ulnLookup[_remoteChainId] = _remoteUln;
        emit SetRemoteUln(_remoteChainId, _remoteUln);
    }

    function setChainAddressSize(uint16 _chainId, uint _size) external onlyOwner {
        require(chainAddressSizeMap[_chainId] == 0, "LayerZero: remote chain address size already set");
        chainAddressSizeMap[_chainId] = _size;
        emit SetChainAddressSize(_chainId, _size);
    }

    //----------------------------------------------------------------------------------
    // view functions
    function getBlockHeaderData(address _oracle, uint16 _remoteChainId, bytes32 _lookupHash) external view returns (BlockData memory blockData) {
        return hashLookup[_oracle][_remoteChainId][_lookupHash];
    }

    function oracleQuotedAmount(address _oracle) external view override returns (uint) {
        return oracleQuotedFees[_oracle];
    }

    function relayerQuotedAmount(address _relayer) external view override returns (uint) {
        return relayerQuotedFees[_relayer];
    }
}

File 2 of 19 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.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 () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 3 of 19 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

File 4 of 19 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 5 of 19 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @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);
}

File 6 of 19 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

import "./IERC20.sol";
import "../../math/SafeMath.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 SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    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'
        // solhint-disable-next-line max-line-length
        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));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @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");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 7 of 19 : ILayerZeroValidationLibrary.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.7.0;
pragma abicoder v2;

import "./utility/LayerZeroPacket.sol";

interface ILayerZeroValidationLibrary {
    function validateProof(bytes32 blockData, bytes calldata _data, uint _remoteAddressSize) external returns (LayerZeroPacket.Packet memory packet);
}

File 8 of 19 : ILayerZeroMessagingLibrary.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.7.0;

import "./ILayerZeroUserApplicationConfig.sol";

interface ILayerZeroMessagingLibrary {
    // send(), messages will be inflight.
    function send(address _userApplication, uint64 _lastNonce, uint16 _chainId, bytes calldata _destination, bytes calldata _payload, address payable refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable;

    // estimate native fee at the send side
    function estimateFees(uint16 _chainId, address _userApplication, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParam) external view returns (uint nativeFee, uint zroFee);

    //---------------------------------------------------------------------------
    // setConfig / getConfig are User Application (UA) functions to specify Oracle, Relayer, blockConfirmations, libraryVersion
    function setConfig(uint16 _chainId, address _userApplication, uint _configType, bytes calldata _config) external;

    function getConfig(uint16 _chainId, address _userApplication, uint _configType) external view returns (bytes memory);
}

File 9 of 19 : ILayerZeroReceiver.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.5.0;

interface ILayerZeroReceiver {
    // @notice LayerZero endpoint will invoke this function to deliver the message on the destination
    // @param _srcChainId - the source endpoint identifier
    // @param _srcAddress - the source sending contract address from the source chain
    // @param _nonce - the ordered message nonce
    // @param _payload - the signed payload is the UA bytes has encoded to be sent
    function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) external;
}

File 10 of 19 : ILayerZeroRelayer.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.7.0;

interface ILayerZeroRelayer {
    // @notice query the relayer price for relaying the payload and its proof to the destination chain
    // @param _dstChainId - the destination endpoint identifier
    // @param _outboundProofType - the proof type identifier to specify proof to be relayed
    // @param _userApplication - the source sending contract address. relayers may apply price discrimination to user apps
    // @param _payloadSize - the length of the payload. it is an indicator of gas usage for relaying cross-chain messages
    // @param _adapterParams - optional parameters for extra service plugins, e.g. sending dust tokens at the destination chain
    function getPrice(uint16 _dstChainId, uint16 _outboundProofType, address _userApplication, uint _payloadSize, bytes calldata _adapterParams) external view returns (uint price);

    // @notice Ultra-Light Node notifies the Oracle of a new block information relaying request
    // @param _dstChainId - the destination endpoint identifier
    // @param _outboundProofType - the proof type identifier to specify the data to be relayed
    // @param _adapterParams - optional parameters for extra service plugins, e.g. sending dust tokens at the destination chain
    function notifyRelayer(uint16 _dstChainId, uint16 _outboundProofType, bytes calldata _adapterParams) external;

    // @notice query if the address is an approved actor for privileges like data submission and fee withdrawal etc.
    // @param _address - the address to be checked
    function isApproved(address _address) external view returns (bool approved);
}

File 11 of 19 : ILayerZeroTreasury.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.5.0;

interface ILayerZeroTreasury {
    function getFees(bool payInZro, uint relayerFee, uint oracleFee) external view returns (uint);
}

File 12 of 19 : ILayerZeroOracle.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.7.0;

interface ILayerZeroOracle {
    // @notice query the oracle price for relaying block information to the destination chain
    // @param _dstChainId the destination endpoint identifier
    // @param _outboundProofType the proof type identifier to specify the data to be relayed
    function getPrice(uint16 _dstChainId, uint16 _outboundProofType) external view returns (uint price);

    // @notice Ultra-Light Node notifies the Oracle of a new block information relaying request
    // @param _dstChainId the destination endpoint identifier
    // @param _outboundProofType the proof type identifier to specify the data to be relayed
    // @param _outboundBlockConfirmations the number of source chain block confirmation needed
    function notifyOracle(uint16 _dstChainId, uint16 _outboundProofType, uint64 _outboundBlockConfirmations) external;

    // @notice query if the address is an approved actor for privileges like data submission and fee withdrawal etc.
    // @param _address the address to be checked
    function isApproved(address _address) external view returns (bool approved);
}

File 13 of 19 : ILayerZeroUltraLightNodeV1.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.7.0;

interface ILayerZeroUltraLightNodeV1 {
    // a Relayer can execute the validateTransactionProof()
    function validateTransactionProof(uint16 _srcChainId, address _dstAddress, uint _gasLimit, bytes32 _lookupHash, bytes calldata _transactionProof) external;

    // an Oracle delivers the block data using updateHash()
    function updateHash(uint16 _remoteChainId, bytes32 _lookupHash, uint _confirmations, bytes32 _data) external;

    // can only withdraw the receivable of the msg.sender
    function withdrawNative(uint8 _type, address _owner, address payable _to, uint _amount) external;

    function withdrawZRO(address _to, uint _amount) external;

    // view functions
    function oracleQuotedAmount(address _oracle) external view returns (uint);

    function relayerQuotedAmount(address _relayer) external view returns (uint);
}

File 14 of 19 : ILayerZeroEndpoint.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.5.0;

import "./ILayerZeroUserApplicationConfig.sol";

interface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {
    // @notice send a LayerZero message to the specified address at a LayerZero endpoint.
    // @param _dstChainId - the destination chain identifier
    // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains
    // @param _payload - a custom bytes payload to send to the destination contract
    // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address
    // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction
    // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination
    function send(uint16 _dstChainId, bytes calldata _destination, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable;

    // @notice used by the messaging library to publish verified payload
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source contract (as bytes) at the source chain
    // @param _dstAddress - the address on destination chain
    // @param _nonce - the unbound message ordering nonce
    // @param _gasLimit - the gas limit for external contract execution
    // @param _payload - verified payload to send to the destination contract
    function receivePayload(uint16 _srcChainId, bytes calldata _srcAddress, address _dstAddress, uint64 _nonce, uint _gasLimit, bytes calldata _payload) external;

    // @notice get the inboundNonce of a receiver from a source chain which could be EVM or non-EVM chain
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);

    // @notice get the outboundNonce from this source chain which, consequently, is always an EVM
    // @param _srcAddress - the source chain contract address
    function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);

    // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery
    // @param _dstChainId - the destination chain identifier
    // @param _userApplication - the user app address on this EVM chain
    // @param _payload - the custom message to send over LayerZero
    // @param _payInZRO - if false, user app pays the protocol fee in native token
    // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain
    function estimateFees(uint16 _dstChainId, address _userApplication, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParam) external view returns (uint nativeFee, uint zroFee);

    // @notice get this Endpoint's immutable source identifier
    function getChainId() external view returns (uint16);

    // @notice the interface to retry failed message on this Endpoint destination
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    // @param _payload - the payload to be retried
    function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external;

    // @notice query if any STORED payload (message blocking) at the endpoint.
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);

    // @notice query if the _libraryAddress is valid for sending msgs.
    // @param _userApplication - the user app address on this EVM chain
    function getSendLibraryAddress(address _userApplication) external view returns (address);

    // @notice query if the _libraryAddress is valid for receiving msgs.
    // @param _userApplication - the user app address on this EVM chain
    function getReceiveLibraryAddress(address _userApplication) external view returns (address);

    // @notice query if the non-reentrancy guard for send() is on
    // @return true if the guard is on. false otherwise
    function isSendingPayload() external view returns (bool);

    // @notice query if the non-reentrancy guard for receive() is on
    // @return true if the guard is on. false otherwise
    function isReceivingPayload() external view returns (bool);

    // @notice get the configuration of the LayerZero messaging library of the specified version
    // @param _version - messaging library version
    // @param _chainId - the chainId for the pending config change
    // @param _userApplication - the contract address of the user application
    // @param _configType - type of configuration. every messaging library has its own convention.
    function getConfig(uint16 _version, uint16 _chainId, address _userApplication, uint _configType) external view returns (bytes memory);

    // @notice get the send() LayerZero messaging library version
    // @param _userApplication - the contract address of the user application
    function getSendVersion(address _userApplication) external view returns (uint16);

    // @notice get the lzReceive() LayerZero messaging library version
    // @param _userApplication - the contract address of the user application
    function getReceiveVersion(address _userApplication) external view returns (uint16);
}

File 15 of 19 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 GSN 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 payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 16 of 19 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 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://diligence.consensys.net/posts/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.5.11/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");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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 functionCall(target, data, "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");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(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) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(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) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // 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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 17 of 19 : LayerZeroPacket.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.7.6;

import "@openzeppelin/contracts/math/SafeMath.sol";
import "./Buffer.sol";

library LayerZeroPacket {
    using Buffer for Buffer.buffer;
    using SafeMath for uint;

    //---------------------------------------------------------------------------
    // packet
    struct Packet {
        uint16 srcChainId;
        uint16 dstChainId;
        uint64 nonce;
        address dstAddress;
        bytes srcAddress;
        bytes32 ulnAddress;
        bytes payload;
    }

    function getPacket(bytes memory data, uint16 srcChain, uint sizeOfSrcAddress, bytes32 ulnAddress) internal pure returns (Packet memory) {
        uint16 dstChainId;
        address dstAddress;
        uint size;
        uint64 nonce;

        // The log consists of the destination chain id and then a bytes payload
        //      0--------------------------------------------31
        // 0   |  destination chain id
        // 32  |  defines bytes array
        // 64  |
        // 96  |  bytes array size
        // 128 |  payload
        assembly {
            dstChainId := mload(add(data, 32))
            size := mload(add(data, 96)) /// size of the byte array
            nonce := mload(add(data, 104)) // offset to convert to uint64  128  is index -24
            dstAddress := mload(add(data, sub(add(128, sizeOfSrcAddress), 4))) // offset to convert to address 12 -8
        }

        Buffer.buffer memory srcAddressBuffer;
        srcAddressBuffer.init(sizeOfSrcAddress);
        srcAddressBuffer.writeRawBytes(0, data, 136, sizeOfSrcAddress); // 128 + 8

        uint payloadSize = size.sub(20).sub(sizeOfSrcAddress);
        Buffer.buffer memory payloadBuffer;
        payloadBuffer.init(payloadSize);
        payloadBuffer.writeRawBytes(0, data, sizeOfSrcAddress.add(156), payloadSize); // 148 + 8
        return Packet(srcChain, dstChainId, nonce, address(dstAddress), srcAddressBuffer.buf, ulnAddress, payloadBuffer.buf);
    }
}

File 18 of 19 : Buffer.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.7.0;

/**
 * @dev A library for working with mutable byte buffers in Solidity.
 *
 * Byte buffers are mutable and expandable, and provide a variety of primitives
 * for writing to them. At any time you can fetch a bytes object containing the
 * current contents of the buffer. The bytes object should not be stored between
 * operations, as it may change due to resizing of the buffer.
 */
library Buffer {
    /**
     * @dev Represents a mutable buffer. Buffers have a current value (buf) and
     *      a capacity. The capacity may be longer than the current value, in
     *      which case it can be extended without the need to allocate more memory.
     */
    struct buffer {
        bytes buf;
        uint capacity;
    }

    /**
     * @dev Initializes a buffer with an initial capacity.a co
     * @param buf The buffer to initialize.
     * @param capacity The number of bytes of space to allocate the buffer.
     * @return The buffer, for chaining.
     */
    function init(buffer memory buf, uint capacity) internal pure returns (buffer memory) {
        if (capacity % 32 != 0) {
            capacity += 32 - (capacity % 32);
        }
        // Allocate space for the buffer data
        buf.capacity = capacity;
        assembly {
            let ptr := mload(0x40)
            mstore(buf, ptr)
            mstore(ptr, 0)
            mstore(0x40, add(32, add(ptr, capacity)))
        }
        return buf;
    }

    /**
     * @dev Initializes a new buffer from an existing bytes object.
     *      Changes to the buffer may mutate the original value.
     * @param b The bytes object to initialize the buffer with.
     * @return A new buffer.
     */
    function fromBytes(bytes memory b) internal pure returns (buffer memory) {
        buffer memory buf;
        buf.buf = b;
        buf.capacity = b.length;
        return buf;
    }

    function resize(buffer memory buf, uint capacity) private pure {
        bytes memory oldbuf = buf.buf;
        init(buf, capacity);
        append(buf, oldbuf);
    }

    function max(uint a, uint b) private pure returns (uint) {
        if (a > b) {
            return a;
        }
        return b;
    }

    /**
     * @dev Sets buffer length to 0.
     * @param buf The buffer to truncate.
     * @return The original buffer, for chaining..
     */
    function truncate(buffer memory buf) internal pure returns (buffer memory) {
        assembly {
            let bufptr := mload(buf)
            mstore(bufptr, 0)
        }
        return buf;
    }

    /**
     * @dev Writes a byte string to a buffer. Resizes if doing so would exceed
     *      the capacity of the buffer.
     * @param buf The buffer to append to.
     * @param off The start offset to write to.
     * @param data The data to append.
     * @param len The number of bytes to copy.
     * @return The original buffer, for chaining.
     */
    function write(buffer memory buf, uint off, bytes memory data, uint len) internal pure returns (buffer memory) {
        require(len <= data.length);

        if (off + len > buf.capacity) {
            resize(buf, max(buf.capacity, len + off) * 2);
        }

        uint dest;
        uint src;
        assembly {
            // Memory address of the buffer data
            let bufptr := mload(buf)
            // Length of existing buffer data
            let buflen := mload(bufptr)
            // Start address = buffer address + offset + sizeof(buffer length)
            dest := add(add(bufptr, 32), off)
            // Update buffer length if we're extending it
            if gt(add(len, off), buflen) {
                mstore(bufptr, add(len, off))
            }
            src := add(data, 32)
        }

        // Copy word-length chunks while possible
        for (; len >= 32; len -= 32) {
            assembly {
                mstore(dest, mload(src))
            }
            dest += 32;
            src += 32;
        }

        // Copy remaining bytes
        uint mask = 256**(32 - len) - 1;
        assembly {
            let srcpart := and(mload(src), not(mask))
            let destpart := and(mload(dest), mask)
            mstore(dest, or(destpart, srcpart))
        }

        return buf;
    }

    /**
     * @dev Writes a byte string to a buffer. Resizes if doing so would exceed
     *      the capacity of the buffer.
     * @param buf The buffer to append to.
     * @param off The start offset to write to.
     * @param rawData The data to append.
     * @param len The number of bytes to copy.
     * @return The original buffer, for chaining.
     */
    function writeRawBytes(buffer memory buf, uint off, bytes memory rawData, uint offData, uint len) internal pure returns (buffer memory) {
        if (off + len > buf.capacity) {
            resize(buf, max(buf.capacity, len + off) * 2);
        }

        uint dest;
        uint src;
        assembly {
            // Memory address of the buffer data
            let bufptr := mload(buf)
            // Length of existing buffer data
            let buflen := mload(bufptr)
            // Start address = buffer address + offset + sizeof(buffer length)
            dest := add(add(bufptr, 32), off)
            // Update buffer length if we're extending it
            if gt(add(len, off), buflen) {
                mstore(bufptr, add(len, off))
            }
            src := add(rawData, offData)
        }

        // Copy word-length chunks while possible
        for (; len >= 32; len -= 32) {
            assembly {
                mstore(dest, mload(src))
            }
            dest += 32;
            src += 32;
        }

        // Copy remaining bytes
        uint mask = 256**(32 - len) - 1;
        assembly {
            let srcpart := and(mload(src), not(mask))
            let destpart := and(mload(dest), mask)
            mstore(dest, or(destpart, srcpart))
        }

        return buf;
    }

    /**
     * @dev Appends a byte string to a buffer. Resizes if doing so would exceed
     *      the capacity of the buffer.
     * @param buf The buffer to append to.
     * @param data The data to append.
     * @param len The number of bytes to copy.
     * @return The original buffer, for chaining.
     */
    function append(buffer memory buf, bytes memory data, uint len) internal pure returns (buffer memory) {
        return write(buf, buf.buf.length, data, len);
    }

    /**
     * @dev Appends a byte string to a buffer. Resizes if doing so would exceed
     *      the capacity of the buffer.
     * @param buf The buffer to append to.
     * @param data The data to append.
     * @return The original buffer, for chaining.
     */
    function append(buffer memory buf, bytes memory data) internal pure returns (buffer memory) {
        return write(buf, buf.buf.length, data, data.length);
    }

    /**
     * @dev Writes a byte to the buffer. Resizes if doing so would exceed the
     *      capacity of the buffer.
     * @param buf The buffer to append to.
     * @param off The offset to write the byte at.
     * @param data The data to append.
     * @return The original buffer, for chaining.
     */
    function writeUint8(buffer memory buf, uint off, uint8 data) internal pure returns (buffer memory) {
        if (off >= buf.capacity) {
            resize(buf, buf.capacity * 2);
        }

        assembly {
            // Memory address of the buffer data
            let bufptr := mload(buf)
            // Length of existing buffer data
            let buflen := mload(bufptr)
            // Address = buffer address + sizeof(buffer length) + off
            let dest := add(add(bufptr, off), 32)
            mstore8(dest, data)
            // Update buffer length if we extended it
            if eq(off, buflen) {
                mstore(bufptr, add(buflen, 1))
            }
        }
        return buf;
    }

    /**
     * @dev Appends a byte to the buffer. Resizes if doing so would exceed the
     *      capacity of the buffer.
     * @param buf The buffer to append to.
     * @param data The data to append.
     * @return The original buffer, for chaining.
     */
    function appendUint8(buffer memory buf, uint8 data) internal pure returns (buffer memory) {
        return writeUint8(buf, buf.buf.length, data);
    }

    /**
     * @dev Writes up to 32 bytes to the buffer. Resizes if doing so would
     *      exceed the capacity of the buffer.
     * @param buf The buffer to append to.
     * @param off The offset to write at.
     * @param data The data to append.
     * @param len The number of bytes to write (left-aligned).
     * @return The original buffer, for chaining.
     */
    function write(buffer memory buf, uint off, bytes32 data, uint len) private pure returns (buffer memory) {
        if (len + off > buf.capacity) {
            resize(buf, (len + off) * 2);
        }

        uint mask = 256**len - 1;
        // Right-align data
        data = data >> (8 * (32 - len));
        assembly {
            // Memory address of the buffer data
            let bufptr := mload(buf)
            // Address = buffer address + sizeof(buffer length) + off + len
            let dest := add(add(bufptr, off), len)
            mstore(dest, or(and(mload(dest), not(mask)), data))
            // Update buffer length if we extended it
            if gt(add(off, len), mload(bufptr)) {
                mstore(bufptr, add(off, len))
            }
        }
        return buf;
    }

    /**
     * @dev Writes a bytes20 to the buffer. Resizes if doing so would exceed the
     *      capacity of the buffer.
     * @param buf The buffer to append to.
     * @param off The offset to write at.
     * @param data The data to append.
     * @return The original buffer, for chaining.
     */
    function writeBytes20(buffer memory buf, uint off, bytes20 data) internal pure returns (buffer memory) {
        return write(buf, off, bytes32(data), 20);
    }

    /**
     * @dev Appends a bytes20 to the buffer. Resizes if doing so would exceed
     *      the capacity of the buffer.
     * @param buf The buffer to append to.
     * @param data The data to append.
     * @return The original buffer, for chhaining.
     */
    function appendBytes20(buffer memory buf, bytes20 data) internal pure returns (buffer memory) {
        return write(buf, buf.buf.length, bytes32(data), 20);
    }

    function appendBytes8(buffer memory buf, bytes8 data) internal pure returns (buffer memory) {
        return write(buf, buf.buf.length, bytes32(data), 8);
    }

    /**
     * @dev Appends a bytes32 to the buffer. Resizes if doing so would exceed
     *      the capacity of the buffer.
     * @param buf The buffer to append to.
     * @param data The data to append.
     * @return The original buffer, for chaining.
     */
    function appendBytes32(buffer memory buf, bytes32 data) internal pure returns (buffer memory) {
        return write(buf, buf.buf.length, data, 32);
    }

    /**
     * @dev Writes an integer to the buffer. Resizes if doing so would exceed
     *      the capacity of the buffer.
     * @param buf The buffer to append to.
     * @param off The offset to write at.
     * @param data The data to append.
     * @param len The number of bytes to write (right-aligned).
     * @return The original buffer, for chaining.
     */
    function writeInt(buffer memory buf, uint off, uint data, uint len) private pure returns (buffer memory) {
        if (len + off > buf.capacity) {
            resize(buf, (len + off) * 2);
        }

        uint mask = 256**len - 1;
        assembly {
            // Memory address of the buffer data
            let bufptr := mload(buf)
            // Address = buffer address + off + sizeof(buffer length) + len
            let dest := add(add(bufptr, off), len)
            mstore(dest, or(and(mload(dest), not(mask)), data))
            // Update buffer length if we extended it
            if gt(add(off, len), mload(bufptr)) {
                mstore(bufptr, add(off, len))
            }
        }
        return buf;
    }

    /**
     * @dev Appends a byte to the end of the buffer. Resizes if doing so would
     * exceed the capacity of the buffer.
     * @param buf The buffer to append to.
     * @param data The data to append.
     * @return The original buffer.
     */
    function appendInt(buffer memory buf, uint data, uint len) internal pure returns (buffer memory) {
        return writeInt(buf, buf.buf.length, data, len);
    }
}

File 19 of 19 : ILayerZeroUserApplicationConfig.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.5.0;

interface ILayerZeroUserApplicationConfig {
    // @notice set the configuration of the LayerZero messaging library of the specified version
    // @param _version - messaging library version
    // @param _chainId - the chainId for the pending config change
    // @param _configType - type of configuration. every messaging library has its own convention.
    // @param _config - configuration in the bytes. can encode arbitrary content.
    function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external;

    // @notice set the send() LayerZero messaging library version to _version
    // @param _version - new messaging library version
    function setSendVersion(uint16 _version) external;

    // @notice set the lzReceive() LayerZero messaging library version to _version
    // @param _version - new messaging library version
    function setReceiveVersion(uint16 _version) external;

    // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload
    // @param _srcChainId - the chainId of the source chain
    // @param _srcAddress - the contract address of the source contract at the source chain
    function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_endpoint","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"chainId","type":"uint16"},{"indexed":false,"internalType":"address","name":"lib","type":"address"}],"name":"AddInboundProofLibraryForChain","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"userApplication","type":"address"},{"indexed":false,"internalType":"uint256","name":"configType","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"newConfig","type":"bytes"}],"name":"AppConfigUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"chainId","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"proofType","type":"uint16"}],"name":"EnableSupportedOutboundProof","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"srcChainId","type":"uint16"},{"indexed":false,"internalType":"address","name":"oracle","type":"address"},{"indexed":false,"internalType":"uint256","name":"confirmations","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"blockhash","type":"bytes32"}],"name":"HashReceived","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":"uint16","name":"chainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"payload","type":"bytes"}],"name":"Packet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"chainId","type":"uint16"},{"indexed":false,"internalType":"uint64","name":"nonce","type":"uint64"},{"indexed":false,"internalType":"uint16","name":"outboundProofType","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"adapterParams","type":"bytes"}],"name":"RelayerParams","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"chainId","type":"uint16"},{"indexed":false,"internalType":"uint256","name":"size","type":"uint256"}],"name":"SetChainAddressSize","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"chainId","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"proofType","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"adapterParams","type":"bytes"}],"name":"SetDefaultAdapterParamsForChainId","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"chainId","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"inboundProofLib","type":"uint16"},{"indexed":false,"internalType":"uint64","name":"inboundBlockConfirm","type":"uint64"},{"indexed":false,"internalType":"address","name":"relayer","type":"address"},{"indexed":false,"internalType":"uint16","name":"outboundProofType","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"outboundBlockConfirm","type":"uint16"},{"indexed":false,"internalType":"address","name":"oracle","type":"address"}],"name":"SetDefaultConfigForChainId","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"}],"name":"SetLayerZeroToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"relayerFeeContract","type":"address"}],"name":"SetRelayerFeeContract","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"chainId","type":"uint16"},{"indexed":false,"internalType":"bytes32","name":"uln","type":"bytes32"}],"name":"SetRemoteUln","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"treasuryAddress","type":"address"}],"name":"SetTreasury","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"_type","type":"uint8"},{"indexed":false,"internalType":"address","name":"_owner","type":"address"},{"indexed":false,"internalType":"address","name":"_msgSender","type":"address"},{"indexed":false,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"WithdrawNative","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_msgSender","type":"address"},{"indexed":false,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"WithdrawZRO","type":"event"},{"inputs":[],"name":"BP_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CONFIG_TYPE_INBOUND_BLOCK_CONFIRMATIONS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CONFIG_TYPE_INBOUND_PROOF_LIBRARY_VERSION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CONFIG_TYPE_ORACLE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CONFIG_TYPE_OUTBOUND_BLOCK_CONFIRMATIONS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CONFIG_TYPE_OUTBOUND_PROOF_TYPE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CONFIG_TYPE_RELAYER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAW_TYPE_ORACLE_QUOTED_FEES","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAW_TYPE_RELAYER_QUOTED_FEES","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAW_TYPE_TREASURY_PROTOCOL_FEES","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"address","name":"_library","type":"address"}],"name":"addInboundProofLibraryForChain","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint16","name":"","type":"uint16"}],"name":"appConfig","outputs":[{"internalType":"uint16","name":"inboundProofLibraryVersion","type":"uint16"},{"internalType":"uint64","name":"inboundBlockConfirmations","type":"uint64"},{"internalType":"address","name":"relayer","type":"address"},{"internalType":"uint16","name":"outboundProofType","type":"uint16"},{"internalType":"uint64","name":"outboundBlockConfirmations","type":"uint64"},{"internalType":"address","name":"oracle","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"chainAddressSizeMap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"uint16","name":"","type":"uint16"}],"name":"defaultAdapterParams","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"defaultAppConfig","outputs":[{"internalType":"uint16","name":"inboundProofLibraryVersion","type":"uint16"},{"internalType":"uint64","name":"inboundBlockConfirmations","type":"uint64"},{"internalType":"address","name":"relayer","type":"address"},{"internalType":"uint16","name":"outboundProofType","type":"uint16"},{"internalType":"uint64","name":"outboundBlockConfirmations","type":"uint64"},{"internalType":"address","name":"oracle","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"uint16","name":"_proofType","type":"uint16"}],"name":"enableSupportedOutboundProof","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endpoint","outputs":[{"internalType":"contract ILayerZeroEndpoint","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"address","name":"_ua","type":"address"},{"internalType":"bytes","name":"_payload","type":"bytes"},{"internalType":"bool","name":"_payInZRO","type":"bool"},{"internalType":"bytes","name":"_adapterParams","type":"bytes"}],"name":"estimateFees","outputs":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"zroFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"address","name":"userApplicationAddress","type":"address"}],"name":"getAppConfig","outputs":[{"components":[{"internalType":"uint16","name":"inboundProofLibraryVersion","type":"uint16"},{"internalType":"uint64","name":"inboundBlockConfirmations","type":"uint64"},{"internalType":"address","name":"relayer","type":"address"},{"internalType":"uint16","name":"outboundProofType","type":"uint16"},{"internalType":"uint64","name":"outboundBlockConfirmations","type":"uint64"},{"internalType":"address","name":"oracle","type":"address"}],"internalType":"struct UltraLightNode.ApplicationConfiguration","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oracle","type":"address"},{"internalType":"uint16","name":"_remoteChainId","type":"uint16"},{"internalType":"bytes32","name":"_lookupHash","type":"bytes32"}],"name":"getBlockHeaderData","outputs":[{"components":[{"internalType":"uint256","name":"confirmations","type":"uint256"},{"internalType":"bytes32","name":"data","type":"bytes32"}],"internalType":"struct UltraLightNode.BlockData","name":"blockData","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"address","name":"userApplicationAddress","type":"address"},{"internalType":"uint256","name":"_configType","type":"uint256"}],"name":"getConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"hashLookup","outputs":[{"internalType":"uint256","name":"confirmations","type":"uint256"},{"internalType":"bytes32","name":"data","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"uint16","name":"","type":"uint16"}],"name":"inboundProofLibrary","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"layerZeroToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"maxInboundProofLibrary","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oracle","type":"address"}],"name":"oracleQuotedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"oracleQuotedFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_relayer","type":"address"}],"name":"relayerQuotedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"relayerQuotedFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_ua","type":"address"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"bytes","name":"_destination","type":"bytes"},{"internalType":"bytes","name":"_payload","type":"bytes"},{"internalType":"address payable","name":"_refundAddress","type":"address"},{"internalType":"address","name":"_zroPaymentAddress","type":"address"},{"internalType":"bytes","name":"_adapterParams","type":"bytes"}],"name":"send","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"uint256","name":"_size","type":"uint256"}],"name":"setChainAddressSize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"chainId","type":"uint16"},{"internalType":"address","name":"_ua","type":"address"},{"internalType":"uint256","name":"_configType","type":"uint256"},{"internalType":"bytes","name":"_config","type":"bytes"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"uint16","name":"_proofType","type":"uint16"},{"internalType":"bytes","name":"_adapterParams","type":"bytes"}],"name":"setDefaultAdapterParamsForChainId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"uint16","name":"_inboundProofLibraryVersion","type":"uint16"},{"internalType":"uint64","name":"_inboundBlockConfirmations","type":"uint64"},{"internalType":"address","name":"_relayer","type":"address"},{"internalType":"uint16","name":"_outboundProofType","type":"uint16"},{"internalType":"uint16","name":"_outboundBlockConfirmations","type":"uint16"},{"internalType":"address","name":"_oracle","type":"address"}],"name":"setDefaultConfigForChainId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_layerZeroToken","type":"address"}],"name":"setLayerZeroToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_remoteChainId","type":"uint16"},{"internalType":"bytes32","name":"_remoteUln","type":"bytes32"}],"name":"setRemoteUln","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"uint16","name":"","type":"uint16"}],"name":"supportedOutboundProof","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryContract","outputs":[{"internalType":"contract ILayerZeroTreasury","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasuryNativeFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasuryZROFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"ulnLookup","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes32","name":"_lookupHash","type":"bytes32"},{"internalType":"uint256","name":"_confirmations","type":"uint256"},{"internalType":"bytes32","name":"_data","type":"bytes32"}],"name":"updateHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"address","name":"_dstAddress","type":"address"},{"internalType":"uint256","name":"_gasLimit","type":"uint256"},{"internalType":"bytes32","name":"_lookupHash","type":"bytes32"},{"internalType":"bytes","name":"_transactionProof","type":"bytes"}],"name":"validateTransactionProof","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_type","type":"uint8"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address payable","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawNative","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawZRO","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a06040523480156200001157600080fd5b50604051620058d0380380620058d08339810160408190526200003491620000df565b6001600090815562000045620000db565b600180546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600160a01b038116620000c55760405162461bcd60e51b8152600401620000bc906200010f565b60405180910390fd5b60601b6001600160601b03191660805262000159565b3390565b600060208284031215620000f1578081fd5b81516001600160a01b038116811462000108578182fd5b9392505050565b6020808252602a908201527f4c617965725a65726f3a20656e64706f696e742063616e6e6f74206265207a65604082015269726f206164647265737360b01b606082015260800190565b60805160601c61574a62000186600039806114cc5280612591528061260b52806135a7525061574a6000f3fe60806040526004361061031e5760003560e01c80638317814a116101a5578063d56bc64b116100ec578063ebfa08e911610095578063f2fde38b1161006f578063f2fde38b146108a4578063f47a5feb146108c4578063f8e1734c146108d9578063f9dd8e0f146108f95761031e565b8063ebfa08e914610837578063ed28580a14610864578063f0f44260146108845761031e565b8063e6108a82116100c6578063e6108a82146107d7578063ea216c21146107f7578063eb0d4c31146108175761031e565b8063d56bc64b14610777578063db00719b14610797578063ddfdef5a146107b75761031e565b8063a183608c1161014e578063b77d22ad11610128578063b77d22ad14610708578063b8e7e3e01461071d578063d543c7741461074a5761031e565b8063a183608c146106a6578063a4662222146106c6578063abe685cd146106f35761031e565b80638da5cb5b1161017f5780638da5cb5b1461065c578063904d3b8d14610671578063959f5943146106865761031e565b80638317814a146105fc5780638525b7111461061c57806387078f9f1461063c5761031e565b80634d0ca1b4116102695780635e280f1111610212578063715018a6116101ec578063715018a6146105b25780638140666e146105c75780638207f79d146105dc5761031e565b80635e280f111461055d57806361aa19da14610572578063704316e5146105925761031e565b806352d3b5001161024357806352d3b500146105085780635b5a2678146105285780635c0115311461053d5761031e565b80634d0ca1b4146104c05780634d3a0f7c146104d557806352d2871f146104e85761031e565b80632cfacb06116102cb57806331bd2430116102a557806331bd24301461046857806340a7bb101461047d57806349148c37146104ab5761031e565b80632cfacb06146103ff5780632e9959ec146104145780632f813464146104365761031e565b806318da0011116102fc57806318da00111461039d57806322c10776146103b25780632a819bbf146103d25761031e565b806302e72c631461032357806307b9ca7c14610359578063096607f81461037b575b600080fd5b34801561032f57600080fd5b5061034361033e366004614072565b61090e565b60405161035091906148c8565b60405180910390f35b34801561036557600080fd5b5061036e610920565b6040516103509190614813565b34801561038757600080fd5b5061039b6103963660046145e2565b61093c565b005b3480156103a957600080fd5b5061036e610d24565b3480156103be57600080fd5b5061039b6103cd3660046146ab565b610d40565b3480156103de57600080fd5b506103f26103ed366004614562565b610f53565b60405161035091906148fc565b34801561040b57600080fd5b50610343611015565b34801561042057600080fd5b5061042961101a565b60405161035091906155b5565b34801561044257600080fd5b506104566104513660046142fd565b61101f565b60405161035096959493929190615504565b34801561047457600080fd5b506103436110b0565b34801561048957600080fd5b5061049d610498366004614346565b6110b5565b604051610350929190615592565b3480156104b757600080fd5b506103436114c0565b3480156104cc57600080fd5b506104296114c5565b61039b6104e3366004614131565b6114ca565b3480156104f457600080fd5b506103f26105033660046143f1565b611de2565b34801561051457600080fd5b5061039b610523366004614072565b6121a5565b34801561053457600080fd5b506103436122e1565b34801561054957600080fd5b5061039b610558366004614420565b6122e7565b34801561056957600080fd5b5061036e612609565b34801561057e57600080fd5b5061034361058d366004614072565b61262d565b34801561059e57600080fd5b5061039b6105ad366004614528565b612659565b3480156105be57600080fd5b5061039b6126ee565b3480156105d357600080fd5b506103436127eb565b3480156105e857600080fd5b5061039b6105f7366004614319565b6127f0565b34801561060857600080fd5b5061039b61061736600461457f565b6129bc565b34801561062857600080fd5b5061039b610637366004614106565b612ab9565b34801561064857600080fd5b5061039b61065736600461450b565b612bc5565b34801561066857600080fd5b5061036e612ccc565b34801561067d57600080fd5b50610343612ce8565b34801561069257600080fd5b506103436106a13660046142fd565b612ced565b3480156106b257600080fd5b506103436106c1366004614072565b612cff565b3480156106d257600080fd5b506106e66106e1366004614319565b612d11565b60405161035091906151d4565b3480156106ff57600080fd5b50610343612f20565b34801561071457600080fd5b5061034361101a565b34801561072957600080fd5b5061073d6107383660046142fd565b612f26565b6040516103509190615264565b34801561075657600080fd5b5061076a610765366004614562565b612f3c565b60405161035091906148a5565b34801561078357600080fd5b5061049d6107923660046140c6565b612f5c565b3480156107a357600080fd5b5061036e6107b2366004614562565b612f86565b3480156107c357600080fd5b506104566107d236600461408e565b612fb9565b3480156107e357600080fd5b506103436107f2366004614072565b613055565b34801561080357600080fd5b506103436108123660046142fd565b61307d565b34801561082357600080fd5b5061039b610832366004614562565b61308f565b34801561084357600080fd5b506108576108523660046140c6565b613198565b604051610350919061524d565b34801561087057600080fd5b5061039b61087f36600461450b565b6131f9565b34801561089057600080fd5b5061039b61089f366004614072565b613300565b3480156108b057600080fd5b5061039b6108bf366004614072565b613431565b3480156108d057600080fd5b5061034361359f565b3480156108e557600080fd5b5061039b6108f436600461449a565b6135a5565b34801561090557600080fd5b506104296114c0565b60056020526000908152604090205481565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b610944613939565b73ffffffffffffffffffffffffffffffffffffffff16610962612ccc565b73ffffffffffffffffffffffffffffffffffffffff16146109ca576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61ffff8088166000908152600c60205260409020548116908716118015906109f6575060008661ffff16115b610a1b5760405162461bcd60e51b8152600401610a1290614dfb565b60405180910390fd5b60008567ffffffffffffffff1611610a455760405162461bcd60e51b8152600401610a129061511a565b73ffffffffffffffffffffffffffffffffffffffff8416610a785760405162461bcd60e51b8152600401610a1290614acb565b61ffff8088166000908152600d602090815260408083209387168352929052205460ff16610ab85760405162461bcd60e51b8152600401610a129061490f565b60008261ffff1611610adc5760405162461bcd60e51b8152600401610a1290614fa6565b73ffffffffffffffffffffffffffffffffffffffff8116610b0f5760405162461bcd60e51b8152600401610a1290614c19565b6040518060c001604052808761ffff1681526020018667ffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018461ffff1681526020018361ffff1667ffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff16815250600960008961ffff1661ffff16815260200190815260200160002060008201518160000160006101000a81548161ffff021916908361ffff16021790555060208201518160000160026101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550604082015181600001600a6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606082015181600001601e6101000a81548161ffff021916908361ffff16021790555060808201518160010160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060a08201518160010160086101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509050507f45bb8a2b6b05457ff80b84be5bf06f2d05069fa8099fcb9d8e34149654b4d5c287878787878787604051610d1397969594939291906154a7565b60405180910390a150505050505050565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60026000541415610d98576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260005560ff8416610df15760035473ffffffffffffffffffffffffffffffffffffffff163314610ddc5760405162461bcd60e51b8152600401610a1290614dc4565b600654610de9908261393d565b600655610e7f565b60ff841660011415610e2c5733600090815260046020526040902054610e17908261393d565b33600090815260046020526040902055610e7f565b60ff841660021415610e675733600090815260056020526040902054610e52908261393d565b33600090815260056020526040902055610e7f565b60405162461bcd60e51b8152600401610a1290615003565b60008273ffffffffffffffffffffffffffffffffffffffff1682604051610ea590614792565b60006040518083038185875af1925050503d8060008114610ee2576040519150601f19603f3d011682016040523d82523d6000602084013e610ee7565b606091505b5050905080610f085760405162461bcd60e51b8152600401610a12906149da565b7f163adce0473e267e1db8ecb524c0fcdceda62c3e6f231966bbb252e0104325378585338686604051610f3f9594939291906155c3565b60405180910390a150506001600055505050565b600a6020908152600092835260408084208252918352918190208054825160026001831615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190921691909104601f81018590048502820185019093528281529290919083018282801561100d5780601f10610fe25761010080835404028352916020019161100d565b820191906000526020600020905b815481529060010190602001808311610ff057829003601f168201915b505050505081565b600381565b600181565b6009602052600090815260409020805460019091015461ffff8083169267ffffffffffffffff62010000820481169373ffffffffffffffffffffffffffffffffffffffff6a010000000000000000000084048116947e010000000000000000000000000000000000000000000000000000000000009094049093169291811691680100000000000000009091041686565b600681565b604080516020601f840181900481028201810190925282815260009182918a918a918991859190899089908190840183828082843760009201829052509394506111059250879150869050612d11565b905060008251600014156112825761ffff8681166000908152600a60209081526040808320606087015190941683529281528282208054845160026001831615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190921691909104601f8101849004840282018401909552848152929390918301828280156111da5780601f106111af576101008083540402835291602001916111da565b820191906000526020600020905b8154815290600101906020018083116111bd57829003601f168201915b50505050509050826040015173ffffffffffffffffffffffffffffffffffffffff1663e54a22158885606001518989866040518663ffffffff1660e01b815260040161122a9594939291906153de565b60206040518083038186803b15801561124257600080fd5b505afa158015611256573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127a9190614677565b91505061131e565b816040015173ffffffffffffffffffffffffffffffffffffffff1663e54a22158784606001518888886040518663ffffffff1660e01b81526004016112cb9594939291906153de565b60206040518083038186803b1580156112e357600080fd5b505afa1580156112f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131b9190614677565b90505b60a082015160608301516040517f0b4d510700000000000000000000000000000000000000000000000000000000815260009273ffffffffffffffffffffffffffffffffffffffff1691630b4d51079161137c918b91600401615373565b60206040518083038186803b15801561139457600080fd5b505afa1580156113a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113cc9190614677565b90506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635cbbbd758e85856040518463ffffffff1660e01b815260040161142f939291906148b0565b60206040518083038186803b15801561144757600080fd5b505afa15801561145b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061147f9190614677565b90508c61148f5780995089611494565b809850885b506114ab9050816114a58b8561399a565b9061399a565b98505050505050505097509795505050505050565b600281565b600081565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16331461151f5760405162461bcd60e51b8152600401610a1290614f6f565b600061152b8a8d612d11565b61ffff8b166000908152601060205260409020549091508c908c908c906115645760405162461bcd60e51b8152600401610a1290614bbc565b6000808560a0015173ffffffffffffffffffffffffffffffffffffffff16630b4d51078488606001516040518363ffffffff1660e01b81526004016115aa929190615373565b60206040518083038186803b1580156115c257600080fd5b505afa1580156115d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115fa9190614677565b60a087015173ffffffffffffffffffffffffffffffffffffffff16600090815260046020526040902054909150611631908261399a565b60a087015173ffffffffffffffffffffffffffffffffffffffff1660009081526004602052604090819020919091558601518b908861187b5761ffff8581166000908152600a6020908152604080832060608d015190941683529281528282208054845160026001831615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190921691909104601f8101849004840282018401909552848152929390918301828280156117315780601f1061170657610100808354040283529160200191611731565b820191906000526020600020905b81548152906001019060200180831161171457829003601f168201915b5050505060608b01516040517fe54a221500000000000000000000000000000000000000000000000000000000815292935073ffffffffffffffffffffffffffffffffffffffff85169263e54a22159250611796918a918d90899088906004016153de565b60206040518083038186803b1580156117ae57600080fd5b505afa1580156117c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e69190614677565b60608a01516040517f3a5fb82a00000000000000000000000000000000000000000000000000000000815291965073ffffffffffffffffffffffffffffffffffffffff841691633a5fb82a91611843918a9190869060040161544f565b600060405180830381600087803b15801561185d57600080fd5b505af1158015611871573d6000803e3d6000fd5b50505050506119a4565b8073ffffffffffffffffffffffffffffffffffffffff1663e54a2215868a606001518a868f8f6040518763ffffffff1660e01b81526004016118c296959493929190615388565b60206040518083038186803b1580156118da57600080fd5b505afa1580156118ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119129190614677565b60608901516040517f3a5fb82a00000000000000000000000000000000000000000000000000000000815291955073ffffffffffffffffffffffffffffffffffffffff831691633a5fb82a91611971918991908f908f90600401615427565b600060405180830381600087803b15801561198b57600080fd5b505af115801561199f573d6000803e3d6000fd5b505050505b60408089015173ffffffffffffffffffffffffffffffffffffffff166000908152600560205220546119d6908561399a565b6040808a015173ffffffffffffffffffffffffffffffffffffffff166000908152600560205281902091909155606089015190517fb8a7262132db1f61626604a31c3de81dc1a5bb0f1511dfa70d626ab1b88b52c291611a3d9188918a918f908f9061555a565b60405180910390a1506000905073ffffffffffffffffffffffffffffffffffffffff8a161580611a83575060025473ffffffffffffffffffffffffffffffffffffffff16155b6003546040517f5cbbbd7500000000000000000000000000000000000000000000000000000000815291925060009173ffffffffffffffffffffffffffffffffffffffff90911690635cbbbd7590611ae490851590889088906004016148b0565b60206040518083038186803b158015611afc57600080fd5b505afa158015611b10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b349190614677565b90508015611c04578115611b6357600654611b4f908261399a565b600655611b5c848261399a565b9350611c04565b8673ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff161480611bb2575073ffffffffffffffffffffffffffffffffffffffff8b1632145b611bce5760405162461bcd60e51b8152600401610a1290614b5f565b600254611bf39073ffffffffffffffffffffffffffffffffffffffff168c30846139f4565b600754611c00908261399a565b6007555b50611c119050828261399a565b915050600083858f8f8f8f604051602001611c3196959493929190614795565b60405160208183030381529060405290507fe8d23d927749ec8e512eb885679c2977d57068839d8cca1a85685dbbea0648f68382604051611c739291906152e8565b60405180910390a160a0860151606087015160808801516040517f6653057900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90931692636653057992611cdd92889260040161547f565b600060405180830381600087803b158015611cf757600080fd5b505af1158015611d0b573d6000803e3d6000fd5b505050505034811115611d305760405162461bcd60e51b8152600401610a1290614a11565b6000611d3c348361393d565b90508015611dcf5760008a73ffffffffffffffffffffffffffffffffffffffff1682604051611d6a90614792565b60006040518083038185875af1925050503d8060008114611da7576040519150601f19603f3d011682016040523d82523d6000602084013e611dac565b606091505b5050905080611dcd5760405162461bcd60e51b8152600401610a1290614b28565b505b5050505050505050505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260086020908152604080832061ffff8716845290915290206060906001831415611e8357805461ffff16611e6d5761ffff808616600090815260096020908152604091829020549151611e5693929092169101615264565b60405160208183030381529060405291505061219e565b8054604051611e569161ffff1690602001615264565b6002831415611ef957805462010000900467ffffffffffffffff16611ed75761ffff8516600090815260096020908152604091829020549151611e569262010000900467ffffffffffffffff1691016155a0565b8054604051611e569162010000900467ffffffffffffffff16906020016155a0565b6003831415611fab5780546a0100000000000000000000900473ffffffffffffffffffffffffffffffffffffffff16611f755761ffff8516600090815260096020908152604091829020549151611e56926a0100000000000000000000900473ffffffffffffffffffffffffffffffffffffffff169101614813565b8054604051611e56916a0100000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1690602001614813565b60048314156120645780547e01000000000000000000000000000000000000000000000000000000000000900461ffff1661202c5761ffff808616600090815260096020908152604091829020549151611e56937e010000000000000000000000000000000000000000000000000000000000009093049092169101615264565b8054604051611e56917e01000000000000000000000000000000000000000000000000000000000000900461ffff1690602001615264565b60058314156120d157600181015467ffffffffffffffff166120b25761ffff8516600090815260096020908152604091829020600101549151611e569267ffffffffffffffff1691016155a0565b6001810154604051611e569167ffffffffffffffff16906020016155a0565b600683141561218657600181015468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff1661214f5761ffff8516600090815260096020908152604091829020600101549151611e569268010000000000000000900473ffffffffffffffffffffffffffffffffffffffff169101614813565b6001810154604051611e569168010000000000000000900473ffffffffffffffffffffffffffffffffffffffff1690602001614813565b60405162461bcd60e51b8152600401610a12906149a3565b9392505050565b6121ad613939565b73ffffffffffffffffffffffffffffffffffffffff166121cb612ccc565b73ffffffffffffffffffffffffffffffffffffffff1614612233576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166122665760405162461bcd60e51b8152600401610a1290614a6e565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161790556040517f33d644987381deff4408951d55afa136f124e22a7810b163b2aaa3ebef770f64906122d6908390614813565b60405180910390a150565b60065481565b60006122f38787612d11565b604081015190915073ffffffffffffffffffffffffffffffffffffffff16331461232f5760405162461bcd60e51b8152600401610a1290614cad565b612337613e26565b61ffff8089166000818152600b60209081526040808320875190951683529381528382205460a087015173ffffffffffffffffffffffffffffffffffffffff9081168452600f83528584209484529382528483208a84528252939091209085015181549290931692909167ffffffffffffffff90911611156123cb5760405162461bcd60e51b8152600401610a1290615177565b61ffff8a166000908152600e60205260409081902054600183015491517fb71e0f71000000000000000000000000000000000000000000000000000000008152909173ffffffffffffffffffffffffffffffffffffffff85169163b71e0f719161243d918b908b9087906004016148d1565b600060405180830381600087803b15801561245757600080fd5b505af115801561246b573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526124b19190810190614221565b60a081015161ffff8d166000908152601060205260409020549195501492506124ef9150505760405162461bcd60e51b8152600401610a1290615060565b8673ffffffffffffffffffffffffffffffffffffffff16816060015173ffffffffffffffffffffffffffffffffffffffff161461253e5760405162461bcd60e51b8152600401610a1290614c76565b80516080820151606083015160408085015160c086015191517fc2fa481300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169563c2fa4813956125cd959194909391928e9190600401615305565b600060405180830381600087803b1580156125e757600080fd5b505af11580156125fb573d6000803e3d6000fd5b505050505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600460205260409020545b919050565b336000908152600f6020908152604080832061ffff88168452825280832086845290915290208054831161269f5760405162461bcd60e51b8152600401610a1290614d41565b828155600181018290556040517fc5e97f049604c4d8626704341240f021a22cee0d8b66ec306a45344be67733a0906126df90879033908790899061529d565b60405180910390a15050505050565b6126f6613939565b73ffffffffffffffffffffffffffffffffffffffff16612714612ccc565b73ffffffffffffffffffffffffffffffffffffffff161461277c576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60015460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b600481565b6127f8613939565b73ffffffffffffffffffffffffffffffffffffffff16612816612ccc565b73ffffffffffffffffffffffffffffffffffffffff161461287e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166128b15760405162461bcd60e51b8152600401610a1290614ce4565b61ffff8281166000908152600c60205260409020548116106128e55760405162461bcd60e51b8152600401610a1290614f12565b61ffff8083166000908152600c60209081526040808320805480861660010186167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009091161790819055600b835281842094168352929052819020805473ffffffffffffffffffffffffffffffffffffffff84167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116179055517f802d55279d51813cb7a9a98e8fd2d7bec5346cb830901c11b85d1650cb857e9a906129b09084908490615273565b60405180910390a15050565b6129c4613939565b73ffffffffffffffffffffffffffffffffffffffff166129e2612ccc565b73ffffffffffffffffffffffffffffffffffffffff1614612a4a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61ffff8085166000908152600a60209081526040808320938716835292905220612a75908383613e64565b507f4a5695eee2a74d548d5f5c485a3de99ace99e3b664c8e30a90f49be6ebb5493284848484604051612aab9493929190615427565b60405180910390a150505050565b60026000541415612b11576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260005560035473ffffffffffffffffffffffffffffffffffffffff163314612b4d5760405162461bcd60e51b8152600401610a129061496c565b600754612b5a908261393d565b600755600254612b819073ffffffffffffffffffffffffffffffffffffffff168383613a8f565b7f3a20c8c3cd1848485ae8261a52398bb9b26f195b717306b3cf7f058e62c095d5338383604051612bb493929190614834565b60405180910390a150506001600055565b612bcd613939565b73ffffffffffffffffffffffffffffffffffffffff16612beb612ccc565b73ffffffffffffffffffffffffffffffffffffffff1614612c53576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61ffff82166000908152600e602052604090205415612c845760405162461bcd60e51b8152600401610a12906150bd565b61ffff82166000908152600e602052604090819020829055517f0611bb2107e385b79ec826fff8ecc1c1248a7aae3c875c96668f8cfbf1734220906129b090849084906152d4565b60015473ffffffffffffffffffffffffffffffffffffffff1690565b600581565b600e6020526000908152604090205481565b60046020526000908152604090205481565b612d19613f0e565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260086020908152604080832061ffff808916808652918452828520835160c0810185528154808416825267ffffffffffffffff6201000082048116838901526a010000000000000000000082048a16838801527e010000000000000000000000000000000000000000000000000000000000009091048416606083015260019092015491821660808201526801000000000000000090910490961660a087015290845260099092529091208251909116612df357805461ffff1682525b602082015167ffffffffffffffff16612e1e57805462010000900467ffffffffffffffff1660208301525b604082015173ffffffffffffffffffffffffffffffffffffffff16612e695780546a0100000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1660408301525b606082015161ffff16612ea45780547e01000000000000000000000000000000000000000000000000000000000000900461ffff1660608301525b608082015167ffffffffffffffff16612ecc57600181015467ffffffffffffffff1660808301525b60a082015173ffffffffffffffffffffffffffffffffffffffff16612f1857600181015468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff1660a08301525b509392505050565b61271081565b600c6020526000908152604090205461ffff1681565b600d60209081526000928352604080842090915290825290205460ff1681565b600f6020908152600093845260408085208252928452828420905282529020805460019091015482565b600b60209081526000928352604080842090915290825290205473ffffffffffffffffffffffffffffffffffffffff1681565b60086020908152600092835260408084209091529082529020805460019091015461ffff8083169267ffffffffffffffff62010000820481169373ffffffffffffffffffffffffffffffffffffffff6a010000000000000000000084048116947e010000000000000000000000000000000000000000000000000000000000009094049093169291811691680100000000000000009091041686565b73ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205490565b60106020526000908152604090205481565b613097613939565b73ffffffffffffffffffffffffffffffffffffffff166130b5612ccc565b73ffffffffffffffffffffffffffffffffffffffff161461311d576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61ffff8083166000908152600d60209081526040808320938516835292905281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055517fec23bee6f88cfecebb09d6aaaed66f0ce110debc1f61117c8270a7116597df9a906129b09084908490615373565b6131a0613f43565b5073ffffffffffffffffffffffffffffffffffffffff83166000908152600f6020908152604080832061ffff86168452825280832084845282529182902082518084019093528054835260010154908201529392505050565b613201613939565b73ffffffffffffffffffffffffffffffffffffffff1661321f612ccc565b73ffffffffffffffffffffffffffffffffffffffff1614613287576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61ffff8216600090815260106020526040902054156132b85760405162461bcd60e51b8152600401610a1290614eb5565b61ffff821660009081526010602052604090819020829055517f0dad975e1d2fbe771c95cdcc7be9a1e61181de7173abe0a32b8f8f83140873e5906129b090849084906152d4565b613308613939565b73ffffffffffffffffffffffffffffffffffffffff16613326612ccc565b73ffffffffffffffffffffffffffffffffffffffff161461338e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166133c15760405162461bcd60e51b8152600401610a1290614e58565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161790556040517fcb7ef3e545f5cdb893f5c568ba710fe08f336375a2d9fd66e161033f8fc09ef3906122d6908390614813565b613439613939565b73ffffffffffffffffffffffffffffffffffffffff16613457612ccc565b73ffffffffffffffffffffffffffffffffffffffff16146134bf576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166135115760405162461bcd60e51b815260040180806020018281038252602681526020018061569f6026913960400191505060405180910390fd5b60015460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60075481565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1633146135fa5760405162461bcd60e51b8152600401610a1290614f6f565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020908152604080832061ffff89168452909152902060018414156136b4576000613645838501856142fd565b61ffff8089166000908152600c602052604090205491925090811690821611156136815760405162461bcd60e51b8152600401610a1290614dfb565b81547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff919091161781556138f4565b600284141561370b5760006136cb8385018561468f565b825467ffffffffffffffff90911662010000027fffffffffffffffffffffffffffffffffffffffffffff0000000000000000ffff909116178255506138f4565b600384141561377657600061372283850185614072565b825473ffffffffffffffffffffffffffffffffffffffff9091166a0100000000000000000000027fffff0000000000000000000000000000000000000000ffffffffffffffffffff909116178255506138f4565b600484141561383057600061378d838501856142fd565b61ffff8089166000908152600d602090815260408083209385168352929052205490915060ff16806137c1575061ffff8116155b6137dd5760405162461bcd60e51b8152600401610a129061490f565b815461ffff9091167e01000000000000000000000000000000000000000000000000000000000000027dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9091161781556138f4565b60058414156138885760006138478385018561468f565b6001830180547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff92909216919091179055506138f4565b600684141561218657600061389f83850185614072565b60018301805473ffffffffffffffffffffffffffffffffffffffff90921668010000000000000000027fffffffff0000000000000000000000000000000000000000ffffffffffffffff909216919091179055505b7ffc01bf86212a14151d51d1be5c2ac64d67d5ec823dfc6f53298d7ce3f3d3d252858585856040516139299493929190614865565b60405180910390a1505050505050565b3390565b600082821115613994576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008282018381101561219e576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6040805173ffffffffffffffffffffffffffffffffffffffff80861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052613a89908590613b21565b50505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052613b1c908490613b21565b505050565b6000613b83826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16613bdf9092919063ffffffff16565b805190915015613b1c57808060200190516020811015613ba257600080fd5b5051613b1c5760405162461bcd60e51b815260040180806020018281038252602a8152602001806156eb602a913960400191505060405180910390fd5b6060613bee8484600085613bf6565b949350505050565b606082471015613c375760405162461bcd60e51b81526004018080602001828103825260268152602001806156c56026913960400191505060405180910390fd5b613c4085613d7c565b613c91576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b60208310613cfa57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613cbd565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613d5c576040519150601f19603f3d011682016040523d82523d6000602084013e613d61565b606091505b5091509150613d71828286613d82565b979650505050505050565b3b151590565b60608315613d9157508161219e565b825115613da15782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613deb578181015183820152602001613dd3565b50505050905090810190601f168015613e185780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6040805160e08101825260008082526020820181905291810182905260608082018390526080820181905260a082019290925260c081019190915290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282613e9a5760008555613efe565b82601f10613ed1578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00823516178555613efe565b82800160010185558215613efe579182015b82811115613efe578235825591602001919060010190613ee3565b50613f0a929150613f5a565b5090565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a081019190915290565b604080518082019091526000808252602082015290565b5b80821115613f0a5760008155600101613f5b565b803561265481615653565b805161265481615653565b60008083601f840112613f96578182fd5b50813567ffffffffffffffff811115613fad578182fd5b602083019150836020828501011115613fc557600080fd5b9250929050565b600082601f830112613fdc578081fd5b815167ffffffffffffffff811115613ff057fe5b61402160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601615603565b818152846020838601011115614035578283fd5b613bee826020830160208701615627565b803561265481615678565b805161265481615678565b803561265481615688565b805161265481615688565b600060208284031215614083578081fd5b813561219e81615653565b600080604083850312156140a0578081fd5b82356140ab81615653565b915060208301356140bb81615678565b809150509250929050565b6000806000606084860312156140da578081fd5b83356140e581615653565b925060208401356140f581615678565b929592945050506040919091013590565b60008060408385031215614118578182fd5b823561412381615653565b946020939093013593505050565b60008060008060008060008060008060006101008c8e031215614152578687fd5b61415b8c613f6f565b9a5061416960208d0161405c565b995061417760408d01614046565b985067ffffffffffffffff8060608e01351115614192578788fd5b6141a28e60608f01358f01613f85565b909950975060808d01358110156141b7578687fd5b6141c78e60808f01358f01613f85565b90975095506141d860a08e01613f6f565b94506141e660c08e01613f6f565b93508060e08e013511156141f8578283fd5b506142098d60e08e01358e01613f85565b81935080925050509295989b509295989b9093969950565b600060208284031215614232578081fd5b815167ffffffffffffffff80821115614249578283fd5b9083019060e0828603121561425c578283fd5b61426660e0615603565b61426f83614051565b815261427d60208401614051565b602082015261428e60408401614067565b604082015261429f60608401613f7a565b60608201526080830151828111156142b5578485fd5b6142c187828601613fcc565b60808301525060a083015160a082015260c0830151828111156142e2578485fd5b6142ee87828601613fcc565b60c08301525095945050505050565b60006020828403121561430e578081fd5b813561219e81615678565b6000806040838503121561432b578182fd5b823561433681615678565b915060208301356140bb81615653565b600080600080600080600060a0888a031215614360578081fd5b873561436b81615678565b9650602088013561437b81615653565b9550604088013567ffffffffffffffff80821115614397578283fd5b6143a38b838c01613f85565b909750955060608a0135915081151582146143bc578283fd5b909350608089013590808211156143d1578283fd5b506143de8a828b01613f85565b989b979a50959850939692959293505050565b600080600060608486031215614405578081fd5b833561441081615678565b925060208401356140f581615653565b60008060008060008060a08789031215614438578384fd5b863561444381615678565b9550602087013561445381615653565b94506040870135935060608701359250608087013567ffffffffffffffff81111561447c578283fd5b61448889828a01613f85565b979a9699509497509295939492505050565b6000806000806000608086880312156144b1578283fd5b85356144bc81615678565b945060208601356144cc81615653565b935060408601359250606086013567ffffffffffffffff8111156144ee578182fd5b6144fa88828901613f85565b969995985093965092949392505050565b6000806040838503121561451d578182fd5b823561412381615678565b6000806000806080858703121561453d578182fd5b843561454881615678565b966020860135965060408601359560600135945092505050565b60008060408385031215614574578182fd5b82356140ab81615678565b60008060008060608587031215614594578182fd5b843561459f81615678565b935060208501356145af81615678565b9250604085013567ffffffffffffffff8111156145ca578283fd5b6145d687828801613f85565b95989497509550505050565b600080600080600080600060e0888a0312156145fc578081fd5b873561460781615678565b9650602088013561461781615678565b9550604088013561462781615688565b9450606088013561463781615653565b9350608088013561464781615678565b925060a088013561465781615678565b915060c088013561466781615653565b8091505092959891949750929550565b600060208284031215614688578081fd5b5051919050565b6000602082840312156146a0578081fd5b813561219e81615688565b600080600080608085870312156146c0578182fd5b843560ff811681146146d0578283fd5b935060208501356146e081615653565b925060408501356146f081615653565b9396929550929360600135925050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b60008151808452614760816020860160208601615627565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b90565b60007fffffffffffffffff0000000000000000000000000000000000000000000000008860c01b1682527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008760601b1660088301528486601c840137848201601c81018281528486823750909201601c019182525095945050505050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b600073ffffffffffffffffffffffffffffffffffffffff861682528460208301526060604083015261489b606083018486614700565b9695505050505050565b901515815260200190565b92151583526020830191909152604082015260600190565b90815260200190565b6000858252606060208301526148eb606083018587614700565b905082604083015295945050505050565b60006020825261219e6020830184614748565b60208082526026908201527f4c617965725a65726f3a20696e76616c6964206f7574626f756e642070726f6f60408201527f6620747970650000000000000000000000000000000000000000000000000000606082015260800190565b60208082526018908201527f4c617965725a65726f3a206f6e6c792074726561737572790000000000000000604082015260600190565b6020808252601e908201527f4c617965725a65726f3a20496e76616c696420636f6e66696720747970650000604082015260600190565b6020808252601a908201527f4c617965725a65726f3a207769746864726177206661696c6564000000000000604082015260600190565b60208082526025908201527f4c617965725a65726f3a206e6f7420656e6f756768206e617469766520666f7260408201527f2066656573000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526031908201527f4c617965725a65726f3a205f6c617965725a65726f546f6b656e2063616e6e6f60408201527f74206265207a65726f2061646472657373000000000000000000000000000000606082015260800190565b60208082526022908201527f4c617965725a65726f3a20696e76616c69642072656c6179657220616464726560408201527f7373000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f4c617965725a65726f3a206661696c656420746f20726566756e640000000000604082015260600190565b6020808252602b908201527f4c617965725a65726f3a206d75737420626520706169642062792073656e646560408201527f72206f72206f726967696e000000000000000000000000000000000000000000606082015260800190565b60208082526021908201527f4c617965725a65726f3a20636861696e496420646f6573206e6f74206578697360408201527f7400000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526021908201527f4c617965725a65726f3a20696e76616c6964206f7261636c652061646472657360408201527f7300000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601e908201527f4c617965725a65726f3a20696e76616c69642064737420616464726573730000604082015260600190565b6020808252601a908201527f4c617965725a65726f3a20696e76616c69642072656c61796572000000000000604082015260600190565b60208082526029908201527f4c617965725a65726f3a206c6962726172792063616e6e6f74206265207a657260408201527f6f20616464726573730000000000000000000000000000000000000000000000606082015260800190565b60208082526043908201527f4c617965725a65726f3a206f7261636c6520646174612063616e206f6e6c792060408201527f75706461746520696620697420686173206d6f726520636f6e6669726d61746960608201527f6f6e730000000000000000000000000000000000000000000000000000000000608082015260a00190565b60208082526017908201527f4c617965725a65726f3a6f6e6c79207472656173757279000000000000000000604082015260600190565b60208082526030908201527f4c617965725a65726f3a20696e76616c696420696e626f756e642070726f6f6660408201527f206c6962726172792076657273696f6e00000000000000000000000000000000606082015260800190565b6020808252602a908201527f4c617965725a65726f3a2074726561737572792063616e6e6f74206265207a6560408201527f726f206164647265737300000000000000000000000000000000000000000000606082015260800190565b60208082526021908201527f4c617965725a65726f3a2072656d6f746520756c6e20616c726561647920736560408201527f7400000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526022908201527f4c617965725a65726f3a2063616e206e6f7420616464206e6577206c6962726160408201527f7279000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526018908201527f4c617965725a65726f3a206f6e6c7920656e64706f696e740000000000000000604082015260600190565b6020808252602e908201527f4c617965725a65726f3a20696e76616c6964206f7574626f756e6420626c6f6360408201527f6b20636f6e6669726d6174696f6e000000000000000000000000000000000000606082015260800190565b60208082526024908201527f4c617965725a65726f3a20756e737570706f727465642077697468647261772060408201527f7479706500000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526028908201527f4c617965725a65726f3a205f7061636b65742e756c6e4164647265737320697360408201527f20696e76616c6964000000000000000000000000000000000000000000000000606082015260800190565b60208082526030908201527f4c617965725a65726f3a2072656d6f746520636861696e20616464726573732060408201527f73697a6520616c72656164792073657400000000000000000000000000000000606082015260800190565b6020808252602d908201527f4c617965725a65726f3a20696e76616c696420696e626f756e6420626c6f636b60408201527f20636f6e6669726d6174696f6e00000000000000000000000000000000000000606082015260800190565b60208082526029908201527f4c617965725a65726f3a206e6f7420656e6f75676820626c6f636b20636f6e6660408201527f69726d6174696f6e730000000000000000000000000000000000000000000000606082015260800190565b600060c08201905061ffff808451168352602084015167ffffffffffffffff80821660208601526040860151915073ffffffffffffffffffffffffffffffffffffffff80831660408701528360608801511660608701528160808801511660808701528060a08801511660a08701525050505092915050565b815181526020918201519181019190915260400190565b61ffff91909116815260200190565b61ffff92909216825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b61ffff94909416845273ffffffffffffffffffffffffffffffffffffffff9290921660208401526040830152606082015260800190565b61ffff929092168252602082015260400190565b600061ffff8416825260406020830152613bee6040830184614748565b600061ffff8816825260c0602083015261532260c0830188614748565b73ffffffffffffffffffffffffffffffffffffffff8716604084015267ffffffffffffffff8616606084015284608084015282810360a08401526153668185614748565b9998505050505050505050565b61ffff92831681529116602082015260400190565b600061ffff808916835280881660208401525073ffffffffffffffffffffffffffffffffffffffff8616604083015284606083015260a060808301526153d260a083018486614700565b98975050505050505050565b600061ffff808816835280871660208401525073ffffffffffffffffffffffffffffffffffffffff8516604083015283606083015260a06080830152613d7160a0830184614748565b600061ffff80871683528086166020840152506060604083015261489b606083018486614700565b600061ffff8086168352808516602084015250606060408301526154766060830184614748565b95945050505050565b61ffff938416815291909216602082015267ffffffffffffffff909116604082015260600190565b61ffff9788168152958716602087015267ffffffffffffffff94909416604086015273ffffffffffffffffffffffffffffffffffffffff9283166060860152908516608085015290931660a083015290911660c082015260e00190565b61ffff968716815267ffffffffffffffff958616602082015273ffffffffffffffffffffffffffffffffffffffff948516604082015292909516606083015290921660808301529190911660a082015260c00190565b600061ffff808816835267ffffffffffffffff8716602084015280861660408401525060806060830152613d71608083018486614700565b918252602082015260400190565b67ffffffffffffffff91909116815260200190565b60ff91909116815260200190565b60ff95909516855273ffffffffffffffffffffffffffffffffffffffff938416602086015291831660408501529091166060830152608082015260a00190565b60405181810167ffffffffffffffff8111828210171561561f57fe5b604052919050565b60005b8381101561564257818101518382015260200161562a565b83811115613a895750506000910152565b73ffffffffffffffffffffffffffffffffffffffff8116811461567557600080fd5b50565b61ffff8116811461567557600080fd5b67ffffffffffffffff8116811461567557600080fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220c4bfc55e84c3d77ca2df7433e929bf0c66f9c72cd7e93453fc448eb8f0bf2c0964736f6c634300070600330000000000000000000000003c2269811836af69497e5f486a85d7316753cf62

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

0000000000000000000000003c2269811836af69497e5f486a85d7316753cf62

-----Decoded View---------------
Arg [0] : _endpoint (address): 0x3c2269811836af69497e5f486a85d7316753cf62

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000003c2269811836af69497e5f486a85d7316753cf62


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.