{
  "address": "0x19f240DD39FEF12D139a4E0Ae81f44945c06092f",
  "abi": [
    {
      "inputs": [],
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint64",
          "name": "dstChainId",
          "type": "uint64"
        }
      ],
      "name": "DstChainIdUpdated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint8",
          "name": "version",
          "type": "uint8"
        }
      ],
      "name": "Initialized",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "messageBus",
          "type": "address"
        }
      ],
      "name": "MessageBusUpdated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "sender",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "receiver",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint64",
          "name": "srcChainId",
          "type": "uint64"
        },
        {
          "indexed": false,
          "internalType": "uint64",
          "name": "dstChainId",
          "type": "uint64"
        },
        {
          "indexed": false,
          "internalType": "bytes",
          "name": "message",
          "type": "bytes"
        }
      ],
      "name": "MessageSent",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "token",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "bytes",
          "name": "message",
          "type": "bytes"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "executor",
          "type": "address"
        }
      ],
      "name": "MessageWithTransferRefund",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "NativeWithdrawal",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "previousOwner",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "OwnershipTransferred",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "receiver",
          "type": "address"
        }
      ],
      "name": "ReceiverUpdated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "payment",
          "type": "address"
        }
      ],
      "name": "SrcChainPaymentUpdated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "contract IERC20Upgradeable",
          "name": "token",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "Withdrawal",
      "type": "event"
    },
    {
      "inputs": [
        {
          "internalType": "bytes",
          "name": "message",
          "type": "bytes"
        }
      ],
      "name": "calcFee",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "dstChainId",
      "outputs": [
        {
          "internalType": "uint64",
          "name": "",
          "type": "uint64"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_token",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "_amount",
          "type": "uint256"
        },
        {
          "internalType": "bytes",
          "name": "_message",
          "type": "bytes"
        },
        {
          "internalType": "address",
          "name": "executor",
          "type": "address"
        }
      ],
      "name": "executeMessageWithTransferRefund",
      "outputs": [
        {
          "internalType": "enum MessageSender.ExecutionStatus",
          "name": "",
          "type": "uint8"
        }
      ],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "_messageBus",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "_receiver",
          "type": "address"
        },
        {
          "internalType": "uint64",
          "name": "_dstChainId",
          "type": "uint64"
        }
      ],
      "name": "initialize",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "messageBus",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "components": [
            {
              "internalType": "address",
              "name": "sender",
              "type": "address"
            },
            {
              "internalType": "address",
              "name": "receiver",
              "type": "address"
            },
            {
              "internalType": "uint64",
              "name": "srcChainId",
              "type": "uint64"
            },
            {
              "internalType": "bytes32",
              "name": "srcTxHash",
              "type": "bytes32"
            }
          ],
          "internalType": "struct MsgDataTypes.RouteInfo",
          "name": "route",
          "type": "tuple"
        },
        {
          "internalType": "uint64",
          "name": "dstChainId",
          "type": "uint64"
        },
        {
          "internalType": "bytes",
          "name": "message",
          "type": "bytes"
        }
      ],
      "name": "messageId",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "owner",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract IERC20Upgradeable",
          "name": "token",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "ownerWithdrawERC20",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address payable",
          "name": "to",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "ownerWithdrawNative",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "receiver",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "renounceOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes",
          "name": "message",
          "type": "bytes"
        }
      ],
      "name": "sendMessage",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint64",
          "name": "dstChainId",
          "type": "uint64"
        }
      ],
      "name": "setDstChainId",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "messageBus",
          "type": "address"
        }
      ],
      "name": "setMessageBus",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_receiver",
          "type": "address"
        }
      ],
      "name": "setReceiver",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_payment",
          "type": "address"
        }
      ],
      "name": "setSrcChainPayment",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "srcChainPayment",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "transferOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ],
  "transactionHash": "0x7f050a5fa69e164af511eb0602f7456da43f7a4c8e5499eb3763bce13a797ec7",
  "receipt": {
    "to": null,
    "from": "0xe5bab2D79EB833FA25906Cd90540339C9aB8AE70",
    "contractAddress": "0x19f240DD39FEF12D139a4E0Ae81f44945c06092f",
    "transactionIndex": 15,
    "gasUsed": "1464649",
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000",
    "blockHash": "0xf2cae1acf53723b3b20ebc4dfab161340c0e7831ad7406c3462d9c2450840959",
    "transactionHash": "0x7f050a5fa69e164af511eb0602f7456da43f7a4c8e5499eb3763bce13a797ec7",
    "logs": [
      {
        "transactionIndex": 15,
        "blockNumber": 20746983,
        "transactionHash": "0x7f050a5fa69e164af511eb0602f7456da43f7a4c8e5499eb3763bce13a797ec7",
        "address": "0x19f240DD39FEF12D139a4E0Ae81f44945c06092f",
        "topics": [
          "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"
        ],
        "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
        "logIndex": 34,
        "blockHash": "0xf2cae1acf53723b3b20ebc4dfab161340c0e7831ad7406c3462d9c2450840959"
      }
    ],
    "blockNumber": 20746983,
    "cumulativeGasUsed": "2634645",
    "status": 1,
    "byzantium": true
  },
  "args": [],
  "numDeployments": 2,
  "solcInputHash": "c3b0da766a55c25c4426257602570d14",
  "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"dstChainId\",\"type\":\"uint64\"}],\"name\":\"DstChainIdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"messageBus\",\"type\":\"address\"}],\"name\":\"MessageBusUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"dstChainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"}],\"name\":\"MessageWithTransferRefund\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"NativeWithdrawal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ReceiverUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payment\",\"type\":\"address\"}],\"name\":\"SrcChainPaymentUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IERC20Upgradeable\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"calcFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dstChainId\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"}],\"name\":\"executeMessageWithTransferRefund\",\"outputs\":[{\"internalType\":\"enum MessageSender.ExecutionStatus\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_messageBus\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_receiver\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_dstChainId\",\"type\":\"uint64\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageBus\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"srcTxHash\",\"type\":\"bytes32\"}],\"internalType\":\"struct MsgDataTypes.RouteInfo\",\"name\":\"route\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"dstChainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"messageId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Upgradeable\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"ownerWithdrawERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"ownerWithdrawNative\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"receiver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"dstChainId\",\"type\":\"uint64\"}],\"name\":\"setDstChainId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"messageBus\",\"type\":\"address\"}],\"name\":\"setMessageBus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_receiver\",\"type\":\"address\"}],\"name\":\"setReceiver\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_payment\",\"type\":\"address\"}],\"name\":\"setSrcChainPayment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"srcChainPayment\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Alexandas\",\"details\":\"Celer SGN source chain sender contract\",\"kind\":\"dev\",\"methods\":{\"calcFee(bytes)\":{\"details\":\"calculate message fee\",\"params\":{\"message\":\"message bytes\"},\"returns\":{\"_0\":\"fee\"}},\"executeMessageWithTransferRefund(address,uint256,bytes,address)\":{\"details\":\"call when cBridge transfer failed\",\"params\":{\"_amount\":\"token amount\",\"_message\":\"message\",\"_token\":\"token address\",\"executor\":\"exector address\"}},\"initialize(address,address,address,uint64)\":{\"details\":\"proxy initialize function\",\"params\":{\"_dstChainId\":\"dst chain chainId\",\"_messageBus\":\"src chain messageBus\",\"_receiver\":\"dst chain receiver\",\"owner\":\"contract owner\"}},\"messageId((address,address,uint64,bytes32),uint64,bytes)\":{\"details\":\"messageId for message bus\",\"params\":{\"dstChainId\":\"message route info\",\"message\":\"message bytes\",\"route\":\"message route info\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"ownerWithdrawERC20(address,address,uint256)\":{\"details\":\"withdraw token\",\"params\":{\"to\":\"receiver address\",\"token\":\"token address\",\"value\":\"token value\"}},\"ownerWithdrawNative(address,uint256)\":{\"details\":\"withdraw ETH\",\"params\":{\"to\":\"receiver address\",\"value\":\"token value\"}},\"renounceOwnership()\":{\"details\":\"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.\"},\"sendMessage(bytes)\":{\"details\":\"sendMessage to dst chain\",\"params\":{\"message\":\"message to dst chain\"}},\"setDstChainId(uint64)\":{\"details\":\"set dst chain chainId\",\"params\":{\"dstChainId\":\"dst chainId\"}},\"setMessageBus(address)\":{\"details\":\"update message bus\",\"params\":{\"messageBus\":\"message bus address\"}},\"setReceiver(address)\":{\"details\":\"set dst chain receiver\",\"params\":{\"_receiver\":\"dst chain receiver\"}},\"setSrcChainPayment(address)\":{\"details\":\"set src chain payment\",\"params\":{\"_payment\":\"src chain payment address\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"stateVariables\":{\"dstChainId\":{\"details\":\"dst chainId\"},\"messageBus\":{\"details\":\"src chain messageBus address\"},\"receiver\":{\"details\":\"dst chain receiver address\"},\"srcChainPayment\":{\"details\":\"src chain payment address\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/messages/MessageSender.sol\":\"MessageSender\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"details\":{\"constantOptimizer\":true,\"cse\":true,\"deduplicate\":true,\"inliner\":true,\"jumpdestRemover\":true,\"orderLiterals\":true,\"peephole\":true,\"yul\":false},\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n    address private _owner;\\n\\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n    /**\\n     * @dev Initializes the contract setting the deployer as the initial owner.\\n     */\\n    function __Ownable_init() internal onlyInitializing {\\n        __Ownable_init_unchained();\\n    }\\n\\n    function __Ownable_init_unchained() internal onlyInitializing {\\n        _transferOwnership(_msgSender());\\n    }\\n\\n    /**\\n     * @dev Returns the address of the current owner.\\n     */\\n    function owner() public view virtual returns (address) {\\n        return _owner;\\n    }\\n\\n    /**\\n     * @dev Throws if called by any account other than the owner.\\n     */\\n    modifier onlyOwner() {\\n        require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n        _;\\n    }\\n\\n    /**\\n     * @dev Leaves the contract without owner. It will not be possible to call\\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\\n     *\\n     * NOTE: Renouncing ownership will leave the contract without an owner,\\n     * thereby removing any functionality that is only available to the owner.\\n     */\\n    function renounceOwnership() public virtual onlyOwner {\\n        _transferOwnership(address(0));\\n    }\\n\\n    /**\\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n     * Can only be called by the current owner.\\n     */\\n    function transferOwnership(address newOwner) public virtual onlyOwner {\\n        require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n        _transferOwnership(newOwner);\\n    }\\n\\n    /**\\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n     * Internal function without access restriction.\\n     */\\n    function _transferOwnership(address newOwner) internal virtual {\\n        address oldOwner = _owner;\\n        _owner = newOwner;\\n        emit OwnershipTransferred(oldOwner, newOwner);\\n    }\\n\\n    /**\\n     * @dev This empty reserved space is put in place to allow future versions to add new\\n     * variables without shifting down storage in the inheritance chain.\\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n     */\\n    uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x652fee292f698d8dba81bf287cb71f1682f6483b67ebe601a5f7387dcfc30b34\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/ERC20/IERC20Upgradeable.sol\\\";\\n\",\"keccak256\":\"0xe73087c5001a37cf7186b3709377c7ceb01a0d38fb908723d1464cea66b4958c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n *     function initialize() initializer public {\\n *         __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n *     }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n *     function initializeV2() reinitializer(2) public {\\n *         __ERC20Permit_init(\\\"MyToken\\\");\\n *     }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n *     _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n    /**\\n     * @dev Indicates that the contract has been initialized.\\n     * @custom:oz-retyped-from bool\\n     */\\n    uint8 private _initialized;\\n\\n    /**\\n     * @dev Indicates that the contract is in the process of being initialized.\\n     */\\n    bool private _initializing;\\n\\n    /**\\n     * @dev Triggered when the contract has been initialized or reinitialized.\\n     */\\n    event Initialized(uint8 version);\\n\\n    /**\\n     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n     * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n     */\\n    modifier initializer() {\\n        bool isTopLevelCall = _setInitializedVersion(1);\\n        if (isTopLevelCall) {\\n            _initializing = true;\\n        }\\n        _;\\n        if (isTopLevelCall) {\\n            _initializing = false;\\n            emit Initialized(1);\\n        }\\n    }\\n\\n    /**\\n     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n     * used to initialize parent contracts.\\n     *\\n     * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n     * initialization step. This is essential to configure modules that are added through upgrades and that require\\n     * initialization.\\n     *\\n     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n     * a contract, executing them in the right order is up to the developer or operator.\\n     */\\n    modifier reinitializer(uint8 version) {\\n        bool isTopLevelCall = _setInitializedVersion(version);\\n        if (isTopLevelCall) {\\n            _initializing = true;\\n        }\\n        _;\\n        if (isTopLevelCall) {\\n            _initializing = false;\\n            emit Initialized(version);\\n        }\\n    }\\n\\n    /**\\n     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n     * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n     */\\n    modifier onlyInitializing() {\\n        require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n        _;\\n    }\\n\\n    /**\\n     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n     * through proxies.\\n     */\\n    function _disableInitializers() internal virtual {\\n        _setInitializedVersion(type(uint8).max);\\n    }\\n\\n    function _setInitializedVersion(uint8 version) private returns (bool) {\\n        // If the contract is initializing we ignore whether _initialized is set in order to support multiple\\n        // inheritance patterns, but we only do this in the context of a constructor, and for the lowest level\\n        // of initializers, because in other contexts the contract may have been reentered.\\n        if (_initializing) {\\n            require(\\n                version == 1 && !AddressUpgradeable.isContract(address(this)),\\n                \\\"Initializable: contract is already initialized\\\"\\n            );\\n            return false;\\n        } else {\\n            require(_initialized < version, \\\"Initializable: contract is already initialized\\\");\\n            _initialized = version;\\n            return true;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x7454006cccb737612b00104d2f606d728e2818b778e7e55542f063c614ce46ba\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `to`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address to, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `from` to `to` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address from,\\n        address to,\\n        uint256 amount\\n    ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x4e733d3164f73f461eaf9d8087a7ad1ea180bdc8ba0d3d61b0e1ae16d8e63dff\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\nimport \\\"../../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20Upgradeable {\\n    using AddressUpgradeable for address;\\n\\n    function safeTransfer(\\n        IERC20Upgradeable token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20Upgradeable token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Deprecated. This function has issues similar to the ones found in\\n     * {IERC20-approve}, and its usage is discouraged.\\n     *\\n     * Whenever possible, use {safeIncreaseAllowance} and\\n     * {safeDecreaseAllowance} instead.\\n     */\\n    function safeApprove(\\n        IERC20Upgradeable token,\\n        address spender,\\n        uint256 value\\n    ) internal {\\n        // safeApprove should only be called when setting an initial allowance,\\n        // or when resetting it to zero. To increase and decrease it, use\\n        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n        require(\\n            (value == 0) || (token.allowance(address(this), spender) == 0),\\n            \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n        );\\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n    }\\n\\n    function safeIncreaseAllowance(\\n        IERC20Upgradeable token,\\n        address spender,\\n        uint256 value\\n    ) internal {\\n        uint256 newAllowance = token.allowance(address(this), spender) + value;\\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n    }\\n\\n    function safeDecreaseAllowance(\\n        IERC20Upgradeable token,\\n        address spender,\\n        uint256 value\\n    ) internal {\\n        unchecked {\\n            uint256 oldAllowance = token.allowance(address(this), spender);\\n            require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n            uint256 newAllowance = oldAllowance - value;\\n            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n        }\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     * @param token The token targeted by the call.\\n     * @param data The call data (encoded using abi.encode or one of its variants).\\n     */\\n    function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n        // the target address contains contract code and also asserts for success in the low-level call.\\n\\n        bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n        if (returndata.length > 0) {\\n            // Return data is optional\\n            require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x3e26a49d2fa5ef8338b8a9467c91e54f417cb07e849b1cc0f4ebc4d2a147938e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n    /**\\n     * @dev Returns true if `account` is a contract.\\n     *\\n     * [IMPORTANT]\\n     * ====\\n     * It is unsafe to assume that an address for which this function returns\\n     * false is an externally-owned account (EOA) and not a contract.\\n     *\\n     * Among others, `isContract` will return false for the following\\n     * types of addresses:\\n     *\\n     *  - an externally-owned account\\n     *  - a contract in construction\\n     *  - an address where a contract will be created\\n     *  - an address where a contract lived, but was destroyed\\n     * ====\\n     *\\n     * [IMPORTANT]\\n     * ====\\n     * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n     *\\n     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n     * constructor.\\n     * ====\\n     */\\n    function isContract(address account) internal view returns (bool) {\\n        // This method relies on extcodesize/address.code.length, which returns 0\\n        // for contracts in construction, since the code is only stored at the end\\n        // of the constructor execution.\\n\\n        return account.code.length > 0;\\n    }\\n\\n    /**\\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n     * `recipient`, forwarding all available gas and reverting on errors.\\n     *\\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n     * imposed by `transfer`, making them unable to receive funds via\\n     * `transfer`. {sendValue} removes this limitation.\\n     *\\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n     *\\n     * IMPORTANT: because control is transferred to `recipient`, care must be\\n     * taken to not create reentrancy vulnerabilities. Consider using\\n     * {ReentrancyGuard} or the\\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n     */\\n    function sendValue(address payable recipient, uint256 amount) internal {\\n        require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n        (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n        require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n    }\\n\\n    /**\\n     * @dev Performs a Solidity function call using a low level `call`. A\\n     * plain `call` is an unsafe replacement for a function call: use this\\n     * function instead.\\n     *\\n     * If `target` reverts with a revert reason, it is bubbled up by this\\n     * function (like regular Solidity function calls).\\n     *\\n     * Returns the raw returned data. To convert to the expected return value,\\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n     *\\n     * Requirements:\\n     *\\n     * - `target` must be a contract.\\n     * - calling `target` with `data` must not revert.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n        return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n     * `errorMessage` as a fallback revert reason when `target` reverts.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCall(\\n        address target,\\n        bytes memory data,\\n        string memory errorMessage\\n    ) internal returns (bytes memory) {\\n        return functionCallWithValue(target, data, 0, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n     * but also transferring `value` wei to `target`.\\n     *\\n     * Requirements:\\n     *\\n     * - the calling contract must have an ETH balance of at least `value`.\\n     * - the called Solidity function must be `payable`.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCallWithValue(\\n        address target,\\n        bytes memory data,\\n        uint256 value\\n    ) internal returns (bytes memory) {\\n        return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCallWithValue(\\n        address target,\\n        bytes memory data,\\n        uint256 value,\\n        string memory errorMessage\\n    ) internal returns (bytes memory) {\\n        require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n        require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\\n        return verifyCallResult(success, returndata, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n     * but performing a static call.\\n     *\\n     * _Available since v3.3._\\n     */\\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n        return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n     * but performing a static call.\\n     *\\n     * _Available since v3.3._\\n     */\\n    function functionStaticCall(\\n        address target,\\n        bytes memory data,\\n        string memory errorMessage\\n    ) internal view returns (bytes memory) {\\n        require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n        (bool success, bytes memory returndata) = target.staticcall(data);\\n        return verifyCallResult(success, returndata, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n     * revert reason using the provided one.\\n     *\\n     * _Available since v4.3._\\n     */\\n    function verifyCallResult(\\n        bool success,\\n        bytes memory returndata,\\n        string memory errorMessage\\n    ) internal pure returns (bytes memory) {\\n        if (success) {\\n            return returndata;\\n        } else {\\n            // Look for revert reason and bubble it up if present\\n            if (returndata.length > 0) {\\n                // The easiest way to bubble the revert reason is using memory via assembly\\n\\n                assembly {\\n                    let returndata_size := mload(returndata)\\n                    revert(add(32, returndata), returndata_size)\\n                }\\n            } else {\\n                revert(errorMessage);\\n            }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x55cf2bd9fc76704ddcdc19834cd288b7de00fc0f298a40ea16a954ae8991db2d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n    function __Context_init() internal onlyInitializing {\\n    }\\n\\n    function __Context_init_unchained() internal onlyInitializing {\\n    }\\n    function _msgSender() internal view virtual returns (address) {\\n        return msg.sender;\\n    }\\n\\n    function _msgData() internal view virtual returns (bytes calldata) {\\n        return msg.data;\\n    }\\n\\n    /**\\n     * @dev This empty reserved space is put in place to allow future versions to add new\\n     * variables without shifting down storage in the inheritance chain.\\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n     */\\n    uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `to`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address to, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `from` to `to` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address from,\\n        address to,\\n        uint256 amount\\n    ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n    using Address for address;\\n\\n    function safeTransfer(\\n        IERC20 token,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n    }\\n\\n    function safeTransferFrom(\\n        IERC20 token,\\n        address from,\\n        address to,\\n        uint256 value\\n    ) internal {\\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n    }\\n\\n    /**\\n     * @dev Deprecated. This function has issues similar to the ones found in\\n     * {IERC20-approve}, and its usage is discouraged.\\n     *\\n     * Whenever possible, use {safeIncreaseAllowance} and\\n     * {safeDecreaseAllowance} instead.\\n     */\\n    function safeApprove(\\n        IERC20 token,\\n        address spender,\\n        uint256 value\\n    ) internal {\\n        // safeApprove should only be called when setting an initial allowance,\\n        // or when resetting it to zero. To increase and decrease it, use\\n        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n        require(\\n            (value == 0) || (token.allowance(address(this), spender) == 0),\\n            \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n        );\\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n    }\\n\\n    function safeIncreaseAllowance(\\n        IERC20 token,\\n        address spender,\\n        uint256 value\\n    ) internal {\\n        uint256 newAllowance = token.allowance(address(this), spender) + value;\\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n    }\\n\\n    function safeDecreaseAllowance(\\n        IERC20 token,\\n        address spender,\\n        uint256 value\\n    ) internal {\\n        unchecked {\\n            uint256 oldAllowance = token.allowance(address(this), spender);\\n            require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n            uint256 newAllowance = oldAllowance - value;\\n            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n        }\\n    }\\n\\n    /**\\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\\n     * @param token The token targeted by the call.\\n     * @param data The call data (encoded using abi.encode or one of its variants).\\n     */\\n    function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n        // the target address contains contract code and also asserts for success in the low-level call.\\n\\n        bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n        if (returndata.length > 0) {\\n            // Return data is optional\\n            require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xc3d946432c0ddbb1f846a0d3985be71299df331b91d06732152117f62f0be2b5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n    /**\\n     * @dev Returns true if `account` is a contract.\\n     *\\n     * [IMPORTANT]\\n     * ====\\n     * It is unsafe to assume that an address for which this function returns\\n     * false is an externally-owned account (EOA) and not a contract.\\n     *\\n     * Among others, `isContract` will return false for the following\\n     * types of addresses:\\n     *\\n     *  - an externally-owned account\\n     *  - a contract in construction\\n     *  - an address where a contract will be created\\n     *  - an address where a contract lived, but was destroyed\\n     * ====\\n     *\\n     * [IMPORTANT]\\n     * ====\\n     * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n     *\\n     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n     * constructor.\\n     * ====\\n     */\\n    function isContract(address account) internal view returns (bool) {\\n        // This method relies on extcodesize/address.code.length, which returns 0\\n        // for contracts in construction, since the code is only stored at the end\\n        // of the constructor execution.\\n\\n        return account.code.length > 0;\\n    }\\n\\n    /**\\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n     * `recipient`, forwarding all available gas and reverting on errors.\\n     *\\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n     * imposed by `transfer`, making them unable to receive funds via\\n     * `transfer`. {sendValue} removes this limitation.\\n     *\\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n     *\\n     * IMPORTANT: because control is transferred to `recipient`, care must be\\n     * taken to not create reentrancy vulnerabilities. Consider using\\n     * {ReentrancyGuard} or the\\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n     */\\n    function sendValue(address payable recipient, uint256 amount) internal {\\n        require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n        (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n        require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n    }\\n\\n    /**\\n     * @dev Performs a Solidity function call using a low level `call`. A\\n     * plain `call` is an unsafe replacement for a function call: use this\\n     * function instead.\\n     *\\n     * If `target` reverts with a revert reason, it is bubbled up by this\\n     * function (like regular Solidity function calls).\\n     *\\n     * Returns the raw returned data. To convert to the expected return value,\\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n     *\\n     * Requirements:\\n     *\\n     * - `target` must be a contract.\\n     * - calling `target` with `data` must not revert.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n        return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n     * `errorMessage` as a fallback revert reason when `target` reverts.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCall(\\n        address target,\\n        bytes memory data,\\n        string memory errorMessage\\n    ) internal returns (bytes memory) {\\n        return functionCallWithValue(target, data, 0, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n     * but also transferring `value` wei to `target`.\\n     *\\n     * Requirements:\\n     *\\n     * - the calling contract must have an ETH balance of at least `value`.\\n     * - the called Solidity function must be `payable`.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCallWithValue(\\n        address target,\\n        bytes memory data,\\n        uint256 value\\n    ) internal returns (bytes memory) {\\n        return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCallWithValue(\\n        address target,\\n        bytes memory data,\\n        uint256 value,\\n        string memory errorMessage\\n    ) internal returns (bytes memory) {\\n        require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n        require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\\n        return verifyCallResult(success, returndata, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n     * but performing a static call.\\n     *\\n     * _Available since v3.3._\\n     */\\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n        return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n     * but performing a static call.\\n     *\\n     * _Available since v3.3._\\n     */\\n    function functionStaticCall(\\n        address target,\\n        bytes memory data,\\n        string memory errorMessage\\n    ) internal view returns (bytes memory) {\\n        require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n        (bool success, bytes memory returndata) = target.staticcall(data);\\n        return verifyCallResult(success, returndata, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n     * but performing a delegate call.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n        return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n     * but performing a delegate call.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function functionDelegateCall(\\n        address target,\\n        bytes memory data,\\n        string memory errorMessage\\n    ) internal returns (bytes memory) {\\n        require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n        (bool success, bytes memory returndata) = target.delegatecall(data);\\n        return verifyCallResult(success, returndata, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n     * revert reason using the provided one.\\n     *\\n     * _Available since v4.3._\\n     */\\n    function verifyCallResult(\\n        bool success,\\n        bytes memory returndata,\\n        string memory errorMessage\\n    ) internal pure returns (bytes memory) {\\n        if (success) {\\n            return returndata;\\n        } else {\\n            // Look for revert reason and bubble it up if present\\n            if (returndata.length > 0) {\\n                // The easiest way to bubble the revert reason is using memory via assembly\\n\\n                assembly {\\n                    let returndata_size := mload(returndata)\\n                    revert(add(32, returndata), returndata_size)\\n                }\\n            } else {\\n                revert(errorMessage);\\n            }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"contracts/access/OwnerWithdrawable.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSE\\n\\npragma solidity >=0.8.0;\\n\\nimport '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/interfaces/IERC20Upgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol';\\n\\n/// @author Alexandas\\n/// @dev Make the contract owner can withdraw token and eth\\nabstract contract OwnerWithdrawable is OwnableUpgradeable {\\n\\tusing SafeERC20Upgradeable for IERC20Upgradeable;\\n\\n\\t/// @dev emit when token is withdrawn\\n\\t/// @param token token address\\n\\t/// @param to receiver address\\n\\t/// @param value token value\\n\\tevent Withdrawal(IERC20Upgradeable token, address to, uint256 value);\\n\\n\\t/// @dev emit when ETH is withdrawn\\n\\t/// @param to receiver address\\n\\t/// @param value token value\\n\\tevent NativeWithdrawal(address to, uint256 value);\\n\\n\\t/// @dev withdraw token\\n\\t/// @param token token address\\n\\t/// @param to receiver address\\n\\t/// @param value token value\\n\\tfunction ownerWithdrawERC20(\\n\\t\\tIERC20Upgradeable token,\\n\\t\\taddress to,\\n\\t\\tuint256 value\\n\\t) external onlyOwner {\\n\\t\\ttoken.safeTransfer(to, value);\\n\\t\\temit Withdrawal(token, to, value);\\n\\t}\\n\\n\\t/// @dev withdraw ETH\\n\\t/// @param to receiver address\\n\\t/// @param value token value\\n\\tfunction ownerWithdrawNative(address payable to, uint256 value) external onlyOwner {\\n\\t\\tbool success = to.send(value);\\n\\t\\trequire(success, 'OwnerWithdrawable: withdraw native token failed');\\n\\t\\temit NativeWithdrawal(to, value);\\n\\t}\\n}\\n\",\"keccak256\":\"0x0f36a2a9ed2839c2530c4e27f9b1797f13e8a6a3d3c9bcaa4c87202f14757954\",\"license\":\"UNLICENSE\"},\"contracts/interfaces/IMessageSender.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSE\\n\\npragma solidity >=0.8.0;\\n\\nimport 'sgn-v2-contracts/contracts/message/libraries/MsgDataTypes.sol';\\n\\ninterface IMessageSender {\\n\\t/// @dev emit when src chain payment address updated\\n\\t/// @param payment payment address\\n\\tevent SrcChainPaymentUpdated(address payment);\\n\\n\\t/// @dev emit when src chain messageBus address updated\\n\\t/// @param messageBus messageBus address\\n\\tevent MessageBusUpdated(address messageBus);\\n\\n\\t/// @dev emit when dst chain receiver address updated\\n\\t/// @param receiver receiver address\\n\\tevent ReceiverUpdated(address receiver);\\n\\n\\t/// @dev emit when dst chain updated\\n\\t/// @param dstChainId dst chainId\\n\\tevent DstChainIdUpdated(uint64 dstChainId);\\n\\n\\t/// @dev emit when transfer refund\\n\\t/// @param token token address\\n\\t/// @param amount token amount\\n\\t/// @param message sender's message\\n\\t/// @param executor executor address\\n\\tevent MessageWithTransferRefund(address token, uint256 amount, bytes message, address executor);\\n\\n\\t/// @dev emit message sent\\n\\t/// @param sender sender contract address\\n\\t/// @param receiver receiver contract address\\n\\t/// @param srcChainId srcChainId\\n\\t/// @param dstChainId dstChainId\\n\\t/// @param message sender's message\\n\\tevent MessageSent(address sender, address receiver, uint64 srcChainId, uint64 dstChainId, bytes message);\\n\\n\\t/// @dev dst chain receiver\\n\\tfunction receiver() external view returns (address);\\n\\n\\t/// @dev dst chain chainId\\n\\tfunction dstChainId() external view returns (uint64);\\n\\n\\t/// @dev calculate message fee\\n\\tfunction calcFee(bytes memory message) external view returns (uint256);\\n\\n\\t/// @dev message id for Message bus in sgn\\n\\tfunction messageId(\\n\\t\\tMsgDataTypes.RouteInfo calldata route,\\n\\t\\tuint64 dstChainId,\\n\\t\\tbytes calldata message\\n\\t) external view returns (bytes32);\\n\\n\\t/// @dev send message to dst chain\\n\\t/// @param message message for dst chain\\n\\tfunction sendMessage(bytes memory message) external payable;\\n\\n}\\n\",\"keccak256\":\"0xef6f21d9e8b909e60a379cada24f2ff1b0011caf4e4efff26feb82ce470738f6\",\"license\":\"UNLICENSE\"},\"contracts/messages/MessageSender.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\npragma solidity >=0.8.0;\\n\\nimport '@openzeppelin/contracts-upgradeable/interfaces/IERC20Upgradeable.sol';\\nimport '@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol';\\nimport 'sgn-v2-contracts/contracts/message/interfaces/IMessageBus.sol';\\nimport 'sgn-v2-contracts/contracts/message/libraries/MessageSenderLib.sol';\\n\\nimport '../interfaces/IMessageSender.sol';\\nimport '../access/OwnerWithdrawable.sol';\\n\\n/// @author Alexandas\\n/// @dev Celer SGN source chain sender contract\\ncontract MessageSender is IMessageSender, OwnerWithdrawable {\\n\\tusing SafeERC20Upgradeable for IERC20Upgradeable;\\n\\n\\tenum ExecutionStatus {\\n\\t\\tFail,\\n\\t\\tSuccess,\\n\\t\\tRetry\\n\\t}\\n\\n\\t/// @dev src chain payment address\\n\\taddress public srcChainPayment;\\n\\n\\t/// @dev src chain messageBus address\\n\\taddress public messageBus;\\n\\n\\t/// @dev dst chain receiver address\\n\\taddress public override receiver;\\n\\n\\t/// @dev dst chainId\\n\\tuint64 public override dstChainId;\\n\\n\\tmodifier onlyMessageBus() {\\n\\t\\trequire(msg.sender == messageBus, 'MessageReceiver: caller is not message bus');\\n\\t\\t_;\\n\\t}\\n\\n\\tmodifier onlySrcChainPayment() {\\n\\t\\trequire(msg.sender == srcChainPayment, 'MessageSender: caller is not payment contract');\\n\\t\\t_;\\n\\t}\\n\\n\\tconstructor() initializer {}\\n\\n\\t/// @dev proxy initialize function\\n\\t/// @param owner contract owner\\n\\t/// @param _messageBus src chain messageBus\\n\\t/// @param _receiver dst chain receiver\\n\\t/// @param _dstChainId dst chain chainId\\n\\tfunction initialize(\\n\\t\\taddress owner,\\n\\t\\taddress _messageBus,\\n\\t\\taddress _receiver,\\n\\t\\tuint64 _dstChainId\\n\\t) external initializer {\\n\\t\\t_transferOwnership(owner);\\n\\t\\t_setMessageBus(_messageBus);\\n\\t\\t_setReceiver(_receiver);\\n\\t\\t_setDstChainId(_dstChainId);\\n\\t}\\n\\n\\t/// @dev sendMessage to dst chain\\n\\t/// @param message message to dst chain\\n\\tfunction sendMessage(bytes memory message) external payable onlySrcChainPayment {\\n\\t\\tMessageSenderLib.sendMessage(receiver, dstChainId, message, messageBus, msg.value);\\n\\t\\temit MessageSent(address(this), receiver, uint64(block.chainid), dstChainId, message);\\n\\t}\\n\\n\\t/// @dev call when cBridge transfer failed\\n\\t/// @param _token token address\\n\\t/// @param _amount token amount\\n\\t/// @param _message message\\n\\t/// @param executor exector address\\n\\tfunction executeMessageWithTransferRefund(\\n\\t\\taddress _token,\\n\\t\\tuint256 _amount,\\n\\t\\tbytes calldata _message,\\n\\t\\taddress executor\\n\\t) external payable onlyMessageBus returns (ExecutionStatus) {\\n\\t\\temit MessageWithTransferRefund(_token, _amount, _message, executor);\\n\\t\\treturn ExecutionStatus.Success;\\n\\t}\\n\\n\\t/// @dev set src chain payment\\n\\t/// @param _payment src chain payment address\\n\\tfunction setSrcChainPayment(address _payment) external onlyOwner {\\n\\t\\t_setSrcChainPayment(_payment);\\n\\t}\\n\\n\\tfunction _setSrcChainPayment(address _payment) internal {\\n\\t\\tsrcChainPayment = _payment;\\n\\t\\temit SrcChainPaymentUpdated(_payment);\\n\\t}\\n\\n\\t/// @dev update message bus\\n\\t/// @param messageBus message bus address\\n\\tfunction setMessageBus(address messageBus) external onlyOwner {\\n\\t\\t_setMessageBus(messageBus);\\n\\t}\\n\\n\\tfunction _setMessageBus(address _messageBus) internal {\\n\\t\\tmessageBus = _messageBus;\\n\\t\\temit MessageBusUpdated(messageBus);\\n\\t}\\n\\n\\t/// @dev set dst chain chainId\\n\\t/// @param dstChainId dst chainId\\n\\tfunction setDstChainId(uint64 dstChainId) external onlyOwner {\\n\\t\\t_setDstChainId(dstChainId);\\n\\t}\\n\\n\\tfunction _setDstChainId(uint64 _dstChainId) internal {\\n\\t\\tdstChainId = _dstChainId;\\n\\t\\temit DstChainIdUpdated(_dstChainId);\\n\\t}\\n\\n\\t/// @dev set dst chain receiver\\n\\t/// @param _receiver dst chain receiver\\n\\tfunction setReceiver(address _receiver) external onlyOwner {\\n\\t\\t_setReceiver(_receiver);\\n\\t}\\n\\n\\tfunction _setReceiver(address _receiver) internal {\\n\\t\\treceiver = _receiver;\\n\\t\\temit ReceiverUpdated(_receiver);\\n\\t}\\n\\n\\t/// @dev calculate message fee\\n\\t/// @param message message bytes\\n\\t/// @return fee\\n\\tfunction calcFee(bytes memory message) public view override returns (uint256) {\\n\\t\\treturn IMessageBus(messageBus).calcFee(message);\\n\\t}\\n\\n\\t/// @dev messageId for message bus\\n\\t/// @param route message route info\\n\\t/// @param dstChainId message route info\\n\\t/// @param message message bytes\\n\\tfunction messageId(\\n\\t\\tMsgDataTypes.RouteInfo calldata route,\\n\\t\\tuint64 dstChainId,\\n\\t\\tbytes calldata message\\n\\t) external view override returns (bytes32) {\\n\\t\\treturn\\n\\t\\t\\tkeccak256(abi.encodePacked(MsgDataTypes.MsgType.MessageOnly, route.sender, route.receiver, route.srcChainId, route.srcTxHash, dstChainId, message));\\n\\t}\\n}\\n\",\"keccak256\":\"0xeb524ebc0e5402e6a230188056a60da153f4545e216df609a586f1728852f9c6\",\"license\":\"GPL-3.0-only\"},\"sgn-v2-contracts/contracts/interfaces/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\npragma solidity >=0.8.0;\\n\\ninterface IBridge {\\n    function send(\\n        address _receiver,\\n        address _token,\\n        uint256 _amount,\\n        uint64 _dstChainId,\\n        uint64 _nonce,\\n        uint32 _maxSlippage\\n    ) external;\\n\\n    function relay(\\n        bytes calldata _relayRequest,\\n        bytes[] calldata _sigs,\\n        address[] calldata _signers,\\n        uint256[] calldata _powers\\n    ) external;\\n\\n    function transfers(bytes32 transferId) external view returns (bool);\\n\\n    function withdraws(bytes32 withdrawId) external view returns (bool);\\n\\n    function withdraw(\\n        bytes calldata _wdmsg,\\n        bytes[] calldata _sigs,\\n        address[] calldata _signers,\\n        uint256[] calldata _powers\\n    ) external;\\n\\n    /**\\n     * @notice Verifies that a message is signed by a quorum among the signers.\\n     * @param _msg signed message\\n     * @param _sigs list of signatures sorted by signer addresses in ascending order\\n     * @param _signers sorted list of current signers\\n     * @param _powers powers of current signers\\n     */\\n    function verifySigs(\\n        bytes memory _msg,\\n        bytes[] calldata _sigs,\\n        address[] calldata _signers,\\n        uint256[] calldata _powers\\n    ) external view;\\n}\\n\",\"keccak256\":\"0x5f5ba7dedac51bcc2cb40e4a39caa18d46704b659a576b6be36ed68e657c8251\",\"license\":\"GPL-3.0-only\"},\"sgn-v2-contracts/contracts/interfaces/IOriginalTokenVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\npragma solidity >=0.8.0;\\n\\ninterface IOriginalTokenVault {\\n    /**\\n     * @notice Lock original tokens to trigger mint at a remote chain's PeggedTokenBridge\\n     * @param _token local token address\\n     * @param _amount locked token amount\\n     * @param _mintChainId destination chainId to mint tokens\\n     * @param _mintAccount destination account to receive minted tokens\\n     * @param _nonce user input to guarantee unique depositId\\n     */\\n    function deposit(\\n        address _token,\\n        uint256 _amount,\\n        uint64 _mintChainId,\\n        address _mintAccount,\\n        uint64 _nonce\\n    ) external;\\n\\n    /**\\n     * @notice Withdraw locked original tokens triggered by a burn at a remote chain's PeggedTokenBridge.\\n     * @param _request The serialized Withdraw protobuf.\\n     * @param _sigs The list of signatures sorted by signing addresses in ascending order. A relay must be signed-off by\\n     * +2/3 of the bridge's current signing power to be delivered.\\n     * @param _signers The sorted list of signers.\\n     * @param _powers The signing powers of the signers.\\n     */\\n    function withdraw(\\n        bytes calldata _request,\\n        bytes[] calldata _sigs,\\n        address[] calldata _signers,\\n        uint256[] calldata _powers\\n    ) external;\\n\\n    function records(bytes32 recordId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x8b4e940c16d960a4f8f0516951c52afbeb31c9b8bbbda7523650aadee2d72369\",\"license\":\"GPL-3.0-only\"},\"sgn-v2-contracts/contracts/interfaces/IOriginalTokenVaultV2.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\npragma solidity >=0.8.0;\\n\\ninterface IOriginalTokenVaultV2 {\\n    /**\\n     * @notice Lock original tokens to trigger mint at a remote chain's PeggedTokenBridge\\n     * @param _token local token address\\n     * @param _amount locked token amount\\n     * @param _mintChainId destination chainId to mint tokens\\n     * @param _mintAccount destination account to receive minted tokens\\n     * @param _nonce user input to guarantee unique depositId\\n     */\\n    function deposit(\\n        address _token,\\n        uint256 _amount,\\n        uint64 _mintChainId,\\n        address _mintAccount,\\n        uint64 _nonce\\n    ) external returns (bytes32);\\n\\n    /**\\n     * @notice Withdraw locked original tokens triggered by a burn at a remote chain's PeggedTokenBridge.\\n     * @param _request The serialized Withdraw protobuf.\\n     * @param _sigs The list of signatures sorted by signing addresses in ascending order. A relay must be signed-off by\\n     * +2/3 of the bridge's current signing power to be delivered.\\n     * @param _signers The sorted list of signers.\\n     * @param _powers The signing powers of the signers.\\n     */\\n    function withdraw(\\n        bytes calldata _request,\\n        bytes[] calldata _sigs,\\n        address[] calldata _signers,\\n        uint256[] calldata _powers\\n    ) external returns (bytes32);\\n\\n    function records(bytes32 recordId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xc3d522d350cd42dc296fdea6ae75d7fe39244638161aadd1cbc70de13e34380d\",\"license\":\"GPL-3.0-only\"},\"sgn-v2-contracts/contracts/interfaces/IPeggedTokenBridge.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\npragma solidity >=0.8.0;\\n\\ninterface IPeggedTokenBridge {\\n    /**\\n     * @notice Burn tokens to trigger withdrawal at a remote chain's OriginalTokenVault\\n     * @param _token local token address\\n     * @param _amount locked token amount\\n     * @param _withdrawAccount account who withdraw original tokens on the remote chain\\n     * @param _nonce user input to guarantee unique depositId\\n     */\\n    function burn(\\n        address _token,\\n        uint256 _amount,\\n        address _withdrawAccount,\\n        uint64 _nonce\\n    ) external;\\n\\n    /**\\n     * @notice Mint tokens triggered by deposit at a remote chain's OriginalTokenVault.\\n     * @param _request The serialized Mint protobuf.\\n     * @param _sigs The list of signatures sorted by signing addresses in ascending order. A relay must be signed-off by\\n     * +2/3 of the sigsVerifier's current signing power to be delivered.\\n     * @param _signers The sorted list of signers.\\n     * @param _powers The signing powers of the signers.\\n     */\\n    function mint(\\n        bytes calldata _request,\\n        bytes[] calldata _sigs,\\n        address[] calldata _signers,\\n        uint256[] calldata _powers\\n    ) external;\\n\\n    function records(bytes32 recordId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5adc3e5f1c8767c9f4580b499b16aba25f41934a2f945e9f0227b28d4b0405ae\",\"license\":\"GPL-3.0-only\"},\"sgn-v2-contracts/contracts/interfaces/IPeggedTokenBridgeV2.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\npragma solidity >=0.8.0;\\n\\ninterface IPeggedTokenBridgeV2 {\\n    /**\\n     * @notice Burn pegged tokens to trigger a cross-chain withdrawal of the original tokens at a remote chain's\\n     * OriginalTokenVault, or mint at another remote chain\\n     * @param _token The pegged token address.\\n     * @param _amount The amount to burn.\\n     * @param _toChainId If zero, withdraw from original vault; otherwise, the remote chain to mint tokens.\\n     * @param _toAccount The account to receive tokens on the remote chain\\n     * @param _nonce A number to guarantee unique depositId. Can be timestamp in practice.\\n     */\\n    function burn(\\n        address _token,\\n        uint256 _amount,\\n        uint64 _toChainId,\\n        address _toAccount,\\n        uint64 _nonce\\n    ) external returns (bytes32);\\n\\n    // same with `burn` above, use openzeppelin ERC20Burnable interface\\n    function burnFrom(\\n        address _token,\\n        uint256 _amount,\\n        uint64 _toChainId,\\n        address _toAccount,\\n        uint64 _nonce\\n    ) external returns (bytes32);\\n\\n    /**\\n     * @notice Mint tokens triggered by deposit at a remote chain's OriginalTokenVault.\\n     * @param _request The serialized Mint protobuf.\\n     * @param _sigs The list of signatures sorted by signing addresses in ascending order. A relay must be signed-off by\\n     * +2/3 of the sigsVerifier's current signing power to be delivered.\\n     * @param _signers The sorted list of signers.\\n     * @param _powers The signing powers of the signers.\\n     */\\n    function mint(\\n        bytes calldata _request,\\n        bytes[] calldata _sigs,\\n        address[] calldata _signers,\\n        uint256[] calldata _powers\\n    ) external returns (bytes32);\\n\\n    function records(bytes32 recordId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xea5828630c131a1c7017360d4c1729c71bdeb5eaf366a30c9637c82795cea9d5\",\"license\":\"GPL-3.0-only\"},\"sgn-v2-contracts/contracts/message/interfaces/IMessageBus.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\npragma solidity >=0.8.0;\\n\\nimport \\\"../libraries/MsgDataTypes.sol\\\";\\n\\ninterface IMessageBus {\\n    function liquidityBridge() external view returns (address);\\n\\n    function pegBridge() external view returns (address);\\n\\n    function pegBridgeV2() external view returns (address);\\n\\n    function pegVault() external view returns (address);\\n\\n    function pegVaultV2() external view returns (address);\\n\\n    /**\\n     * @notice Calculates the required fee for the message.\\n     * @param _message Arbitrary message bytes to be decoded by the destination app contract.\\n     @ @return The required fee.\\n     */\\n    function calcFee(bytes calldata _message) external view returns (uint256);\\n\\n    /**\\n     * @notice Sends a message to an app on another chain via MessageBus without an associated transfer.\\n     * A fee is charged in the native gas token.\\n     * @param _receiver The address of the destination app contract.\\n     * @param _dstChainId The destination chain ID.\\n     * @param _message Arbitrary message bytes to be decoded by the destination app contract.\\n     */\\n    function sendMessage(\\n        address _receiver,\\n        uint256 _dstChainId,\\n        bytes calldata _message\\n    ) external payable;\\n\\n    /**\\n     * @notice Sends a message associated with a transfer to an app on another chain via MessageBus without an associated transfer.\\n     * A fee is charged in the native token.\\n     * @param _receiver The address of the destination app contract.\\n     * @param _dstChainId The destination chain ID.\\n     * @param _srcBridge The bridge contract to send the transfer with.\\n     * @param _srcTransferId The transfer ID.\\n     * @param _dstChainId The destination chain ID.\\n     * @param _message Arbitrary message bytes to be decoded by the destination app contract.\\n     */\\n    function sendMessageWithTransfer(\\n        address _receiver,\\n        uint256 _dstChainId,\\n        address _srcBridge,\\n        bytes32 _srcTransferId,\\n        bytes calldata _message\\n    ) external payable;\\n\\n    /**\\n     * @notice Withdraws message fee in the form of native gas token.\\n     * @param _account The address receiving the fee.\\n     * @param _cumulativeFee The cumulative fee credited to the account. Tracked by SGN.\\n     * @param _sigs The list of signatures sorted by signing addresses in ascending order. A withdrawal must be\\n     * signed-off by +2/3 of the sigsVerifier's current signing power to be delivered.\\n     * @param _signers The sorted list of signers.\\n     * @param _powers The signing powers of the signers.\\n     */\\n    function withdrawFee(\\n        address _account,\\n        uint256 _cumulativeFee,\\n        bytes[] calldata _sigs,\\n        address[] calldata _signers,\\n        uint256[] calldata _powers\\n    ) external;\\n\\n    /**\\n     * @notice Execute a message with a successful transfer.\\n     * @param _message Arbitrary message bytes originated from and encoded by the source app contract\\n     * @param _transfer The transfer info.\\n     * @param _sigs The list of signatures sorted by signing addresses in ascending order. A relay must be signed-off by\\n     * +2/3 of the sigsVerifier's current signing power to be delivered.\\n     * @param _signers The sorted list of signers.\\n     * @param _powers The signing powers of the signers.\\n     */\\n    function executeMessageWithTransfer(\\n        bytes calldata _message,\\n        MsgDataTypes.TransferInfo calldata _transfer,\\n        bytes[] calldata _sigs,\\n        address[] calldata _signers,\\n        uint256[] calldata _powers\\n    ) external payable;\\n\\n    /**\\n     * @notice Execute a message with a refunded transfer.\\n     * @param _message Arbitrary message bytes originated from and encoded by the source app contract\\n     * @param _transfer The transfer info.\\n     * @param _sigs The list of signatures sorted by signing addresses in ascending order. A relay must be signed-off by\\n     * +2/3 of the sigsVerifier's current signing power to be delivered.\\n     * @param _signers The sorted list of signers.\\n     * @param _powers The signing powers of the signers.\\n     */\\n    function executeMessageWithTransferRefund(\\n        bytes calldata _message, // the same message associated with the original transfer\\n        MsgDataTypes.TransferInfo calldata _transfer,\\n        bytes[] calldata _sigs,\\n        address[] calldata _signers,\\n        uint256[] calldata _powers\\n    ) external payable;\\n\\n    /**\\n     * @notice Execute a message not associated with a transfer.\\n     * @param _message Arbitrary message bytes originated from and encoded by the source app contract\\n     * @param _sigs The list of signatures sorted by signing addresses in ascending order. A relay must be signed-off by\\n     * +2/3 of the sigsVerifier's current signing power to be delivered.\\n     * @param _signers The sorted list of signers.\\n     * @param _powers The signing powers of the signers.\\n     */\\n    function executeMessage(\\n        bytes calldata _message,\\n        MsgDataTypes.RouteInfo calldata _route,\\n        bytes[] calldata _sigs,\\n        address[] calldata _signers,\\n        uint256[] calldata _powers\\n    ) external payable;\\n}\\n\",\"keccak256\":\"0x17d7b296165800697f311fb52f0f0f149fc7ebcc200d4b557981aa258aa1e7c8\",\"license\":\"GPL-3.0-only\"},\"sgn-v2-contracts/contracts/message/libraries/MessageSenderLib.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\npragma solidity >=0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport \\\"../../interfaces/IBridge.sol\\\";\\nimport \\\"../../interfaces/IOriginalTokenVault.sol\\\";\\nimport \\\"../../interfaces/IOriginalTokenVaultV2.sol\\\";\\nimport \\\"../../interfaces/IPeggedTokenBridge.sol\\\";\\nimport \\\"../../interfaces/IPeggedTokenBridgeV2.sol\\\";\\nimport \\\"../interfaces/IMessageBus.sol\\\";\\nimport \\\"./MsgDataTypes.sol\\\";\\n\\nlibrary MessageSenderLib {\\n    using SafeERC20 for IERC20;\\n\\n    // ============== Internal library functions called by apps ==============\\n\\n    /**\\n     * @notice Sends a message to an app on another chain via MessageBus without an associated transfer.\\n     * @param _receiver The address of the destination app contract.\\n     * @param _dstChainId The destination chain ID.\\n     * @param _message Arbitrary message bytes to be decoded by the destination app contract.\\n     * @param _messageBus The address of the MessageBus on this chain.\\n     * @param _fee The fee amount to pay to MessageBus.\\n     */\\n    function sendMessage(\\n        address _receiver,\\n        uint64 _dstChainId,\\n        bytes memory _message,\\n        address _messageBus,\\n        uint256 _fee\\n    ) internal {\\n        IMessageBus(_messageBus).sendMessage{value: _fee}(_receiver, _dstChainId, _message);\\n    }\\n\\n    /**\\n     * @notice Sends a message to an app on another chain via MessageBus with an associated transfer.\\n     * @param _receiver The address of the destination app contract.\\n     * @param _token The address of the token to be sent.\\n     * @param _amount The amount of tokens to be sent.\\n     * @param _dstChainId The destination chain ID.\\n     * @param _nonce A number input to guarantee uniqueness of transferId. Can be timestamp in practice.\\n     * @param _maxSlippage The max slippage accepted, given as percentage in point (pip). Eg. 5000 means 0.5%.\\n     * Must be greater than minimalMaxSlippage. Receiver is guaranteed to receive at least (100% - max slippage percentage) * amount or the\\n     * transfer can be refunded. Only applicable to the {MsgDataTypes.BridgeSendType.Liquidity}.\\n     * @param _message Arbitrary message bytes to be decoded by the destination app contract.\\n     * @param _bridgeSendType One of the {MsgDataTypes.BridgeSendType} enum.\\n     * @param _messageBus The address of the MessageBus on this chain.\\n     * @param _fee The fee amount to pay to MessageBus.\\n     * @return The transfer ID.\\n     */\\n    function sendMessageWithTransfer(\\n        address _receiver,\\n        address _token,\\n        uint256 _amount,\\n        uint64 _dstChainId,\\n        uint64 _nonce,\\n        uint32 _maxSlippage,\\n        bytes memory _message,\\n        MsgDataTypes.BridgeSendType _bridgeSendType,\\n        address _messageBus,\\n        uint256 _fee\\n    ) internal returns (bytes32) {\\n        if (_bridgeSendType == MsgDataTypes.BridgeSendType.Liquidity) {\\n            return\\n                sendMessageWithLiquidityBridgeTransfer(\\n                    _receiver,\\n                    _token,\\n                    _amount,\\n                    _dstChainId,\\n                    _nonce,\\n                    _maxSlippage,\\n                    _message,\\n                    _messageBus,\\n                    _fee\\n                );\\n        } else if (\\n            _bridgeSendType == MsgDataTypes.BridgeSendType.PegDeposit ||\\n            _bridgeSendType == MsgDataTypes.BridgeSendType.PegV2Deposit\\n        ) {\\n            return\\n                sendMessageWithPegVaultDeposit(\\n                    _bridgeSendType,\\n                    _receiver,\\n                    _token,\\n                    _amount,\\n                    _dstChainId,\\n                    _nonce,\\n                    _message,\\n                    _messageBus,\\n                    _fee\\n                );\\n        } else if (\\n            _bridgeSendType == MsgDataTypes.BridgeSendType.PegBurn ||\\n            _bridgeSendType == MsgDataTypes.BridgeSendType.PegV2Burn\\n        ) {\\n            return\\n                sendMessageWithPegBridgeBurn(\\n                    _bridgeSendType,\\n                    _receiver,\\n                    _token,\\n                    _amount,\\n                    _dstChainId,\\n                    _nonce,\\n                    _message,\\n                    _messageBus,\\n                    _fee\\n                );\\n        } else {\\n            revert(\\\"bridge type not supported\\\");\\n        }\\n    }\\n\\n    /**\\n     * @notice Sends a message to an app on another chain via MessageBus with an associated liquidity bridge transfer.\\n     * @param _receiver The address of the destination app contract.\\n     * @param _token The address of the token to be sent.\\n     * @param _amount The amount of tokens to be sent.\\n     * @param _dstChainId The destination chain ID.\\n     * @param _nonce A number input to guarantee uniqueness of transferId. Can be timestamp in practice.\\n     * @param _maxSlippage The max slippage accepted, given as percentage in point (pip). Eg. 5000 means 0.5%.\\n     * Must be greater than minimalMaxSlippage. Receiver is guaranteed to receive at least (100% - max slippage percentage) * amount or the\\n     * transfer can be refunded.\\n     * @param _message Arbitrary message bytes to be decoded by the destination app contract.\\n     * @param _messageBus The address of the MessageBus on this chain.\\n     * @param _fee The fee amount to pay to MessageBus.\\n     * @return The transfer ID.\\n     */\\n    function sendMessageWithLiquidityBridgeTransfer(\\n        address _receiver,\\n        address _token,\\n        uint256 _amount,\\n        uint64 _dstChainId,\\n        uint64 _nonce,\\n        uint32 _maxSlippage,\\n        bytes memory _message,\\n        address _messageBus,\\n        uint256 _fee\\n    ) internal returns (bytes32) {\\n        address bridge = IMessageBus(_messageBus).liquidityBridge();\\n        IERC20(_token).safeIncreaseAllowance(bridge, _amount);\\n        IBridge(bridge).send(_receiver, _token, _amount, _dstChainId, _nonce, _maxSlippage);\\n        bytes32 transferId = keccak256(\\n            abi.encodePacked(address(this), _receiver, _token, _amount, _dstChainId, _nonce, uint64(block.chainid))\\n        );\\n        IMessageBus(_messageBus).sendMessageWithTransfer{value: _fee}(\\n            _receiver,\\n            _dstChainId,\\n            bridge,\\n            transferId,\\n            _message\\n        );\\n        return transferId;\\n    }\\n\\n    /**\\n     * @notice Sends a message to an app on another chain via MessageBus with an associated OriginalTokenVault deposit.\\n     * @param _receiver The address of the destination app contract.\\n     * @param _token The address of the token to be sent.\\n     * @param _amount The amount of tokens to be sent.\\n     * @param _dstChainId The destination chain ID.\\n     * @param _nonce A number input to guarantee uniqueness of transferId. Can be timestamp in practice.\\n     * @param _message Arbitrary message bytes to be decoded by the destination app contract.\\n     * @param _messageBus The address of the MessageBus on this chain.\\n     * @param _fee The fee amount to pay to MessageBus.\\n     * @return The transfer ID.\\n     */\\n    function sendMessageWithPegVaultDeposit(\\n        MsgDataTypes.BridgeSendType _bridgeSendType,\\n        address _receiver,\\n        address _token,\\n        uint256 _amount,\\n        uint64 _dstChainId,\\n        uint64 _nonce,\\n        bytes memory _message,\\n        address _messageBus,\\n        uint256 _fee\\n    ) internal returns (bytes32) {\\n        address pegVault;\\n        if (_bridgeSendType == MsgDataTypes.BridgeSendType.PegDeposit) {\\n            pegVault = IMessageBus(_messageBus).pegVault();\\n        } else {\\n            pegVault = IMessageBus(_messageBus).pegVaultV2();\\n        }\\n        IERC20(_token).safeIncreaseAllowance(pegVault, _amount);\\n        bytes32 transferId;\\n        if (_bridgeSendType == MsgDataTypes.BridgeSendType.PegDeposit) {\\n            IOriginalTokenVault(pegVault).deposit(_token, _amount, _dstChainId, _receiver, _nonce);\\n            transferId = keccak256(\\n                abi.encodePacked(address(this), _token, _amount, _dstChainId, _receiver, _nonce, uint64(block.chainid))\\n            );\\n        } else {\\n            transferId = IOriginalTokenVaultV2(pegVault).deposit(_token, _amount, _dstChainId, _receiver, _nonce);\\n        }\\n        IMessageBus(_messageBus).sendMessageWithTransfer{value: _fee}(\\n            _receiver,\\n            _dstChainId,\\n            pegVault,\\n            transferId,\\n            _message\\n        );\\n        return transferId;\\n    }\\n\\n    /**\\n     * @notice Sends a message to an app on another chain via MessageBus with an associated PeggedTokenBridge burn.\\n     * @param _receiver The address of the destination app contract.\\n     * @param _token The address of the token to be sent.\\n     * @param _amount The amount of tokens to be sent.\\n     * @param _dstChainId The destination chain ID.\\n     * @param _nonce A number input to guarantee uniqueness of transferId. Can be timestamp in practice.\\n     * @param _message Arbitrary message bytes to be decoded by the destination app contract.\\n     * @param _messageBus The address of the MessageBus on this chain.\\n     * @param _fee The fee amount to pay to MessageBus.\\n     * @return The transfer ID.\\n     */\\n    function sendMessageWithPegBridgeBurn(\\n        MsgDataTypes.BridgeSendType _bridgeSendType,\\n        address _receiver,\\n        address _token,\\n        uint256 _amount,\\n        uint64 _dstChainId,\\n        uint64 _nonce,\\n        bytes memory _message,\\n        address _messageBus,\\n        uint256 _fee\\n    ) internal returns (bytes32) {\\n        address pegBridge;\\n        if (_bridgeSendType == MsgDataTypes.BridgeSendType.PegBurn) {\\n            pegBridge = IMessageBus(_messageBus).pegBridge();\\n        } else {\\n            pegBridge = IMessageBus(_messageBus).pegBridgeV2();\\n        }\\n        IERC20(_token).safeIncreaseAllowance(pegBridge, _amount);\\n        bytes32 transferId;\\n        if (_bridgeSendType == MsgDataTypes.BridgeSendType.PegBurn) {\\n            IPeggedTokenBridge(pegBridge).burn(_token, _amount, _receiver, _nonce);\\n            transferId = keccak256(\\n                abi.encodePacked(address(this), _token, _amount, _receiver, _nonce, uint64(block.chainid))\\n            );\\n        } else {\\n            transferId = IPeggedTokenBridgeV2(pegBridge).burn(_token, _amount, _dstChainId, _receiver, _nonce);\\n        }\\n        // handle cases where certain tokens do not spend allowance for role-based burn\\n        IERC20(_token).safeApprove(pegBridge, 0);\\n        IMessageBus(_messageBus).sendMessageWithTransfer{value: _fee}(\\n            _receiver,\\n            _dstChainId,\\n            pegBridge,\\n            transferId,\\n            _message\\n        );\\n        return transferId;\\n    }\\n\\n    /**\\n     * @notice Sends a token transfer via a bridge.\\n     * @param _receiver The address of the destination app contract.\\n     * @param _token The address of the token to be sent.\\n     * @param _amount The amount of tokens to be sent.\\n     * @param _dstChainId The destination chain ID.\\n     * @param _nonce A number input to guarantee uniqueness of transferId. Can be timestamp in practice.\\n     * @param _maxSlippage The max slippage accepted, given as percentage in point (pip). Eg. 5000 means 0.5%.\\n     * Must be greater than minimalMaxSlippage. Receiver is guaranteed to receive at least (100% - max slippage percentage) * amount or the\\n     * transfer can be refunded.\\n     * @param _bridgeSendType One of the {MsgDataTypes.BridgeSendType} enum.\\n     */\\n    function sendTokenTransfer(\\n        address _receiver,\\n        address _token,\\n        uint256 _amount,\\n        uint64 _dstChainId,\\n        uint64 _nonce,\\n        uint32 _maxSlippage,\\n        MsgDataTypes.BridgeSendType _bridgeSendType,\\n        address _bridge\\n    ) internal {\\n        IERC20(_token).safeIncreaseAllowance(_bridge, _amount);\\n        if (_bridgeSendType == MsgDataTypes.BridgeSendType.Liquidity) {\\n            IBridge(_bridge).send(_receiver, _token, _amount, _dstChainId, _nonce, _maxSlippage);\\n        } else if (_bridgeSendType == MsgDataTypes.BridgeSendType.PegDeposit) {\\n            IOriginalTokenVault(_bridge).deposit(_token, _amount, _dstChainId, _receiver, _nonce);\\n        } else if (_bridgeSendType == MsgDataTypes.BridgeSendType.PegBurn) {\\n            IPeggedTokenBridge(_bridge).burn(_token, _amount, _receiver, _nonce);\\n            // handle cases where certain tokens do not spend allowance for role-based burn\\n            IERC20(_token).safeApprove(_bridge, 0);\\n        } else if (_bridgeSendType == MsgDataTypes.BridgeSendType.PegV2Deposit) {\\n            IOriginalTokenVaultV2(_bridge).deposit(_token, _amount, _dstChainId, _receiver, _nonce);\\n        } else if (_bridgeSendType == MsgDataTypes.BridgeSendType.PegV2Burn) {\\n            IPeggedTokenBridgeV2(_bridge).burn(_token, _amount, _dstChainId, _receiver, _nonce);\\n            // handle cases where certain tokens do not spend allowance for role-based burn\\n            IERC20(_token).safeApprove(_bridge, 0);\\n        } else if (_bridgeSendType == MsgDataTypes.BridgeSendType.PegV2BurnFrom) {\\n            IPeggedTokenBridgeV2(_bridge).burnFrom(_token, _amount, _dstChainId, _receiver, _nonce);\\n            // handle cases where certain tokens do not spend allowance for role-based burn\\n            IERC20(_token).safeApprove(_bridge, 0);\\n        } else {\\n            revert(\\\"bridge type not supported\\\");\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xd7e93a0efe4e607d69feb173cf7d2cf7785375ad56053f6ad3413ceda9fc2687\",\"license\":\"GPL-3.0-only\"},\"sgn-v2-contracts/contracts/message/libraries/MsgDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n\\npragma solidity 0.8.9;\\n\\nlibrary MsgDataTypes {\\n    // bridge operation type at the sender side (src chain)\\n    enum BridgeSendType {\\n        Null,\\n        Liquidity,\\n        PegDeposit,\\n        PegBurn,\\n        PegV2Deposit,\\n        PegV2Burn,\\n        PegV2BurnFrom\\n    }\\n\\n    // bridge operation type at the receiver side (dst chain)\\n    enum TransferType {\\n        Null,\\n        LqRelay, // relay through liquidity bridge\\n        LqWithdraw, // withdraw from liquidity bridge\\n        PegMint, // mint through pegged token bridge\\n        PegWithdraw, // withdraw from original token vault\\n        PegV2Mint, // mint through pegged token bridge v2\\n        PegV2Withdraw // withdraw from original token vault v2\\n    }\\n\\n    enum MsgType {\\n        MessageWithTransfer,\\n        MessageOnly\\n    }\\n\\n    enum TxStatus {\\n        Null,\\n        Success,\\n        Fail,\\n        Fallback,\\n        Pending // transient state within a transaction\\n    }\\n\\n    struct TransferInfo {\\n        TransferType t;\\n        address sender;\\n        address receiver;\\n        address token;\\n        uint256 amount;\\n        uint64 wdseq; // only needed for LqWithdraw (refund)\\n        uint64 srcChainId;\\n        bytes32 refId;\\n        bytes32 srcTxHash; // src chain msg tx hash\\n    }\\n\\n    struct RouteInfo {\\n        address sender;\\n        address receiver;\\n        uint64 srcChainId;\\n        bytes32 srcTxHash; // src chain msg tx hash\\n    }\\n\\n    struct MsgWithTransferExecutionParams {\\n        bytes message;\\n        TransferInfo transfer;\\n        bytes[] sigs;\\n        address[] signers;\\n        uint256[] powers;\\n    }\\n\\n    struct BridgeTransferParams {\\n        bytes request;\\n        bytes[] sigs;\\n        address[] signers;\\n        uint256[] powers;\\n    }\\n}\\n\",\"keccak256\":\"0x4ac9e6e5be92e3e58adbcab75ef765458d37fd4908d764477a0f32a96f9ecbba\",\"license\":\"GPL-3.0-only\"}},\"version\":1}",
  "bytecode": "0x60806040523480156200001157600080fd5b5060006200002060016200008e565b9050801562000039576000805461ff0019166101001790555b801562000087576000805461ff00191690556040517f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906200007e9060019062000168565b60405180910390a15b50620001cb565b60008054610100900460ff1615620000f7578160ff166001148015620000c75750620000c5306200013b60201b620008b21760201c565b155b620000ef5760405162461bcd60e51b8152600401620000e69062000178565b60405180910390fd5b506000919050565b60005460ff808416911610620001215760405162461bcd60e51b8152600401620000e69062000178565b506000805460ff191660ff92909216919091179055600190565b6001600160a01b03163b151590565b600060ff82165b92915050565b62000162816200014a565b82525050565b6020810162000151828462000157565b602080825281016200015181602e81527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160208201526d191e481a5b9a5d1a585b1a5e995960921b604082015260600190565b6118ec80620001db6000396000f3fe6080604052600436106101095760003560e01c80638da5cb5b11610095578063bbd53ea711610064578063bbd53ea7146102c9578063d204d9a8146102e9578063d7c8cb2414610309578063f2fde38b14610329578063f7260d3e1461034957600080fd5b80638da5cb5b1461024257806393563a9514610269578063a1a227fa14610289578063bb0248aa146102a957600080fd5b8063547cad12116100dc578063547cad12146101ba578063699256f4146101da578063715018a6146101fa578063718da7ee1461020f57806382646a581461022f57600080fd5b80630bcb49821461010e57806330c593f7146101375780633fe3f1cf1461016b5780635335dca21461018d575b600080fd5b61012161011c366004610dd2565b610369565b60405161012e9190610e9f565b60405180910390f35b34801561014357600080fd5b5060675461015e90600160a01b90046001600160401b031681565b60405161012e9190610ebc565b34801561017757600080fd5b5061018b610186366004610ee4565b6103ea565b005b34801561019957600080fd5b506101ad6101a836600461103c565b610484565b60405161012e919061107c565b3480156101c657600080fd5b5061018b6101d536600461108a565b61050b565b3480156101e657600080fd5b5061018b6101f53660046110ab565b610541565b34801561020657600080fd5b5061018b6105ef565b34801561021b57600080fd5b5061018b61022a36600461108a565b610625565b61018b61023d36600461103c565b610658565b34801561024e57600080fd5b506033546001600160a01b03165b60405161012e91906110f1565b34801561027557600080fd5b5061018b61028436600461111e565b610711565b34801561029557600080fd5b5060665461025c906001600160a01b031681565b3480156102b557600080fd5b506101ad6102c4366004611189565b610782565b3480156102d557600080fd5b5061018b6102e436600461108a565b6107f3565b3480156102f557600080fd5b5060655461025c906001600160a01b031681565b34801561031557600080fd5b5061018b6103243660046111f6565b610826565b34801561033557600080fd5b5061018b61034436600461108a565b610859565b34801561035557600080fd5b5060675461025c906001600160a01b031681565b6066546000906001600160a01b0316331461039f5760405162461bcd60e51b815260040161039690611261565b60405180910390fd5b7f9afeef02b2dc7c87e4d0fe67945dedf1c4ee5bcf5cdf26f94fb1837859816f3386868686866040516103d695949392919061129a565b60405180910390a150600195945050505050565b60006103f660016108c1565b9050801561040e576000805461ff0019166101001790555b6104178561094e565b610420846109a0565b610429836109ec565b61043282610a37565b801561047d576000805461ff00191690556040517f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890610474906001906112fe565b60405180910390a15b5050505050565b60665460405163299aee5160e11b81526000916001600160a01b031690635335dca2906104b590859060040161136a565b60206040518083038186803b1580156104cd57600080fd5b505afa1580156104e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105059190611386565b92915050565b6033546001600160a01b031633146105355760405162461bcd60e51b8152600401610396906113dc565b61053e816109a0565b50565b6033546001600160a01b0316331461056b5760405162461bcd60e51b8152600401610396906113dc565b6040516000906001600160a01b0384169083156108fc0290849084818181858888f193505050509050806105b15760405162461bcd60e51b815260040161039690611438565b7f2c876ecb97b3c6854f2488d373403f903eacb800e51c159a5c0c7a9c857e482783836040516105e292919061145c565b60405180910390a1505050565b6033546001600160a01b031633146106195760405162461bcd60e51b8152600401610396906113dc565b610623600061094e565b565b6033546001600160a01b0316331461064f5760405162461bcd60e51b8152600401610396906113dc565b61053e816109ec565b6065546001600160a01b031633146106825760405162461bcd60e51b8152600401610396906114c1565b6067546066546106b3916001600160a01b0380821692600160a01b9092046001600160401b03169185911634610a8c565b6067546040517fbbb476e98b9b7845d6cfd4e37a62d14480243e3fe95454791d9eb9a6ca748e32916107069130916001600160a01b038116914691600160a01b90046001600160401b03169087906114d1565b60405180910390a150565b6033546001600160a01b0316331461073b5760405162461bcd60e51b8152600401610396906113dc565b61074f6001600160a01b0384168383610af7565b7f2717ead6b9200dd235aad468c9809ea400fe33ac69b5bfaa6d3e90fc922b63988383836040516105e293929190611518565b60006001610793602087018761108a565b6107a3604088016020890161108a565b6107b36060890160408a016111f6565b88606001358888886040516020016107d29897969594939291906115db565b6040516020818303038152906040528051906020012090505b949350505050565b6033546001600160a01b0316331461081d5760405162461bcd60e51b8152600401610396906113dc565b61053e81610b52565b6033546001600160a01b031633146108505760405162461bcd60e51b8152600401610396906113dc565b61053e81610a37565b6033546001600160a01b031633146108835760405162461bcd60e51b8152600401610396906113dc565b6001600160a01b0381166108a95760405162461bcd60e51b815260040161039690611699565b61053e8161094e565b6001600160a01b03163b151590565b60008054610100900460ff1615610908578160ff1660011480156108e45750303b155b6109005760405162461bcd60e51b8152600401610396906116f4565b506000919050565b60005460ff80841691161061092f5760405162461bcd60e51b8152600401610396906116f4565b506000805460ff191660ff92909216919091179055600190565b919050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606680546001600160a01b0319166001600160a01b0383169081179091556040517f3f8223bcd8b3b875473e9f9e14e1ad075451a2b5ffd31591655da9a01516bf5e91610706916110f1565b606780546001600160a01b0319166001600160a01b0383161790556040517f75fd3aa5d9b6e2a8a9d8894008c9263200713f4b1fa9113665e09ceac0027746906107069083906110f1565b6067805467ffffffffffffffff60a01b1916600160a01b6001600160401b038416021790556040517fb21f4918f3e7b110065f3bf18a09b38074a4553144258ccfc30b57a76211e92990610706908390610ebc565b604051634f9e72ad60e11b81526001600160a01b03831690639f3ce55a908390610abe90899089908990600401611722565b6000604051808303818588803b158015610ad757600080fd5b505af1158015610aeb573d6000803e3d6000fd5b50505050505050505050565b610b4d8363a9059cbb60e01b8484604051602401610b16929190611758565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610b9d565b505050565b606580546001600160a01b0319166001600160a01b0383161790556040517faf4cc7de2dd4900af1750e9a7af95c24ca2096d76903102700c90a6abaa819a2906107069083906110f1565b6000610bf2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610c2c9092919063ffffffff16565b805190915015610b4d5780806020019051810190610c109190611779565b610b4d5760405162461bcd60e51b8152600401610396906117e1565b6060610c3b8484600085610c45565b90505b9392505050565b606082471015610c675760405162461bcd60e51b815260040161039690611834565b6001600160a01b0385163b610c8e5760405162461bcd60e51b815260040161039690611878565b600080866001600160a01b03168587604051610caa91906118aa565b60006040518083038185875af1925050503d8060008114610ce7576040519150601f19603f3d011682016040523d82523d6000602084013e610cec565b606091505b5091509150610cfc828286610d07565b979650505050505050565b60608315610d16575081610c3e565b825115610d265782518084602001fd5b8160405162461bcd60e51b8152600401610396919061136a565b60006001600160a01b038216610505565b610d5a81610d40565b811461053e57600080fd5b803561050581610d51565b80610d5a565b803561050581610d70565b60008083601f840112610d9657610d96600080fd5b5081356001600160401b03811115610db057610db0600080fd5b602083019150836001820283011115610dcb57610dcb600080fd5b9250929050565b600080600080600060808688031215610ded57610ded600080fd5b6000610df98888610d65565b9550506020610e0a88828901610d76565b94505060408601356001600160401b03811115610e2957610e29600080fd5b610e3588828901610d81565b93509350506060610e4888828901610d65565b9150509295509295909350565b634e487b7160e01b600052602160045260246000fd5b6003811061053e5761053e610e55565b8061094981610e6b565b600061050582610e7b565b610e9981610e85565b82525050565b602081016105058284610e90565b6001600160401b038116610e99565b602081016105058284610ead565b6001600160401b038116610d5a565b803561050581610eca565b60008060008060808587031215610efd57610efd600080fd5b6000610f098787610d65565b9450506020610f1a87828801610d65565b9350506040610f2b87828801610d65565b9250506060610f3c87828801610ed9565b91505092959194509250565b634e487b7160e01b600052604160045260246000fd5b601f19601f83011681018181106001600160401b0382111715610f8357610f83610f48565b6040525050565b6000610f9560405190565b90506109498282610f5e565b60006001600160401b03821115610fba57610fba610f48565b601f19601f83011660200192915050565b82818337506000910152565b6000610fea610fe584610fa1565b610f8a565b90508281526020810184848401111561100557611005600080fd5b611010848285610fcb565b509392505050565b600082601f83011261102c5761102c600080fd5b81356107eb848260208601610fd7565b60006020828403121561105157611051600080fd5b81356001600160401b0381111561106a5761106a600080fd5b6107eb84828501611018565b80610e99565b602081016105058284611076565b60006020828403121561109f5761109f600080fd5b60006107eb8484610d65565b600080604083850312156110c1576110c1600080fd5b60006110cd8585610d65565b92505060206110de85828601610d76565b9150509250929050565b610e9981610d40565b6020810161050582846110e8565b600061050582610d40565b610d5a816110ff565b80356105058161110a565b60008060006060848603121561113657611136600080fd5b60006111428686611113565b935050602061115386828701610d65565b925050604061116486828701610d76565b9150509250925092565b60006080828403121561118357611183600080fd5b50919050565b60008060008060c085870312156111a2576111a2600080fd5b60006111ae878761116e565b94505060806111bf87828801610ed9565b93505060a08501356001600160401b038111156111de576111de600080fd5b6111ea87828801610d81565b95989497509550505050565b60006020828403121561120b5761120b600080fd5b60006107eb8484610ed9565b602a81526000602082017f4d65737361676552656365697665723a2063616c6c6572206973206e6f74206d8152696573736167652062757360b01b602082015291505b5060400190565b6020808252810161050581611217565b8183526000602084019350611287838584610fcb565b601f19601f8401165b9093019392505050565b608081016112a882886110e8565b6112b56020830187611076565b81810360408301526112c8818587611271565b90506112d760608301846110e8565b9695505050505050565b6000610505826112ef565b90565b60ff1690565b610e99816112e1565b6020810161050582846112f5565b60005b8381101561132757818101518382015260200161130f565b83811115611336576000848401525b50505050565b6000611346825190565b80845260208401935061135d81856020860161130c565b601f19601f820116611290565b60208082528101610c3e818461133c565b805161050581610d70565b60006020828403121561139b5761139b600080fd5b60006107eb848461137b565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572910190815260005b5060200190565b60208082528101610505816113a7565b602f81526000602082017f4f776e6572576974686472617761626c653a207769746864726177206e61746981526e1d99481d1bdad95b8819985a5b1959608a1b6020820152915061125a565b60208082528101610505816113ec565b6000610505826110ff565b610e9981611448565b6040810161146a8285611453565b610c3e6020830184611076565b602d81526000602082017f4d65737361676553656e6465723a2063616c6c6572206973206e6f742070617981526c1b595b9d0818dbdb9d1c9858dd609a1b6020820152915061125a565b6020808252810161050581611477565b60a081016114df82886110e8565b6114ec60208301876110e8565b6114f96040830186610ead565b6115066060830185610ead565b8181036080830152610cfc818461133c565b606081016115268286611453565b61153360208301856110e8565b6107eb6040830184611076565b6002811061053e5761053e610e55565b8061094981611540565b600061050582611550565b60006105058260f81b90565b610e9961157d8261155a565b611565565b60006105058260601b90565b600061050582611582565b610e996115a582610d40565b61158e565b60006105058260c01b90565b610e996001600160401b0382166115aa565b60006115d5838584610fcb565b50500190565b60006115e7828b611571565b6001820191506115f7828a611599565b6014820191506116078289611599565b60148201915061161782886115b6565b6008820191506116278287611076565b60208201915061163782866115b6565b6008820191506116488284866115c8565b9a9950505050505050505050565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b6020820152915061125a565b6020808252810161050581611656565b602e81526000602082017f496e697469616c697a61626c653a20636f6e747261637420697320616c72656181526d191e481a5b9a5d1a585b1a5e995960921b6020820152915061125a565b60208082528101610505816116a9565b60006105056112ec6001600160401b03841681565b610e9981611704565b6060810161173082866110e8565b61173d6020830185611719565b818103604083015261174f818461133c565b95945050505050565b6040810161146a82856110e8565b801515610d5a565b805161050581611766565b60006020828403121561178e5761178e600080fd5b60006107eb848461176e565b602a81526000602082017f5361666545524332303a204552433230206f7065726174696f6e20646964206e8152691bdd081cdd58d8d9595960b21b6020820152915061125a565b602080825281016105058161179a565b602681526000602082017f416464726573733a20696e73756666696369656e742062616c616e636520666f8152651c8818d85b1b60d21b6020820152915061125a565b60208082528101610505816117f1565b601d81526000602082017f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000815291506113d5565b6020808252810161050581611844565b6000611892825190565b6118a081856020860161130c565b9290920192915050565b6000610c3e828461188856fea264697066735822122039e902b739856f4996677f56dcae83ccac3e89e6202ace55cc6c6e69d534f00564736f6c63430008090033",
  "deployedBytecode": "0x6080604052600436106101095760003560e01c80638da5cb5b11610095578063bbd53ea711610064578063bbd53ea7146102c9578063d204d9a8146102e9578063d7c8cb2414610309578063f2fde38b14610329578063f7260d3e1461034957600080fd5b80638da5cb5b1461024257806393563a9514610269578063a1a227fa14610289578063bb0248aa146102a957600080fd5b8063547cad12116100dc578063547cad12146101ba578063699256f4146101da578063715018a6146101fa578063718da7ee1461020f57806382646a581461022f57600080fd5b80630bcb49821461010e57806330c593f7146101375780633fe3f1cf1461016b5780635335dca21461018d575b600080fd5b61012161011c366004610dd2565b610369565b60405161012e9190610e9f565b60405180910390f35b34801561014357600080fd5b5060675461015e90600160a01b90046001600160401b031681565b60405161012e9190610ebc565b34801561017757600080fd5b5061018b610186366004610ee4565b6103ea565b005b34801561019957600080fd5b506101ad6101a836600461103c565b610484565b60405161012e919061107c565b3480156101c657600080fd5b5061018b6101d536600461108a565b61050b565b3480156101e657600080fd5b5061018b6101f53660046110ab565b610541565b34801561020657600080fd5b5061018b6105ef565b34801561021b57600080fd5b5061018b61022a36600461108a565b610625565b61018b61023d36600461103c565b610658565b34801561024e57600080fd5b506033546001600160a01b03165b60405161012e91906110f1565b34801561027557600080fd5b5061018b61028436600461111e565b610711565b34801561029557600080fd5b5060665461025c906001600160a01b031681565b3480156102b557600080fd5b506101ad6102c4366004611189565b610782565b3480156102d557600080fd5b5061018b6102e436600461108a565b6107f3565b3480156102f557600080fd5b5060655461025c906001600160a01b031681565b34801561031557600080fd5b5061018b6103243660046111f6565b610826565b34801561033557600080fd5b5061018b61034436600461108a565b610859565b34801561035557600080fd5b5060675461025c906001600160a01b031681565b6066546000906001600160a01b0316331461039f5760405162461bcd60e51b815260040161039690611261565b60405180910390fd5b7f9afeef02b2dc7c87e4d0fe67945dedf1c4ee5bcf5cdf26f94fb1837859816f3386868686866040516103d695949392919061129a565b60405180910390a150600195945050505050565b60006103f660016108c1565b9050801561040e576000805461ff0019166101001790555b6104178561094e565b610420846109a0565b610429836109ec565b61043282610a37565b801561047d576000805461ff00191690556040517f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890610474906001906112fe565b60405180910390a15b5050505050565b60665460405163299aee5160e11b81526000916001600160a01b031690635335dca2906104b590859060040161136a565b60206040518083038186803b1580156104cd57600080fd5b505afa1580156104e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105059190611386565b92915050565b6033546001600160a01b031633146105355760405162461bcd60e51b8152600401610396906113dc565b61053e816109a0565b50565b6033546001600160a01b0316331461056b5760405162461bcd60e51b8152600401610396906113dc565b6040516000906001600160a01b0384169083156108fc0290849084818181858888f193505050509050806105b15760405162461bcd60e51b815260040161039690611438565b7f2c876ecb97b3c6854f2488d373403f903eacb800e51c159a5c0c7a9c857e482783836040516105e292919061145c565b60405180910390a1505050565b6033546001600160a01b031633146106195760405162461bcd60e51b8152600401610396906113dc565b610623600061094e565b565b6033546001600160a01b0316331461064f5760405162461bcd60e51b8152600401610396906113dc565b61053e816109ec565b6065546001600160a01b031633146106825760405162461bcd60e51b8152600401610396906114c1565b6067546066546106b3916001600160a01b0380821692600160a01b9092046001600160401b03169185911634610a8c565b6067546040517fbbb476e98b9b7845d6cfd4e37a62d14480243e3fe95454791d9eb9a6ca748e32916107069130916001600160a01b038116914691600160a01b90046001600160401b03169087906114d1565b60405180910390a150565b6033546001600160a01b0316331461073b5760405162461bcd60e51b8152600401610396906113dc565b61074f6001600160a01b0384168383610af7565b7f2717ead6b9200dd235aad468c9809ea400fe33ac69b5bfaa6d3e90fc922b63988383836040516105e293929190611518565b60006001610793602087018761108a565b6107a3604088016020890161108a565b6107b36060890160408a016111f6565b88606001358888886040516020016107d29897969594939291906115db565b6040516020818303038152906040528051906020012090505b949350505050565b6033546001600160a01b0316331461081d5760405162461bcd60e51b8152600401610396906113dc565b61053e81610b52565b6033546001600160a01b031633146108505760405162461bcd60e51b8152600401610396906113dc565b61053e81610a37565b6033546001600160a01b031633146108835760405162461bcd60e51b8152600401610396906113dc565b6001600160a01b0381166108a95760405162461bcd60e51b815260040161039690611699565b61053e8161094e565b6001600160a01b03163b151590565b60008054610100900460ff1615610908578160ff1660011480156108e45750303b155b6109005760405162461bcd60e51b8152600401610396906116f4565b506000919050565b60005460ff80841691161061092f5760405162461bcd60e51b8152600401610396906116f4565b506000805460ff191660ff92909216919091179055600190565b919050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606680546001600160a01b0319166001600160a01b0383169081179091556040517f3f8223bcd8b3b875473e9f9e14e1ad075451a2b5ffd31591655da9a01516bf5e91610706916110f1565b606780546001600160a01b0319166001600160a01b0383161790556040517f75fd3aa5d9b6e2a8a9d8894008c9263200713f4b1fa9113665e09ceac0027746906107069083906110f1565b6067805467ffffffffffffffff60a01b1916600160a01b6001600160401b038416021790556040517fb21f4918f3e7b110065f3bf18a09b38074a4553144258ccfc30b57a76211e92990610706908390610ebc565b604051634f9e72ad60e11b81526001600160a01b03831690639f3ce55a908390610abe90899089908990600401611722565b6000604051808303818588803b158015610ad757600080fd5b505af1158015610aeb573d6000803e3d6000fd5b50505050505050505050565b610b4d8363a9059cbb60e01b8484604051602401610b16929190611758565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610b9d565b505050565b606580546001600160a01b0319166001600160a01b0383161790556040517faf4cc7de2dd4900af1750e9a7af95c24ca2096d76903102700c90a6abaa819a2906107069083906110f1565b6000610bf2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610c2c9092919063ffffffff16565b805190915015610b4d5780806020019051810190610c109190611779565b610b4d5760405162461bcd60e51b8152600401610396906117e1565b6060610c3b8484600085610c45565b90505b9392505050565b606082471015610c675760405162461bcd60e51b815260040161039690611834565b6001600160a01b0385163b610c8e5760405162461bcd60e51b815260040161039690611878565b600080866001600160a01b03168587604051610caa91906118aa565b60006040518083038185875af1925050503d8060008114610ce7576040519150601f19603f3d011682016040523d82523d6000602084013e610cec565b606091505b5091509150610cfc828286610d07565b979650505050505050565b60608315610d16575081610c3e565b825115610d265782518084602001fd5b8160405162461bcd60e51b8152600401610396919061136a565b60006001600160a01b038216610505565b610d5a81610d40565b811461053e57600080fd5b803561050581610d51565b80610d5a565b803561050581610d70565b60008083601f840112610d9657610d96600080fd5b5081356001600160401b03811115610db057610db0600080fd5b602083019150836001820283011115610dcb57610dcb600080fd5b9250929050565b600080600080600060808688031215610ded57610ded600080fd5b6000610df98888610d65565b9550506020610e0a88828901610d76565b94505060408601356001600160401b03811115610e2957610e29600080fd5b610e3588828901610d81565b93509350506060610e4888828901610d65565b9150509295509295909350565b634e487b7160e01b600052602160045260246000fd5b6003811061053e5761053e610e55565b8061094981610e6b565b600061050582610e7b565b610e9981610e85565b82525050565b602081016105058284610e90565b6001600160401b038116610e99565b602081016105058284610ead565b6001600160401b038116610d5a565b803561050581610eca565b60008060008060808587031215610efd57610efd600080fd5b6000610f098787610d65565b9450506020610f1a87828801610d65565b9350506040610f2b87828801610d65565b9250506060610f3c87828801610ed9565b91505092959194509250565b634e487b7160e01b600052604160045260246000fd5b601f19601f83011681018181106001600160401b0382111715610f8357610f83610f48565b6040525050565b6000610f9560405190565b90506109498282610f5e565b60006001600160401b03821115610fba57610fba610f48565b601f19601f83011660200192915050565b82818337506000910152565b6000610fea610fe584610fa1565b610f8a565b90508281526020810184848401111561100557611005600080fd5b611010848285610fcb565b509392505050565b600082601f83011261102c5761102c600080fd5b81356107eb848260208601610fd7565b60006020828403121561105157611051600080fd5b81356001600160401b0381111561106a5761106a600080fd5b6107eb84828501611018565b80610e99565b602081016105058284611076565b60006020828403121561109f5761109f600080fd5b60006107eb8484610d65565b600080604083850312156110c1576110c1600080fd5b60006110cd8585610d65565b92505060206110de85828601610d76565b9150509250929050565b610e9981610d40565b6020810161050582846110e8565b600061050582610d40565b610d5a816110ff565b80356105058161110a565b60008060006060848603121561113657611136600080fd5b60006111428686611113565b935050602061115386828701610d65565b925050604061116486828701610d76565b9150509250925092565b60006080828403121561118357611183600080fd5b50919050565b60008060008060c085870312156111a2576111a2600080fd5b60006111ae878761116e565b94505060806111bf87828801610ed9565b93505060a08501356001600160401b038111156111de576111de600080fd5b6111ea87828801610d81565b95989497509550505050565b60006020828403121561120b5761120b600080fd5b60006107eb8484610ed9565b602a81526000602082017f4d65737361676552656365697665723a2063616c6c6572206973206e6f74206d8152696573736167652062757360b01b602082015291505b5060400190565b6020808252810161050581611217565b8183526000602084019350611287838584610fcb565b601f19601f8401165b9093019392505050565b608081016112a882886110e8565b6112b56020830187611076565b81810360408301526112c8818587611271565b90506112d760608301846110e8565b9695505050505050565b6000610505826112ef565b90565b60ff1690565b610e99816112e1565b6020810161050582846112f5565b60005b8381101561132757818101518382015260200161130f565b83811115611336576000848401525b50505050565b6000611346825190565b80845260208401935061135d81856020860161130c565b601f19601f820116611290565b60208082528101610c3e818461133c565b805161050581610d70565b60006020828403121561139b5761139b600080fd5b60006107eb848461137b565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572910190815260005b5060200190565b60208082528101610505816113a7565b602f81526000602082017f4f776e6572576974686472617761626c653a207769746864726177206e61746981526e1d99481d1bdad95b8819985a5b1959608a1b6020820152915061125a565b60208082528101610505816113ec565b6000610505826110ff565b610e9981611448565b6040810161146a8285611453565b610c3e6020830184611076565b602d81526000602082017f4d65737361676553656e6465723a2063616c6c6572206973206e6f742070617981526c1b595b9d0818dbdb9d1c9858dd609a1b6020820152915061125a565b6020808252810161050581611477565b60a081016114df82886110e8565b6114ec60208301876110e8565b6114f96040830186610ead565b6115066060830185610ead565b8181036080830152610cfc818461133c565b606081016115268286611453565b61153360208301856110e8565b6107eb6040830184611076565b6002811061053e5761053e610e55565b8061094981611540565b600061050582611550565b60006105058260f81b90565b610e9961157d8261155a565b611565565b60006105058260601b90565b600061050582611582565b610e996115a582610d40565b61158e565b60006105058260c01b90565b610e996001600160401b0382166115aa565b60006115d5838584610fcb565b50500190565b60006115e7828b611571565b6001820191506115f7828a611599565b6014820191506116078289611599565b60148201915061161782886115b6565b6008820191506116278287611076565b60208201915061163782866115b6565b6008820191506116488284866115c8565b9a9950505050505050505050565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b6020820152915061125a565b6020808252810161050581611656565b602e81526000602082017f496e697469616c697a61626c653a20636f6e747261637420697320616c72656181526d191e481a5b9a5d1a585b1a5e995960921b6020820152915061125a565b60208082528101610505816116a9565b60006105056112ec6001600160401b03841681565b610e9981611704565b6060810161173082866110e8565b61173d6020830185611719565b818103604083015261174f818461133c565b95945050505050565b6040810161146a82856110e8565b801515610d5a565b805161050581611766565b60006020828403121561178e5761178e600080fd5b60006107eb848461176e565b602a81526000602082017f5361666545524332303a204552433230206f7065726174696f6e20646964206e8152691bdd081cdd58d8d9595960b21b6020820152915061125a565b602080825281016105058161179a565b602681526000602082017f416464726573733a20696e73756666696369656e742062616c616e636520666f8152651c8818d85b1b60d21b6020820152915061125a565b60208082528101610505816117f1565b601d81526000602082017f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000815291506113d5565b6020808252810161050581611844565b6000611892825190565b6118a081856020860161130c565b9290920192915050565b6000610c3e828461188856fea264697066735822122039e902b739856f4996677f56dcae83ccac3e89e6202ace55cc6c6e69d534f00564736f6c63430008090033",
  "devdoc": {
    "author": "Alexandas",
    "details": "Celer SGN source chain sender contract",
    "kind": "dev",
    "methods": {
      "calcFee(bytes)": {
        "details": "calculate message fee",
        "params": {
          "message": "message bytes"
        },
        "returns": {
          "_0": "fee"
        }
      },
      "executeMessageWithTransferRefund(address,uint256,bytes,address)": {
        "details": "call when cBridge transfer failed",
        "params": {
          "_amount": "token amount",
          "_message": "message",
          "_token": "token address",
          "executor": "exector address"
        }
      },
      "initialize(address,address,address,uint64)": {
        "details": "proxy initialize function",
        "params": {
          "_dstChainId": "dst chain chainId",
          "_messageBus": "src chain messageBus",
          "_receiver": "dst chain receiver",
          "owner": "contract owner"
        }
      },
      "messageId((address,address,uint64,bytes32),uint64,bytes)": {
        "details": "messageId for message bus",
        "params": {
          "dstChainId": "message route info",
          "message": "message bytes",
          "route": "message route info"
        }
      },
      "owner()": {
        "details": "Returns the address of the current owner."
      },
      "ownerWithdrawERC20(address,address,uint256)": {
        "details": "withdraw token",
        "params": {
          "to": "receiver address",
          "token": "token address",
          "value": "token value"
        }
      },
      "ownerWithdrawNative(address,uint256)": {
        "details": "withdraw ETH",
        "params": {
          "to": "receiver address",
          "value": "token value"
        }
      },
      "renounceOwnership()": {
        "details": "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."
      },
      "sendMessage(bytes)": {
        "details": "sendMessage to dst chain",
        "params": {
          "message": "message to dst chain"
        }
      },
      "setDstChainId(uint64)": {
        "details": "set dst chain chainId",
        "params": {
          "dstChainId": "dst chainId"
        }
      },
      "setMessageBus(address)": {
        "details": "update message bus",
        "params": {
          "messageBus": "message bus address"
        }
      },
      "setReceiver(address)": {
        "details": "set dst chain receiver",
        "params": {
          "_receiver": "dst chain receiver"
        }
      },
      "setSrcChainPayment(address)": {
        "details": "set src chain payment",
        "params": {
          "_payment": "src chain payment address"
        }
      },
      "transferOwnership(address)": {
        "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
      }
    },
    "stateVariables": {
      "dstChainId": {
        "details": "dst chainId"
      },
      "messageBus": {
        "details": "src chain messageBus address"
      },
      "receiver": {
        "details": "dst chain receiver address"
      },
      "srcChainPayment": {
        "details": "src chain payment address"
      }
    },
    "version": 1
  },
  "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
  },
  "storageLayout": {
    "storage": [
      {
        "astId": 147,
        "contract": "contracts/messages/MessageSender.sol:MessageSender",
        "label": "_initialized",
        "offset": 0,
        "slot": "0",
        "type": "t_uint8"
      },
      {
        "astId": 150,
        "contract": "contracts/messages/MessageSender.sol:MessageSender",
        "label": "_initializing",
        "offset": 1,
        "slot": "0",
        "type": "t_bool"
      },
      {
        "astId": 1038,
        "contract": "contracts/messages/MessageSender.sol:MessageSender",
        "label": "__gap",
        "offset": 0,
        "slot": "1",
        "type": "t_array(t_uint256)50_storage"
      },
      {
        "astId": 10,
        "contract": "contracts/messages/MessageSender.sol:MessageSender",
        "label": "_owner",
        "offset": 0,
        "slot": "51",
        "type": "t_address"
      },
      {
        "astId": 122,
        "contract": "contracts/messages/MessageSender.sol:MessageSender",
        "label": "__gap",
        "offset": 0,
        "slot": "52",
        "type": "t_array(t_uint256)49_storage"
      },
      {
        "astId": 7989,
        "contract": "contracts/messages/MessageSender.sol:MessageSender",
        "label": "srcChainPayment",
        "offset": 0,
        "slot": "101",
        "type": "t_address"
      },
      {
        "astId": 7992,
        "contract": "contracts/messages/MessageSender.sol:MessageSender",
        "label": "messageBus",
        "offset": 0,
        "slot": "102",
        "type": "t_address"
      },
      {
        "astId": 7996,
        "contract": "contracts/messages/MessageSender.sol:MessageSender",
        "label": "receiver",
        "offset": 0,
        "slot": "103",
        "type": "t_address"
      },
      {
        "astId": 8000,
        "contract": "contracts/messages/MessageSender.sol:MessageSender",
        "label": "dstChainId",
        "offset": 20,
        "slot": "103",
        "type": "t_uint64"
      }
    ],
    "types": {
      "t_address": {
        "encoding": "inplace",
        "label": "address",
        "numberOfBytes": "20"
      },
      "t_array(t_uint256)49_storage": {
        "base": "t_uint256",
        "encoding": "inplace",
        "label": "uint256[49]",
        "numberOfBytes": "1568"
      },
      "t_array(t_uint256)50_storage": {
        "base": "t_uint256",
        "encoding": "inplace",
        "label": "uint256[50]",
        "numberOfBytes": "1600"
      },
      "t_bool": {
        "encoding": "inplace",
        "label": "bool",
        "numberOfBytes": "1"
      },
      "t_uint256": {
        "encoding": "inplace",
        "label": "uint256",
        "numberOfBytes": "32"
      },
      "t_uint64": {
        "encoding": "inplace",
        "label": "uint64",
        "numberOfBytes": "8"
      },
      "t_uint8": {
        "encoding": "inplace",
        "label": "uint8",
        "numberOfBytes": "1"
      }
    }
  }
}