From 202b485b2b39e4c3aa309168f28fc214e1365a0c Mon Sep 17 00:00:00 2001 From: mrbot22 Date: Thu, 7 Oct 2021 22:02:25 +0300 Subject: [PATCH 1/3] add relay --- locale/en.po | 6 +- locale/zh-CN.po | 6 +- src/components/CurrencyLogo/index.tsx | 14 +- src/connectors/index.ts | 8 +- src/constants/abis/relay-bridge.json | 24740 ++++++++++++++++++++++++ src/constants/chains.ts | 4 +- src/hooks/useContract.ts | 5 + src/modals/ChainModal/index.tsx | 22 + src/pages/bridge/index.tsx | 284 +- src/services/covalent/fetchers.ts | 6 + 10 files changed, 25016 insertions(+), 79 deletions(-) create mode 100644 src/constants/abis/relay-bridge.json diff --git a/locale/en.po b/locale/en.po index f3e003d..f1debff 100644 --- a/locale/en.po +++ b/locale/en.po @@ -1690,7 +1690,11 @@ msgstr "Pooled {0}" #~ msgid "Pour a hot bowl of MISO, the new <0>token launchpad from SUSHI" #~ msgstr "" -#: src/pages/bridge/index.tsx:620 +#: src/pages/bridge/index.tsx:657 +msgid "Powered by Relay" +msgstr "Powered by Relay" + +#: src/pages/bridge/index.tsx:658 msgid "Powered by Anyswap Network" msgstr "Powered by Anyswap Network" diff --git a/locale/zh-CN.po b/locale/zh-CN.po index 410a244..540b44c 100644 --- a/locale/zh-CN.po +++ b/locale/zh-CN.po @@ -1567,7 +1567,11 @@ msgstr "汇集{0}" #~ msgid "Pour a hot bowl of MISO, the new <0>token launchpad from SUSHI" #~ msgstr "来一碗热味增汤, Sushi全新的<0>代币Launchpad" -#: src/pages/bridge/index.tsx:620 +#: src/pages/bridge/index.tsx:657 +msgid "Powered by Relay" +msgstr "" + +#: src/pages/bridge/index.tsx:658 msgid "Powered by Anyswap Network" msgstr "" diff --git a/src/components/CurrencyLogo/index.tsx b/src/components/CurrencyLogo/index.tsx index 213df2d..cdb12c3 100644 --- a/src/components/CurrencyLogo/index.tsx +++ b/src/components/CurrencyLogo/index.tsx @@ -17,6 +17,7 @@ const BLOCKCHAIN = { [ChainId.MATIC]: 'polygon', [ChainId.XDAI]: 'xdai', [ChainId.MOONRIVER]: 'moonriver', + [ChainId.AVALANCHE]: 'avalanche', // [ChainId.OKEX]: 'okex', } @@ -43,6 +44,17 @@ function getCurrencyLogoUrls(currency) { return urls } +function getCurrencyLogoUrlsFromRelay(currency) { + const urls = [] + if (currency.chainId in BLOCKCHAIN) { + urls.push( + `https://raw.githubusercontent.com/zeroexchange/bridge-tokens/main/${BLOCKCHAIN[currency.chainId]}-tokens/${currency.address}/logo.png` + ) + } + + return urls +} + const AvalancheLogo = 'https://raw.githubusercontent.com/sushiswap/icons/master/token/avax.jpg' const BinanceCoinLogo = 'https://raw.githubusercontent.com/solarbeamio/assets/master/blockchains/smartchain/info/logo.png' @@ -115,7 +127,7 @@ const CurrencyLogo: FunctionComponent = ({ } if (currency.isToken) { - const defaultUrls = [...getCurrencyLogoUrls(currency)] + const defaultUrls = [...getCurrencyLogoUrls(currency), ...getCurrencyLogoUrlsFromRelay(currency)] if (currency instanceof WrappedTokenInfo) { return [...uriLocations, ...defaultUrls, unknown] } diff --git a/src/connectors/index.ts b/src/connectors/index.ts index d2ef599..3cd10c7 100644 --- a/src/connectors/index.ts +++ b/src/connectors/index.ts @@ -56,14 +56,14 @@ export const injected = new InjectedConnector({ // 42, // kovan // 250, // fantom // 4002, // fantom testnet - // 137, // matic + 137, // matic // 80001, // matic testnet // 100, // xdai // 56, // binance smart chain // 97, // binance smart chain testnet // 1287, // moonbase 1285, // moonriver - // 43114, // avalanche + 43114, // avalanche // 43113, // fuji // 128, // heco // 256, // heco testnet @@ -86,14 +86,14 @@ export const bridgeInjected = new InjectedConnector({ // 42, // kovan // 250, // fantom // 4002, // fantom testnet - // 137, // matic + 137, // matic // 80001, // matic testnet // 100, // xdai 56, // binance smart chain // 97, // binance smart chain testnet // 1287, // moonbase 1285, // moonriver - // 43114, // avalanche + 43114, // avalanche // 43113, // fuji // 128, // heco // 256, // heco testnet diff --git a/src/constants/abis/relay-bridge.json b/src/constants/abis/relay-bridge.json new file mode 100644 index 0000000..1e4fd7d --- /dev/null +++ b/src/constants/abis/relay-bridge.json @@ -0,0 +1,24740 @@ +{ + "contractName": "Bridge", + "abi": [ + { + "inputs": [ + { + "internalType": "uint8", + "name": "chainID", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "initialRelayers", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "initialRelayerThreshold", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint8", + "name": "destinationChainID", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "resourceID", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint64", + "name": "depositNonce", + "type": "uint64" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint8", + "name": "originChainID", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "uint64", + "name": "depositNonce", + "type": "uint64" + }, + { + "indexed": true, + "internalType": "enum Bridge.ProposalStatus", + "name": "status", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "resourceID", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "dataHash", + "type": "bytes32" + } + ], + "name": "ProposalEvent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint8", + "name": "originChainID", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "uint64", + "name": "depositNonce", + "type": "uint64" + }, + { + "indexed": true, + "internalType": "enum Bridge.ProposalStatus", + "name": "status", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "resourceID", + "type": "bytes32" + } + ], + "name": "ProposalVote", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "relayer", + "type": "address" + } + ], + "name": "RelayerAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "relayer", + "type": "address" + } + ], + "name": "RelayerRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "newThreshold", + "type": "uint256" + } + ], + "name": "RelayerThresholdChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FEE_SETTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "RELAYER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_chainID", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "name": "_depositCounts", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "name": "_fees", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint72", + "name": "", + "type": "uint72" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "_hasVotedOnProposal", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint72", + "name": "", + "type": "uint72" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "_proposals", + "outputs": [ + { + "internalType": "bytes32", + "name": "_resourceID", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_dataHash", + "type": "bytes32" + }, + { + "internalType": "enum Bridge.ProposalStatus", + "name": "_status", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "_proposedBlock", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_relayerThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "_resourceIDToHandlerAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_totalProposals", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_totalRelayers", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getRoleMember", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMemberCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "relayer", + "type": "address" + } + ], + "name": "isRelayer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "renounceAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "adminPauseTransfers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "adminUnpauseTransfers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newThreshold", + "type": "uint256" + } + ], + "name": "adminChangeRelayerThreshold", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "relayerAddress", + "type": "address" + } + ], + "name": "adminAddRelayer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "relayerAddress", + "type": "address" + } + ], + "name": "adminRemoveRelayer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "handlerAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "resourceID", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "adminSetResource", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "handlerAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "resourceID", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "contractAddress", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "depositFunctionSig", + "type": "bytes4" + }, + { + "internalType": "bytes4", + "name": "executeFunctionSig", + "type": "bytes4" + } + ], + "name": "adminSetGenericResource", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "handlerAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "adminSetBurnable", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "originChainID", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "depositNonce", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "dataHash", + "type": "bytes32" + } + ], + "name": "getProposal", + "outputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "_resourceID", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_dataHash", + "type": "bytes32" + }, + { + "internalType": "address[]", + "name": "_yesVotes", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "_noVotes", + "type": "address[]" + }, + { + "internalType": "enum Bridge.ProposalStatus", + "name": "_status", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "_proposedBlock", + "type": "uint256" + } + ], + "internalType": "struct Bridge.Proposal", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "destinationChainID", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "newFee", + "type": "uint256" + } + ], + "name": "changeFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "handlerAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountOrTokenID", + "type": "uint256" + } + ], + "name": "adminWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "destinationChainID", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "resourceID", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "_auxData", + "type": "bytes" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "chainID", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "depositNonce", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "resourceID", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "voteProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable[]", + "name": "addrs", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "name": "transferFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.6.4+commit.1dca32f3\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"chainID\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"initialRelayers\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"initialRelayerThreshold\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint8\",\"name\":\"destinationChainID\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"resourceID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"depositNonce\",\"type\":\"uint64\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint8\",\"name\":\"originChainID\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"depositNonce\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"enum Bridge.ProposalStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"resourceID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"dataHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint8\",\"name\":\"originChainID\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"depositNonce\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"enum Bridge.ProposalStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"resourceID\",\"type\":\"bytes32\"}],\"name\":\"ProposalVote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"}],\"name\":\"RelayerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"}],\"name\":\"RelayerRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newThreshold\",\"type\":\"uint256\"}],\"name\":\"RelayerThresholdChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"FEE_SETTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RELAYER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_chainID\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"_depositCounts\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"_fees\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"_hasVotedOnProposal\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint72\",\"name\":\"\",\"type\":\"uint72\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"_proposals\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"_resourceID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_dataHash\",\"type\":\"bytes32\"},{\"internalType\":\"enum Bridge.ProposalStatus\",\"name\":\"_status\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_proposedBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_relayerThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"_resourceIDToHandlerAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_totalProposals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_totalRelayers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"relayerAddress\",\"type\":\"address\"}],\"name\":\"adminAddRelayer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newThreshold\",\"type\":\"uint256\"}],\"name\":\"adminChangeRelayerThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"adminPauseTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"relayerAddress\",\"type\":\"address\"}],\"name\":\"adminRemoveRelayer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"handlerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"adminSetBurnable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"handlerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"resourceID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"depositFunctionSig\",\"type\":\"bytes4\"},{\"internalType\":\"bytes4\",\"name\":\"executeFunctionSig\",\"type\":\"bytes4\"}],\"name\":\"adminSetGenericResource\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"handlerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"resourceID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"adminSetResource\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"adminUnpauseTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"handlerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountOrTokenID\",\"type\":\"uint256\"}],\"name\":\"adminWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"destinationChainID\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"newFee\",\"type\":\"uint256\"}],\"name\":\"changeFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"destinationChainID\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"resourceID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_auxData\",\"type\":\"bytes\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"originChainID\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"depositNonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"dataHash\",\"type\":\"bytes32\"}],\"name\":\"getProposal\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"_resourceID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_dataHash\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"_yesVotes\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"_noVotes\",\"type\":\"address[]\"},{\"internalType\":\"enum Bridge.ProposalStatus\",\"name\":\"_status\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_proposedBlock\",\"type\":\"uint256\"}],\"internalType\":\"struct Bridge.Proposal\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"}],\"name\":\"isRelayer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"renounceAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable[]\",\"name\":\"addrs\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"transferFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"chainID\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"depositNonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"resourceID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"voteProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"ChainSafe Systems.\",\"methods\":{\"adminAddRelayer(address)\":{\"params\":{\"relayerAddress\":\"Address of relayer to be added.\"}},\"adminChangeRelayerThreshold(uint256)\":{\"params\":{\"newThreshold\":\"Value {_relayerThreshold} will be changed to.\"}},\"adminRemoveRelayer(address)\":{\"params\":{\"relayerAddress\":\"Address of relayer to be removed.\"}},\"adminSetBurnable(address,address)\":{\"params\":{\"handlerAddress\":\"Address of handler resource will be set for.\",\"tokenAddress\":\"Address of contract to be called when a deposit is made and a deposited is executed.\"}},\"adminSetGenericResource(address,bytes32,address,bytes4,bytes4)\":{\"params\":{\"contractAddress\":\"Address of contract to be called when a deposit is made and a deposited is executed.\",\"handlerAddress\":\"Address of handler resource will be set for.\",\"resourceID\":\"ResourceID to be used when making deposits.\"}},\"adminSetResource(address,bytes32,address)\":{\"params\":{\"handlerAddress\":\"Address of handler resource will be set for.\",\"resourceID\":\"ResourceID to be used when making deposits.\",\"tokenAddress\":\"Address of contract to be called when a deposit is made and a deposited is executed.\"}},\"adminWithdraw(address,address,address,uint256)\":{\"params\":{\"amountOrTokenID\":\"Either the amount of ERC20 tokens or the ERC721 token ID to withdraw.\",\"handlerAddress\":\"Address of handler to withdraw from.\",\"recipient\":\"Address to withdraw tokens to.\",\"tokenAddress\":\"Address of token to withdraw.\"}},\"changeFee(uint8,uint256)\":{\"params\":{\"newFee\":\"Value {_fees[destinationChainID]} will be updated to.\"}},\"constructor\":{\"params\":{\"chainID\":\"ID of chain the Bridge contract exists on.\",\"initialRelayerThreshold\":\"Number of votes needed for a deposit proposal to be considered passed.\",\"initialRelayers\":\"Addresses that should be initially granted the relayer role.\"}},\"deposit(uint8,bytes32,bytes,bytes)\":{\"params\":{\"_auxData\":\"Unused parameter, can be used for everything, for example, writing IDs of apps from which the deposit was made.\",\"data\":\"Additional data to be passed to specified handler.\",\"destinationChainID\":\"ID of chain deposit will be bridged to.\",\"resourceID\":\"ResourceID used to find address of handler to be used for deposit.\"}},\"getProposal(uint8,uint64,bytes32)\":{\"params\":{\"dataHash\":\"Hash of data to be provided when deposit proposal is executed.\",\"depositNonce\":\"ID of proposal generated by proposal's origin Bridge contract.\",\"originChainID\":\"Chain ID deposit originated from.\"},\"returns\":{\"_0\":\"Proposal which consists of: - _dataHash Hash of data to be provided when deposit proposal is executed. - _yesVotes Number of votes in favor of proposal. - _noVotes Number of votes against proposal. - _status Current status of proposal.\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. * To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. * Role bearers are not sorted in any particular way, and their ordering may change at any point. * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. * If `account` had not been already granted `role`, emits a {RoleGranted} event. * Requirements: * - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"isRelayer(address)\":{\"params\":{\"relayer\":\"Address to check.\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"renounceAdmin(address)\":{\"params\":{\"newAdmin\":\"Address that admin role will be granted to.\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. * Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). * If the calling account had been granted `role`, emits a {RoleRevoked} event. * Requirements: * - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. * If `account` had been granted `role`, emits a {RoleRevoked} event. * Requirements: * - the caller must have ``role``'s admin role.\"},\"transferFunds(address[],uint256[])\":{\"params\":{\"addrs\":\"Array of addresses to transfer {amounts} to.\",\"amounts\":\"Array of amonuts to transfer to {addrs}.\"}},\"voteProposal(uint8,uint64,bytes32,bytes)\":{\"params\":{\"chainID\":\"ID of chain deposit originated from.\",\"data\":\"data provided when deposit was made.\",\"depositNonce\":\"ID of deposited generated by origin Bridge contract.\"}}},\"title\":\"Facilitates deposits, creation and votiing of deposit proposals, and deposit executions.\"},\"userdoc\":{\"methods\":{\"adminAddRelayer(address)\":{\"notice\":\"Grants {relayerAddress} the relayer role and increases {_totalRelayer} count.Only callable by an address that currently has the admin role.Emits {RelayerAdded} event.\"},\"adminChangeRelayerThreshold(uint256)\":{\"notice\":\"Modifies the number of votes required for a proposal to be considered passed.Only callable by an address that currently has the admin role.Emits {RelayerThresholdChanged} event.\"},\"adminPauseTransfers()\":{\"notice\":\"Pauses deposits, proposal creation and voting, and deposit executions.Only callable by an address that currently has the admin role.\"},\"adminRemoveRelayer(address)\":{\"notice\":\"Removes relayer role for {relayerAddress} and decreases {_totalRelayer} count.Only callable by an address that currently has the admin role.Emits {RelayerRemoved} event.\"},\"adminSetBurnable(address,address)\":{\"notice\":\"Sets a resource as burnable for handler contracts that use the IERCHandler interface.Only callable by an address that currently has the admin role.\"},\"adminSetGenericResource(address,bytes32,address,bytes4,bytes4)\":{\"notice\":\"Sets a new resource for handler contracts that use the IGenericHandler interface, and maps the {handlerAddress} to {resourceID} in {_resourceIDToHandlerAddress}.Only callable by an address that currently has the admin role.\"},\"adminSetResource(address,bytes32,address)\":{\"notice\":\"Sets a new resource for handler contracts that use the IERCHandler interface, and maps the {handlerAddress} to {resourceID} in {_resourceIDToHandlerAddress}.Only callable by an address that currently has the admin role.\"},\"adminUnpauseTransfers()\":{\"notice\":\"Unpauses deposits, proposal creation and voting, and deposit executions.Only callable by an address that currently has the admin role.\"},\"adminWithdraw(address,address,address,uint256)\":{\"notice\":\"Used to manually withdraw funds from ERC safes.\"},\"changeFee(uint8,uint256)\":{\"notice\":\"Changes deposit fee.Only callable by admin.\"},\"constructor\":\"Initializes Bridge, creates and grants {msg.sender} the admin role, creates and grants {initialRelayers} the relayer role.\",\"deposit(uint8,bytes32,bytes,bytes)\":{\"notice\":\"Initiates a transfer using a specified handler contract.Only callable when Bridge is not paused.Emits {Deposit} event.\"},\"getProposal(uint8,uint64,bytes32)\":{\"notice\":\"Returns a proposal.\"},\"isRelayer(address)\":{\"notice\":\"Returns true if {relayer} has the relayer role.\"},\"renounceAdmin(address)\":{\"notice\":\"Removes admin role from {msg.sender} and grants it to {newAdmin}.Only callable by an address that currently has the admin role.\"},\"transferFunds(address[],uint256[])\":{\"notice\":\"Transfers eth in the contract to the specified addresses. The parameters addrs and amounts are mapped 1-1. This means that the address at index 0 for addrs will receive the amount (in WEI) from amounts at index 0.\"},\"voteProposal(uint8,uint64,bytes32,bytes)\":{\"notice\":\"When called, {msg.sender} will be marked as voting in favor of proposal.Only callable by relayers when Bridge is not paused.Proposal must not have already been passed or executed.{msg.sender} must not have already voted on proposal.Emits {ProposalEvent} event with status indicating the proposal status.Emits {ProposalVote} event.\"}}}},\"settings\":{\"compilationTarget\":{\"/Users/oleg/Desktop/crosschain/chainbridge-solidity/contracts/Bridge.sol\":\"Bridge\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/oleg/Desktop/crosschain/chainbridge-solidity/contracts/Bridge.sol\":{\"keccak256\":\"0x8b4271b116c8dc69f0f0e3803081c697a0e785fcea45d3235ad270fb096d9854\",\"urls\":[\"bzz-raw://c6597cf41788a0fa753819f6236f3915f60a197d8a362cee0d742a054da95728\",\"dweb:/ipfs/QmXAE53VnVmuYx1e4V1iWd4DoZM3fYwzzvbxQNfiLYmAuH\"]},\"/Users/oleg/Desktop/crosschain/chainbridge-solidity/contracts/interfaces/IBridge.sol\":{\"keccak256\":\"0x69acbf5e85d70afb39f819efa08ff2442e8b122f35a012f6e37ed96fb35222b6\",\"urls\":[\"bzz-raw://02c37de0e9beefc6cf988b43980aaee9f68b2b60b34cc889aa374aeee135c13c\",\"dweb:/ipfs/QmVZFyHbMq8KgMyboAspK1VK25kR2uXv6x6t6nh5dfERHF\"]},\"/Users/oleg/Desktop/crosschain/chainbridge-solidity/contracts/interfaces/IDepositExecute.sol\":{\"keccak256\":\"0x0e294346387f78e5762ed8f30ef4ba23c577abc9e2dfbaeb29e97b1b5099aa35\",\"urls\":[\"bzz-raw://896aa03012baece6caca18cf66386717e1cd47e5700ea24f1a31589b3513d814\",\"dweb:/ipfs/QmVJWiXZgEjFiZB21wsvkhHAUupNqBJ8FvZuJcB4X4NEvj\"]},\"/Users/oleg/Desktop/crosschain/chainbridge-solidity/contracts/interfaces/IERCHandler.sol\":{\"keccak256\":\"0xae4a0687ed7310b0e5b1e82074b38bd492de3c14f33acf12486f7380cd523578\",\"urls\":[\"bzz-raw://0e4195985bfa8305ea9ca1ecd40d34023846a89f3313104e84aedb84069a2926\",\"dweb:/ipfs/QmcrKQzMC6YnXRZeE8Wau4rYB815kXrFTpPWVJBkmSS4SV\"]},\"/Users/oleg/Desktop/crosschain/chainbridge-solidity/contracts/interfaces/IGenericHandler.sol\":{\"keccak256\":\"0x9f660f1583d7a7c27fff0c60a7f944f6f27f836f4577c10de1db38d58ea26077\",\"urls\":[\"bzz-raw://d782b3dc5499e19315007afa18f30327b044bf0d98f71413b129bb62ac8ad811\",\"dweb:/ipfs/QmbY4bKnqUJwMNw3JtR2hDH3gzSHoJopZkbykRxYcB7e3y\"]},\"/Users/oleg/Desktop/crosschain/chainbridge-solidity/contracts/utils/Pausable.sol\":{\"keccak256\":\"0xd995bcc6b4067ac18db610e47a2a969e8009cb311b017cdd34fc2b46c3be7020\",\"urls\":[\"bzz-raw://53e0d1dc839eb40ba23a887d302f26764eed0fe035d0e519be6a1099a1237b33\",\"dweb:/ipfs/QmbMhz1VEBxhRsz6par2rKgErxFphimiCqrmCREiusVDHv\"]},\"/Users/oleg/Desktop/crosschain/chainbridge-solidity/contracts/utils/SafeMath.sol\":{\"keccak256\":\"0x0f714e07671743649ebdc961f0380ecb7b86b9572e4a43f77e18c77c015e2977\",\"urls\":[\"bzz-raw://d39b51548731cf4968c01ad302330697df92c297d4edace1c4c020017178264d\",\"dweb:/ipfs/QmeNowPEdLsw558fStna6zoh4actw95gVXB5pU5YAoqAzg\"]},\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x0de74dfa6b37943c1b834cbd8fb7a8d052e5ff80c7adb33692102dd6cd2985e9\",\"urls\":[\"bzz-raw://9d2d827fcf4a838f5821732c0acd6a40d21c2a5a2cfe2563feec91465f47bb60\",\"dweb:/ipfs/Qmex3wMKf5Sghbfvr288RUg1kP2uAyTMf11w83WbMbpQQc\"]},\"@openzeppelin/contracts/access/AccessControl.sol\":{\"keccak256\":\"0xc35d706da2c3b3228e8c2bfd9c775201688ef307e4990cd59a6dadc2a61abddc\",\"urls\":[\"bzz-raw://45c9859e241844143aaad5054ca5ffebf998a069592cd9c780c88c723849400b\",\"dweb:/ipfs/QmPFPTuys4hWRUga4UJvdyXKP32a9kdhg8hDu7Zku1ENFT\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x5f7da58ee3d9faa9b8999a93d49c8ff978f1afc88ae9bcfc6f9cbb44da011c2b\",\"urls\":[\"bzz-raw://4f089d954b3ecaa26949412fe63e9a184b056562c6c13dd4a0529a5d9a2e685a\",\"dweb:/ipfs/QmVK5iCNAMcEJQxT59bsC5E53JQASDQPU6khHox3d5ZXCn\"]},\"@openzeppelin/contracts/utils/EnumerableSet.sol\":{\"keccak256\":\"0x7f6401708b61f575b497aa7c8118ca9d70348643c83c26e70d9b643edf1a95c1\",\"urls\":[\"bzz-raw://b020d65f592c1715bc3d5799ad835cd975ef7d314f340f27603fb99ad86a0427\",\"dweb:/ipfs/QmQoGZmzE5aDTMGJM4BW77eraerfTSV9Rs8wykpQ42i1in\"]}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b506040516200439b3803806200439b8339818101604052810190620000379190620004d3565b60008060006101000a81548160ff02191690831515021790555082600260006101000a81548160ff021916908360ff16021790555080600381905550620000886000801b336200014b60201b60201c565b620000af6040516200009a9062000645565b6040518091039020336200014b60201b60201c565b620000d9604051620000c1906200062e565b60405180910390206000801b6200016160201b60201c565b60005b8251811015620001415762000121604051620000f8906200062e565b60405180910390208483815181106200010d57fe5b60200260200101516200018060201b60201c565b6004600081548092919060010191905055508080600101915050620000dc565b505050506200078a565b6200015d82826200020f60201b60201c565b5050565b8060016000848152602001908152602001600020600201819055505050565b620001b76001600084815260200190815260200160002060020154620001ab620002b360201b60201c565b620002bb60201b60201c565b620001f9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001f0906200065c565b60405180910390fd5b6200020b82826200020f60201b60201c565b5050565b6200023e8160016000858152602001908152602001600020600001620002f460201b620021b21790919060201c565b15620002af5762000254620002b360201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600033905090565b6000620002ec82600160008681526020019081526020016000206000016200032c60201b620020b41790919060201c565b905092915050565b600062000324836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6200036460201b60201c565b905092915050565b60006200035c836000018373ffffffffffffffffffffffffffffffffffffffff1660001b620003de60201b60201c565b905092915050565b6000620003788383620003de60201b60201c565b620003d3578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050620003d8565b600090505b92915050565b600080836001016000848152602001908152602001600020541415905092915050565b60008151905062000412816200073c565b92915050565b600082601f8301126200042a57600080fd5b8151620004416200043b82620006ac565b6200067e565b915081818352602084019350602081019050838560208402820111156200046757600080fd5b60005b838110156200049b578162000480888262000401565b8452602084019350602083019250506001810190506200046a565b5050505092915050565b600081519050620004b68162000756565b92915050565b600081519050620004cd8162000770565b92915050565b600080600060608486031215620004e957600080fd5b6000620004f986828701620004bc565b935050602084015167ffffffffffffffff8111156200051757600080fd5b620005258682870162000418565b92505060406200053886828701620004a5565b9150509250925092565b600062000551602f83620006d5565b91507f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60008301527f2061646d696e20746f206772616e7400000000000000000000000000000000006020830152604082019050919050565b6000620005b9600c83620006e6565b91507f52454c415945525f524f4c4500000000000000000000000000000000000000006000830152600c82019050919050565b6000620005fb600f83620006e6565b91507f4645455f5345545445525f524f4c4500000000000000000000000000000000006000830152600f82019050919050565b60006200063b82620005aa565b9150819050919050565b60006200065282620005ec565b9150819050919050565b60006020820190508181036000830152620006778162000542565b9050919050565b6000604051905081810181811067ffffffffffffffff82111715620006a257600080fd5b8060405250919050565b600067ffffffffffffffff821115620006c457600080fd5b602082029050602081019050919050565b600082825260208201905092915050565b600081905092915050565b6000620006fe8262000705565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6200074781620006f1565b81146200075357600080fd5b50565b620007618162000725565b81146200076d57600080fd5b50565b6200077b816200072f565b81146200078757600080fd5b50565b613c01806200079a6000396000f3fe60806040526004361061020f5760003560e01c80639010d07c11610118578063c0331b3e116100a0578063d547741f1161006f578063d547741f146107d7578063d7a9cd7914610800578063e8437ee71461082b578063e934768314610854578063ffaac0eb1461087f5761020f565b8063c0331b3e1461071f578063ca15c87314610748578063cb10f21514610785578063cdb0f73a146107ae5761020f565b80639d82dd63116100e75780639d82dd6314610626578063a217fddf1461064f578063a49e88d91461067a578063a9cf69fa146106b7578063beab7131146106f45761020f565b80639010d07c1461055657806391d1485414610593578063926d7d7f146105d05780639d5773e0146105fb5761020f565b80635c975abb1161019b5780637febe63f1161016a5780637febe63f14610471578063802aabe8146104ae57806380ae1c28146104d957806384db809f146104f05780638c0c26311461052d5761020f565b80635c975abb146103d85780635e1fab0f1461040357806373c45c981461042c578063780cf004146104485761020f565b80634603ae38116101e25780634603ae38146102cc5780634b0b919d146102f55780634e05600514610332578063505987191461035b578063541d55481461039b5761020f565b806313a7e54e14610214578063248a9ca31461023d5780632f2ff15d1461027a57806336568abe146102a3575b600080fd5b34801561022057600080fd5b5061023b60048036038101906102369190612b3a565b610896565b005b34801561024957600080fd5b50610264600480360381019061025f9190612921565b610914565b60405161027191906134eb565b60405180910390f35b34801561028657600080fd5b506102a1600480360381019061029c919061294a565b610934565b005b3480156102af57600080fd5b506102ca60048036038101906102c5919061294a565b6109a8565b005b3480156102d857600080fd5b506102f360048036038101906102ee91906128ac565b610a2b565b005b34801561030157600080fd5b5061031c60048036038101906103179190612a76565b610ad1565b60405161032991906138ed565b60405180910390f35b34801561033e57600080fd5b50610359600480360381019061035491906129c2565b610af8565b005b34801561036757600080fd5b50610382600480360381019061037d91906129eb565b610b37565b604051610392949392919061359d565b60405180910390f35b3480156103a757600080fd5b506103c260048036038101906103bd91906126f5565b610b81565b6040516103cf91906134d0565b60405180910390f35b3480156103e457600080fd5b506103ed610ba7565b6040516103fa91906134d0565b60405180910390f35b34801561040f57600080fd5b5061042a600480360381019061042591906126f5565b610bbd565b005b61044660048036038101906104419190612a9f565b610be2565b005b34801561045457600080fd5b5061046f600480360381019061046a9190612783565b610e0a565b005b34801561047d57600080fd5b5061049860048036038101906104939190612a27565b610e8d565b6040516104a591906134d0565b60405180910390f35b3480156104ba57600080fd5b506104c3610ec9565b6040516104d091906138d2565b60405180910390f35b3480156104e557600080fd5b506104ee610ecf565b005b3480156104fc57600080fd5b5061051760048036038101906105129190612921565b610ee1565b6040516105249190613463565b60405180910390f35b34801561053957600080fd5b50610554600480360381019061054f9190612747565b610f14565b005b34801561056257600080fd5b5061057d60048036038101906105789190612986565b610f91565b60405161058a9190613463565b60405180910390f35b34801561059f57600080fd5b506105ba60048036038101906105b5919061294a565b610fc3565b6040516105c791906134d0565b60405180910390f35b3480156105dc57600080fd5b506105e5610ff5565b6040516105f291906134eb565b60405180910390f35b34801561060757600080fd5b5061061061100c565b60405161061d91906138d2565b60405180910390f35b34801561063257600080fd5b5061064d600480360381019061064891906126f5565b611012565b005b34801561065b57600080fd5b506106646110ec565b60405161067191906134eb565b60405180910390f35b34801561068657600080fd5b506106a1600480360381019061069c9190612a76565b6110f3565b6040516106ae91906138d2565b60405180910390f35b3480156106c357600080fd5b506106de60048036038101906106d99190612b76565b61110b565b6040516106eb91906138b0565b60405180910390f35b34801561070057600080fd5b506107096112ec565b6040516107169190613908565b60405180910390f35b34801561072b57600080fd5b5061074660048036038101906107419190612bc5565b6112ff565b005b34801561075457600080fd5b5061076f600480360381019061076a9190612921565b611b22565b60405161077c91906138d2565b60405180910390f35b34801561079157600080fd5b506107ac60048036038101906107a791906127e6565b611b49565b005b3480156107ba57600080fd5b506107d560048036038101906107d091906126f5565b611c1b565b005b3480156107e357600080fd5b506107fe60048036038101906107f9919061294a565b611cf5565b005b34801561080c57600080fd5b50610815611d69565b60405161082291906138d2565b60405180910390f35b34801561083757600080fd5b50610852600480360381019061084d9190612835565b611d6f565b005b34801561086057600080fd5b50610869611e47565b60405161087691906134eb565b60405180910390f35b34801561088b57600080fd5b50610894611e5e565b005b6108b36040516108a59061344e565b604051809103902033610fc3565b6108f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108e9906137d0565b60405180910390fd5b80600a60008460ff1660ff168152602001908152602001600020819055505050565b600060016000838152602001908152602001600020600201549050919050565b61095b6001600084815260200190815260200160002060020154610956611e70565b610fc3565b61099a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099190613690565b60405180910390fd5b6109a48282611e78565b5050565b6109b0611e70565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610a1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1490613870565b60405180910390fd5b610a278282611f0c565b5050565b610a33611fa0565b60008090505b84849050811015610aca57848482818110610a5057fe5b9050602002016020810190610a65919061271e565b73ffffffffffffffffffffffffffffffffffffffff166108fc848484818110610a8a57fe5b905060200201359081150290604051600060405180830381858888f19350505050158015610abc573d6000803e3d6000fd5b508080600101915050610a39565b5050505050565b60066020528060005260406000206000915054906101000a900467ffffffffffffffff1681565b610b00611fa0565b80600381905550807fa20d6b84cd798a24038be305eff8a45ca82ef54a2aa2082005d8e14c0a4746c860405160405180910390a250565b6008602052816000526040600020602052806000526040600020600091509150508060000154908060010154908060040160009054906101000a900460ff16908060050154905084565b6000610ba0604051610b9290613439565b604051809103902083610fc3565b9050919050565b60008060009054906101000a900460ff16905090565b610bc5611fa0565b610bd26000801b82610934565b610bdf6000801b336109a8565b50565b610bea611fee565b600a60008760ff1660ff168152602001908152602001600020543414610c45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3c90613710565b60405180910390fd5b60006007600087815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610ced576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ce490613750565b60405180910390fd5b6000600660008960ff1660ff168152602001908152602001600020600081819054906101000a900467ffffffffffffffff1660010191906101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055905060008290508073ffffffffffffffffffffffffffffffffffffffff166338995da9898b85338c8c6040518763ffffffff1660e01b8152600401610d9196959493929190613614565b600060405180830381600087803b158015610dab57600080fd5b505af1158015610dbf573d6000803e3d6000fd5b505050508167ffffffffffffffff16888a60ff167fdbb69440df8433824a026ef190652f29929eb64b4d1d5d2a69be8afe3e6eaed860405160405180910390a4505050505050505050565b610e12611fa0565b60008490508073ffffffffffffffffffffffffffffffffffffffff1663d9caed128585856040518463ffffffff1660e01b8152600401610e5493929190613499565b600060405180830381600087803b158015610e6e57600080fd5b505af1158015610e82573d6000803e3d6000fd5b505050505050505050565b6009602052826000526040600020602052816000526040600020602052806000526040600020600092509250509054906101000a900460ff1681565b60045481565b610ed7611fa0565b610edf61203f565b565b60076020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610f1c611fa0565b60008290508073ffffffffffffffffffffffffffffffffffffffff166307b7ed99836040518263ffffffff1660e01b8152600401610f5a9190613463565b600060405180830381600087803b158015610f7457600080fd5b505af1158015610f88573d6000803e3d6000fd5b50505050505050565b6000610fbb826001600086815260200190815260200160002060000161209a90919063ffffffff16565b905092915050565b6000610fed82600160008681526020019081526020016000206000016120b490919063ffffffff16565b905092915050565b60405161100190613439565b604051809103902081565b60055481565b61101a611fa0565b61103760405161102990613439565b604051809103902082610fc3565b611076576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161106d906136f0565b60405180910390fd5b61109360405161108590613439565b604051809103902082611cf5565b8073ffffffffffffffffffffffffffffffffffffffff167f10e1f7ce9fd7d1b90a66d13a2ab3cb8dd7f29f3f8d520b143b063ccfbab6906b60405160405180910390a26004600081548092919060019003919050555050565b6000801b81565b600a6020528060005260406000206000915090505481565b61111361245b565b60008460ff1660088567ffffffffffffffff1668ffffffffffffffffff16901b179050600860008268ffffffffffffffffff1668ffffffffffffffffff16815260200190815260200160002060008481526020019081526020016000206040518060c001604052908160008201548152602001600182015481526020016002820180548060200260200160405190810160405280929190818152602001828054801561121457602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116111ca575b50505050508152602001600382018054806020026020016040519081016040528092919081815260200182805480156112a257602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611258575b505050505081526020016004820160009054906101000a900460ff1660028111156112c957fe5b60028111156112d457fe5b81526020016005820154815250509150509392505050565b600260009054906101000a900460ff1681565b6113076120e4565b61130f611fee565b60006007600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600081848460405160200161135e9392919061340f565b60405160208183030381529060405280519060200120905060008760ff1660088867ffffffffffffffff1668ffffffffffffffffff16901b1790506000600860008368ffffffffffffffffff1668ffffffffffffffffff16815260200190815260200160002060008481526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff166007600089815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561147a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161147190613850565b60405180910390fd5b60018160040160009054906101000a900460ff16600281111561149957fe5b11156114da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d190613890565b60405180910390fd5b600960008368ffffffffffffffffff1668ffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561159f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611596906136b0565b60405180910390fd5b60008160040160009054906101000a900460ff1660028111156115be57fe5b14156117de57600560008154600101919050819055506040518060c00160405280888152602001848152602001600160405190808252806020026020018201604052801561161b5781602001602082028036833780820191505090505b50815260200160006040519080825280602002602001820160405280156116515781602001602082028036833780820191505090505b5081526020016001600281111561166457fe5b815260200143815250600860008468ffffffffffffffffff1668ffffffffffffffffff1681526020019081526020016000206000858152602001908152602001600020600082015181600001556020820151816001015560408201518160020190805190602001906116d79291906124a2565b5060608201518160030190805190602001906116f49291906124a2565b5060808201518160040160006101000a81548160ff0219169083600281111561171957fe5b021790555060a08201518160050155905050338160020160008154811061173c57fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600281111561179157fe5b8867ffffffffffffffff168a60ff167f803c5a12f6bde629cea32e63d4b92d1b560816a6fb72e939d3c89e1cab6504178a876040516117d1929190613574565b60405180910390a461188a565b80600101548314611824576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181b90613830565b60405180910390fd5b80600201339080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b6001600960008468ffffffffffffffffff1668ffffffffffffffffff168152602001908152602001600020600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508060040160009054906101000a900460ff16600281111561193757fe5b8867ffffffffffffffff168a60ff167f25f8daaa4635a7729927ba3f5b3d59cc3320aca7c32c9db4e7ca7b95743436408a60405161197591906134eb565b60405180910390a4600354816002018054905010611b1757806001015483146119d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119ca90613730565b60405180910390fd5b60028160040160006101000a81548160ff021916908360028111156119f457fe5b02179055506000600760008360000154815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663e248cff2836000015489896040518463ffffffff1660e01b8152600401611a76939291906135e2565b600060405180830381600087803b158015611a9057600080fd5b505af1158015611aa4573d6000803e3d6000fd5b505050508160040160009054906101000a900460ff166002811115611ac557fe5b8967ffffffffffffffff168b60ff167f803c5a12f6bde629cea32e63d4b92d1b560816a6fb72e939d3c89e1cab65041785600001548660010154604051611b0d929190613574565b60405180910390a4505b505050505050505050565b6000611b4260016000848152602001908152602001600020600001612142565b9050919050565b611b51611fa0565b826007600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008390508073ffffffffffffffffffffffffffffffffffffffff1663b8fa373684846040518363ffffffff1660e01b8152600401611be3929190613506565b600060405180830381600087803b158015611bfd57600080fd5b505af1158015611c11573d6000803e3d6000fd5b5050505050505050565b611c23611fa0565b611c40604051611c3290613439565b604051809103902082610fc3565b15611c80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c77906137b0565b60405180910390fd5b611c9d604051611c8f90613439565b604051809103902082610934565b8073ffffffffffffffffffffffffffffffffffffffff167f03580ee9f53a62b7cb409a2cb56f9be87747dd15017afc5cef6eef321e4fb2c560405160405180910390a260046000815480929190600101919050555050565b611d1c6001600084815260200190815260200160002060020154611d17611e70565b610fc3565b611d5b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d5290613770565b60405180910390fd5b611d658282611f0c565b5050565b60035481565b611d77611fa0565b846007600086815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008590508073ffffffffffffffffffffffffffffffffffffffff1663bba8185a868686866040518563ffffffff1660e01b8152600401611e0d949392919061352f565b600060405180830381600087803b158015611e2757600080fd5b505af1158015611e3b573d6000803e3d6000fd5b50505050505050505050565b604051611e539061344e565b604051809103902081565b611e66611fa0565b611e6e612157565b565b600033905090565b611ea081600160008581526020019081526020016000206000016121b290919063ffffffff16565b15611f0857611ead611e70565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b611f3481600160008581526020019081526020016000206000016121e290919063ffffffff16565b15611f9c57611f41611e70565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b611fad6000801b33610fc3565b611fec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fe390613810565b60405180910390fd5b565b6000809054906101000a900460ff161561203d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161203490613790565b60405180910390fd5b565b612047611fee565b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833604051612090919061347e565b60405180910390a1565b60006120a98360000183612212565b60001c905092915050565b60006120dc836000018373ffffffffffffffffffffffffffffffffffffffff1660001b61227f565b905092915050565b6121016040516120f390613439565b604051809103902033610fc3565b612140576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612137906137f0565b60405180910390fd5b565b6000612150826000016122a2565b9050919050565b61215f6122b3565b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa336040516121a8919061347e565b60405180910390a1565b60006121da836000018373ffffffffffffffffffffffffffffffffffffffff1660001b612303565b905092915050565b600061220a836000018373ffffffffffffffffffffffffffffffffffffffff1660001b612373565b905092915050565b60008183600001805490501161225d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161225490613670565b60405180910390fd5b82600001828154811061226c57fe5b9060005260206000200154905092915050565b600080836001016000848152602001908152602001600020541415905092915050565b600081600001805490509050919050565b6000809054906101000a900460ff16612301576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122f8906136d0565b60405180910390fd5b565b600061230f838361227f565b61236857826000018290806001815401808255809150506001900390600052602060002001600090919091909150558260000180549050836001016000848152602001908152602001600020819055506001905061236d565b600090505b92915050565b6000808360010160008481526020019081526020016000205490506000811461244f57600060018203905060006001866000018054905003905060008660000182815481106123be57fe5b90600052602060002001549050808760000184815481106123db57fe5b906000526020600020018190555060018301876001016000838152602001908152602001600020819055508660000180548061241357fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612455565b60009150505b92915050565b6040518060c00160405280600080191681526020016000801916815260200160608152602001606081526020016000600281111561249557fe5b8152602001600081525090565b82805482825590600052602060002090810192821561251b579160200282015b8281111561251a5782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550916020019190600101906124c2565b5b509050612528919061252c565b5090565b61256c91905b8082111561256857600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550600101612532565b5090565b90565b60008135905061257e81613b13565b92915050565b60008135905061259381613b2a565b92915050565b60008083601f8401126125ab57600080fd5b8235905067ffffffffffffffff8111156125c457600080fd5b6020830191508360208202830111156125dc57600080fd5b9250929050565b60008083601f8401126125f557600080fd5b8235905067ffffffffffffffff81111561260e57600080fd5b60208301915083602082028301111561262657600080fd5b9250929050565b60008135905061263c81613b41565b92915050565b60008135905061265181613b58565b92915050565b60008083601f84011261266957600080fd5b8235905067ffffffffffffffff81111561268257600080fd5b60208301915083600182028301111561269a57600080fd5b9250929050565b6000813590506126b081613b6f565b92915050565b6000813590506126c581613b86565b92915050565b6000813590506126da81613b9d565b92915050565b6000813590506126ef81613bb4565b92915050565b60006020828403121561270757600080fd5b60006127158482850161256f565b91505092915050565b60006020828403121561273057600080fd5b600061273e84828501612584565b91505092915050565b6000806040838503121561275a57600080fd5b60006127688582860161256f565b92505060206127798582860161256f565b9150509250929050565b6000806000806080858703121561279957600080fd5b60006127a78782880161256f565b94505060206127b88782880161256f565b93505060406127c98782880161256f565b92505060606127da878288016126a1565b91505092959194509250565b6000806000606084860312156127fb57600080fd5b60006128098682870161256f565b935050602061281a8682870161262d565b925050604061282b8682870161256f565b9150509250925092565b600080600080600060a0868803121561284d57600080fd5b600061285b8882890161256f565b955050602061286c8882890161262d565b945050604061287d8882890161256f565b935050606061288e88828901612642565b925050608061289f88828901612642565b9150509295509295909350565b600080600080604085870312156128c257600080fd5b600085013567ffffffffffffffff8111156128dc57600080fd5b6128e887828801612599565b9450945050602085013567ffffffffffffffff81111561290757600080fd5b612913878288016125e3565b925092505092959194509250565b60006020828403121561293357600080fd5b60006129418482850161262d565b91505092915050565b6000806040838503121561295d57600080fd5b600061296b8582860161262d565b925050602061297c8582860161256f565b9150509250929050565b6000806040838503121561299957600080fd5b60006129a78582860161262d565b92505060206129b8858286016126a1565b9150509250929050565b6000602082840312156129d457600080fd5b60006129e2848285016126a1565b91505092915050565b600080604083850312156129fe57600080fd5b6000612a0c858286016126cb565b9250506020612a1d8582860161262d565b9150509250929050565b600080600060608486031215612a3c57600080fd5b6000612a4a868287016126cb565b9350506020612a5b8682870161262d565b9250506040612a6c8682870161256f565b9150509250925092565b600060208284031215612a8857600080fd5b6000612a96848285016126e0565b91505092915050565b60008060008060008060808789031215612ab857600080fd5b6000612ac689828a016126e0565b9650506020612ad789828a0161262d565b955050604087013567ffffffffffffffff811115612af457600080fd5b612b0089828a01612657565b9450945050606087013567ffffffffffffffff811115612b1f57600080fd5b612b2b89828a01612657565b92509250509295509295509295565b60008060408385031215612b4d57600080fd5b6000612b5b858286016126e0565b9250506020612b6c858286016126a1565b9150509250929050565b600080600060608486031215612b8b57600080fd5b6000612b99868287016126e0565b9350506020612baa868287016126b6565b9250506040612bbb8682870161262d565b9150509250925092565b600080600080600060808688031215612bdd57600080fd5b6000612beb888289016126e0565b9550506020612bfc888289016126b6565b9450506040612c0d8882890161262d565b935050606086013567ffffffffffffffff811115612c2a57600080fd5b612c3688828901612657565b92509250509295509295909350565b6000612c518383612c6c565b60208301905092915050565b612c6681613a6d565b82525050565b612c7581613994565b82525050565b612c8481613994565b82525050565b612c9b612c9682613994565b613ac4565b82525050565b6000612cac82613933565b612cb6818561394b565b9350612cc183613923565b8060005b83811015612cf2578151612cd98882612c45565b9750612ce48361393e565b925050600181019050612cc5565b5085935050505092915050565b612d08816139b8565b82525050565b612d17816139c4565b82525050565b612d26816139c4565b82525050565b612d35816139ce565b82525050565b6000612d47838561395c565b9350612d54838584613ab5565b612d5d83613ae8565b840190509392505050565b6000612d74838561396d565b9350612d81838584613ab5565b82840190509392505050565b612d9681613a7f565b82525050565b612da581613a7f565b82525050565b6000612db8602283613978565b91507f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e60008301527f64730000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612e1e602f83613978565b91507f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60008301527f2061646d696e20746f206772616e7400000000000000000000000000000000006020830152604082019050919050565b6000612e84601583613978565b91507f72656c6179657220616c726561647920766f74656400000000000000000000006000830152602082019050919050565b6000612ec4601483613978565b91507f5061757361626c653a206e6f74207061757365640000000000000000000000006000830152602082019050919050565b6000612f04601f83613978565b91507f6164647220646f65736e277420686176652072656c6179657220726f6c6521006000830152602082019050919050565b6000612f44601683613978565b91507f496e636f72726563742066656520737570706c696564000000000000000000006000830152602082019050919050565b6000612f84601b83613978565b91507f6461746120646f65736e2774206d6174636820646174616861736800000000006000830152602082019050919050565b6000612fc4602083613978565b91507f7265736f757263654944206e6f74206d617070656420746f2068616e646c65726000830152602082019050919050565b6000613004603083613978565b91507f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60008301527f2061646d696e20746f207265766f6b65000000000000000000000000000000006020830152604082019050919050565b600061306a601083613978565b91507f5061757361626c653a20706175736564000000000000000000000000000000006000830152602082019050919050565b60006130aa601e83613978565b91507f6164647220616c7265616479206861732072656c6179657220726f6c652100006000830152602082019050919050565b60006130ea601883613978565b91507f73656e646572206973206e6f74206665652073657474657200000000000000006000830152602082019050919050565b600061312a602083613978565b91507f73656e64657220646f65736e277420686176652072656c6179657220726f6c656000830152602082019050919050565b600061316a601e83613978565b91507f73656e64657220646f65736e277420686176652061646d696e20726f6c6500006000830152602082019050919050565b60006131aa600c83613989565b91507f52454c415945525f524f4c4500000000000000000000000000000000000000006000830152600c82019050919050565b60006131ea601183613978565b91507f6461746168617368206d69736d617463680000000000000000000000000000006000830152602082019050919050565b600061322a600f83613989565b91507f4645455f5345545445525f524f4c4500000000000000000000000000000000006000830152600f82019050919050565b600061326a601983613978565b91507f6e6f2068616e646c657220666f72207265736f757263654944000000000000006000830152602082019050919050565b60006132aa602f83613978565b91507f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008301527f20726f6c657320666f722073656c6600000000000000000000000000000000006020830152604082019050919050565b6000613310601983613978565b91507f70726f706f73616c20616c7265616479206578656375746564000000000000006000830152602082019050919050565b600060c08301600083015161335b6000860182612d0e565b50602083015161336e6020860182612d0e565b50604083015184820360408601526133868282612ca1565b915050606083015184820360608601526133a08282612ca1565b91505060808301516133b56080860182612d8d565b5060a08301516133c860a08601826133d3565b508091505092915050565b6133dc81613a2d565b82525050565b6133eb81613a2d565b82525050565b6133fa81613a37565b82525050565b61340981613a60565b82525050565b600061341b8286612c8a565b60148201915061342c828486612d68565b9150819050949350505050565b60006134448261319d565b9150819050919050565b60006134598261321d565b9150819050919050565b60006020820190506134786000830184612c7b565b92915050565b60006020820190506134936000830184612c5d565b92915050565b60006060820190506134ae6000830186612c7b565b6134bb6020830185612c7b565b6134c860408301846133e2565b949350505050565b60006020820190506134e56000830184612cff565b92915050565b60006020820190506135006000830184612d1d565b92915050565b600060408201905061351b6000830185612d1d565b6135286020830184612c7b565b9392505050565b60006080820190506135446000830187612d1d565b6135516020830186612c7b565b61355e6040830185612d2c565b61356b6060830184612d2c565b95945050505050565b60006040820190506135896000830185612d1d565b6135966020830184612d1d565b9392505050565b60006080820190506135b26000830187612d1d565b6135bf6020830186612d1d565b6135cc6040830185612d9c565b6135d960608301846133e2565b95945050505050565b60006040820190506135f76000830186612d1d565b818103602083015261360a818486612d3b565b9050949350505050565b600060a0820190506136296000830189612d1d565b6136366020830188613400565b61364360408301876133f1565b6136506060830186612c5d565b8181036080830152613663818486612d3b565b9050979650505050505050565b6000602082019050818103600083015261368981612dab565b9050919050565b600060208201905081810360008301526136a981612e11565b9050919050565b600060208201905081810360008301526136c981612e77565b9050919050565b600060208201905081810360008301526136e981612eb7565b9050919050565b6000602082019050818103600083015261370981612ef7565b9050919050565b6000602082019050818103600083015261372981612f37565b9050919050565b6000602082019050818103600083015261374981612f77565b9050919050565b6000602082019050818103600083015261376981612fb7565b9050919050565b6000602082019050818103600083015261378981612ff7565b9050919050565b600060208201905081810360008301526137a98161305d565b9050919050565b600060208201905081810360008301526137c98161309d565b9050919050565b600060208201905081810360008301526137e9816130dd565b9050919050565b600060208201905081810360008301526138098161311d565b9050919050565b600060208201905081810360008301526138298161315d565b9050919050565b60006020820190508181036000830152613849816131dd565b9050919050565b600060208201905081810360008301526138698161325d565b9050919050565b600060208201905081810360008301526138898161329d565b9050919050565b600060208201905081810360008301526138a981613303565b9050919050565b600060208201905081810360008301526138ca8184613343565b905092915050565b60006020820190506138e760008301846133e2565b92915050565b600060208201905061390260008301846133f1565b92915050565b600060208201905061391d6000830184613400565b92915050565b6000819050602082019050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600061399f82613a0d565b9050919050565b60006139b182613a0d565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050613a0882613b06565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600067ffffffffffffffff82169050919050565b600068ffffffffffffffffff82169050919050565b600060ff82169050919050565b6000613a7882613a91565b9050919050565b6000613a8a826139fa565b9050919050565b6000613a9c82613aa3565b9050919050565b6000613aae82613a0d565b9050919050565b82818337600083830152505050565b6000613acf82613ad6565b9050919050565b6000613ae182613af9565b9050919050565b6000601f19601f8301169050919050565b60008160601b9050919050565b60038110613b1057fe5b50565b613b1c81613994565b8114613b2757600080fd5b50565b613b33816139a6565b8114613b3e57600080fd5b50565b613b4a816139c4565b8114613b5557600080fd5b50565b613b61816139ce565b8114613b6c57600080fd5b50565b613b7881613a2d565b8114613b8357600080fd5b50565b613b8f81613a37565b8114613b9a57600080fd5b50565b613ba681613a4b565b8114613bb157600080fd5b50565b613bbd81613a60565b8114613bc857600080fd5b5056fea26469706673582212209c78c02039d421a3eedf3bd035a56585f512802cf522eb429eef2a0b996c5cc464736f6c63430006040033", + "deployedBytecode": "0x60806040526004361061020f5760003560e01c80639010d07c11610118578063c0331b3e116100a0578063d547741f1161006f578063d547741f146107d7578063d7a9cd7914610800578063e8437ee71461082b578063e934768314610854578063ffaac0eb1461087f5761020f565b8063c0331b3e1461071f578063ca15c87314610748578063cb10f21514610785578063cdb0f73a146107ae5761020f565b80639d82dd63116100e75780639d82dd6314610626578063a217fddf1461064f578063a49e88d91461067a578063a9cf69fa146106b7578063beab7131146106f45761020f565b80639010d07c1461055657806391d1485414610593578063926d7d7f146105d05780639d5773e0146105fb5761020f565b80635c975abb1161019b5780637febe63f1161016a5780637febe63f14610471578063802aabe8146104ae57806380ae1c28146104d957806384db809f146104f05780638c0c26311461052d5761020f565b80635c975abb146103d85780635e1fab0f1461040357806373c45c981461042c578063780cf004146104485761020f565b80634603ae38116101e25780634603ae38146102cc5780634b0b919d146102f55780634e05600514610332578063505987191461035b578063541d55481461039b5761020f565b806313a7e54e14610214578063248a9ca31461023d5780632f2ff15d1461027a57806336568abe146102a3575b600080fd5b34801561022057600080fd5b5061023b60048036038101906102369190612b3a565b610896565b005b34801561024957600080fd5b50610264600480360381019061025f9190612921565b610914565b60405161027191906134eb565b60405180910390f35b34801561028657600080fd5b506102a1600480360381019061029c919061294a565b610934565b005b3480156102af57600080fd5b506102ca60048036038101906102c5919061294a565b6109a8565b005b3480156102d857600080fd5b506102f360048036038101906102ee91906128ac565b610a2b565b005b34801561030157600080fd5b5061031c60048036038101906103179190612a76565b610ad1565b60405161032991906138ed565b60405180910390f35b34801561033e57600080fd5b50610359600480360381019061035491906129c2565b610af8565b005b34801561036757600080fd5b50610382600480360381019061037d91906129eb565b610b37565b604051610392949392919061359d565b60405180910390f35b3480156103a757600080fd5b506103c260048036038101906103bd91906126f5565b610b81565b6040516103cf91906134d0565b60405180910390f35b3480156103e457600080fd5b506103ed610ba7565b6040516103fa91906134d0565b60405180910390f35b34801561040f57600080fd5b5061042a600480360381019061042591906126f5565b610bbd565b005b61044660048036038101906104419190612a9f565b610be2565b005b34801561045457600080fd5b5061046f600480360381019061046a9190612783565b610e0a565b005b34801561047d57600080fd5b5061049860048036038101906104939190612a27565b610e8d565b6040516104a591906134d0565b60405180910390f35b3480156104ba57600080fd5b506104c3610ec9565b6040516104d091906138d2565b60405180910390f35b3480156104e557600080fd5b506104ee610ecf565b005b3480156104fc57600080fd5b5061051760048036038101906105129190612921565b610ee1565b6040516105249190613463565b60405180910390f35b34801561053957600080fd5b50610554600480360381019061054f9190612747565b610f14565b005b34801561056257600080fd5b5061057d60048036038101906105789190612986565b610f91565b60405161058a9190613463565b60405180910390f35b34801561059f57600080fd5b506105ba60048036038101906105b5919061294a565b610fc3565b6040516105c791906134d0565b60405180910390f35b3480156105dc57600080fd5b506105e5610ff5565b6040516105f291906134eb565b60405180910390f35b34801561060757600080fd5b5061061061100c565b60405161061d91906138d2565b60405180910390f35b34801561063257600080fd5b5061064d600480360381019061064891906126f5565b611012565b005b34801561065b57600080fd5b506106646110ec565b60405161067191906134eb565b60405180910390f35b34801561068657600080fd5b506106a1600480360381019061069c9190612a76565b6110f3565b6040516106ae91906138d2565b60405180910390f35b3480156106c357600080fd5b506106de60048036038101906106d99190612b76565b61110b565b6040516106eb91906138b0565b60405180910390f35b34801561070057600080fd5b506107096112ec565b6040516107169190613908565b60405180910390f35b34801561072b57600080fd5b5061074660048036038101906107419190612bc5565b6112ff565b005b34801561075457600080fd5b5061076f600480360381019061076a9190612921565b611b22565b60405161077c91906138d2565b60405180910390f35b34801561079157600080fd5b506107ac60048036038101906107a791906127e6565b611b49565b005b3480156107ba57600080fd5b506107d560048036038101906107d091906126f5565b611c1b565b005b3480156107e357600080fd5b506107fe60048036038101906107f9919061294a565b611cf5565b005b34801561080c57600080fd5b50610815611d69565b60405161082291906138d2565b60405180910390f35b34801561083757600080fd5b50610852600480360381019061084d9190612835565b611d6f565b005b34801561086057600080fd5b50610869611e47565b60405161087691906134eb565b60405180910390f35b34801561088b57600080fd5b50610894611e5e565b005b6108b36040516108a59061344e565b604051809103902033610fc3565b6108f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108e9906137d0565b60405180910390fd5b80600a60008460ff1660ff168152602001908152602001600020819055505050565b600060016000838152602001908152602001600020600201549050919050565b61095b6001600084815260200190815260200160002060020154610956611e70565b610fc3565b61099a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099190613690565b60405180910390fd5b6109a48282611e78565b5050565b6109b0611e70565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610a1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1490613870565b60405180910390fd5b610a278282611f0c565b5050565b610a33611fa0565b60008090505b84849050811015610aca57848482818110610a5057fe5b9050602002016020810190610a65919061271e565b73ffffffffffffffffffffffffffffffffffffffff166108fc848484818110610a8a57fe5b905060200201359081150290604051600060405180830381858888f19350505050158015610abc573d6000803e3d6000fd5b508080600101915050610a39565b5050505050565b60066020528060005260406000206000915054906101000a900467ffffffffffffffff1681565b610b00611fa0565b80600381905550807fa20d6b84cd798a24038be305eff8a45ca82ef54a2aa2082005d8e14c0a4746c860405160405180910390a250565b6008602052816000526040600020602052806000526040600020600091509150508060000154908060010154908060040160009054906101000a900460ff16908060050154905084565b6000610ba0604051610b9290613439565b604051809103902083610fc3565b9050919050565b60008060009054906101000a900460ff16905090565b610bc5611fa0565b610bd26000801b82610934565b610bdf6000801b336109a8565b50565b610bea611fee565b600a60008760ff1660ff168152602001908152602001600020543414610c45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3c90613710565b60405180910390fd5b60006007600087815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610ced576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ce490613750565b60405180910390fd5b6000600660008960ff1660ff168152602001908152602001600020600081819054906101000a900467ffffffffffffffff1660010191906101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055905060008290508073ffffffffffffffffffffffffffffffffffffffff166338995da9898b85338c8c6040518763ffffffff1660e01b8152600401610d9196959493929190613614565b600060405180830381600087803b158015610dab57600080fd5b505af1158015610dbf573d6000803e3d6000fd5b505050508167ffffffffffffffff16888a60ff167fdbb69440df8433824a026ef190652f29929eb64b4d1d5d2a69be8afe3e6eaed860405160405180910390a4505050505050505050565b610e12611fa0565b60008490508073ffffffffffffffffffffffffffffffffffffffff1663d9caed128585856040518463ffffffff1660e01b8152600401610e5493929190613499565b600060405180830381600087803b158015610e6e57600080fd5b505af1158015610e82573d6000803e3d6000fd5b505050505050505050565b6009602052826000526040600020602052816000526040600020602052806000526040600020600092509250509054906101000a900460ff1681565b60045481565b610ed7611fa0565b610edf61203f565b565b60076020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610f1c611fa0565b60008290508073ffffffffffffffffffffffffffffffffffffffff166307b7ed99836040518263ffffffff1660e01b8152600401610f5a9190613463565b600060405180830381600087803b158015610f7457600080fd5b505af1158015610f88573d6000803e3d6000fd5b50505050505050565b6000610fbb826001600086815260200190815260200160002060000161209a90919063ffffffff16565b905092915050565b6000610fed82600160008681526020019081526020016000206000016120b490919063ffffffff16565b905092915050565b60405161100190613439565b604051809103902081565b60055481565b61101a611fa0565b61103760405161102990613439565b604051809103902082610fc3565b611076576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161106d906136f0565b60405180910390fd5b61109360405161108590613439565b604051809103902082611cf5565b8073ffffffffffffffffffffffffffffffffffffffff167f10e1f7ce9fd7d1b90a66d13a2ab3cb8dd7f29f3f8d520b143b063ccfbab6906b60405160405180910390a26004600081548092919060019003919050555050565b6000801b81565b600a6020528060005260406000206000915090505481565b61111361245b565b60008460ff1660088567ffffffffffffffff1668ffffffffffffffffff16901b179050600860008268ffffffffffffffffff1668ffffffffffffffffff16815260200190815260200160002060008481526020019081526020016000206040518060c001604052908160008201548152602001600182015481526020016002820180548060200260200160405190810160405280929190818152602001828054801561121457602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116111ca575b50505050508152602001600382018054806020026020016040519081016040528092919081815260200182805480156112a257602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611258575b505050505081526020016004820160009054906101000a900460ff1660028111156112c957fe5b60028111156112d457fe5b81526020016005820154815250509150509392505050565b600260009054906101000a900460ff1681565b6113076120e4565b61130f611fee565b60006007600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600081848460405160200161135e9392919061340f565b60405160208183030381529060405280519060200120905060008760ff1660088867ffffffffffffffff1668ffffffffffffffffff16901b1790506000600860008368ffffffffffffffffff1668ffffffffffffffffff16815260200190815260200160002060008481526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff166007600089815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561147a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161147190613850565b60405180910390fd5b60018160040160009054906101000a900460ff16600281111561149957fe5b11156114da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d190613890565b60405180910390fd5b600960008368ffffffffffffffffff1668ffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561159f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611596906136b0565b60405180910390fd5b60008160040160009054906101000a900460ff1660028111156115be57fe5b14156117de57600560008154600101919050819055506040518060c00160405280888152602001848152602001600160405190808252806020026020018201604052801561161b5781602001602082028036833780820191505090505b50815260200160006040519080825280602002602001820160405280156116515781602001602082028036833780820191505090505b5081526020016001600281111561166457fe5b815260200143815250600860008468ffffffffffffffffff1668ffffffffffffffffff1681526020019081526020016000206000858152602001908152602001600020600082015181600001556020820151816001015560408201518160020190805190602001906116d79291906124a2565b5060608201518160030190805190602001906116f49291906124a2565b5060808201518160040160006101000a81548160ff0219169083600281111561171957fe5b021790555060a08201518160050155905050338160020160008154811061173c57fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600281111561179157fe5b8867ffffffffffffffff168a60ff167f803c5a12f6bde629cea32e63d4b92d1b560816a6fb72e939d3c89e1cab6504178a876040516117d1929190613574565b60405180910390a461188a565b80600101548314611824576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181b90613830565b60405180910390fd5b80600201339080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b6001600960008468ffffffffffffffffff1668ffffffffffffffffff168152602001908152602001600020600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508060040160009054906101000a900460ff16600281111561193757fe5b8867ffffffffffffffff168a60ff167f25f8daaa4635a7729927ba3f5b3d59cc3320aca7c32c9db4e7ca7b95743436408a60405161197591906134eb565b60405180910390a4600354816002018054905010611b1757806001015483146119d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119ca90613730565b60405180910390fd5b60028160040160006101000a81548160ff021916908360028111156119f457fe5b02179055506000600760008360000154815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663e248cff2836000015489896040518463ffffffff1660e01b8152600401611a76939291906135e2565b600060405180830381600087803b158015611a9057600080fd5b505af1158015611aa4573d6000803e3d6000fd5b505050508160040160009054906101000a900460ff166002811115611ac557fe5b8967ffffffffffffffff168b60ff167f803c5a12f6bde629cea32e63d4b92d1b560816a6fb72e939d3c89e1cab65041785600001548660010154604051611b0d929190613574565b60405180910390a4505b505050505050505050565b6000611b4260016000848152602001908152602001600020600001612142565b9050919050565b611b51611fa0565b826007600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008390508073ffffffffffffffffffffffffffffffffffffffff1663b8fa373684846040518363ffffffff1660e01b8152600401611be3929190613506565b600060405180830381600087803b158015611bfd57600080fd5b505af1158015611c11573d6000803e3d6000fd5b5050505050505050565b611c23611fa0565b611c40604051611c3290613439565b604051809103902082610fc3565b15611c80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c77906137b0565b60405180910390fd5b611c9d604051611c8f90613439565b604051809103902082610934565b8073ffffffffffffffffffffffffffffffffffffffff167f03580ee9f53a62b7cb409a2cb56f9be87747dd15017afc5cef6eef321e4fb2c560405160405180910390a260046000815480929190600101919050555050565b611d1c6001600084815260200190815260200160002060020154611d17611e70565b610fc3565b611d5b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d5290613770565b60405180910390fd5b611d658282611f0c565b5050565b60035481565b611d77611fa0565b846007600086815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008590508073ffffffffffffffffffffffffffffffffffffffff1663bba8185a868686866040518563ffffffff1660e01b8152600401611e0d949392919061352f565b600060405180830381600087803b158015611e2757600080fd5b505af1158015611e3b573d6000803e3d6000fd5b50505050505050505050565b604051611e539061344e565b604051809103902081565b611e66611fa0565b611e6e612157565b565b600033905090565b611ea081600160008581526020019081526020016000206000016121b290919063ffffffff16565b15611f0857611ead611e70565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b611f3481600160008581526020019081526020016000206000016121e290919063ffffffff16565b15611f9c57611f41611e70565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b611fad6000801b33610fc3565b611fec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fe390613810565b60405180910390fd5b565b6000809054906101000a900460ff161561203d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161203490613790565b60405180910390fd5b565b612047611fee565b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833604051612090919061347e565b60405180910390a1565b60006120a98360000183612212565b60001c905092915050565b60006120dc836000018373ffffffffffffffffffffffffffffffffffffffff1660001b61227f565b905092915050565b6121016040516120f390613439565b604051809103902033610fc3565b612140576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612137906137f0565b60405180910390fd5b565b6000612150826000016122a2565b9050919050565b61215f6122b3565b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa336040516121a8919061347e565b60405180910390a1565b60006121da836000018373ffffffffffffffffffffffffffffffffffffffff1660001b612303565b905092915050565b600061220a836000018373ffffffffffffffffffffffffffffffffffffffff1660001b612373565b905092915050565b60008183600001805490501161225d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161225490613670565b60405180910390fd5b82600001828154811061226c57fe5b9060005260206000200154905092915050565b600080836001016000848152602001908152602001600020541415905092915050565b600081600001805490509050919050565b6000809054906101000a900460ff16612301576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122f8906136d0565b60405180910390fd5b565b600061230f838361227f565b61236857826000018290806001815401808255809150506001900390600052602060002001600090919091909150558260000180549050836001016000848152602001908152602001600020819055506001905061236d565b600090505b92915050565b6000808360010160008481526020019081526020016000205490506000811461244f57600060018203905060006001866000018054905003905060008660000182815481106123be57fe5b90600052602060002001549050808760000184815481106123db57fe5b906000526020600020018190555060018301876001016000838152602001908152602001600020819055508660000180548061241357fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612455565b60009150505b92915050565b6040518060c00160405280600080191681526020016000801916815260200160608152602001606081526020016000600281111561249557fe5b8152602001600081525090565b82805482825590600052602060002090810192821561251b579160200282015b8281111561251a5782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550916020019190600101906124c2565b5b509050612528919061252c565b5090565b61256c91905b8082111561256857600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550600101612532565b5090565b90565b60008135905061257e81613b13565b92915050565b60008135905061259381613b2a565b92915050565b60008083601f8401126125ab57600080fd5b8235905067ffffffffffffffff8111156125c457600080fd5b6020830191508360208202830111156125dc57600080fd5b9250929050565b60008083601f8401126125f557600080fd5b8235905067ffffffffffffffff81111561260e57600080fd5b60208301915083602082028301111561262657600080fd5b9250929050565b60008135905061263c81613b41565b92915050565b60008135905061265181613b58565b92915050565b60008083601f84011261266957600080fd5b8235905067ffffffffffffffff81111561268257600080fd5b60208301915083600182028301111561269a57600080fd5b9250929050565b6000813590506126b081613b6f565b92915050565b6000813590506126c581613b86565b92915050565b6000813590506126da81613b9d565b92915050565b6000813590506126ef81613bb4565b92915050565b60006020828403121561270757600080fd5b60006127158482850161256f565b91505092915050565b60006020828403121561273057600080fd5b600061273e84828501612584565b91505092915050565b6000806040838503121561275a57600080fd5b60006127688582860161256f565b92505060206127798582860161256f565b9150509250929050565b6000806000806080858703121561279957600080fd5b60006127a78782880161256f565b94505060206127b88782880161256f565b93505060406127c98782880161256f565b92505060606127da878288016126a1565b91505092959194509250565b6000806000606084860312156127fb57600080fd5b60006128098682870161256f565b935050602061281a8682870161262d565b925050604061282b8682870161256f565b9150509250925092565b600080600080600060a0868803121561284d57600080fd5b600061285b8882890161256f565b955050602061286c8882890161262d565b945050604061287d8882890161256f565b935050606061288e88828901612642565b925050608061289f88828901612642565b9150509295509295909350565b600080600080604085870312156128c257600080fd5b600085013567ffffffffffffffff8111156128dc57600080fd5b6128e887828801612599565b9450945050602085013567ffffffffffffffff81111561290757600080fd5b612913878288016125e3565b925092505092959194509250565b60006020828403121561293357600080fd5b60006129418482850161262d565b91505092915050565b6000806040838503121561295d57600080fd5b600061296b8582860161262d565b925050602061297c8582860161256f565b9150509250929050565b6000806040838503121561299957600080fd5b60006129a78582860161262d565b92505060206129b8858286016126a1565b9150509250929050565b6000602082840312156129d457600080fd5b60006129e2848285016126a1565b91505092915050565b600080604083850312156129fe57600080fd5b6000612a0c858286016126cb565b9250506020612a1d8582860161262d565b9150509250929050565b600080600060608486031215612a3c57600080fd5b6000612a4a868287016126cb565b9350506020612a5b8682870161262d565b9250506040612a6c8682870161256f565b9150509250925092565b600060208284031215612a8857600080fd5b6000612a96848285016126e0565b91505092915050565b60008060008060008060808789031215612ab857600080fd5b6000612ac689828a016126e0565b9650506020612ad789828a0161262d565b955050604087013567ffffffffffffffff811115612af457600080fd5b612b0089828a01612657565b9450945050606087013567ffffffffffffffff811115612b1f57600080fd5b612b2b89828a01612657565b92509250509295509295509295565b60008060408385031215612b4d57600080fd5b6000612b5b858286016126e0565b9250506020612b6c858286016126a1565b9150509250929050565b600080600060608486031215612b8b57600080fd5b6000612b99868287016126e0565b9350506020612baa868287016126b6565b9250506040612bbb8682870161262d565b9150509250925092565b600080600080600060808688031215612bdd57600080fd5b6000612beb888289016126e0565b9550506020612bfc888289016126b6565b9450506040612c0d8882890161262d565b935050606086013567ffffffffffffffff811115612c2a57600080fd5b612c3688828901612657565b92509250509295509295909350565b6000612c518383612c6c565b60208301905092915050565b612c6681613a6d565b82525050565b612c7581613994565b82525050565b612c8481613994565b82525050565b612c9b612c9682613994565b613ac4565b82525050565b6000612cac82613933565b612cb6818561394b565b9350612cc183613923565b8060005b83811015612cf2578151612cd98882612c45565b9750612ce48361393e565b925050600181019050612cc5565b5085935050505092915050565b612d08816139b8565b82525050565b612d17816139c4565b82525050565b612d26816139c4565b82525050565b612d35816139ce565b82525050565b6000612d47838561395c565b9350612d54838584613ab5565b612d5d83613ae8565b840190509392505050565b6000612d74838561396d565b9350612d81838584613ab5565b82840190509392505050565b612d9681613a7f565b82525050565b612da581613a7f565b82525050565b6000612db8602283613978565b91507f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e60008301527f64730000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612e1e602f83613978565b91507f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60008301527f2061646d696e20746f206772616e7400000000000000000000000000000000006020830152604082019050919050565b6000612e84601583613978565b91507f72656c6179657220616c726561647920766f74656400000000000000000000006000830152602082019050919050565b6000612ec4601483613978565b91507f5061757361626c653a206e6f74207061757365640000000000000000000000006000830152602082019050919050565b6000612f04601f83613978565b91507f6164647220646f65736e277420686176652072656c6179657220726f6c6521006000830152602082019050919050565b6000612f44601683613978565b91507f496e636f72726563742066656520737570706c696564000000000000000000006000830152602082019050919050565b6000612f84601b83613978565b91507f6461746120646f65736e2774206d6174636820646174616861736800000000006000830152602082019050919050565b6000612fc4602083613978565b91507f7265736f757263654944206e6f74206d617070656420746f2068616e646c65726000830152602082019050919050565b6000613004603083613978565b91507f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60008301527f2061646d696e20746f207265766f6b65000000000000000000000000000000006020830152604082019050919050565b600061306a601083613978565b91507f5061757361626c653a20706175736564000000000000000000000000000000006000830152602082019050919050565b60006130aa601e83613978565b91507f6164647220616c7265616479206861732072656c6179657220726f6c652100006000830152602082019050919050565b60006130ea601883613978565b91507f73656e646572206973206e6f74206665652073657474657200000000000000006000830152602082019050919050565b600061312a602083613978565b91507f73656e64657220646f65736e277420686176652072656c6179657220726f6c656000830152602082019050919050565b600061316a601e83613978565b91507f73656e64657220646f65736e277420686176652061646d696e20726f6c6500006000830152602082019050919050565b60006131aa600c83613989565b91507f52454c415945525f524f4c4500000000000000000000000000000000000000006000830152600c82019050919050565b60006131ea601183613978565b91507f6461746168617368206d69736d617463680000000000000000000000000000006000830152602082019050919050565b600061322a600f83613989565b91507f4645455f5345545445525f524f4c4500000000000000000000000000000000006000830152600f82019050919050565b600061326a601983613978565b91507f6e6f2068616e646c657220666f72207265736f757263654944000000000000006000830152602082019050919050565b60006132aa602f83613978565b91507f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008301527f20726f6c657320666f722073656c6600000000000000000000000000000000006020830152604082019050919050565b6000613310601983613978565b91507f70726f706f73616c20616c7265616479206578656375746564000000000000006000830152602082019050919050565b600060c08301600083015161335b6000860182612d0e565b50602083015161336e6020860182612d0e565b50604083015184820360408601526133868282612ca1565b915050606083015184820360608601526133a08282612ca1565b91505060808301516133b56080860182612d8d565b5060a08301516133c860a08601826133d3565b508091505092915050565b6133dc81613a2d565b82525050565b6133eb81613a2d565b82525050565b6133fa81613a37565b82525050565b61340981613a60565b82525050565b600061341b8286612c8a565b60148201915061342c828486612d68565b9150819050949350505050565b60006134448261319d565b9150819050919050565b60006134598261321d565b9150819050919050565b60006020820190506134786000830184612c7b565b92915050565b60006020820190506134936000830184612c5d565b92915050565b60006060820190506134ae6000830186612c7b565b6134bb6020830185612c7b565b6134c860408301846133e2565b949350505050565b60006020820190506134e56000830184612cff565b92915050565b60006020820190506135006000830184612d1d565b92915050565b600060408201905061351b6000830185612d1d565b6135286020830184612c7b565b9392505050565b60006080820190506135446000830187612d1d565b6135516020830186612c7b565b61355e6040830185612d2c565b61356b6060830184612d2c565b95945050505050565b60006040820190506135896000830185612d1d565b6135966020830184612d1d565b9392505050565b60006080820190506135b26000830187612d1d565b6135bf6020830186612d1d565b6135cc6040830185612d9c565b6135d960608301846133e2565b95945050505050565b60006040820190506135f76000830186612d1d565b818103602083015261360a818486612d3b565b9050949350505050565b600060a0820190506136296000830189612d1d565b6136366020830188613400565b61364360408301876133f1565b6136506060830186612c5d565b8181036080830152613663818486612d3b565b9050979650505050505050565b6000602082019050818103600083015261368981612dab565b9050919050565b600060208201905081810360008301526136a981612e11565b9050919050565b600060208201905081810360008301526136c981612e77565b9050919050565b600060208201905081810360008301526136e981612eb7565b9050919050565b6000602082019050818103600083015261370981612ef7565b9050919050565b6000602082019050818103600083015261372981612f37565b9050919050565b6000602082019050818103600083015261374981612f77565b9050919050565b6000602082019050818103600083015261376981612fb7565b9050919050565b6000602082019050818103600083015261378981612ff7565b9050919050565b600060208201905081810360008301526137a98161305d565b9050919050565b600060208201905081810360008301526137c98161309d565b9050919050565b600060208201905081810360008301526137e9816130dd565b9050919050565b600060208201905081810360008301526138098161311d565b9050919050565b600060208201905081810360008301526138298161315d565b9050919050565b60006020820190508181036000830152613849816131dd565b9050919050565b600060208201905081810360008301526138698161325d565b9050919050565b600060208201905081810360008301526138898161329d565b9050919050565b600060208201905081810360008301526138a981613303565b9050919050565b600060208201905081810360008301526138ca8184613343565b905092915050565b60006020820190506138e760008301846133e2565b92915050565b600060208201905061390260008301846133f1565b92915050565b600060208201905061391d6000830184613400565b92915050565b6000819050602082019050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600061399f82613a0d565b9050919050565b60006139b182613a0d565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050613a0882613b06565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600067ffffffffffffffff82169050919050565b600068ffffffffffffffffff82169050919050565b600060ff82169050919050565b6000613a7882613a91565b9050919050565b6000613a8a826139fa565b9050919050565b6000613a9c82613aa3565b9050919050565b6000613aae82613a0d565b9050919050565b82818337600083830152505050565b6000613acf82613ad6565b9050919050565b6000613ae182613af9565b9050919050565b6000601f19601f8301169050919050565b60008160601b9050919050565b60038110613b1057fe5b50565b613b1c81613994565b8114613b2757600080fd5b50565b613b33816139a6565b8114613b3e57600080fd5b50565b613b4a816139c4565b8114613b5557600080fd5b50565b613b61816139ce565b8114613b6c57600080fd5b50565b613b7881613a2d565b8114613b8357600080fd5b50565b613b8f81613a37565b8114613b9a57600080fd5b50565b613ba681613a4b565b8114613bb157600080fd5b50565b613bbd81613a60565b8114613bc857600080fd5b5056fea26469706673582212209c78c02039d421a3eedf3bd035a56585f512802cf522eb429eef2a0b996c5cc464736f6c63430006040033", + "sourceMap": "479:15476:0:-:0;;;3676:500;5:9:-1;2:2;;;27:1;24;17:12;2:2;3676:500:0;;;;;;;;;;;;;;;;;;;;;;;;782:5:17;772:7;;:15;;;;;;;;;;;;;;;;;;3796:7:0;3785:8;;:18;;;;;;;;;;;;;;;;;;3833:23;3813:17;:43;;;;3867:42;1729:4:20;3878:18:0;;3898:10;3867;;;:42;;:::i;:::-;3919:39;2376:28;;;;;;;;;;;;;;3947:10;3919;;;:39;;:::i;:::-;3968:47;2303:25;;;;;;;;;;;;;;1729:4:20;3996:18:0;;3968:13;;;:47;;:::i;:::-;4031:6;4026:144;4043:15;:22;4039:1;:26;4026:144;;;4086:43;2303:25;;;;;;;;;;;;;;4110:15;4126:1;4110:18;;;;;;;;;;;;;;4086:9;;;:43;;:::i;:::-;4143:14;;:16;;;;;;;;;;;;;4067:3;;;;;;;4026:144;;;;3676:500;;;479:15476;;6132:110:20;6210:25;6221:4;6227:7;6210:10;;;:25;;:::i;:::-;6132:110;;:::o;6319:124::-;6427:9;6402:6;:12;6409:4;6402:12;;;;;;;;;;;:22;;:34;;;;6319:124;;:::o;4188:223::-;4271:45;4279:6;:12;4286:4;4279:12;;;;;;;;;;;:22;;;4303:12;:10;;;:12;;:::i;:::-;4271:7;;;:45;;:::i;:::-;4263:105;;;;;;;;;;;;;;;;;;;;;;4379:25;4390:4;4396:7;4379:10;;;:25;;:::i;:::-;4188:223;;:::o;6449:184::-;6522:33;6547:7;6522:6;:12;6529:4;6522:12;;;;;;;;;;;:20;;:24;;;;;;:33;;;;:::i;:::-;6518:109;;;6603:12;:10;;;:12;;:::i;:::-;6576:40;;6594:7;6576:40;;6588:4;6576:40;;;;;;;;;;6518:109;6449:184;;:::o;735:104:19:-;788:15;822:10;815:17;;735:104;:::o;2494:137:20:-;2563:4;2586:38;2616:7;2586:6;:12;2593:4;2586:12;;;;;;;;;;;:20;;:29;;;;;;:38;;;;:::i;:::-;2579:45;;2494:137;;;;:::o;4831:141:35:-;4901:4;4924:41;4929:3;:10;;4957:5;4949:14;;4941:23;;4924:4;;;:41;;:::i;:::-;4917:48;;4831:141;;;;:::o;5368:156::-;5448:4;5471:46;5481:3;:10;;5509:5;5501:14;;5493:23;;5471:9;;;:46;;:::i;:::-;5464:53;;5368:156;;;;:::o;1578:404::-;1641:4;1662:21;1672:3;1677:5;1662:9;;;:21;;:::i;:::-;1657:319;;1699:3;:11;;1716:5;1699:23;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;1699:23:35;;;;;;;;;;;;;;;;;;;1879:3;:11;;:18;;;;1857:3;:12;;:19;1870:5;1857:19;;;;;;;;;;;:40;;;;1918:4;1911:11;;;;1657:319;1960:5;1953:12;;1578:404;;;;;:::o;3743:127::-;3816:4;3862:1;3839:3;:12;;:19;3852:5;3839:19;;;;;;;;;;;;:24;;3832:31;;3743:127;;;;:::o;5:134:-1:-;;89:6;83:13;74:22;;101:33;128:5;101:33;;;68:71;;;;;164:722;;292:3;285:4;277:6;273:17;269:27;259:2;;310:1;307;300:12;259:2;340:6;334:13;362:80;377:64;434:6;377:64;;;362:80;;;353:89;;459:5;484:6;477:5;470:21;514:4;506:6;502:17;492:27;;536:4;531:3;527:14;520:21;;589:6;636:3;628:4;620:6;616:17;611:3;607:27;604:36;601:2;;;653:1;650;643:12;601:2;678:1;663:217;688:6;685:1;682:13;663:217;;;746:3;768:48;812:3;800:10;768:48;;;763:3;756:61;840:4;835:3;831:14;824:21;;868:4;863:3;859:14;852:21;;720:160;710:1;707;703:9;698:14;;663:217;;;667:14;252:634;;;;;;;;894:134;;978:6;972:13;963:22;;990:33;1017:5;990:33;;;957:71;;;;;1035:130;;1117:6;1111:13;1102:22;;1129:31;1154:5;1129:31;;;1096:69;;;;;1172:660;;;;1344:2;1332:9;1323:7;1319:23;1315:32;1312:2;;;1360:1;1357;1350:12;1312:2;1395:1;1412:62;1466:7;1457:6;1446:9;1442:22;1412:62;;;1402:72;;1374:106;1532:2;1521:9;1517:18;1511:25;1556:18;1548:6;1545:30;1542:2;;;1588:1;1585;1578:12;1542:2;1608:89;1689:7;1680:6;1669:9;1665:22;1608:89;;;1598:99;;1490:213;1734:2;1752:64;1808:7;1799:6;1788:9;1784:22;1752:64;;;1742:74;;1713:109;1306:526;;;;;;1840:384;;2000:67;2064:2;2059:3;2000:67;;;1993:74;;2100:34;2096:1;2091:3;2087:11;2080:55;2169:17;2164:2;2159:3;2155:12;2148:39;2215:2;2210:3;2206:12;2199:19;;1986:238;;;;2233:348;;2411:85;2493:2;2488:3;2411:85;;;2404:92;;2529:14;2525:1;2520:3;2516:11;2509:35;2572:2;2567:3;2563:12;2556:19;;2397:184;;;;2590:351;;2768:85;2850:2;2845:3;2768:85;;;2761:92;;2886:17;2882:1;2877:3;2873:11;2866:38;2932:2;2927:3;2923:12;2916:19;;2754:187;;;;2949:372;;3148:148;3292:3;3148:148;;;3141:155;;3313:3;3306:10;;3129:192;;;;3328:372;;3527:148;3671:3;3527:148;;;3520:155;;3692:3;3685:10;;3508:192;;;;3707:407;;3898:2;3887:9;3883:18;3875:26;;3948:9;3942:4;3938:20;3934:1;3923:9;3919:17;3912:47;3973:131;4099:4;3973:131;;;3965:139;;3869:245;;;;4121:256;;4183:2;4177:9;4167:19;;4221:4;4213:6;4209:17;4320:6;4308:10;4305:22;4284:18;4272:10;4269:34;4266:62;4263:2;;;4341:1;4338;4331:12;4263:2;4361:10;4357:2;4350:22;4161:216;;;;;4384:304;;4543:18;4535:6;4532:30;4529:2;;;4575:1;4572;4565:12;4529:2;4610:4;4602:6;4598:17;4590:25;;4673:4;4667;4663:15;4655:23;;4466:222;;;;4696:163;;4811:6;4806:3;4799:19;4848:4;4843:3;4839:14;4824:29;;4792:67;;;;;4868:145;;5004:3;4989:18;;4982:31;;;;;5021:91;;5083:24;5101:5;5083:24;;;5072:35;;5066:46;;;;5119:121;;5192:42;5185:5;5181:54;5170:65;;5164:76;;;;5247:72;;5309:5;5298:16;;5292:27;;;;5326:81;;5397:4;5390:5;5386:16;5375:27;;5369:38;;;;5414:117;5483:24;5501:5;5483:24;;;5476:5;5473:35;5463:2;;5522:1;5519;5512:12;5463:2;5457:74;;5538:117;5607:24;5625:5;5607:24;;;5600:5;5597:35;5587:2;;5646:1;5643;5636:12;5587:2;5581:74;;5662:113;5729:22;5745:5;5729:22;;;5722:5;5719:33;5709:2;;5766:1;5763;5756:12;5709:2;5703:72;;479:15476:0;;;;;;;", + "deployedSourceMap": "479:15476:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;9;2:12;10509:132:0;;5:9:-1;2:2;;;27:1;24;17:12;2:2;10509:132:0;;;;;;;;;;;;;;;;:::i;:::-;;3826:112:20;;5:9:-1;2:2;;;27:1;24;17:12;2:2;3826:112:20;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;4188:223;;5:9:-1;2:2;;;27:1;24;17:12;2:2;4188:223:20;;;;;;;;;;;;;;;;:::i;:::-;;5362:205;;5:9:-1;2:2;;;27:1;24;17:12;2:2;5362:205:20;;;;;;;;;;;;;;;;:::i;:::-;;15741:211:0;;5:9:-1;2:2;;;27:1;24;17:12;2:2;15741:211:0;;;;;;;;;;;;;;;;:::i;:::-;;1011:46;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1011:46:0;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;5699:176;;5:9:-1;2:2;;;27:1;24;17:12;2:2;5699:176:0;;;;;;;;;;;;;;;;:::i;:::-;;1233:65;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1233:65:0;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;4303:119;;5:9:-1;2:2;;;27:1;24;17:12;2:2;4303:119:0;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;889:76:17;;5:9:-1;2:2;;;27:1;24;17:12;2:2;889:76:17;;;:::i;:::-;;;;;;;;;;;;;;;;4673:170:0;;5:9:-1;2:2;;;27:1;24;17:12;2:2;4673:170:0;;;;;;;;;;;;;;;;:::i;:::-;;11878:676;;;;;;;;;;;;;;;;:::i;:::-;;11009:304;;5:9:-1;2:2;;;27:1;24;17:12;2:2;11009:304:0;;;;;;;;;;;;;;;;:::i;:::-;;1383:90;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1383:90:0;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;606:29;;5:9:-1;2:2;;;27:1;24;17:12;2:2;606:29:0;;;:::i;:::-;;;;;;;;;;;;;;;;5031:75;;5:9:-1;2:2;;;27:1;24;17:12;2:2;5031:75:0;;;:::i;:::-;;1100:62;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1100:62:0;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;9293:200;;5:9:-1;2:2;;;27:1;24;17:12;2:2;9293:200:0;;;;;;;;;;;;;;;;:::i;:::-;;3509:136:20;;5:9:-1;2:2;;;27:1;24;17:12;2:2;3509:136:20;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;2494:137;;5:9:-1;2:2;;;27:1;24;17:12;2:2;2494:137:20;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;2264:64:0;;5:9:-1;2:2;;;27:1;24;17:12;2:2;2264:64:0;;;:::i;:::-;;;;;;;;;;;;;;;;641:30;;5:9:-1;2:2;;;27:1;24;17:12;2:2;641:30:0;;;:::i;:::-;;;;;;;;;;;;;;;;6766:290;;5:9:-1;2:2;;;27:1;24;17:12;2:2;6766:290:0;;;;;;;;;;;;;;;;:::i;:::-;;1684:49:20;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1684:49:20;;;:::i;:::-;;;;;;;;;;;;;;;;1520:38:0;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1520:38:0;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;10076:258;;5:9:-1;2:2;;;27:1;24;17:12;2:2;10076:258:0;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;539:23;;5:9:-1;2:2;;;27:1;24;17:12;2:2;539:23:0;;;:::i;:::-;;;;;;;;;;;;;;;;13206:2145;;5:9:-1;2:2;;;27:1;24;17:12;2:2;13206:2145:0;;;;;;;;;;;;;;;;:::i;:::-;;2799:125:20;;5:9:-1;2:2;;;27:1;24;17:12;2:2;2799:125:20;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;7597:298:0;;5:9:-1;2:2;;;27:1;24;17:12;2:2;7597:298:0;;;;;;;;;;;;;;;;:::i;:::-;;6176:284;;5:9:-1;2:2;;;27:1;24;17:12;2:2;6176:284:0;;;;;;;;;;;;;;;;:::i;:::-;;4645:226:20;;5:9:-1;2:2;;;27:1;24;17:12;2:2;4645:226:20;;;;;;;;;;;;;;;;:::i;:::-;;568:32:0;;5:9:-1;2:2;;;27:1;24;17:12;2:2;568:32:0;;;:::i;:::-;;;;;;;;;;;;;;;;8443:459;;5:9:-1;2:2;;;27:1;24;17:12;2:2;8443:459:0;;;;;;;;;;;;;;;;:::i;:::-;;2334:70;;5:9:-1;2:2;;;27:1;24;17:12;2:2;2334:70:0;;;:::i;:::-;;;;;;;;;;;;;;;;5296:79;;5:9:-1;2:2;;;27:1;24;17:12;2:2;5296:79:0;;;:::i;:::-;;10509:132;2679:36;2376:28;;;;;;;;;;;;;;2704:10;2679:7;:36::i;:::-;2671:73;;;;;;;;;;;;;;;;;;;;;;10628:6:::1;10600:5;:25;10606:18;10600:25;;;;;;;;;;;;;;;:34;;;;10509:132:::0;;:::o;3826:112:20:-;3883:7;3909:6;:12;3916:4;3909:12;;;;;;;;;;;:22;;;3902:29;;3826:112;;;:::o;4188:223::-;4271:45;4279:6;:12;4286:4;4279:12;;;;;;;;;;;:22;;;4303:12;:10;:12::i;:::-;4271:7;:45::i;:::-;4263:105;;;;;;;;;;;;;;;;;;;;;;4379:25;4390:4;4396:7;4379:10;:25::i;:::-;4188:223;;:::o;5362:205::-;5459:12;:10;:12::i;:::-;5448:23;;:7;:23;;;5440:83;;;;;;;;;;;;;;;;;;;;;;5534:26;5546:4;5552:7;5534:11;:26::i;:::-;5362:205;;:::o;15741:211:0:-;2442:12;:10;:12::i;:::-;15857:6:::1;15866:1:::0;15857:10:::1;;15852:94;15873:5;;:12;;15869:1;:16;15852:94;;;15906:5;;15912:1;15906:8;;;;;;;;;;;;;;;;;;;;;;:17;;:29;15924:7;;15932:1;15924:10;;;;;;;;;;;;;15906:29;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::1;77:16;74:1;67:27;5:2;15906:29:0;15887:3;;;;;;;15852:94;;;;15741:211:::0;;;;:::o;1011:46::-;;;;;;;;;;;;;;;;;;;;;;:::o;5699:176::-;2442:12;:10;:12::i;:::-;5804::::1;5784:17;:32;;;;5855:12;5831:37;;;;;;;;;;5699:176:::0;:::o;1233:65::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;4303:119::-;4362:4;4385:30;2303:25;;;;;;;;;;;;;;4407:7;4385;:30::i;:::-;4378:37;;4303:119;;;:::o;889:76:17:-;928:4;951:7;;;;;;;;;;;944:14;;889:76;:::o;4673:170:0:-;2442:12;:10;:12::i;:::-;4743:39:::1;1729:4:20;4753:18:0::0;::::1;4773:8;4743:9;:39::i;:::-;4792:44;1729:4:20;4805:18:0::0;::::1;4825:10;4792:12;:44::i;:::-;4673:170:::0;:::o;11878:676::-;1186:16:17;:14;:16::i;:::-;12049:5:0::1;:25;12055:18;12049:25;;;;;;;;;;;;;;;;12036:9;:38;12028:73;;;;;;;;;;;;;;;;;;;;;;12112:15;12130:27;:39;12158:10;12130:39;;;;;;;;;;;;;;;;;;;;;12112:57;;12206:1;12187:21;;:7;:21;;;;12179:66;;;;;;;;;;;;;;;;;;;;;;12256:19;12280:14;:34;12295:18;12280:34;;;;;;;;;;;;;;;;12278:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12256:58;;12325:30;12374:7;12325:57;;12392:14;:22;;;12415:10;12427:18;12447:12;12461:10;12473:4;;12392:86;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::1;2:2;12392:86:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::1;77:16;74:1;67:27;5:2;12392:86:0;;;;12534:12;12494:53;;12522:10;12502:18;12494:53;;;;;;;;;;;;1212:1:17;;;11878:676:0::0;;;;;;:::o;11009:304::-;2442:12;:10;:12::i;:::-;11189:19:::1;11223:14;11189:49;;11248:7;:16;;;11265:12;11279:9;11290:15;11248:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::1;2:2;11248:58:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::1;77:16;74:1;67:27;5:2;11248:58:0;;;;2464:1;11009:304:::0;;;;:::o;1383:90::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;606:29::-;;;;:::o;5031:75::-;2442:12;:10;:12::i;:::-;5091:8:::1;:6;:8::i;:::-;5031:75::o:0;1100:62::-;;;;;;;;;;;;;;;;;;;;;;:::o;9293:200::-;2442:12;:10;:12::i;:::-;9394:19:::1;9428:14;9394:49;;9453:7;:19;;;9473:12;9453:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::1;2:2;9453:33:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::1;77:16;74:1;67:27;5:2;9453:33:0;;;;2464:1;9293:200:::0;;:::o;3509:136:20:-;3582:7;3608:30;3632:5;3608:6;:12;3615:4;3608:12;;;;;;;;;;;:20;;:23;;:30;;;;:::i;:::-;3601:37;;3509:136;;;;:::o;2494:137::-;2563:4;2586:38;2616:7;2586:6;:12;2593:4;2586:12;;;;;;;;;;;:20;;:29;;:38;;;;:::i;:::-;2579:45;;2494:137;;;;:::o;2264:64:0:-;2303:25;;;;;;;;;;;;;;2264:64;:::o;641:30::-;;;;:::o;6766:290::-;2442:12;:10;:12::i;:::-;6855:37:::1;2303:25;;;;;;;;;;;;;;6877:14;6855:7;:37::i;:::-;6847:81;;;;;;;;;;;;;;;;;;;;;;6938:40;2303:25;;;;;;;;;;;;;;6963:14;6938:10;:40::i;:::-;7008:14;6993:30;;;;;;;;;;;;7033:14;;:16;;;;;;;;;;;;;;6766:290:::0;:::o;1684:49:20:-;1729:4;1684:49;;;:::o;1520:38:0:-;;;;;;;;;;;;;;;;;:::o;10076:258::-;10180:15;;:::i;:::-;10207:17;10264:13;10257:21;;10252:1;10235:12;10228:20;;:25;;;;10227:51;10207:71;;10295:10;:22;10306:10;10295:22;;;;;;;;;;;;;;;:32;10318:8;10295:32;;;;;;;;;;;10288:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10076:258;;;;;:::o;539:23::-;;;;;;;;;;;;;:::o;13206:2145::-;2597:15;:13;:15::i;:::-;1186:16:17::1;:14;:16::i;:::-;13351:15:0::2;13369:27;:39;13397:10;13369:39;;;;;;;;;;;;;;;;;;;;;13351:57;;13418:16;13464:7;13473:4;;13447:31;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;13447:31:0;;;13437:42;;;;;;13418:61;;13490:17;13547:7;13540:15;;13535:1;13518:12;13511:20;;:25;;;;13510:45;13490:65;;13565:25;13593:10;:22;13604:10;13593:22;;;;;;;;;;;;;;;:32;13616:8;13593:32;;;;;;;;;;;13565:60;;13695:1;13644:53;;:27;:39;13672:10;13644:39;;;;;;;;;;;;;;;;;;;;;:53;;;;13636:91;;;;;;;;;;;;;;;;;;;;;;13771:1;13750:8;:16;;;;;;;;;;;;13745:22;;;;;;;;:27;;13737:65;;;;;;;;;;;;;;;;;;;;;;13821:19;:31;13841:10;13821:31;;;;;;;;;;;;;;;:41;13853:8;13821:41;;;;;;;;;;;:53;13863:10;13821:53;;;;;;;;;;;;;;;;;;;;;;;;;13820:54;13812:88;;;;;;;;;;;;;;;;;;;;;;13941:1;13920:8;:16;;;;;;;;;;;;13915:22;;;;;;;;:27;13911:708;;;13960:15;;13958:17;;;;;;;;;;;14024:295;;;;;;;;14065:10;14024:295;;;;14105:8;14024:295;;;;14157:1;14143:16;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;125:4;109:14;101:6;88:42;156:4;148:6;144:17;134:27;;0:165;14143:16:0;;;;14024:295;;;;14202:1;14188:16;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;125:4;109:14;101:6;88:42;156:4;148:6;144:17;134:27;;0:165;14188:16:0;;;;14024:295;;;;14232:21;14024:295;;;;;;;;;;;;14288:12;14024:295;;::::0;13989:10:::2;:22;14000:10;13989:22;;;;;;;;;;;;;;;:32;14012:8;13989:32;;;;;;;;;;;:330;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14358:10;14334:8;:18;;14353:1;14334:21;;;;;;;;;;;;;;;;:34;;;;;;;;;;;;;;;;;;14424:21;14387:81;;;;;;;;14410:12;14387:81;;14401:7;14387:81;;;14447:10;14459:8;14387:81;;;;;;;;;;;;;;;;13911:708;;;14519:8;:18;;;14507:8;:30;14499:60;;;;;;;;;;;;;;;;;;;;;;14573:8;:18;;14597:10;14573:35;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;14573:35:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13911:708;14693:4;14637:19;:31;14657:10;14637:31;;;;;;;;;;;;;;;:41;14669:8;14637:41;;;;;;;;;;;:53;14679:10;14637:53;;;;;;;;;;;;;;;;:60;;;;;;;;;;;;;;;;;;14748:8;:16;;;;;;;;;;;;14712:65;;;;;;;;14734:12;14712:65;;14725:7;14712:65;;;14766:10;14712:65;;;;;;;;;;;;;;;14871:17;;14842:8;:18;;:25;;;;:46;14838:507;;14924:8;:18;;;14912:8;:30;14904:70;;;;;;;;;;;;;;;;;;;;;;15008:23;14989:8;:16;;;:42;;;;;;;;;;;;;;;;;;;;;;;;15046:30;15095:27;:49;15123:8;:20;;;15095:49;;;;;;;;;;;;;;;;;;;;;15046:99;;15160:14;:30;;;15191:8;:20;;;15213:4;;15160:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::2;2:2;15160:58:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::2;77:16;74:1;67:27;5:2;15160:58:0;;;;15275:8;:16;;;;;;;;;;;;15238:96;;;;;;;;15261:12;15238:96;;15252:7;15238:96;;;15293:8;:20;;;15315:8;:18;;;15238:96;;;;;;;;;;;;;;;;14838:507;;1212:1:17;;;;13206:2145:0::0;;;;;:::o;2799:125:20:-;2862:7;2888:29;:6;:12;2895:4;2888:12;;;;;;;;;;;:20;;:27;:29::i;:::-;2881:36;;2799:125;;;:::o;7597:298:0:-;2442:12;:10;:12::i;:::-;7760:14:::1;7718:27;:39;7746:10;7718:39;;;;;;;;;;;;:56;;;;;;;;;;;;;;;;;;7784:19;7818:14;7784:49;;7843:7;:19;;;7863:10;7875:12;7843:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::1;2:2;7843:45:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::1;77:16;74:1;67:27;5:2;7843:45:0;;;;2464:1;7597:298:::0;;;:::o;6176:284::-;2442:12;:10;:12::i;:::-;6263:37:::1;2303:25;;;;;;;;;;;;;;6285:14;6263:7;:37::i;:::-;6262:38;6254:81;;;;;;;;;;;;;;;;;;;;;;6345:39;2303:25;;;;;;;;;;;;;;6369:14;6345:9;:39::i;:::-;6412:14;6399:28;;;;;;;;;;;;6437:14;;:16;;;;;;;;;;;;;6176:284:::0;:::o;4645:226:20:-;4729:45;4737:6;:12;4744:4;4737:12;;;;;;;;;;;:22;;;4761:12;:10;:12::i;:::-;4729:7;:45::i;:::-;4721:106;;;;;;;;;;;;;;;;;;;;;;4838:26;4850:4;4856:7;4838:11;:26::i;:::-;4645:226;;:::o;568:32:0:-;;;;:::o;8443:459::-;2442:12;:10;:12::i;:::-;8716:14:::1;8674:27;:39;8702:10;8674:39;;;;;;;;;;;;:56;;;;;;;;;;;;;;;;;;8740:23;8782:14;8740:57;;8807:7;:19;;;8827:10;8839:15;8856:18;8876;8807:88;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24::::0;17:12:::1;2:2;8807:88:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::1;77:16;74:1;67:27;5:2;8807:88:0;;;;2464:1;8443:459:::0;;;;;:::o;2334:70::-;2376:28;;;;;;;;;;;;;;2334:70;:::o;5296:79::-;2442:12;:10;:12::i;:::-;5358:10:::1;:8;:10::i;:::-;5296:79::o:0;735:104:19:-;788:15;822:10;815:17;;735:104;:::o;6449:184:20:-;6522:33;6547:7;6522:6;:12;6529:4;6522:12;;;;;;;;;;;:20;;:24;;:33;;;;:::i;:::-;6518:109;;;6603:12;:10;:12::i;:::-;6576:40;;6594:7;6576:40;;6588:4;6576:40;;;;;;;;;;6518:109;6449:184;;:::o;6639:188::-;6713:36;6741:7;6713:6;:12;6720:4;6713:12;;;;;;;;;;;:20;;:27;;:36;;;;:::i;:::-;6709:112;;;6797:12;:10;:12::i;:::-;6770:40;;6788:7;6770:40;;6782:4;6770:40;;;;;;;;;;6709:112;6639:188;;:::o;2966:134:0:-;3019:39;1729:4:20;3027:18:0;;3047:10;3019:7;:39::i;:::-;3011:82;;;;;;;;;;;;;;;;;;;;;;2966:134::o;1226:93:17:-;1284:7;;;;;;;;;;;1283:8;1275:37;;;;;;;;;;;;;;;;;;;;;;1226:93::o;1802:113::-;1186:16;:14;:16::i;:::-;1871:4:::1;1861:7;::::0;:14:::1;;;;;;;;;;;;;;;;;;1890:18;1897:10;1890:18;;;;;;;;;;;;;;;1802:113::o:0;6052:147:35:-;6126:7;6168:22;6172:3;:10;;6184:5;6168:3;:22::i;:::-;6160:31;;6145:47;;6052:147;;;;:::o;5368:156::-;5448:4;5471:46;5481:3;:10;;5509:5;5501:14;;5493:23;;5471:9;:46::i;:::-;5464:53;;5368:156;;;;:::o;3106:133:0:-;3162:33;2303:25;;;;;;;;;;;;;;3184:10;3162:7;:33::i;:::-;3154:78;;;;;;;;;;;;;;;;;;;;;;3106:133::o;5605:115:35:-;5668:7;5694:19;5702:3;:10;;5694:7;:19::i;:::-;5687:26;;5605:115;;;:::o;2047::17:-;1537:13;:11;:13::i;:::-;2115:5:::1;2105:7:::0;::::1;:15;;;;;;;;;;;;;;;;;;2135:20;2144:10;2135:20;;;;;;;;;;;;;;;2047:115::o:0;4831:141:35:-;4901:4;4924:41;4929:3;:10;;4957:5;4949:14;;4941:23;;4924:4;:41::i;:::-;4917:48;;4831:141;;;;:::o;5140:147::-;5213:4;5236:44;5244:3;:10;;5272:5;5264:14;;5256:23;;5236:7;:44::i;:::-;5229:51;;5140:147;;;;:::o;4390:201::-;4457:7;4505:5;4484:3;:11;;:18;;;;:26;4476:73;;;;;;;;;;;;;;;;;;;;;;4566:3;:11;;4578:5;4566:18;;;;;;;;;;;;;;;;4559:25;;4390:201;;;;:::o;3743:127::-;3816:4;3862:1;3839:3;:12;;:19;3852:5;3839:19;;;;;;;;;;;;:24;;3832:31;;3743:127;;;;:::o;3951:107::-;4007:7;4033:3;:11;;:18;;;;4026:25;;3951:107;;;:::o;1574:93:17:-;1628:7;;;;;;;;;;;1620:40;;;;;;;;;;;;;;;;;;;;;;1574:93::o;1578:404:35:-;1641:4;1662:21;1672:3;1677:5;1662:9;:21::i;:::-;1657:319;;1699:3;:11;;1716:5;1699:23;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;1699:23:35;;;;;;;;;;;;;;;;;;;1879:3;:11;;:18;;;;1857:3;:12;;:19;1870:5;1857:19;;;;;;;;;;;:40;;;;1918:4;1911:11;;;;1657:319;1960:5;1953:12;;1578:404;;;;;:::o;2150:1512::-;2216:4;2332:18;2353:3;:12;;:19;2366:5;2353:19;;;;;;;;;;;;2332:40;;2401:1;2387:10;:15;2383:1273;;2744:21;2781:1;2768:10;:14;2744:38;;2796:17;2837:1;2816:3;:11;;:18;;;;:22;2796:42;;3078:17;3098:3;:11;;3110:9;3098:22;;;;;;;;;;;;;;;;3078:42;;3241:9;3212:3;:11;;3224:13;3212:26;;;;;;;;;;;;;;;:38;;;;3358:1;3342:13;:17;3316:3;:12;;:23;3329:9;3316:23;;;;;;;;;;;:43;;;;3465:3;:11;;:17;;;;;;;;;;;;;;;;;;;;;;;;3557:3;:12;;:19;3570:5;3557:19;;;;;;;;;;;3550:26;;;3598:4;3591:11;;;;;;;;2383:1273;3640:5;3633:12;;;2150:1512;;;;;:::o;479:15476:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;5:130:-1:-;;85:6;72:20;63:29;;97:33;124:5;97:33;;;57:78;;;;;142:146;;230:6;217:20;208:29;;242:41;277:5;242:41;;;202:86;;;;;321:360;;;459:3;452:4;444:6;440:17;436:27;426:2;;477:1;474;467:12;426:2;510:6;497:20;487:30;;537:18;529:6;526:30;523:2;;;569:1;566;559:12;523:2;603:4;595:6;591:17;579:29;;654:3;646:4;638:6;634:17;624:8;620:32;617:41;614:2;;;671:1;668;661:12;614:2;419:262;;;;;;707:352;;;837:3;830:4;822:6;818:17;814:27;804:2;;855:1;852;845:12;804:2;888:6;875:20;865:30;;915:18;907:6;904:30;901:2;;;947:1;944;937:12;901:2;981:4;973:6;969:17;957:29;;1032:3;1024:4;1016:6;1012:17;1002:8;998:32;995:41;992:2;;;1049:1;1046;1039:12;992:2;797:262;;;;;;1067:130;;1147:6;1134:20;1125:29;;1159:33;1186:5;1159:33;;;1119:78;;;;;1204:128;;1283:6;1270:20;1261:29;;1295:32;1321:5;1295:32;;;1255:77;;;;;1353:336;;;1467:3;1460:4;1452:6;1448:17;1444:27;1434:2;;1485:1;1482;1475:12;1434:2;1518:6;1505:20;1495:30;;1545:18;1537:6;1534:30;1531:2;;;1577:1;1574;1567:12;1531:2;1611:4;1603:6;1599:17;1587:29;;1662:3;1654:4;1646:6;1642:17;1632:8;1628:32;1625:41;1622:2;;;1679:1;1676;1669:12;1622:2;1427:262;;;;;;1697:130;;1777:6;1764:20;1755:29;;1789:33;1816:5;1789:33;;;1749:78;;;;;1834:128;;1913:6;1900:20;1891:29;;1925:32;1951:5;1925:32;;;1885:77;;;;;1969:128;;2048:6;2035:20;2026:29;;2060:32;2086:5;2060:32;;;2020:77;;;;;2104:126;;2182:6;2169:20;2160:29;;2194:31;2219:5;2194:31;;;2154:76;;;;;2237:241;;2341:2;2329:9;2320:7;2316:23;2312:32;2309:2;;;2357:1;2354;2347:12;2309:2;2392:1;2409:53;2454:7;2445:6;2434:9;2430:22;2409:53;;;2399:63;;2371:97;2303:175;;;;;2485:257;;2597:2;2585:9;2576:7;2572:23;2568:32;2565:2;;;2613:1;2610;2603:12;2565:2;2648:1;2665:61;2718:7;2709:6;2698:9;2694:22;2665:61;;;2655:71;;2627:105;2559:183;;;;;2749:366;;;2870:2;2858:9;2849:7;2845:23;2841:32;2838:2;;;2886:1;2883;2876:12;2838:2;2921:1;2938:53;2983:7;2974:6;2963:9;2959:22;2938:53;;;2928:63;;2900:97;3028:2;3046:53;3091:7;3082:6;3071:9;3067:22;3046:53;;;3036:63;;3007:98;2832:283;;;;;;3122:617;;;;;3277:3;3265:9;3256:7;3252:23;3248:33;3245:2;;;3294:1;3291;3284:12;3245:2;3329:1;3346:53;3391:7;3382:6;3371:9;3367:22;3346:53;;;3336:63;;3308:97;3436:2;3454:53;3499:7;3490:6;3479:9;3475:22;3454:53;;;3444:63;;3415:98;3544:2;3562:53;3607:7;3598:6;3587:9;3583:22;3562:53;;;3552:63;;3523:98;3652:2;3670:53;3715:7;3706:6;3695:9;3691:22;3670:53;;;3660:63;;3631:98;3239:500;;;;;;;;3746:491;;;;3884:2;3872:9;3863:7;3859:23;3855:32;3852:2;;;3900:1;3897;3890:12;3852:2;3935:1;3952:53;3997:7;3988:6;3977:9;3973:22;3952:53;;;3942:63;;3914:97;4042:2;4060:53;4105:7;4096:6;4085:9;4081:22;4060:53;;;4050:63;;4021:98;4150:2;4168:53;4213:7;4204:6;4193:9;4189:22;4168:53;;;4158:63;;4129:98;3846:391;;;;;;4244:739;;;;;;4414:3;4402:9;4393:7;4389:23;4385:33;4382:2;;;4431:1;4428;4421:12;4382:2;4466:1;4483:53;4528:7;4519:6;4508:9;4504:22;4483:53;;;4473:63;;4445:97;4573:2;4591:53;4636:7;4627:6;4616:9;4612:22;4591:53;;;4581:63;;4552:98;4681:2;4699:53;4744:7;4735:6;4724:9;4720:22;4699:53;;;4689:63;;4660:98;4789:2;4807:52;4851:7;4842:6;4831:9;4827:22;4807:52;;;4797:62;;4768:97;4896:3;4915:52;4959:7;4950:6;4939:9;4935:22;4915:52;;;4905:62;;4875:98;4376:607;;;;;;;;;4990:694;;;;;5189:2;5177:9;5168:7;5164:23;5160:32;5157:2;;;5205:1;5202;5195:12;5157:2;5268:1;5257:9;5253:17;5240:31;5291:18;5283:6;5280:30;5277:2;;;5323:1;5320;5313:12;5277:2;5351:88;5431:7;5422:6;5411:9;5407:22;5351:88;;;5341:98;;;;5219:226;5504:2;5493:9;5489:18;5476:32;5528:18;5520:6;5517:30;5514:2;;;5560:1;5557;5550:12;5514:2;5588:80;5660:7;5651:6;5640:9;5636:22;5588:80;;;5578:90;;;;5455:219;5151:533;;;;;;;;5691:241;;5795:2;5783:9;5774:7;5770:23;5766:32;5763:2;;;5811:1;5808;5801:12;5763:2;5846:1;5863:53;5908:7;5899:6;5888:9;5884:22;5863:53;;;5853:63;;5825:97;5757:175;;;;;5939:366;;;6060:2;6048:9;6039:7;6035:23;6031:32;6028:2;;;6076:1;6073;6066:12;6028:2;6111:1;6128:53;6173:7;6164:6;6153:9;6149:22;6128:53;;;6118:63;;6090:97;6218:2;6236:53;6281:7;6272:6;6261:9;6257:22;6236:53;;;6226:63;;6197:98;6022:283;;;;;;6312:366;;;6433:2;6421:9;6412:7;6408:23;6404:32;6401:2;;;6449:1;6446;6439:12;6401:2;6484:1;6501:53;6546:7;6537:6;6526:9;6522:22;6501:53;;;6491:63;;6463:97;6591:2;6609:53;6654:7;6645:6;6634:9;6630:22;6609:53;;;6599:63;;6570:98;6395:283;;;;;;6685:241;;6789:2;6777:9;6768:7;6764:23;6760:32;6757:2;;;6805:1;6802;6795:12;6757:2;6840:1;6857:53;6902:7;6893:6;6882:9;6878:22;6857:53;;;6847:63;;6819:97;6751:175;;;;;6933:364;;;7053:2;7041:9;7032:7;7028:23;7024:32;7021:2;;;7069:1;7066;7059:12;7021:2;7104:1;7121:52;7165:7;7156:6;7145:9;7141:22;7121:52;;;7111:62;;7083:96;7210:2;7228:53;7273:7;7264:6;7253:9;7249:22;7228:53;;;7218:63;;7189:98;7015:282;;;;;;7304:489;;;;7441:2;7429:9;7420:7;7416:23;7412:32;7409:2;;;7457:1;7454;7447:12;7409:2;7492:1;7509:52;7553:7;7544:6;7533:9;7529:22;7509:52;;;7499:62;;7471:96;7598:2;7616:53;7661:7;7652:6;7641:9;7637:22;7616:53;;;7606:63;;7577:98;7706:2;7724:53;7769:7;7760:6;7749:9;7745:22;7724:53;;;7714:63;;7685:98;7403:390;;;;;;7800:237;;7902:2;7890:9;7881:7;7877:23;7873:32;7870:2;;;7918:1;7915;7908:12;7870:2;7953:1;7970:51;8013:7;8004:6;7993:9;7989:22;7970:51;;;7960:61;;7932:95;7864:173;;;;;8044:861;;;;;;;8235:3;8223:9;8214:7;8210:23;8206:33;8203:2;;;8252:1;8249;8242:12;8203:2;8287:1;8304:51;8347:7;8338:6;8327:9;8323:22;8304:51;;;8294:61;;8266:95;8392:2;8410:53;8455:7;8446:6;8435:9;8431:22;8410:53;;;8400:63;;8371:98;8528:2;8517:9;8513:18;8500:32;8552:18;8544:6;8541:30;8538:2;;;8584:1;8581;8574:12;8538:2;8612:64;8668:7;8659:6;8648:9;8644:22;8612:64;;;8602:74;;;;8479:203;8741:2;8730:9;8726:18;8713:32;8765:18;8757:6;8754:30;8751:2;;;8797:1;8794;8787:12;8751:2;8825:64;8881:7;8872:6;8861:9;8857:22;8825:64;;;8815:74;;;;8692:203;8197:708;;;;;;;;;8912:362;;;9031:2;9019:9;9010:7;9006:23;9002:32;8999:2;;;9047:1;9044;9037:12;8999:2;9082:1;9099:51;9142:7;9133:6;9122:9;9118:22;9099:51;;;9089:61;;9061:95;9187:2;9205:53;9250:7;9241:6;9230:9;9226:22;9205:53;;;9195:63;;9166:98;8993:281;;;;;;9281:485;;;;9416:2;9404:9;9395:7;9391:23;9387:32;9384:2;;;9432:1;9429;9422:12;9384:2;9467:1;9484:51;9527:7;9518:6;9507:9;9503:22;9484:51;;;9474:61;;9446:95;9572:2;9590:52;9634:7;9625:6;9614:9;9610:22;9590:52;;;9580:62;;9551:97;9679:2;9697:53;9742:7;9733:6;9722:9;9718:22;9697:53;;;9687:63;;9658:98;9378:388;;;;;;9773:735;;;;;;9944:3;9932:9;9923:7;9919:23;9915:33;9912:2;;;9961:1;9958;9951:12;9912:2;9996:1;10013:51;10056:7;10047:6;10036:9;10032:22;10013:51;;;10003:61;;9975:95;10101:2;10119:52;10163:7;10154:6;10143:9;10139:22;10119:52;;;10109:62;;10080:97;10208:2;10226:53;10271:7;10262:6;10251:9;10247:22;10226:53;;;10216:63;;10187:98;10344:2;10333:9;10329:18;10316:32;10368:18;10360:6;10357:30;10354:2;;;10400:1;10397;10390:12;10354:2;10428:64;10484:7;10475:6;10464:9;10460:22;10428:64;;;10418:74;;;;10295:203;9906:602;;;;;;;;;10516:173;;10603:46;10645:3;10637:6;10603:46;;;10678:4;10673:3;10669:14;10655:28;;10596:93;;;;;10697:142;10788:45;10827:5;10788:45;;;10783:3;10776:58;10770:69;;;10846:103;10919:24;10937:5;10919:24;;;10914:3;10907:37;10901:48;;;10956:113;11039:24;11057:5;11039:24;;;11034:3;11027:37;11021:48;;;11076:152;11177:45;11197:24;11215:5;11197:24;;;11177:45;;;11172:3;11165:58;11159:69;;;11266:654;;11397:50;11441:5;11397:50;;;11460:76;11529:6;11524:3;11460:76;;;11453:83;;11557:52;11603:5;11557:52;;;11629:7;11657:1;11642:256;11667:6;11664:1;11661:13;11642:256;;;11734:6;11728:13;11755:63;11814:3;11799:13;11755:63;;;11748:70;;11835:56;11884:6;11835:56;;;11825:66;;11699:199;11689:1;11686;11682:9;11677:14;;11642:256;;;11646:14;11911:3;11904:10;;11376:544;;;;;;;;11928:104;12005:21;12020:5;12005:21;;;12000:3;11993:34;11987:45;;;12039:103;12112:24;12130:5;12112:24;;;12107:3;12100:37;12094:48;;;12149:113;12232:24;12250:5;12232:24;;;12227:3;12220:37;12214:48;;;12269:110;12350:23;12367:5;12350:23;;;12345:3;12338:36;12332:47;;;12409:297;;12523:70;12586:6;12581:3;12523:70;;;12516:77;;12605:43;12641:6;12636:3;12629:5;12605:43;;;12670:29;12692:6;12670:29;;;12665:3;12661:39;12654:46;;12509:197;;;;;;12737:310;;12869:88;12950:6;12945:3;12869:88;;;12862:95;;12969:43;13005:6;13000:3;12993:5;12969:43;;;13034:6;13029:3;13025:16;13018:23;;12855:192;;;;;;13055:146;13143:52;13189:5;13143:52;;;13138:3;13131:65;13125:76;;;13208:156;13306:52;13352:5;13306:52;;;13301:3;13294:65;13288:76;;;13372:371;;13532:67;13596:2;13591:3;13532:67;;;13525:74;;13632:34;13628:1;13623:3;13619:11;13612:55;13701:4;13696:2;13691:3;13687:12;13680:26;13734:2;13729:3;13725:12;13718:19;;13518:225;;;;13752:384;;13912:67;13976:2;13971:3;13912:67;;;13905:74;;14012:34;14008:1;14003:3;13999:11;13992:55;14081:17;14076:2;14071:3;14067:12;14060:39;14127:2;14122:3;14118:12;14111:19;;13898:238;;;;14145:321;;14305:67;14369:2;14364:3;14305:67;;;14298:74;;14405:23;14401:1;14396:3;14392:11;14385:44;14457:2;14452:3;14448:12;14441:19;;14291:175;;;;14475:320;;14635:67;14699:2;14694:3;14635:67;;;14628:74;;14735:22;14731:1;14726:3;14722:11;14715:43;14786:2;14781:3;14777:12;14770:19;;14621:174;;;;14804:331;;14964:67;15028:2;15023:3;14964:67;;;14957:74;;15064:33;15060:1;15055:3;15051:11;15044:54;15126:2;15121:3;15117:12;15110:19;;14950:185;;;;15144:322;;15304:67;15368:2;15363:3;15304:67;;;15297:74;;15404:24;15400:1;15395:3;15391:11;15384:45;15457:2;15452:3;15448:12;15441:19;;15290:176;;;;15475:327;;15635:67;15699:2;15694:3;15635:67;;;15628:74;;15735:29;15731:1;15726:3;15722:11;15715:50;15793:2;15788:3;15784:12;15777:19;;15621:181;;;;15811:332;;15971:67;16035:2;16030:3;15971:67;;;15964:74;;16071:34;16067:1;16062:3;16058:11;16051:55;16134:2;16129:3;16125:12;16118:19;;15957:186;;;;16152:385;;16312:67;16376:2;16371:3;16312:67;;;16305:74;;16412:34;16408:1;16403:3;16399:11;16392:55;16481:18;16476:2;16471:3;16467:12;16460:40;16528:2;16523:3;16519:12;16512:19;;16298:239;;;;16546:316;;16706:67;16770:2;16765:3;16706:67;;;16699:74;;16806:18;16802:1;16797:3;16793:11;16786:39;16853:2;16848:3;16844:12;16837:19;;16692:170;;;;16871:330;;17031:67;17095:2;17090:3;17031:67;;;17024:74;;17131:32;17127:1;17122:3;17118:11;17111:53;17192:2;17187:3;17183:12;17176:19;;17017:184;;;;17210:324;;17370:67;17434:2;17429:3;17370:67;;;17363:74;;17470:26;17466:1;17461:3;17457:11;17450:47;17525:2;17520:3;17516:12;17509:19;;17356:178;;;;17543:332;;17703:67;17767:2;17762:3;17703:67;;;17696:74;;17803:34;17799:1;17794:3;17790:11;17783:55;17866:2;17861:3;17857:12;17850:19;;17689:186;;;;17884:330;;18044:67;18108:2;18103:3;18044:67;;;18037:74;;18144:32;18140:1;18135:3;18131:11;18124:53;18205:2;18200:3;18196:12;18189:19;;18030:184;;;;18223:348;;18401:85;18483:2;18478:3;18401:85;;;18394:92;;18519:14;18515:1;18510:3;18506:11;18499:35;18562:2;18557:3;18553:12;18546:19;;18387:184;;;;18580:317;;18740:67;18804:2;18799:3;18740:67;;;18733:74;;18840:19;18836:1;18831:3;18827:11;18820:40;18888:2;18883:3;18879:12;18872:19;;18726:171;;;;18906:351;;19084:85;19166:2;19161:3;19084:85;;;19077:92;;19202:17;19198:1;19193:3;19189:11;19182:38;19248:2;19243:3;19239:12;19232:19;;19070:187;;;;19266:325;;19426:67;19490:2;19485:3;19426:67;;;19419:74;;19526:27;19522:1;19517:3;19513:11;19506:48;19582:2;19577:3;19573:12;19566:19;;19412:179;;;;19600:384;;19760:67;19824:2;19819:3;19760:67;;;19753:74;;19860:34;19856:1;19851:3;19847:11;19840:55;19929:17;19924:2;19919:3;19915:12;19908:39;19975:2;19970:3;19966:12;19959:19;;19746:238;;;;19993:325;;20153:67;20217:2;20212:3;20153:67;;;20146:74;;20253:27;20249:1;20244:3;20240:11;20233:48;20309:2;20304:3;20300:12;20293:19;;20139:179;;;;20381:1362;;20530:4;20525:3;20521:14;20620:4;20613:5;20609:16;20603:23;20632:63;20689:4;20684:3;20680:14;20666:12;20632:63;;;20550:151;20779:4;20772:5;20768:16;20762:23;20791:63;20848:4;20843:3;20839:14;20825:12;20791:63;;;20711:149;20938:4;20931:5;20927:16;20921:23;20990:3;20984:4;20980:14;20973:4;20968:3;20964:14;20957:38;21010:99;21104:4;21090:12;21010:99;;;21002:107;;20870:251;21198:4;21191:5;21187:16;21181:23;21250:3;21244:4;21240:14;21233:4;21228:3;21224:14;21217:38;21270:99;21364:4;21350:12;21270:99;;;21262:107;;21131:250;21457:4;21450:5;21446:16;21440:23;21469:78;21541:4;21536:3;21532:14;21518:12;21469:78;;;21391:162;21636:4;21629:5;21625:16;21619:23;21648:63;21705:4;21700:3;21696:14;21682:12;21648:63;;;21563:154;21734:4;21727:11;;20503:1240;;;;;;21750:103;21823:24;21841:5;21823:24;;;21818:3;21811:37;21805:48;;;21860:113;21943:24;21961:5;21943:24;;;21938:3;21931:37;21925:48;;;21980:110;22061:23;22078:5;22061:23;;;22056:3;22049:36;22043:47;;;22097:107;22176:22;22192:5;22176:22;;;22171:3;22164:35;22158:46;;;22211:421;;22386:75;22457:3;22448:6;22386:75;;;22483:2;22478:3;22474:12;22467:19;;22504:103;22603:3;22594:6;22586;22504:103;;;22497:110;;22624:3;22617:10;;22374:258;;;;;;;22639:372;;22838:148;22982:3;22838:148;;;22831:155;;23003:3;22996:10;;22819:192;;;;23018:372;;23217:148;23361:3;23217:148;;;23210:155;;23382:3;23375:10;;23198:192;;;;23397:213;;23515:2;23504:9;23500:18;23492:26;;23529:71;23597:1;23586:9;23582:17;23573:6;23529:71;;;23486:124;;;;;23617:229;;23743:2;23732:9;23728:18;23720:26;;23757:79;23833:1;23822:9;23818:17;23809:6;23757:79;;;23714:132;;;;;23853:435;;24027:2;24016:9;24012:18;24004:26;;24041:71;24109:1;24098:9;24094:17;24085:6;24041:71;;;24123:72;24191:2;24180:9;24176:18;24167:6;24123:72;;;24206;24274:2;24263:9;24259:18;24250:6;24206:72;;;23998:290;;;;;;;24295:201;;24407:2;24396:9;24392:18;24384:26;;24421:65;24483:1;24472:9;24468:17;24459:6;24421:65;;;24378:118;;;;;24503:213;;24621:2;24610:9;24606:18;24598:26;;24635:71;24703:1;24692:9;24688:17;24679:6;24635:71;;;24592:124;;;;;24723:324;;24869:2;24858:9;24854:18;24846:26;;24883:71;24951:1;24940:9;24936:17;24927:6;24883:71;;;24965:72;25033:2;25022:9;25018:18;25009:6;24965:72;;;24840:207;;;;;;25054:539;;25252:3;25241:9;25237:19;25229:27;;25267:71;25335:1;25324:9;25320:17;25311:6;25267:71;;;25349:72;25417:2;25406:9;25402:18;25393:6;25349:72;;;25432:70;25498:2;25487:9;25483:18;25474:6;25432:70;;;25513;25579:2;25568:9;25564:18;25555:6;25513:70;;;25223:370;;;;;;;;25600:324;;25746:2;25735:9;25731:18;25723:26;;25760:71;25828:1;25817:9;25813:17;25804:6;25760:71;;;25842:72;25910:2;25899:9;25895:18;25886:6;25842:72;;;25717:207;;;;;;25931:577;;26148:3;26137:9;26133:19;26125:27;;26163:71;26231:1;26220:9;26216:17;26207:6;26163:71;;;26245:72;26313:2;26302:9;26298:18;26289:6;26245:72;;;26328:87;26411:2;26400:9;26396:18;26387:6;26328:87;;;26426:72;26494:2;26483:9;26479:18;26470:6;26426:72;;;26119:389;;;;;;;;26515:428;;26689:2;26678:9;26674:18;26666:26;;26703:71;26771:1;26760:9;26756:17;26747:6;26703:71;;;26822:9;26816:4;26812:20;26807:2;26796:9;26792:18;26785:48;26847:86;26928:4;26919:6;26911;26847:86;;;26839:94;;26660:283;;;;;;;26950:767;;27210:3;27199:9;27195:19;27187:27;;27225:71;27293:1;27282:9;27278:17;27269:6;27225:71;;;27307:68;27371:2;27360:9;27356:18;27347:6;27307:68;;;27386:70;27452:2;27441:9;27437:18;27428:6;27386:70;;;27467:80;27543:2;27532:9;27528:18;27519:6;27467:80;;;27596:9;27590:4;27586:20;27580:3;27569:9;27565:19;27558:49;27621:86;27702:4;27693:6;27685;27621:86;;;27613:94;;27181:536;;;;;;;;;;27724:407;;27915:2;27904:9;27900:18;27892:26;;27965:9;27959:4;27955:20;27951:1;27940:9;27936:17;27929:47;27990:131;28116:4;27990:131;;;27982:139;;27886:245;;;;28138:407;;28329:2;28318:9;28314:18;28306:26;;28379:9;28373:4;28369:20;28365:1;28354:9;28350:17;28343:47;28404:131;28530:4;28404:131;;;28396:139;;28300:245;;;;28552:407;;28743:2;28732:9;28728:18;28720:26;;28793:9;28787:4;28783:20;28779:1;28768:9;28764:17;28757:47;28818:131;28944:4;28818:131;;;28810:139;;28714:245;;;;28966:407;;29157:2;29146:9;29142:18;29134:26;;29207:9;29201:4;29197:20;29193:1;29182:9;29178:17;29171:47;29232:131;29358:4;29232:131;;;29224:139;;29128:245;;;;29380:407;;29571:2;29560:9;29556:18;29548:26;;29621:9;29615:4;29611:20;29607:1;29596:9;29592:17;29585:47;29646:131;29772:4;29646:131;;;29638:139;;29542:245;;;;29794:407;;29985:2;29974:9;29970:18;29962:26;;30035:9;30029:4;30025:20;30021:1;30010:9;30006:17;29999:47;30060:131;30186:4;30060:131;;;30052:139;;29956:245;;;;30208:407;;30399:2;30388:9;30384:18;30376:26;;30449:9;30443:4;30439:20;30435:1;30424:9;30420:17;30413:47;30474:131;30600:4;30474:131;;;30466:139;;30370:245;;;;30622:407;;30813:2;30802:9;30798:18;30790:26;;30863:9;30857:4;30853:20;30849:1;30838:9;30834:17;30827:47;30888:131;31014:4;30888:131;;;30880:139;;30784:245;;;;31036:407;;31227:2;31216:9;31212:18;31204:26;;31277:9;31271:4;31267:20;31263:1;31252:9;31248:17;31241:47;31302:131;31428:4;31302:131;;;31294:139;;31198:245;;;;31450:407;;31641:2;31630:9;31626:18;31618:26;;31691:9;31685:4;31681:20;31677:1;31666:9;31662:17;31655:47;31716:131;31842:4;31716:131;;;31708:139;;31612:245;;;;31864:407;;32055:2;32044:9;32040:18;32032:26;;32105:9;32099:4;32095:20;32091:1;32080:9;32076:17;32069:47;32130:131;32256:4;32130:131;;;32122:139;;32026:245;;;;32278:407;;32469:2;32458:9;32454:18;32446:26;;32519:9;32513:4;32509:20;32505:1;32494:9;32490:17;32483:47;32544:131;32670:4;32544:131;;;32536:139;;32440:245;;;;32692:407;;32883:2;32872:9;32868:18;32860:26;;32933:9;32927:4;32923:20;32919:1;32908:9;32904:17;32897:47;32958:131;33084:4;32958:131;;;32950:139;;32854:245;;;;33106:407;;33297:2;33286:9;33282:18;33274:26;;33347:9;33341:4;33337:20;33333:1;33322:9;33318:17;33311:47;33372:131;33498:4;33372:131;;;33364:139;;33268:245;;;;33520:407;;33711:2;33700:9;33696:18;33688:26;;33761:9;33755:4;33751:20;33747:1;33736:9;33732:17;33725:47;33786:131;33912:4;33786:131;;;33778:139;;33682:245;;;;33934:407;;34125:2;34114:9;34110:18;34102:26;;34175:9;34169:4;34165:20;34161:1;34150:9;34146:17;34139:47;34200:131;34326:4;34200:131;;;34192:139;;34096:245;;;;34348:407;;34539:2;34528:9;34524:18;34516:26;;34589:9;34583:4;34579:20;34575:1;34564:9;34560:17;34553:47;34614:131;34740:4;34614:131;;;34606:139;;34510:245;;;;34762:407;;34953:2;34942:9;34938:18;34930:26;;35003:9;34997:4;34993:20;34989:1;34978:9;34974:17;34967:47;35028:131;35154:4;35028:131;;;35020:139;;34924:245;;;;35176:357;;35342:2;35331:9;35327:18;35319:26;;35392:9;35386:4;35382:20;35378:1;35367:9;35363:17;35356:47;35417:106;35518:4;35509:6;35417:106;;;35409:114;;35313:220;;;;;35540:213;;35658:2;35647:9;35643:18;35635:26;;35672:71;35740:1;35729:9;35725:17;35716:6;35672:71;;;35629:124;;;;;35760:209;;35876:2;35865:9;35861:18;35853:26;;35890:69;35956:1;35945:9;35941:17;35932:6;35890:69;;;35847:122;;;;;35976:205;;36090:2;36079:9;36075:18;36067:26;;36104:67;36168:1;36157:9;36153:17;36144:6;36104:67;;;36061:120;;;;;36188:147;;36270:3;36262:11;;36308:4;36303:3;36299:14;36291:22;;36256:79;;;;36342:133;;36447:5;36441:12;36431:22;;36412:63;;;;36482:104;;36576:4;36571:3;36567:14;36559:22;;36553:33;;;;36594:168;;36714:6;36709:3;36702:19;36751:4;36746:3;36742:14;36727:29;;36695:67;;;;;36771:162;;36885:6;36880:3;36873:19;36922:4;36917:3;36913:14;36898:29;;36866:67;;;;;36942:144;;37077:3;37062:18;;37055:31;;;;;37095:163;;37210:6;37205:3;37198:19;37247:4;37242:3;37238:14;37223:29;;37191:67;;;;;37267:145;;37403:3;37388:18;;37381:31;;;;;37420:91;;37482:24;37500:5;37482:24;;;37471:35;;37465:46;;;;37518:99;;37588:24;37606:5;37588:24;;;37577:35;;37571:46;;;;37624:85;;37697:5;37690:13;37683:21;37672:32;;37666:43;;;;37716:72;;37778:5;37767:16;;37761:27;;;;37795:144;;37867:66;37860:5;37856:78;37845:89;;37839:100;;;;37946:140;;38025:5;38014:16;;38031:50;38075:5;38031:50;;;38008:78;;;;38093:121;;38166:42;38159:5;38155:54;38144:65;;38138:76;;;;38221:72;;38283:5;38272:16;;38266:27;;;;38300:96;;38372:18;38365:5;38361:30;38350:41;;38344:52;;;;38403:98;;38475:20;38468:5;38464:32;38453:43;;38447:54;;;;38508:81;;38579:4;38572:5;38568:16;38557:27;;38551:38;;;;38596:129;;38683:37;38714:5;38683:37;;;38670:50;;38664:61;;;;38732:140;;38826:41;38861:5;38826:41;;;38813:54;;38807:65;;;;38879:121;;38958:37;38989:5;38958:37;;;38945:50;;38939:61;;;;39007:108;;39086:24;39104:5;39086:24;;;39073:37;;39067:48;;;;39123:145;39204:6;39199:3;39194;39181:30;39260:1;39251:6;39246:3;39242:16;39235:27;39174:94;;;;39276:95;;39340:26;39360:5;39340:26;;;39329:37;;39323:48;;;;39378:89;;39442:20;39456:5;39442:20;;;39431:31;;39425:42;;;;39474:97;;39562:2;39558:7;39553:2;39546:5;39542:14;39538:28;39528:38;;39522:49;;;;39579:94;;39657:5;39653:2;39649:14;39627:36;;39621:52;;;;39681:108;39767:1;39760:5;39757:12;39747:2;;39773:9;39747:2;39741:48;;39796:117;39865:24;39883:5;39865:24;;;39858:5;39855:35;39845:2;;39904:1;39901;39894:12;39845:2;39839:74;;39920:133;39997:32;40023:5;39997:32;;;39990:5;39987:43;39977:2;;40044:1;40041;40034:12;39977:2;39971:82;;40060:117;40129:24;40147:5;40129:24;;;40122:5;40119:35;40109:2;;40168:1;40165;40158:12;40109:2;40103:74;;40184:115;40252:23;40269:5;40252:23;;;40245:5;40242:34;40232:2;;40290:1;40287;40280:12;40232:2;40226:73;;40306:117;40375:24;40393:5;40375:24;;;40368:5;40365:35;40355:2;;40414:1;40411;40404:12;40355:2;40349:74;;40430:115;40498:23;40515:5;40498:23;;;40491:5;40488:34;40478:2;;40536:1;40533;40526:12;40478:2;40472:73;;40552:115;40620:23;40637:5;40620:23;;;40613:5;40610:34;40600:2;;40658:1;40655;40648:12;40600:2;40594:73;;40674:113;40741:22;40757:5;40741:22;;;40734:5;40731:33;40721:2;;40778:1;40775;40768:12;40721:2;40715:72;", + "source": "pragma solidity 0.6.4;\npragma experimental ABIEncoderV2;\n\nimport \"@openzeppelin/contracts/access/AccessControl.sol\";\nimport \"./utils/Pausable.sol\";\nimport \"./utils/SafeMath.sol\";\nimport \"./interfaces/IDepositExecute.sol\";\nimport \"./interfaces/IBridge.sol\";\nimport \"./interfaces/IERCHandler.sol\";\nimport \"./interfaces/IGenericHandler.sol\";\n\n/**\n @title Facilitates deposits, creation and votiing of deposit proposals, and deposit executions.\n @author ChainSafe Systems.\n */\ncontract Bridge is Pausable, AccessControl, SafeMath {\n\n uint8 public _chainID;\n uint256 public _relayerThreshold;\n uint256 public _totalRelayers;\n uint256 public _totalProposals;\n\n enum Vote {No, Yes}\n\n enum ProposalStatus {Inactive, Active, Executed}\n\n struct Proposal {\n bytes32 _resourceID;\n bytes32 _dataHash;\n address[] _yesVotes;\n address[] _noVotes;\n ProposalStatus _status;\n uint256 _proposedBlock;\n }\n\n // destinationChainID => number of deposits\n mapping(uint8 => uint64) public _depositCounts;\n // resourceID => handler address\n mapping(bytes32 => address) public _resourceIDToHandlerAddress;\n // destinationChainID + depositNonce => dataHash => Proposal\n mapping(uint72 => mapping(bytes32 => Proposal)) public _proposals;\n // destinationChainID + depositNonce => dataHash => relayerAddress => bool\n mapping(uint72 => mapping(bytes32 => mapping(address => bool))) public _hasVotedOnProposal;\n // destinationChainID => deposit fee\n mapping(uint8 => uint256) public _fees;\n\n event RelayerThresholdChanged(uint indexed newThreshold);\n event RelayerAdded(address indexed relayer);\n event RelayerRemoved(address indexed relayer);\n event Deposit(\n uint8 indexed destinationChainID,\n bytes32 indexed resourceID,\n uint64 indexed depositNonce\n );\n event ProposalEvent(\n uint8 indexed originChainID,\n uint64 indexed depositNonce,\n ProposalStatus indexed status,\n bytes32 resourceID,\n bytes32 dataHash\n );\n\n event ProposalVote(\n uint8 indexed originChainID,\n uint64 indexed depositNonce,\n ProposalStatus indexed status,\n bytes32 resourceID\n );\n\n bytes32 public constant RELAYER_ROLE = keccak256(\"RELAYER_ROLE\");\n bytes32 public constant FEE_SETTER_ROLE = keccak256(\"FEE_SETTER_ROLE\");\n\n modifier onlyAdmin() {\n _onlyAdmin();\n _;\n }\n\n modifier onlyAdminOrRelayer() {\n _onlyAdminOrRelayer();\n _;\n }\n\n modifier onlyRelayers() {\n _onlyRelayers();\n _;\n }\n\n modifier onlyFeeSetter() {\n require(hasRole(FEE_SETTER_ROLE, msg.sender), \"sender is not fee setter\");\n _;\n }\n\n function _onlyAdminOrRelayer() private view {\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender) || hasRole(RELAYER_ROLE, msg.sender),\n \"sender is not relayer or admin\");\n }\n\n function _onlyAdmin() private view {\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \"sender doesn't have admin role\");\n }\n\n function _onlyRelayers() private view {\n require(hasRole(RELAYER_ROLE, msg.sender), \"sender doesn't have relayer role\");\n }\n\n /**\n @notice Initializes Bridge, creates and grants {msg.sender} the admin role,\n creates and grants {initialRelayers} the relayer role.\n @param chainID ID of chain the Bridge contract exists on.\n @param initialRelayers Addresses that should be initially granted the relayer role.\n @param initialRelayerThreshold Number of votes needed for a deposit proposal to be considered passed.\n */\n constructor (uint8 chainID, address[] memory initialRelayers, uint initialRelayerThreshold) public {\n _chainID = chainID;\n _relayerThreshold = initialRelayerThreshold;\n\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n _setupRole(FEE_SETTER_ROLE, msg.sender);\n _setRoleAdmin(RELAYER_ROLE, DEFAULT_ADMIN_ROLE);\n\n for (uint i; i < initialRelayers.length; i++) {\n grantRole(RELAYER_ROLE, initialRelayers[i]);\n _totalRelayers++;\n }\n }\n\n /**\n @notice Returns true if {relayer} has the relayer role.\n @param relayer Address to check.\n */\n function isRelayer(address relayer) external view returns (bool) {\n return hasRole(RELAYER_ROLE, relayer);\n }\n\n /**\n @notice Removes admin role from {msg.sender} and grants it to {newAdmin}.\n @notice Only callable by an address that currently has the admin role.\n @param newAdmin Address that admin role will be granted to.\n */\n function renounceAdmin(address newAdmin) external onlyAdmin {\n grantRole(DEFAULT_ADMIN_ROLE, newAdmin);\n renounceRole(DEFAULT_ADMIN_ROLE, msg.sender);\n }\n\n /**\n @notice Pauses deposits, proposal creation and voting, and deposit executions.\n @notice Only callable by an address that currently has the admin role.\n */\n function adminPauseTransfers() external onlyAdmin {\n _pause();\n }\n\n /**\n @notice Unpauses deposits, proposal creation and voting, and deposit executions.\n @notice Only callable by an address that currently has the admin role.\n */\n function adminUnpauseTransfers() external onlyAdmin {\n _unpause();\n }\n\n /**\n @notice Modifies the number of votes required for a proposal to be considered passed.\n @notice Only callable by an address that currently has the admin role.\n @param newThreshold Value {_relayerThreshold} will be changed to.\n @notice Emits {RelayerThresholdChanged} event.\n */\n function adminChangeRelayerThreshold(uint newThreshold) external onlyAdmin {\n _relayerThreshold = newThreshold;\n emit RelayerThresholdChanged(newThreshold);\n }\n\n /**\n @notice Grants {relayerAddress} the relayer role and increases {_totalRelayer} count.\n @notice Only callable by an address that currently has the admin role.\n @param relayerAddress Address of relayer to be added.\n @notice Emits {RelayerAdded} event.\n */\n function adminAddRelayer(address relayerAddress) external onlyAdmin {\n require(!hasRole(RELAYER_ROLE, relayerAddress), \"addr already has relayer role!\");\n grantRole(RELAYER_ROLE, relayerAddress);\n emit RelayerAdded(relayerAddress);\n _totalRelayers++;\n }\n\n /**\n @notice Removes relayer role for {relayerAddress} and decreases {_totalRelayer} count.\n @notice Only callable by an address that currently has the admin role.\n @param relayerAddress Address of relayer to be removed.\n @notice Emits {RelayerRemoved} event.\n */\n function adminRemoveRelayer(address relayerAddress) external onlyAdmin {\n require(hasRole(RELAYER_ROLE, relayerAddress), \"addr doesn't have relayer role!\");\n revokeRole(RELAYER_ROLE, relayerAddress);\n emit RelayerRemoved(relayerAddress);\n _totalRelayers--;\n }\n\n /**\n @notice Sets a new resource for handler contracts that use the IERCHandler interface,\n and maps the {handlerAddress} to {resourceID} in {_resourceIDToHandlerAddress}.\n @notice Only callable by an address that currently has the admin role.\n @param handlerAddress Address of handler resource will be set for.\n @param resourceID ResourceID to be used when making deposits.\n @param tokenAddress Address of contract to be called when a deposit is made and a deposited is executed.\n */\n function adminSetResource(address handlerAddress, bytes32 resourceID, address tokenAddress) external onlyAdmin {\n _resourceIDToHandlerAddress[resourceID] = handlerAddress;\n IERCHandler handler = IERCHandler(handlerAddress);\n handler.setResource(resourceID, tokenAddress);\n }\n\n /**\n @notice Sets a new resource for handler contracts that use the IGenericHandler interface,\n and maps the {handlerAddress} to {resourceID} in {_resourceIDToHandlerAddress}.\n @notice Only callable by an address that currently has the admin role.\n @param handlerAddress Address of handler resource will be set for.\n @param resourceID ResourceID to be used when making deposits.\n @param contractAddress Address of contract to be called when a deposit is made and a deposited is executed.\n */\n function adminSetGenericResource(\n address handlerAddress,\n bytes32 resourceID,\n address contractAddress,\n bytes4 depositFunctionSig,\n bytes4 executeFunctionSig\n ) external onlyAdmin {\n _resourceIDToHandlerAddress[resourceID] = handlerAddress;\n IGenericHandler handler = IGenericHandler(handlerAddress);\n handler.setResource(resourceID, contractAddress, depositFunctionSig, executeFunctionSig);\n }\n\n /**\n @notice Sets a resource as burnable for handler contracts that use the IERCHandler interface.\n @notice Only callable by an address that currently has the admin role.\n @param handlerAddress Address of handler resource will be set for.\n @param tokenAddress Address of contract to be called when a deposit is made and a deposited is executed.\n */\n function adminSetBurnable(address handlerAddress, address tokenAddress) external onlyAdmin {\n IERCHandler handler = IERCHandler(handlerAddress);\n handler.setBurnable(tokenAddress);\n }\n\n /**\n @notice Returns a proposal.\n @param originChainID Chain ID deposit originated from.\n @param depositNonce ID of proposal generated by proposal's origin Bridge contract.\n @param dataHash Hash of data to be provided when deposit proposal is executed.\n @return Proposal which consists of:\n - _dataHash Hash of data to be provided when deposit proposal is executed.\n - _yesVotes Number of votes in favor of proposal.\n - _noVotes Number of votes against proposal.\n - _status Current status of proposal.\n */\n function getProposal(uint8 originChainID, uint64 depositNonce, bytes32 dataHash) external view returns (Proposal memory) {\n uint72 nonceAndID = (uint72(depositNonce) << 8) | uint72(originChainID);\n return _proposals[nonceAndID][dataHash];\n }\n\n /**\n @notice Changes deposit fee.\n @notice Only callable by admin.\n @param newFee Value {_fees[destinationChainID]} will be updated to.\n */\n function changeFee(uint8 destinationChainID, uint newFee) external onlyFeeSetter {\n _fees[destinationChainID] = newFee;\n }\n\n /**\n @notice Used to manually withdraw funds from ERC safes.\n @param handlerAddress Address of handler to withdraw from.\n @param tokenAddress Address of token to withdraw.\n @param recipient Address to withdraw tokens to.\n @param amountOrTokenID Either the amount of ERC20 tokens or the ERC721 token ID to withdraw.\n */\n function adminWithdraw(\n address handlerAddress,\n address tokenAddress,\n address recipient,\n uint256 amountOrTokenID\n ) external onlyAdmin {\n IERCHandler handler = IERCHandler(handlerAddress);\n handler.withdraw(tokenAddress, recipient, amountOrTokenID);\n }\n\n /**\n @notice Initiates a transfer using a specified handler contract.\n @notice Only callable when Bridge is not paused.\n @param destinationChainID ID of chain deposit will be bridged to.\n @param resourceID ResourceID used to find address of handler to be used for deposit.\n @param data Additional data to be passed to specified handler.\n @param _auxData Unused parameter, can be used for everything, for example, writing IDs of apps from which the deposit was made.\n @notice Emits {Deposit} event.\n */\n function deposit(uint8 destinationChainID, bytes32 resourceID, bytes calldata data, bytes calldata _auxData) external payable whenNotPaused {\n require(msg.value == _fees[destinationChainID], \"Incorrect fee supplied\");\n\n address handler = _resourceIDToHandlerAddress[resourceID];\n require(handler != address(0), \"resourceID not mapped to handler\");\n\n uint64 depositNonce = ++_depositCounts[destinationChainID];\n\n IDepositExecute depositHandler = IDepositExecute(handler);\n depositHandler.deposit(resourceID, destinationChainID, depositNonce, msg.sender, data);\n\n emit Deposit(destinationChainID, resourceID, depositNonce);\n }\n\n /**\n @notice When called, {msg.sender} will be marked as voting in favor of proposal.\n @notice Only callable by relayers when Bridge is not paused.\n @param chainID ID of chain deposit originated from.\n @param depositNonce ID of deposited generated by origin Bridge contract.\n @param data data provided when deposit was made.\n @notice Proposal must not have already been passed or executed.\n @notice {msg.sender} must not have already voted on proposal.\n @notice Emits {ProposalEvent} event with status indicating the proposal status.\n @notice Emits {ProposalVote} event.\n */\n function voteProposal(uint8 chainID, uint64 depositNonce, bytes32 resourceID, bytes calldata data) external onlyRelayers whenNotPaused {\n address handler = _resourceIDToHandlerAddress[resourceID];\n bytes32 dataHash = keccak256(abi.encodePacked(handler, data));\n\n uint72 nonceAndID = (uint72(depositNonce) << 8) | uint72(chainID);\n Proposal storage proposal = _proposals[nonceAndID][dataHash];\n\n require(_resourceIDToHandlerAddress[resourceID] != address(0), \"no handler for resourceID\");\n require(uint(proposal._status) <= 1, \"proposal already executed\");\n require(!_hasVotedOnProposal[nonceAndID][dataHash][msg.sender], \"relayer already voted\");\n\n if (uint(proposal._status) == 0) {\n ++_totalProposals;\n _proposals[nonceAndID][dataHash] = Proposal({\n _resourceID : resourceID,\n _dataHash : dataHash,\n _yesVotes : new address[](1),\n _noVotes : new address[](0),\n _status : ProposalStatus.Active,\n _proposedBlock : block.number\n });\n\n proposal._yesVotes[0] = msg.sender;\n emit ProposalEvent(chainID, depositNonce, ProposalStatus.Active, resourceID, dataHash);\n } else {\n require(dataHash == proposal._dataHash, \"datahash mismatch\");\n proposal._yesVotes.push(msg.sender);\n }\n \n _hasVotedOnProposal[nonceAndID][dataHash][msg.sender] = true;\n emit ProposalVote(chainID, depositNonce, proposal._status, resourceID);\n\n // if _relayerThreshold has been exceeded\n if (proposal._yesVotes.length >= _relayerThreshold) {\n require(dataHash == proposal._dataHash, \"data doesn't match datahash\");\n\n proposal._status = ProposalStatus.Executed;\n\n IDepositExecute depositHandler = IDepositExecute(_resourceIDToHandlerAddress[proposal._resourceID]);\n\n depositHandler.executeProposal(proposal._resourceID, data);\n\n emit ProposalEvent(chainID, depositNonce, proposal._status, proposal._resourceID, proposal._dataHash);\n }\n }\n\n /**\n @notice Transfers eth in the contract to the specified addresses. The parameters addrs and amounts are mapped 1-1.\n This means that the address at index 0 for addrs will receive the amount (in WEI) from amounts at index 0.\n @param addrs Array of addresses to transfer {amounts} to.\n @param amounts Array of amonuts to transfer to {addrs}.\n */\n function transferFunds(address payable[] calldata addrs, uint[] calldata amounts) external onlyAdmin {\n for (uint i = 0; i < addrs.length; i++) {\n addrs[i].transfer(amounts[i]);\n }\n }\n\n}\n", + "sourcePath": "/Users/oleg/Desktop/crosschain/chainbridge-solidity/contracts/Bridge.sol", + "ast": { + "absolutePath": "/Users/oleg/Desktop/crosschain/chainbridge-solidity/contracts/Bridge.sol", + "exportedSymbols": { + "Bridge": [ + 906 + ] + }, + "id": 907, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "0.6", + ".4" + ], + "nodeType": "PragmaDirective", + "src": "0:22:0" + }, + { + "id": 2, + "literals": [ + "experimental", + "ABIEncoderV2" + ], + "nodeType": "PragmaDirective", + "src": "23:33:0" + }, + { + "absolutePath": "@openzeppelin/contracts/access/AccessControl.sol", + "file": "@openzeppelin/contracts/access/AccessControl.sol", + "id": 3, + "nodeType": "ImportDirective", + "scope": 907, + "sourceUnit": 6332, + "src": "58:58:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/oleg/Desktop/crosschain/chainbridge-solidity/contracts/utils/Pausable.sol", + "file": "./utils/Pausable.sol", + "id": 4, + "nodeType": "ImportDirective", + "scope": 907, + "sourceUnit": 5991, + "src": "117:30:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/oleg/Desktop/crosschain/chainbridge-solidity/contracts/utils/SafeMath.sol", + "file": "./utils/SafeMath.sol", + "id": 5, + "nodeType": "ImportDirective", + "scope": 907, + "sourceUnit": 6040, + "src": "148:30:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/oleg/Desktop/crosschain/chainbridge-solidity/contracts/interfaces/IDepositExecute.sol", + "file": "./interfaces/IDepositExecute.sol", + "id": 6, + "nodeType": "ImportDirective", + "scope": 907, + "sourceUnit": 5846, + "src": "179:42:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/oleg/Desktop/crosschain/chainbridge-solidity/contracts/interfaces/IBridge.sol", + "file": "./interfaces/IBridge.sol", + "id": 7, + "nodeType": "ImportDirective", + "scope": 907, + "sourceUnit": 5820, + "src": "222:34:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/oleg/Desktop/crosschain/chainbridge-solidity/contracts/interfaces/IERCHandler.sol", + "file": "./interfaces/IERCHandler.sol", + "id": 8, + "nodeType": "ImportDirective", + "scope": 907, + "sourceUnit": 5874, + "src": "257:38:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/oleg/Desktop/crosschain/chainbridge-solidity/contracts/interfaces/IGenericHandler.sol", + "file": "./interfaces/IGenericHandler.sol", + "id": 9, + "nodeType": "ImportDirective", + "scope": 907, + "sourceUnit": 5890, + "src": "296:42:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 11, + "name": "Pausable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5990, + "src": "498:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pausable_$5990", + "typeString": "contract Pausable" + } + }, + "id": 12, + "nodeType": "InheritanceSpecifier", + "src": "498:8:0" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 13, + "name": "AccessControl", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6331, + "src": "508:13:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$6331", + "typeString": "contract AccessControl" + } + }, + "id": 14, + "nodeType": "InheritanceSpecifier", + "src": "508:13:0" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 15, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6039, + "src": "523:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$6039", + "typeString": "contract SafeMath" + } + }, + "id": 16, + "nodeType": "InheritanceSpecifier", + "src": "523:8:0" + } + ], + "contractDependencies": [ + 5990, + 6039, + 6066, + 6331 + ], + "contractKind": "contract", + "documentation": { + "id": 10, + "nodeType": "StructuredDocumentation", + "src": "340:138:0", + "text": "@title Facilitates deposits, creation and votiing of deposit proposals, and deposit executions.\n@author ChainSafe Systems." + }, + "fullyImplemented": true, + "id": 906, + "linearizedBaseContracts": [ + 906, + 6039, + 6331, + 6066, + 5990 + ], + "name": "Bridge", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "beab7131", + "id": 18, + "name": "_chainID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 906, + "src": "539:23:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 17, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "539:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "d7a9cd79", + "id": 20, + "name": "_relayerThreshold", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 906, + "src": "568:32:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "568:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "802aabe8", + "id": 22, + "name": "_totalRelayers", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 906, + "src": "606:29:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "606:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "9d5773e0", + "id": 24, + "name": "_totalProposals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 906, + "src": "641:30:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 23, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "641:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "Bridge.Vote", + "id": 27, + "members": [ + { + "id": 25, + "name": "No", + "nodeType": "EnumValue", + "src": "689:2:0" + }, + { + "id": 26, + "name": "Yes", + "nodeType": "EnumValue", + "src": "693:3:0" + } + ], + "name": "Vote", + "nodeType": "EnumDefinition", + "src": "678:19:0" + }, + { + "canonicalName": "Bridge.ProposalStatus", + "id": 31, + "members": [ + { + "id": 28, + "name": "Inactive", + "nodeType": "EnumValue", + "src": "724:8:0" + }, + { + "id": 29, + "name": "Active", + "nodeType": "EnumValue", + "src": "734:6:0" + }, + { + "id": 30, + "name": "Executed", + "nodeType": "EnumValue", + "src": "742:8:0" + } + ], + "name": "ProposalStatus", + "nodeType": "EnumDefinition", + "src": "703:48:0" + }, + { + "canonicalName": "Bridge.Proposal", + "id": 46, + "members": [ + { + "constant": false, + "id": 33, + "name": "_resourceID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 46, + "src": "783:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 32, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "783:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 35, + "name": "_dataHash", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 46, + "src": "812:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 34, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "812:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 38, + "name": "_yesVotes", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 46, + "src": "839:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 36, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "839:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 37, + "length": null, + "nodeType": "ArrayTypeName", + "src": "839:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 41, + "name": "_noVotes", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 46, + "src": "868:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 39, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "868:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 40, + "length": null, + "nodeType": "ArrayTypeName", + "src": "868:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 43, + "name": "_status", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 46, + "src": "896:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + }, + "typeName": { + "contractScope": null, + "id": 42, + "name": "ProposalStatus", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 31, + "src": "896:14:0", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 45, + "name": "_proposedBlock", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 46, + "src": "928:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 44, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "928:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Proposal", + "nodeType": "StructDefinition", + "scope": 906, + "src": "757:200:0", + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "4b0b919d", + "id": 50, + "name": "_depositCounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 906, + "src": "1011:46:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint8_$_t_uint64_$", + "typeString": "mapping(uint8 => uint64)" + }, + "typeName": { + "id": 49, + "keyType": { + "id": 47, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1019:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Mapping", + "src": "1011:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint8_$_t_uint64_$", + "typeString": "mapping(uint8 => uint64)" + }, + "valueType": { + "id": 48, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1028:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "84db809f", + "id": 54, + "name": "_resourceIDToHandlerAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 906, + "src": "1100:62:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + }, + "typeName": { + "id": 53, + "keyType": { + "id": 51, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1108:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "1100:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + }, + "valueType": { + "id": 52, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1119:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "50598719", + "id": 60, + "name": "_proposals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 906, + "src": "1233:65:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint72_$_t_mapping$_t_bytes32_$_t_struct$_Proposal_$46_storage_$_$", + "typeString": "mapping(uint72 => mapping(bytes32 => struct Bridge.Proposal))" + }, + "typeName": { + "id": 59, + "keyType": { + "id": 55, + "name": "uint72", + "nodeType": "ElementaryTypeName", + "src": "1241:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "nodeType": "Mapping", + "src": "1233:47:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint72_$_t_mapping$_t_bytes32_$_t_struct$_Proposal_$46_storage_$_$", + "typeString": "mapping(uint72 => mapping(bytes32 => struct Bridge.Proposal))" + }, + "valueType": { + "id": 58, + "keyType": { + "id": 56, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1259:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "1251:28:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Proposal_$46_storage_$", + "typeString": "mapping(bytes32 => struct Bridge.Proposal)" + }, + "valueType": { + "contractScope": null, + "id": 57, + "name": "Proposal", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 46, + "src": "1270:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "7febe63f", + "id": 68, + "name": "_hasVotedOnProposal", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 906, + "src": "1383:90:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint72_$_t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_bool_$_$_$", + "typeString": "mapping(uint72 => mapping(bytes32 => mapping(address => bool)))" + }, + "typeName": { + "id": 67, + "keyType": { + "id": 61, + "name": "uint72", + "nodeType": "ElementaryTypeName", + "src": "1391:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "nodeType": "Mapping", + "src": "1383:63:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint72_$_t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_bool_$_$_$", + "typeString": "mapping(uint72 => mapping(bytes32 => mapping(address => bool)))" + }, + "valueType": { + "id": 66, + "keyType": { + "id": 62, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1409:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "1401:44:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(bytes32 => mapping(address => bool))" + }, + "valueType": { + "id": 65, + "keyType": { + "id": 63, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1428:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1420:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 64, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1439:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "a49e88d9", + "id": 72, + "name": "_fees", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 906, + "src": "1520:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint8_$_t_uint256_$", + "typeString": "mapping(uint8 => uint256)" + }, + "typeName": { + "id": 71, + "keyType": { + "id": 69, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1528:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Mapping", + "src": "1520:25:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint8_$_t_uint256_$", + "typeString": "mapping(uint8 => uint256)" + }, + "valueType": { + "id": 70, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1537:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 76, + "name": "RelayerThresholdChanged", + "nodeType": "EventDefinition", + "parameters": { + "id": 75, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 74, + "indexed": true, + "name": "newThreshold", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 76, + "src": "1595:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 73, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1595:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1594:27:0" + }, + "src": "1565:57:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 80, + "name": "RelayerAdded", + "nodeType": "EventDefinition", + "parameters": { + "id": 79, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 78, + "indexed": true, + "name": "relayer", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 80, + "src": "1646:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 77, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1646:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1645:25:0" + }, + "src": "1627:44:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 84, + "name": "RelayerRemoved", + "nodeType": "EventDefinition", + "parameters": { + "id": 83, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 82, + "indexed": true, + "name": "relayer", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 84, + "src": "1697:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 81, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1697:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1696:25:0" + }, + "src": "1676:46:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 92, + "name": "Deposit", + "nodeType": "EventDefinition", + "parameters": { + "id": 91, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 86, + "indexed": true, + "name": "destinationChainID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 92, + "src": "1750:34:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 85, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1750:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 88, + "indexed": true, + "name": "resourceID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 92, + "src": "1794:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 87, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1794:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 90, + "indexed": true, + "name": "depositNonce", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 92, + "src": "1830:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 89, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1830:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1740:124:0" + }, + "src": "1727:138:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 104, + "name": "ProposalEvent", + "nodeType": "EventDefinition", + "parameters": { + "id": 103, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 94, + "indexed": true, + "name": "originChainID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 104, + "src": "1899:37:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 93, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1899:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 96, + "indexed": true, + "name": "depositNonce", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 104, + "src": "1946:36:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 95, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1946:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 98, + "indexed": true, + "name": "status", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 104, + "src": "1992:30:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + }, + "typeName": { + "contractScope": null, + "id": 97, + "name": "ProposalStatus", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 31, + "src": "1992:14:0", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 100, + "indexed": false, + "name": "resourceID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 104, + "src": "2032:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 99, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2032:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 102, + "indexed": false, + "name": "dataHash", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 104, + "src": "2060:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 101, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2060:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1889:193:0" + }, + "src": "1870:213:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 114, + "name": "ProposalVote", + "nodeType": "EventDefinition", + "parameters": { + "id": 113, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 106, + "indexed": true, + "name": "originChainID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 114, + "src": "2117:29:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 105, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2117:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 108, + "indexed": true, + "name": "depositNonce", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 114, + "src": "2156:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 107, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2156:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 110, + "indexed": true, + "name": "status", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 114, + "src": "2194:29:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + }, + "typeName": { + "contractScope": null, + "id": 109, + "name": "ProposalStatus", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 31, + "src": "2194:14:0", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 112, + "indexed": false, + "name": "resourceID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 114, + "src": "2233:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 111, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2233:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2107:150:0" + }, + "src": "2089:169:0" + }, + { + "constant": true, + "functionSelector": "926d7d7f", + "id": 119, + "name": "RELAYER_ROLE", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 906, + "src": "2264:64:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 115, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2264:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "52454c415945525f524f4c45", + "id": 117, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2313:14:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e2b7fb3b832174769106daebcfd6d1970523240dda11281102db9363b83b0dc4", + "typeString": "literal_string \"RELAYER_ROLE\"" + }, + "value": "RELAYER_ROLE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e2b7fb3b832174769106daebcfd6d1970523240dda11281102db9363b83b0dc4", + "typeString": "literal_string \"RELAYER_ROLE\"" + } + ], + "id": 116, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "2303:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2303:25:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "public" + }, + { + "constant": true, + "functionSelector": "e9347683", + "id": 124, + "name": "FEE_SETTER_ROLE", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 906, + "src": "2334:70:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 120, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2334:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "4645455f5345545445525f524f4c45", + "id": 122, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2386:17:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e6ad9a47fbda1dc18de1eb5eeb7d935e5e81b4748f3cfc61e233e64f88182060", + "typeString": "literal_string \"FEE_SETTER_ROLE\"" + }, + "value": "FEE_SETTER_ROLE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e6ad9a47fbda1dc18de1eb5eeb7d935e5e81b4748f3cfc61e233e64f88182060", + "typeString": "literal_string \"FEE_SETTER_ROLE\"" + } + ], + "id": 121, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "2376:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 123, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2376:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "public" + }, + { + "body": { + "id": 130, + "nodeType": "Block", + "src": "2432:40:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 126, + "name": "_onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "2442:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2442:12:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 128, + "nodeType": "ExpressionStatement", + "src": "2442:12:0" + }, + { + "id": 129, + "nodeType": "PlaceholderStatement", + "src": "2464:1:0" + } + ] + }, + "documentation": null, + "id": 131, + "name": "onlyAdmin", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 125, + "nodeType": "ParameterList", + "parameters": [], + "src": "2429:2:0" + }, + "src": "2411:61:0", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 137, + "nodeType": "Block", + "src": "2508:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 133, + "name": "_onlyAdminOrRelayer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 177, + "src": "2518:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2518:21:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 135, + "nodeType": "ExpressionStatement", + "src": "2518:21:0" + }, + { + "id": 136, + "nodeType": "PlaceholderStatement", + "src": "2549:1:0" + } + ] + }, + "documentation": null, + "id": 138, + "name": "onlyAdminOrRelayer", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 132, + "nodeType": "ParameterList", + "parameters": [], + "src": "2505:2:0" + }, + "src": "2478:79:0", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 144, + "nodeType": "Block", + "src": "2587:43:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 140, + "name": "_onlyRelayers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 203, + "src": "2597:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2597:15:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 142, + "nodeType": "ExpressionStatement", + "src": "2597:15:0" + }, + { + "id": 143, + "nodeType": "PlaceholderStatement", + "src": "2622:1:0" + } + ] + }, + "documentation": null, + "id": 145, + "name": "onlyRelayers", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 139, + "nodeType": "ParameterList", + "parameters": [], + "src": "2584:2:0" + }, + "src": "2563:67:0", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 157, + "nodeType": "Block", + "src": "2661:101:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 149, + "name": "FEE_SETTER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "2687:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 150, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2704:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2704:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 148, + "name": "hasRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6129, + "src": "2679:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) view returns (bool)" + } + }, + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2679:36:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "73656e646572206973206e6f742066656520736574746572", + "id": 153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2717:26:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8de2276491d292abb103eed097e5b54c54caff8f8fbcb4389760965d5923bbef", + "typeString": "literal_string \"sender is not fee setter\"" + }, + "value": "sender is not fee setter" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8de2276491d292abb103eed097e5b54c54caff8f8fbcb4389760965d5923bbef", + "typeString": "literal_string \"sender is not fee setter\"" + } + ], + "id": 147, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2671:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2671:73:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 155, + "nodeType": "ExpressionStatement", + "src": "2671:73:0" + }, + { + "id": 156, + "nodeType": "PlaceholderStatement", + "src": "2754:1:0" + } + ] + }, + "documentation": null, + "id": 158, + "name": "onlyFeeSetter", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 146, + "nodeType": "ParameterList", + "parameters": [], + "src": "2658:2:0" + }, + "src": "2636:126:0", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 176, + "nodeType": "Block", + "src": "2812:148:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 163, + "name": "DEFAULT_ADMIN_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6092, + "src": "2838:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 164, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2858:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2858:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 162, + "name": "hasRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6129, + "src": "2830:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) view returns (bool)" + } + }, + "id": 166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2830:39:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 168, + "name": "RELAYER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "2881:12:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 169, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2895:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2895:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 167, + "name": "hasRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6129, + "src": "2873:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) view returns (bool)" + } + }, + "id": 171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2873:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2830:76:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "73656e646572206973206e6f742072656c61796572206f722061646d696e", + "id": 173, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2920:32:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_060530e99bec4f476b8f8f370f65f741cac486899cd6c35c4dd2e82720711afe", + "typeString": "literal_string \"sender is not relayer or admin\"" + }, + "value": "sender is not relayer or admin" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_060530e99bec4f476b8f8f370f65f741cac486899cd6c35c4dd2e82720711afe", + "typeString": "literal_string \"sender is not relayer or admin\"" + } + ], + "id": 161, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2822:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2822:131:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 175, + "nodeType": "ExpressionStatement", + "src": "2822:131:0" + } + ] + }, + "documentation": null, + "id": 177, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_onlyAdminOrRelayer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 159, + "nodeType": "ParameterList", + "parameters": [], + "src": "2796:2:0" + }, + "returnParameters": { + "id": 160, + "nodeType": "ParameterList", + "parameters": [], + "src": "2812:0:0" + }, + "scope": 906, + "src": "2768:192:0", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 189, + "nodeType": "Block", + "src": "3001:99:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 182, + "name": "DEFAULT_ADMIN_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6092, + "src": "3027:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 183, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3047:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3047:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 181, + "name": "hasRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6129, + "src": "3019:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) view returns (bool)" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3019:39:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "73656e64657220646f65736e277420686176652061646d696e20726f6c65", + "id": 186, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3060:32:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cccb3b305edc7308d7027b1001041a46b235f7d3213d690bb469676069d9b205", + "typeString": "literal_string \"sender doesn't have admin role\"" + }, + "value": "sender doesn't have admin role" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cccb3b305edc7308d7027b1001041a46b235f7d3213d690bb469676069d9b205", + "typeString": "literal_string \"sender doesn't have admin role\"" + } + ], + "id": 180, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3011:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3011:82:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 188, + "nodeType": "ExpressionStatement", + "src": "3011:82:0" + } + ] + }, + "documentation": null, + "id": 190, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_onlyAdmin", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 178, + "nodeType": "ParameterList", + "parameters": [], + "src": "2985:2:0" + }, + "returnParameters": { + "id": 179, + "nodeType": "ParameterList", + "parameters": [], + "src": "3001:0:0" + }, + "scope": 906, + "src": "2966:134:0", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 202, + "nodeType": "Block", + "src": "3144:95:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 195, + "name": "RELAYER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "3170:12:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 196, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3184:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3184:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 194, + "name": "hasRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6129, + "src": "3162:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) view returns (bool)" + } + }, + "id": 198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3162:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "73656e64657220646f65736e277420686176652072656c6179657220726f6c65", + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3197:34:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5edc249083609d56bd00194353566fb7b8c09e436c3268ab57a56188319b6d4", + "typeString": "literal_string \"sender doesn't have relayer role\"" + }, + "value": "sender doesn't have relayer role" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c5edc249083609d56bd00194353566fb7b8c09e436c3268ab57a56188319b6d4", + "typeString": "literal_string \"sender doesn't have relayer role\"" + } + ], + "id": 193, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3154:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3154:78:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 201, + "nodeType": "ExpressionStatement", + "src": "3154:78:0" + } + ] + }, + "documentation": null, + "id": 203, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_onlyRelayers", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 191, + "nodeType": "ParameterList", + "parameters": [], + "src": "3128:2:0" + }, + "returnParameters": { + "id": 192, + "nodeType": "ParameterList", + "parameters": [], + "src": "3144:0:0" + }, + "scope": 906, + "src": "3106:133:0", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 261, + "nodeType": "Block", + "src": "3775:401:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 214, + "name": "_chainID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18, + "src": "3785:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 215, + "name": "chainID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 206, + "src": "3796:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "3785:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 217, + "nodeType": "ExpressionStatement", + "src": "3785:18:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 218, + "name": "_relayerThreshold", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "3813:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 219, + "name": "initialRelayerThreshold", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 211, + "src": "3833:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3813:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 221, + "nodeType": "ExpressionStatement", + "src": "3813:43:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 223, + "name": "DEFAULT_ADMIN_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6092, + "src": "3878:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 224, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3898:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3898:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 222, + "name": "_setupRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6266, + "src": "3867:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3867:42:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 227, + "nodeType": "ExpressionStatement", + "src": "3867:42:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 229, + "name": "FEE_SETTER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "3930:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 230, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3947:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3947:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 228, + "name": "_setupRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6266, + "src": "3919:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3919:39:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 233, + "nodeType": "ExpressionStatement", + "src": "3919:39:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 235, + "name": "RELAYER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "3982:12:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 236, + "name": "DEFAULT_ADMIN_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6092, + "src": "3996:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 234, + "name": "_setRoleAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6282, + "src": "3968:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3968:47:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 238, + "nodeType": "ExpressionStatement", + "src": "3968:47:0" + }, + { + "body": { + "id": 259, + "nodeType": "Block", + "src": "4072:98:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 250, + "name": "RELAYER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "4096:12:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 251, + "name": "initialRelayers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 209, + "src": "4110:15:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 253, + "indexExpression": { + "argumentTypes": null, + "id": 252, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 240, + "src": "4126:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4110:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 249, + "name": "grantRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "4086:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4086:43:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 255, + "nodeType": "ExpressionStatement", + "src": "4086:43:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "4143:16:0", + "subExpression": { + "argumentTypes": null, + "id": 256, + "name": "_totalRelayers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22, + "src": "4143:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 258, + "nodeType": "ExpressionStatement", + "src": "4143:16:0" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 242, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 240, + "src": "4039:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 243, + "name": "initialRelayers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 209, + "src": "4043:15:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4043:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4039:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 260, + "initializationExpression": { + "assignments": [ + 240 + ], + "declarations": [ + { + "constant": false, + "id": 240, + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 260, + "src": "4031:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 239, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4031:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 241, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "4031:6:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "4067:3:0", + "subExpression": { + "argumentTypes": null, + "id": 246, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 240, + "src": "4067:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 248, + "nodeType": "ExpressionStatement", + "src": "4067:3:0" + }, + "nodeType": "ForStatement", + "src": "4026:144:0" + } + ] + }, + "documentation": { + "id": 204, + "nodeType": "StructuredDocumentation", + "src": "3245:426:0", + "text": "@notice Initializes Bridge, creates and grants {msg.sender} the admin role,\ncreates and grants {initialRelayers} the relayer role.\n@param chainID ID of chain the Bridge contract exists on.\n@param initialRelayers Addresses that should be initially granted the relayer role.\n@param initialRelayerThreshold Number of votes needed for a deposit proposal to be considered passed." + }, + "id": 262, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 212, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 206, + "name": "chainID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 262, + "src": "3689:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 205, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3689:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 209, + "name": "initialRelayers", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 262, + "src": "3704:32:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 207, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3704:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 208, + "length": null, + "nodeType": "ArrayTypeName", + "src": "3704:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 211, + "name": "initialRelayerThreshold", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 262, + "src": "3738:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 210, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3738:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3688:79:0" + }, + "returnParameters": { + "id": 213, + "nodeType": "ParameterList", + "parameters": [], + "src": "3775:0:0" + }, + "scope": 906, + "src": "3676:500:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 275, + "nodeType": "Block", + "src": "4368:54:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 271, + "name": "RELAYER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "4393:12:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 272, + "name": "relayer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 265, + "src": "4407:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 270, + "name": "hasRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6129, + "src": "4385:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) view returns (bool)" + } + }, + "id": 273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4385:30:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 269, + "id": 274, + "nodeType": "Return", + "src": "4378:37:0" + } + ] + }, + "documentation": { + "id": 263, + "nodeType": "StructuredDocumentation", + "src": "4182:116:0", + "text": "@notice Returns true if {relayer} has the relayer role.\n@param relayer Address to check." + }, + "functionSelector": "541d5548", + "id": 276, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isRelayer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 266, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 265, + "name": "relayer", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 276, + "src": "4322:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 264, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4322:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4321:17:0" + }, + "returnParameters": { + "id": 269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 268, + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 276, + "src": "4362:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 267, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4362:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4361:6:0" + }, + "scope": 906, + "src": "4303:119:0", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 295, + "nodeType": "Block", + "src": "4733:110:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 285, + "name": "DEFAULT_ADMIN_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6092, + "src": "4753:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 286, + "name": "newAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 279, + "src": "4773:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 284, + "name": "grantRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "4743:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4743:39:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 288, + "nodeType": "ExpressionStatement", + "src": "4743:39:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 290, + "name": "DEFAULT_ADMIN_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6092, + "src": "4805:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 291, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4825:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4825:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 289, + "name": "renounceRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6252, + "src": "4792:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4792:44:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 294, + "nodeType": "ExpressionStatement", + "src": "4792:44:0" + } + ] + }, + "documentation": { + "id": 277, + "nodeType": "StructuredDocumentation", + "src": "4428:240:0", + "text": "@notice Removes admin role from {msg.sender} and grants it to {newAdmin}.\n@notice Only callable by an address that currently has the admin role.\n@param newAdmin Address that admin role will be granted to." + }, + "functionSelector": "5e1fab0f", + "id": 296, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 282, + "modifierName": { + "argumentTypes": null, + "id": 281, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "4723:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4723:9:0" + } + ], + "name": "renounceAdmin", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 280, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 279, + "name": "newAdmin", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 296, + "src": "4696:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 278, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4696:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4695:18:0" + }, + "returnParameters": { + "id": 283, + "nodeType": "ParameterList", + "parameters": [], + "src": "4733:0:0" + }, + "scope": 906, + "src": "4673:170:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 305, + "nodeType": "Block", + "src": "5081:25:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 302, + "name": "_pause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5973, + "src": "5091:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5091:8:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 304, + "nodeType": "ExpressionStatement", + "src": "5091:8:0" + } + ] + }, + "documentation": { + "id": 297, + "nodeType": "StructuredDocumentation", + "src": "4849:177:0", + "text": "@notice Pauses deposits, proposal creation and voting, and deposit executions.\n@notice Only callable by an address that currently has the admin role." + }, + "functionSelector": "80ae1c28", + "id": 306, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 300, + "modifierName": { + "argumentTypes": null, + "id": 299, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "5071:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5071:9:0" + } + ], + "name": "adminPauseTransfers", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 298, + "nodeType": "ParameterList", + "parameters": [], + "src": "5059:2:0" + }, + "returnParameters": { + "id": 301, + "nodeType": "ParameterList", + "parameters": [], + "src": "5081:0:0" + }, + "scope": 906, + "src": "5031:75:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 315, + "nodeType": "Block", + "src": "5348:27:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 312, + "name": "_unpause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5989, + "src": "5358:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5358:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 314, + "nodeType": "ExpressionStatement", + "src": "5358:10:0" + } + ] + }, + "documentation": { + "id": 307, + "nodeType": "StructuredDocumentation", + "src": "5112:179:0", + "text": "@notice Unpauses deposits, proposal creation and voting, and deposit executions.\n@notice Only callable by an address that currently has the admin role." + }, + "functionSelector": "ffaac0eb", + "id": 316, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 310, + "modifierName": { + "argumentTypes": null, + "id": 309, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "5338:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5338:9:0" + } + ], + "name": "adminUnpauseTransfers", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 308, + "nodeType": "ParameterList", + "parameters": [], + "src": "5326:2:0" + }, + "returnParameters": { + "id": 311, + "nodeType": "ParameterList", + "parameters": [], + "src": "5348:0:0" + }, + "scope": 906, + "src": "5296:79:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 332, + "nodeType": "Block", + "src": "5774:101:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 324, + "name": "_relayerThreshold", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "5784:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 325, + "name": "newThreshold", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 319, + "src": "5804:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5784:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 327, + "nodeType": "ExpressionStatement", + "src": "5784:32:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 329, + "name": "newThreshold", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 319, + "src": "5855:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 328, + "name": "RelayerThresholdChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 76, + "src": "5831:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5831:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 331, + "nodeType": "EmitStatement", + "src": "5826:42:0" + } + ] + }, + "documentation": { + "id": 317, + "nodeType": "StructuredDocumentation", + "src": "5381:313:0", + "text": "@notice Modifies the number of votes required for a proposal to be considered passed.\n@notice Only callable by an address that currently has the admin role.\n@param newThreshold Value {_relayerThreshold} will be changed to.\n@notice Emits {RelayerThresholdChanged} event." + }, + "functionSelector": "4e056005", + "id": 333, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 322, + "modifierName": { + "argumentTypes": null, + "id": 321, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "5764:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5764:9:0" + } + ], + "name": "adminChangeRelayerThreshold", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 320, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 319, + "name": "newThreshold", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 333, + "src": "5736:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 318, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5736:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5735:19:0" + }, + "returnParameters": { + "id": 323, + "nodeType": "ParameterList", + "parameters": [], + "src": "5774:0:0" + }, + "scope": 906, + "src": "5699:176:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 362, + "nodeType": "Block", + "src": "6244:216:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "6262:38:0", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 343, + "name": "RELAYER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "6271:12:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 344, + "name": "relayerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 336, + "src": "6285:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 342, + "name": "hasRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6129, + "src": "6263:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) view returns (bool)" + } + }, + "id": 345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6263:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6164647220616c7265616479206861732072656c6179657220726f6c6521", + "id": 347, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6302:32:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8513154392cb347d26f1716c23a55342a9b762f4522b7062343455b658c92c85", + "typeString": "literal_string \"addr already has relayer role!\"" + }, + "value": "addr already has relayer role!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8513154392cb347d26f1716c23a55342a9b762f4522b7062343455b658c92c85", + "typeString": "literal_string \"addr already has relayer role!\"" + } + ], + "id": 341, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6254:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6254:81:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 349, + "nodeType": "ExpressionStatement", + "src": "6254:81:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 351, + "name": "RELAYER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "6355:12:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 352, + "name": "relayerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 336, + "src": "6369:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 350, + "name": "grantRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "6345:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6345:39:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 354, + "nodeType": "ExpressionStatement", + "src": "6345:39:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 356, + "name": "relayerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 336, + "src": "6412:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 355, + "name": "RelayerAdded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 80, + "src": "6399:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6399:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 358, + "nodeType": "EmitStatement", + "src": "6394:33:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "6437:16:0", + "subExpression": { + "argumentTypes": null, + "id": 359, + "name": "_totalRelayers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22, + "src": "6437:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 361, + "nodeType": "ExpressionStatement", + "src": "6437:16:0" + } + ] + }, + "documentation": { + "id": 334, + "nodeType": "StructuredDocumentation", + "src": "5881:290:0", + "text": "@notice Grants {relayerAddress} the relayer role and increases {_totalRelayer} count.\n@notice Only callable by an address that currently has the admin role.\n@param relayerAddress Address of relayer to be added.\n@notice Emits {RelayerAdded} event." + }, + "functionSelector": "cdb0f73a", + "id": 363, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 339, + "modifierName": { + "argumentTypes": null, + "id": 338, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "6234:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6234:9:0" + } + ], + "name": "adminAddRelayer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 336, + "name": "relayerAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 363, + "src": "6201:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 335, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6201:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6200:24:0" + }, + "returnParameters": { + "id": 340, + "nodeType": "ParameterList", + "parameters": [], + "src": "6244:0:0" + }, + "scope": 906, + "src": "6176:284:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 391, + "nodeType": "Block", + "src": "6837:219:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 373, + "name": "RELAYER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "6863:12:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 374, + "name": "relayerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 366, + "src": "6877:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 372, + "name": "hasRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6129, + "src": "6855:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) view returns (bool)" + } + }, + "id": 375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6855:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6164647220646f65736e277420686176652072656c6179657220726f6c6521", + "id": 376, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6894:33:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1399520dec2ce6448b61ea4bb9d4980c6bfff25cd5836058c07edd3d56f94864", + "typeString": "literal_string \"addr doesn't have relayer role!\"" + }, + "value": "addr doesn't have relayer role!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_1399520dec2ce6448b61ea4bb9d4980c6bfff25cd5836058c07edd3d56f94864", + "typeString": "literal_string \"addr doesn't have relayer role!\"" + } + ], + "id": 371, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6847:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6847:81:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 378, + "nodeType": "ExpressionStatement", + "src": "6847:81:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 380, + "name": "RELAYER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "6949:12:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 381, + "name": "relayerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 366, + "src": "6963:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 379, + "name": "revokeRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6230, + "src": "6938:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6938:40:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 383, + "nodeType": "ExpressionStatement", + "src": "6938:40:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 385, + "name": "relayerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 366, + "src": "7008:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 384, + "name": "RelayerRemoved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 84, + "src": "6993:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6993:30:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 387, + "nodeType": "EmitStatement", + "src": "6988:35:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "--", + "prefix": false, + "src": "7033:16:0", + "subExpression": { + "argumentTypes": null, + "id": 388, + "name": "_totalRelayers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22, + "src": "7033:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 390, + "nodeType": "ExpressionStatement", + "src": "7033:16:0" + } + ] + }, + "documentation": { + "id": 364, + "nodeType": "StructuredDocumentation", + "src": "6466:295:0", + "text": "@notice Removes relayer role for {relayerAddress} and decreases {_totalRelayer} count.\n@notice Only callable by an address that currently has the admin role.\n@param relayerAddress Address of relayer to be removed.\n@notice Emits {RelayerRemoved} event." + }, + "functionSelector": "9d82dd63", + "id": 392, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 369, + "modifierName": { + "argumentTypes": null, + "id": 368, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "6827:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6827:9:0" + } + ], + "name": "adminRemoveRelayer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 367, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 366, + "name": "relayerAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 392, + "src": "6794:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 365, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6794:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6793:24:0" + }, + "returnParameters": { + "id": 370, + "nodeType": "ParameterList", + "parameters": [], + "src": "6837:0:0" + }, + "scope": 906, + "src": "6766:290:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 423, + "nodeType": "Block", + "src": "7708:187:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 404, + "name": "_resourceIDToHandlerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "7718:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + } + }, + "id": 406, + "indexExpression": { + "argumentTypes": null, + "id": 405, + "name": "resourceID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 397, + "src": "7746:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7718:39:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 407, + "name": "handlerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 395, + "src": "7760:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7718:56:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 409, + "nodeType": "ExpressionStatement", + "src": "7718:56:0" + }, + { + "assignments": [ + 411 + ], + "declarations": [ + { + "constant": false, + "id": 411, + "name": "handler", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 423, + "src": "7784:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERCHandler_$5873", + "typeString": "contract IERCHandler" + }, + "typeName": { + "contractScope": null, + "id": 410, + "name": "IERCHandler", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5873, + "src": "7784:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERCHandler_$5873", + "typeString": "contract IERCHandler" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 415, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 413, + "name": "handlerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 395, + "src": "7818:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 412, + "name": "IERCHandler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5873, + "src": "7806:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERCHandler_$5873_$", + "typeString": "type(contract IERCHandler)" + } + }, + "id": 414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7806:27:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERCHandler_$5873", + "typeString": "contract IERCHandler" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7784:49:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 419, + "name": "resourceID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 397, + "src": "7863:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 420, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 399, + "src": "7875:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 416, + "name": "handler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 411, + "src": "7843:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERCHandler_$5873", + "typeString": "contract IERCHandler" + } + }, + "id": 418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setResource", + "nodeType": "MemberAccess", + "referencedDeclaration": 5856, + "src": "7843:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address) external" + } + }, + "id": 421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7843:45:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 422, + "nodeType": "ExpressionStatement", + "src": "7843:45:0" + } + ] + }, + "documentation": { + "id": 393, + "nodeType": "StructuredDocumentation", + "src": "7062:530:0", + "text": "@notice Sets a new resource for handler contracts that use the IERCHandler interface,\nand maps the {handlerAddress} to {resourceID} in {_resourceIDToHandlerAddress}.\n@notice Only callable by an address that currently has the admin role.\n@param handlerAddress Address of handler resource will be set for.\n@param resourceID ResourceID to be used when making deposits.\n@param tokenAddress Address of contract to be called when a deposit is made and a deposited is executed." + }, + "functionSelector": "cb10f215", + "id": 424, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 402, + "modifierName": { + "argumentTypes": null, + "id": 401, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "7698:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7698:9:0" + } + ], + "name": "adminSetResource", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 400, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 395, + "name": "handlerAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 424, + "src": "7623:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 394, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7623:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 397, + "name": "resourceID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 424, + "src": "7647:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 396, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7647:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 399, + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 424, + "src": "7667:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 398, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7667:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7622:66:0" + }, + "returnParameters": { + "id": 403, + "nodeType": "ParameterList", + "parameters": [], + "src": "7708:0:0" + }, + "scope": 906, + "src": "7597:298:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 461, + "nodeType": "Block", + "src": "8664:238:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 440, + "name": "_resourceIDToHandlerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "8674:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + } + }, + "id": 442, + "indexExpression": { + "argumentTypes": null, + "id": 441, + "name": "resourceID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 429, + "src": "8702:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8674:39:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 443, + "name": "handlerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 427, + "src": "8716:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "8674:56:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 445, + "nodeType": "ExpressionStatement", + "src": "8674:56:0" + }, + { + "assignments": [ + 447 + ], + "declarations": [ + { + "constant": false, + "id": 447, + "name": "handler", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "8740:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IGenericHandler_$5889", + "typeString": "contract IGenericHandler" + }, + "typeName": { + "contractScope": null, + "id": 446, + "name": "IGenericHandler", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5889, + "src": "8740:15:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IGenericHandler_$5889", + "typeString": "contract IGenericHandler" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 451, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 449, + "name": "handlerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 427, + "src": "8782:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 448, + "name": "IGenericHandler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "8766:15:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IGenericHandler_$5889_$", + "typeString": "type(contract IGenericHandler)" + } + }, + "id": 450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8766:31:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IGenericHandler_$5889", + "typeString": "contract IGenericHandler" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8740:57:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 455, + "name": "resourceID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 429, + "src": "8827:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 456, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 431, + "src": "8839:15:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 457, + "name": "depositFunctionSig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 433, + "src": "8856:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "argumentTypes": null, + "id": 458, + "name": "executeFunctionSig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 435, + "src": "8876:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + ], + "expression": { + "argumentTypes": null, + "id": 452, + "name": "handler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 447, + "src": "8807:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IGenericHandler_$5889", + "typeString": "contract IGenericHandler" + } + }, + "id": 454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setResource", + "nodeType": "MemberAccess", + "referencedDeclaration": 5888, + "src": "8807:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$_t_bytes4_$_t_bytes4_$returns$__$", + "typeString": "function (bytes32,address,bytes4,bytes4) external" + } + }, + "id": 459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8807:88:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 460, + "nodeType": "ExpressionStatement", + "src": "8807:88:0" + } + ] + }, + "documentation": { + "id": 425, + "nodeType": "StructuredDocumentation", + "src": "7901:537:0", + "text": "@notice Sets a new resource for handler contracts that use the IGenericHandler interface,\nand maps the {handlerAddress} to {resourceID} in {_resourceIDToHandlerAddress}.\n@notice Only callable by an address that currently has the admin role.\n@param handlerAddress Address of handler resource will be set for.\n@param resourceID ResourceID to be used when making deposits.\n@param contractAddress Address of contract to be called when a deposit is made and a deposited is executed." + }, + "functionSelector": "e8437ee7", + "id": 462, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 438, + "modifierName": { + "argumentTypes": null, + "id": 437, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "8654:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8654:9:0" + } + ], + "name": "adminSetGenericResource", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 436, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 427, + "name": "handlerAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 462, + "src": "8485:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 426, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8485:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 429, + "name": "resourceID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 462, + "src": "8517:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 428, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8517:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 431, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 462, + "src": "8545:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 430, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8545:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 433, + "name": "depositFunctionSig", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 462, + "src": "8578:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 432, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "8578:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 435, + "name": "executeFunctionSig", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 462, + "src": "8613:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 434, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "8613:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8475:169:0" + }, + "returnParameters": { + "id": 439, + "nodeType": "ParameterList", + "parameters": [], + "src": "8664:0:0" + }, + "scope": 906, + "src": "8443:459:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 484, + "nodeType": "Block", + "src": "9384:109:0", + "statements": [ + { + "assignments": [ + 473 + ], + "declarations": [ + { + "constant": false, + "id": 473, + "name": "handler", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 484, + "src": "9394:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERCHandler_$5873", + "typeString": "contract IERCHandler" + }, + "typeName": { + "contractScope": null, + "id": 472, + "name": "IERCHandler", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5873, + "src": "9394:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERCHandler_$5873", + "typeString": "contract IERCHandler" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 477, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 475, + "name": "handlerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 465, + "src": "9428:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 474, + "name": "IERCHandler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5873, + "src": "9416:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERCHandler_$5873_$", + "typeString": "type(contract IERCHandler)" + } + }, + "id": 476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9416:27:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERCHandler_$5873", + "typeString": "contract IERCHandler" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9394:49:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 481, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 467, + "src": "9473:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 478, + "name": "handler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 473, + "src": "9453:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERCHandler_$5873", + "typeString": "contract IERCHandler" + } + }, + "id": 480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBurnable", + "nodeType": "MemberAccess", + "referencedDeclaration": 5862, + "src": "9453:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9453:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 483, + "nodeType": "ExpressionStatement", + "src": "9453:33:0" + } + ] + }, + "documentation": { + "id": 463, + "nodeType": "StructuredDocumentation", + "src": "8908:380:0", + "text": "@notice Sets a resource as burnable for handler contracts that use the IERCHandler interface.\n@notice Only callable by an address that currently has the admin role.\n@param handlerAddress Address of handler resource will be set for.\n@param tokenAddress Address of contract to be called when a deposit is made and a deposited is executed." + }, + "functionSelector": "8c0c2631", + "id": 485, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 470, + "modifierName": { + "argumentTypes": null, + "id": 469, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "9374:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9374:9:0" + } + ], + "name": "adminSetBurnable", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 468, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 465, + "name": "handlerAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 485, + "src": "9319:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 464, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9319:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 467, + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 485, + "src": "9343:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 466, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9343:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9318:46:0" + }, + "returnParameters": { + "id": 471, + "nodeType": "ParameterList", + "parameters": [], + "src": "9384:0:0" + }, + "scope": 906, + "src": "9293:200:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 518, + "nodeType": "Block", + "src": "10197:137:0", + "statements": [ + { + "assignments": [ + 498 + ], + "declarations": [ + { + "constant": false, + "id": 498, + "name": "nonceAndID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 518, + "src": "10207:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + }, + "typeName": { + "id": 497, + "name": "uint72", + "nodeType": "ElementaryTypeName", + "src": "10207:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 511, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + }, + "id": 510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + }, + "id": 504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 501, + "name": "depositNonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 490, + "src": "10235:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 500, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10228:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint72_$", + "typeString": "type(uint72)" + }, + "typeName": { + "id": 499, + "name": "uint72", + "nodeType": "ElementaryTypeName", + "src": "10228:6:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10228:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "38", + "id": 503, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10252:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "10228:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + } + ], + "id": 505, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "10227:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 508, + "name": "originChainID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 488, + "src": "10264:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 507, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10257:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint72_$", + "typeString": "type(uint72)" + }, + "typeName": { + "id": 506, + "name": "uint72", + "nodeType": "ElementaryTypeName", + "src": "10257:6:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 509, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10257:21:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "src": "10227:51:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10207:71:0" + }, + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 512, + "name": "_proposals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60, + "src": "10295:10:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint72_$_t_mapping$_t_bytes32_$_t_struct$_Proposal_$46_storage_$_$", + "typeString": "mapping(uint72 => mapping(bytes32 => struct Bridge.Proposal storage ref))" + } + }, + "id": 514, + "indexExpression": { + "argumentTypes": null, + "id": 513, + "name": "nonceAndID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 498, + "src": "10306:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10295:22:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Proposal_$46_storage_$", + "typeString": "mapping(bytes32 => struct Bridge.Proposal storage ref)" + } + }, + "id": 516, + "indexExpression": { + "argumentTypes": null, + "id": 515, + "name": "dataHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 492, + "src": "10318:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10295:32:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage", + "typeString": "struct Bridge.Proposal storage ref" + } + }, + "functionReturnParameters": 496, + "id": 517, + "nodeType": "Return", + "src": "10288:39:0" + } + ] + }, + "documentation": { + "id": 486, + "nodeType": "StructuredDocumentation", + "src": "9499:572:0", + "text": "@notice Returns a proposal.\n@param originChainID Chain ID deposit originated from.\n@param depositNonce ID of proposal generated by proposal's origin Bridge contract.\n@param dataHash Hash of data to be provided when deposit proposal is executed.\n@return Proposal which consists of:\n- _dataHash Hash of data to be provided when deposit proposal is executed.\n- _yesVotes Number of votes in favor of proposal.\n- _noVotes Number of votes against proposal.\n- _status Current status of proposal." + }, + "functionSelector": "a9cf69fa", + "id": 519, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getProposal", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 493, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 488, + "name": "originChainID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 519, + "src": "10097:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 487, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "10097:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 490, + "name": "depositNonce", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 519, + "src": "10118:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 489, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "10118:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 492, + "name": "dataHash", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 519, + "src": "10139:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 491, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "10139:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10096:60:0" + }, + "returnParameters": { + "id": 496, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 495, + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 519, + "src": "10180:15:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_memory_ptr", + "typeString": "struct Bridge.Proposal" + }, + "typeName": { + "contractScope": null, + "id": 494, + "name": "Proposal", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 46, + "src": "10180:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10179:17:0" + }, + "scope": 906, + "src": "10076:258:0", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 535, + "nodeType": "Block", + "src": "10590:51:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 529, + "name": "_fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 72, + "src": "10600:5:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint8_$_t_uint256_$", + "typeString": "mapping(uint8 => uint256)" + } + }, + "id": 531, + "indexExpression": { + "argumentTypes": null, + "id": 530, + "name": "destinationChainID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 522, + "src": "10606:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10600:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 532, + "name": "newFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "10628:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10600:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 534, + "nodeType": "ExpressionStatement", + "src": "10600:34:0" + } + ] + }, + "documentation": { + "id": 520, + "nodeType": "StructuredDocumentation", + "src": "10340:164:0", + "text": "@notice Changes deposit fee.\n@notice Only callable by admin.\n@param newFee Value {_fees[destinationChainID]} will be updated to." + }, + "functionSelector": "13a7e54e", + "id": 536, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 527, + "modifierName": { + "argumentTypes": null, + "id": 526, + "name": "onlyFeeSetter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 158, + "src": "10576:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10576:13:0" + } + ], + "name": "changeFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 525, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 522, + "name": "destinationChainID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 536, + "src": "10528:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 521, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "10528:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 524, + "name": "newFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 536, + "src": "10554:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 523, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10554:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10527:39:0" + }, + "returnParameters": { + "id": 528, + "nodeType": "ParameterList", + "parameters": [], + "src": "10590:0:0" + }, + "scope": 906, + "src": "10509:132:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 564, + "nodeType": "Block", + "src": "11179:134:0", + "statements": [ + { + "assignments": [ + 551 + ], + "declarations": [ + { + "constant": false, + "id": 551, + "name": "handler", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 564, + "src": "11189:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERCHandler_$5873", + "typeString": "contract IERCHandler" + }, + "typeName": { + "contractScope": null, + "id": 550, + "name": "IERCHandler", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5873, + "src": "11189:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERCHandler_$5873", + "typeString": "contract IERCHandler" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 555, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 553, + "name": "handlerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 539, + "src": "11223:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 552, + "name": "IERCHandler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5873, + "src": "11211:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERCHandler_$5873_$", + "typeString": "type(contract IERCHandler)" + } + }, + "id": 554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11211:27:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERCHandler_$5873", + "typeString": "contract IERCHandler" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11189:49:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 559, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "11265:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 560, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 543, + "src": "11279:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 561, + "name": "amountOrTokenID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 545, + "src": "11290:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 556, + "name": "handler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 551, + "src": "11248:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERCHandler_$5873", + "typeString": "contract IERCHandler" + } + }, + "id": 558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 5872, + "src": "11248:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256) external" + } + }, + "id": 562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11248:58:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 563, + "nodeType": "ExpressionStatement", + "src": "11248:58:0" + } + ] + }, + "documentation": { + "id": 537, + "nodeType": "StructuredDocumentation", + "src": "10647:357:0", + "text": "@notice Used to manually withdraw funds from ERC safes.\n@param handlerAddress Address of handler to withdraw from.\n@param tokenAddress Address of token to withdraw.\n@param recipient Address to withdraw tokens to.\n@param amountOrTokenID Either the amount of ERC20 tokens or the ERC721 token ID to withdraw." + }, + "functionSelector": "780cf004", + "id": 565, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 548, + "modifierName": { + "argumentTypes": null, + "id": 547, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "11169:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11169:9:0" + } + ], + "name": "adminWithdraw", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 546, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 539, + "name": "handlerAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 565, + "src": "11041:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 538, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11041:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 541, + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 565, + "src": "11073:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 540, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11073:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 543, + "name": "recipient", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 565, + "src": "11103:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 542, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11103:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 545, + "name": "amountOrTokenID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 565, + "src": "11130:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 544, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11130:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11031:128:0" + }, + "returnParameters": { + "id": 549, + "nodeType": "ParameterList", + "parameters": [], + "src": "11179:0:0" + }, + "scope": 906, + "src": "11009:304:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 635, + "nodeType": "Block", + "src": "12018:536:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 580, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "12036:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 581, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12036:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 582, + "name": "_fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 72, + "src": "12049:5:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint8_$_t_uint256_$", + "typeString": "mapping(uint8 => uint256)" + } + }, + "id": 584, + "indexExpression": { + "argumentTypes": null, + "id": 583, + "name": "destinationChainID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 568, + "src": "12055:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12049:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12036:38:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "496e636f72726563742066656520737570706c696564", + "id": 586, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12076:24:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2a2431514317abe5c8b163ccf132d16516b7e676afbb7d1bf5781dba4082d9d5", + "typeString": "literal_string \"Incorrect fee supplied\"" + }, + "value": "Incorrect fee supplied" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2a2431514317abe5c8b163ccf132d16516b7e676afbb7d1bf5781dba4082d9d5", + "typeString": "literal_string \"Incorrect fee supplied\"" + } + ], + "id": 579, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12028:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12028:73:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 588, + "nodeType": "ExpressionStatement", + "src": "12028:73:0" + }, + { + "assignments": [ + 590 + ], + "declarations": [ + { + "constant": false, + "id": 590, + "name": "handler", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 635, + "src": "12112:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 589, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12112:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 594, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 591, + "name": "_resourceIDToHandlerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "12130:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + } + }, + "id": 593, + "indexExpression": { + "argumentTypes": null, + "id": 592, + "name": "resourceID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 570, + "src": "12158:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12130:39:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12112:57:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 596, + "name": "handler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 590, + "src": "12187:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 599, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12206:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 598, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12198:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 597, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12198:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12198:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "12187:21:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "7265736f757263654944206e6f74206d617070656420746f2068616e646c6572", + "id": 602, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12210:34:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_542d0c0b50539d1853c947fb8449b05e8626e9928b1fbf8fb55da8a4976aae52", + "typeString": "literal_string \"resourceID not mapped to handler\"" + }, + "value": "resourceID not mapped to handler" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_542d0c0b50539d1853c947fb8449b05e8626e9928b1fbf8fb55da8a4976aae52", + "typeString": "literal_string \"resourceID not mapped to handler\"" + } + ], + "id": 595, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12179:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12179:66:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 604, + "nodeType": "ExpressionStatement", + "src": "12179:66:0" + }, + { + "assignments": [ + 606 + ], + "declarations": [ + { + "constant": false, + "id": 606, + "name": "depositNonce", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 635, + "src": "12256:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 605, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "12256:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 611, + "initialValue": { + "argumentTypes": null, + "id": 610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "12278:36:0", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 607, + "name": "_depositCounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50, + "src": "12280:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint8_$_t_uint64_$", + "typeString": "mapping(uint8 => uint64)" + } + }, + "id": 609, + "indexExpression": { + "argumentTypes": null, + "id": 608, + "name": "destinationChainID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 568, + "src": "12295:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12280:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12256:58:0" + }, + { + "assignments": [ + 613 + ], + "declarations": [ + { + "constant": false, + "id": 613, + "name": "depositHandler", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 635, + "src": "12325:30:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDepositExecute_$5845", + "typeString": "contract IDepositExecute" + }, + "typeName": { + "contractScope": null, + "id": 612, + "name": "IDepositExecute", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5845, + "src": "12325:15:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDepositExecute_$5845", + "typeString": "contract IDepositExecute" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 617, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 615, + "name": "handler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 590, + "src": "12374:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 614, + "name": "IDepositExecute", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5845, + "src": "12358:15:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IDepositExecute_$5845_$", + "typeString": "type(contract IDepositExecute)" + } + }, + "id": 616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12358:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDepositExecute_$5845", + "typeString": "contract IDepositExecute" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12325:57:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 621, + "name": "resourceID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 570, + "src": "12415:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 622, + "name": "destinationChainID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 568, + "src": "12427:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 623, + "name": "depositNonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 606, + "src": "12447:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 624, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "12461:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 625, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12461:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 626, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 572, + "src": "12473:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + ], + "expression": { + "argumentTypes": null, + "id": 618, + "name": "depositHandler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 613, + "src": "12392:14:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDepositExecute_$5845", + "typeString": "contract IDepositExecute" + } + }, + "id": 620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 5836, + "src": "12392:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint8_$_t_uint64_$_t_address_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (bytes32,uint8,uint64,address,bytes memory) external" + } + }, + "id": 627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12392:86:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 628, + "nodeType": "ExpressionStatement", + "src": "12392:86:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 630, + "name": "destinationChainID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 568, + "src": "12502:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 631, + "name": "resourceID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 570, + "src": "12522:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 632, + "name": "depositNonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 606, + "src": "12534:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 629, + "name": "Deposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 92, + "src": "12494:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint8_$_t_bytes32_$_t_uint64_$returns$__$", + "typeString": "function (uint8,bytes32,uint64)" + } + }, + "id": 633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12494:53:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 634, + "nodeType": "EmitStatement", + "src": "12489:58:0" + } + ] + }, + "documentation": { + "id": 566, + "nodeType": "StructuredDocumentation", + "src": "11319:554:0", + "text": "@notice Initiates a transfer using a specified handler contract.\n@notice Only callable when Bridge is not paused.\n@param destinationChainID ID of chain deposit will be bridged to.\n@param resourceID ResourceID used to find address of handler to be used for deposit.\n@param data Additional data to be passed to specified handler.\n@param _auxData Unused parameter, can be used for everything, for example, writing IDs of apps from which the deposit was made.\n@notice Emits {Deposit} event." + }, + "functionSelector": "73c45c98", + "id": 636, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 577, + "modifierName": { + "argumentTypes": null, + "id": 576, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5930, + "src": "12004:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "12004:13:0" + } + ], + "name": "deposit", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 575, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 568, + "name": "destinationChainID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 636, + "src": "11895:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 567, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "11895:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 570, + "name": "resourceID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 636, + "src": "11921:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 569, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "11921:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 572, + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 636, + "src": "11941:19:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 571, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "11941:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 574, + "name": "_auxData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 636, + "src": "11962:23:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 573, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "11962:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11894:92:0" + }, + "returnParameters": { + "id": 578, + "nodeType": "ParameterList", + "parameters": [], + "src": "12018:0:0" + }, + "scope": 906, + "src": "11878:676:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 869, + "nodeType": "Block", + "src": "13341:2010:0", + "statements": [ + { + "assignments": [ + 653 + ], + "declarations": [ + { + "constant": false, + "id": 653, + "name": "handler", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 869, + "src": "13351:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 652, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13351:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 657, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 654, + "name": "_resourceIDToHandlerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "13369:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + } + }, + "id": 656, + "indexExpression": { + "argumentTypes": null, + "id": 655, + "name": "resourceID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 643, + "src": "13397:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13369:39:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13351:57:0" + }, + { + "assignments": [ + 659 + ], + "declarations": [ + { + "constant": false, + "id": 659, + "name": "dataHash", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 869, + "src": "13418:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 658, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13418:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 667, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 663, + "name": "handler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 653, + "src": "13464:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 664, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 645, + "src": "13473:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + ], + "expression": { + "argumentTypes": null, + "id": 661, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "13447:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 662, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "13447:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13447:31:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 660, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "13437:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13437:42:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13418:61:0" + }, + { + "assignments": [ + 669 + ], + "declarations": [ + { + "constant": false, + "id": 669, + "name": "nonceAndID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 869, + "src": "13490:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + }, + "typeName": { + "id": 668, + "name": "uint72", + "nodeType": "ElementaryTypeName", + "src": "13490:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 682, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + }, + "id": 681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + }, + "id": 675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 672, + "name": "depositNonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 641, + "src": "13518:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 671, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13511:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint72_$", + "typeString": "type(uint72)" + }, + "typeName": { + "id": 670, + "name": "uint72", + "nodeType": "ElementaryTypeName", + "src": "13511:6:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13511:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "38", + "id": 674, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13535:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "13511:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + } + ], + "id": 676, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13510:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 679, + "name": "chainID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 639, + "src": "13547:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 678, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13540:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint72_$", + "typeString": "type(uint72)" + }, + "typeName": { + "id": 677, + "name": "uint72", + "nodeType": "ElementaryTypeName", + "src": "13540:6:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 680, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13540:15:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "src": "13510:45:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13490:65:0" + }, + { + "assignments": [ + 684 + ], + "declarations": [ + { + "constant": false, + "id": 684, + "name": "proposal", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 869, + "src": "13565:25:0", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal" + }, + "typeName": { + "contractScope": null, + "id": 683, + "name": "Proposal", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 46, + "src": "13565:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 690, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 685, + "name": "_proposals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60, + "src": "13593:10:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint72_$_t_mapping$_t_bytes32_$_t_struct$_Proposal_$46_storage_$_$", + "typeString": "mapping(uint72 => mapping(bytes32 => struct Bridge.Proposal storage ref))" + } + }, + "id": 687, + "indexExpression": { + "argumentTypes": null, + "id": 686, + "name": "nonceAndID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 669, + "src": "13604:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13593:22:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Proposal_$46_storage_$", + "typeString": "mapping(bytes32 => struct Bridge.Proposal storage ref)" + } + }, + "id": 689, + "indexExpression": { + "argumentTypes": null, + "id": 688, + "name": "dataHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "13616:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13593:32:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage", + "typeString": "struct Bridge.Proposal storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13565:60:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 692, + "name": "_resourceIDToHandlerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "13644:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + } + }, + "id": 694, + "indexExpression": { + "argumentTypes": null, + "id": 693, + "name": "resourceID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 643, + "src": "13672:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13644:39:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 697, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13695:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 696, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13687:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 695, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13687:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 698, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13687:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "13644:53:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f2068616e646c657220666f72207265736f757263654944", + "id": 700, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13699:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e9d3c8def96ec5b61b3d5e8e38d358587f69ed955aa1f36ba2f95c28a40ffe20", + "typeString": "literal_string \"no handler for resourceID\"" + }, + "value": "no handler for resourceID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e9d3c8def96ec5b61b3d5e8e38d358587f69ed955aa1f36ba2f95c28a40ffe20", + "typeString": "literal_string \"no handler for resourceID\"" + } + ], + "id": 691, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "13636:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13636:91:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 702, + "nodeType": "ExpressionStatement", + "src": "13636:91:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 706, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "13750:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 707, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_status", + "nodeType": "MemberAccess", + "referencedDeclaration": 43, + "src": "13750:16:0", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + ], + "id": 705, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13745:4:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 704, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13745:4:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13745:22:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 709, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13771:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "13745:27:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "70726f706f73616c20616c7265616479206578656375746564", + "id": 711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13774:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_fcb55c22e4cb4c20ef1baada257b62e82b2a7e0accec2b76ffeb478011fafce5", + "typeString": "literal_string \"proposal already executed\"" + }, + "value": "proposal already executed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_fcb55c22e4cb4c20ef1baada257b62e82b2a7e0accec2b76ffeb478011fafce5", + "typeString": "literal_string \"proposal already executed\"" + } + ], + "id": 703, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "13737:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13737:65:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 713, + "nodeType": "ExpressionStatement", + "src": "13737:65:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "13820:54:0", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 715, + "name": "_hasVotedOnProposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "13821:19:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint72_$_t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_bool_$_$_$", + "typeString": "mapping(uint72 => mapping(bytes32 => mapping(address => bool)))" + } + }, + "id": 717, + "indexExpression": { + "argumentTypes": null, + "id": 716, + "name": "nonceAndID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 669, + "src": "13841:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13821:31:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(bytes32 => mapping(address => bool))" + } + }, + "id": 719, + "indexExpression": { + "argumentTypes": null, + "id": 718, + "name": "dataHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "13853:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13821:41:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 722, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 720, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "13863:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "13863:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13821:53:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "72656c6179657220616c726561647920766f746564", + "id": 724, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13876:23:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0bc9c5100729666c219a147072032fe3fda273fedfa160b31a35f38bd9d0632b", + "typeString": "literal_string \"relayer already voted\"" + }, + "value": "relayer already voted" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0bc9c5100729666c219a147072032fe3fda273fedfa160b31a35f38bd9d0632b", + "typeString": "literal_string \"relayer already voted\"" + } + ], + "id": 714, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "13812:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13812:88:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 726, + "nodeType": "ExpressionStatement", + "src": "13812:88:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 729, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "13920:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 730, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_status", + "nodeType": "MemberAccess", + "referencedDeclaration": 43, + "src": "13920:16:0", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + ], + "id": 728, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13915:4:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 727, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13915:4:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13915:22:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 732, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13941:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "13915:27:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 798, + "nodeType": "Block", + "src": "14485:134:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 782, + "name": "dataHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "14507:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 783, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "14519:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 784, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_dataHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 35, + "src": "14519:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "14507:30:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6461746168617368206d69736d61746368", + "id": 786, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14539:19:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e3209b3b3221a11cdef33af435affcc74bff38eb4aaafc629c451edb5bb6cf58", + "typeString": "literal_string \"datahash mismatch\"" + }, + "value": "datahash mismatch" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e3209b3b3221a11cdef33af435affcc74bff38eb4aaafc629c451edb5bb6cf58", + "typeString": "literal_string \"datahash mismatch\"" + } + ], + "id": 781, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14499:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14499:60:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 788, + "nodeType": "ExpressionStatement", + "src": "14499:60:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 794, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "14597:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14597:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 789, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "14573:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 792, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_yesVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 38, + "src": "14573:18:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14573:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14573:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 797, + "nodeType": "ExpressionStatement", + "src": "14573:35:0" + } + ] + }, + "id": 799, + "nodeType": "IfStatement", + "src": "13911:708:0", + "trueBody": { + "id": 780, + "nodeType": "Block", + "src": "13944:535:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "13958:17:0", + "subExpression": { + "argumentTypes": null, + "id": 734, + "name": "_totalProposals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "13960:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 736, + "nodeType": "ExpressionStatement", + "src": "13958:17:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 737, + "name": "_proposals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60, + "src": "13989:10:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint72_$_t_mapping$_t_bytes32_$_t_struct$_Proposal_$46_storage_$_$", + "typeString": "mapping(uint72 => mapping(bytes32 => struct Bridge.Proposal storage ref))" + } + }, + "id": 740, + "indexExpression": { + "argumentTypes": null, + "id": 738, + "name": "nonceAndID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 669, + "src": "14000:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13989:22:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Proposal_$46_storage_$", + "typeString": "mapping(bytes32 => struct Bridge.Proposal storage ref)" + } + }, + "id": 741, + "indexExpression": { + "argumentTypes": null, + "id": 739, + "name": "dataHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "14012:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13989:32:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage", + "typeString": "struct Bridge.Proposal storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 743, + "name": "resourceID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 643, + "src": "14065:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 744, + "name": "dataHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "14105:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 748, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14157:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "id": 747, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "14143:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_$", + "typeString": "function (uint256) pure returns (address[] memory)" + }, + "typeName": { + "baseType": { + "id": 745, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14147:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 746, + "length": null, + "nodeType": "ArrayTypeName", + "src": "14147:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 749, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14143:16:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 753, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14202:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 752, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "14188:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_$", + "typeString": "function (uint256) pure returns (address[] memory)" + }, + "typeName": { + "baseType": { + "id": 750, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14192:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 751, + "length": null, + "nodeType": "ArrayTypeName", + "src": "14192:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 754, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14188:16:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 755, + "name": "ProposalStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 31, + "src": "14232:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ProposalStatus_$31_$", + "typeString": "type(enum Bridge.ProposalStatus)" + } + }, + "id": 756, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Active", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14232:21:0", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 757, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "14288:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14288:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 742, + "name": "Proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46, + "src": "14024:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Proposal_$46_storage_ptr_$", + "typeString": "type(struct Bridge.Proposal storage pointer)" + } + }, + "id": 759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "_resourceID", + "_dataHash", + "_yesVotes", + "_noVotes", + "_status", + "_proposedBlock" + ], + "nodeType": "FunctionCall", + "src": "14024:295:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_memory", + "typeString": "struct Bridge.Proposal memory" + } + }, + "src": "13989:330:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage", + "typeString": "struct Bridge.Proposal storage ref" + } + }, + "id": 761, + "nodeType": "ExpressionStatement", + "src": "13989:330:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 762, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "14334:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 765, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_yesVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 38, + "src": "14334:18:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 766, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 764, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14353:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14334:21:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 767, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "14358:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14358:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "14334:34:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 770, + "nodeType": "ExpressionStatement", + "src": "14334:34:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 772, + "name": "chainID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 639, + "src": "14401:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 773, + "name": "depositNonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 641, + "src": "14410:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 774, + "name": "ProposalStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 31, + "src": "14424:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ProposalStatus_$31_$", + "typeString": "type(enum Bridge.ProposalStatus)" + } + }, + "id": 775, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Active", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14424:21:0", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + }, + { + "argumentTypes": null, + "id": 776, + "name": "resourceID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 643, + "src": "14447:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 777, + "name": "dataHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "14459:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 771, + "name": "ProposalEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 104, + "src": "14387:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint8_$_t_uint64_$_t_enum$_ProposalStatus_$31_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (uint8,uint64,enum Bridge.ProposalStatus,bytes32,bytes32)" + } + }, + "id": 778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14387:81:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 779, + "nodeType": "EmitStatement", + "src": "14382:86:0" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 800, + "name": "_hasVotedOnProposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "14637:19:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint72_$_t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_bool_$_$_$", + "typeString": "mapping(uint72 => mapping(bytes32 => mapping(address => bool)))" + } + }, + "id": 805, + "indexExpression": { + "argumentTypes": null, + "id": 801, + "name": "nonceAndID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 669, + "src": "14657:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14637:31:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(bytes32 => mapping(address => bool))" + } + }, + "id": 806, + "indexExpression": { + "argumentTypes": null, + "id": 802, + "name": "dataHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "14669:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14637:41:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 807, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 803, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "14679:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14679:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14637:53:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14693:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "14637:60:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 810, + "nodeType": "ExpressionStatement", + "src": "14637:60:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 812, + "name": "chainID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 639, + "src": "14725:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 813, + "name": "depositNonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 641, + "src": "14734:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 814, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "14748:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 815, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_status", + "nodeType": "MemberAccess", + "referencedDeclaration": 43, + "src": "14748:16:0", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + }, + { + "argumentTypes": null, + "id": 816, + "name": "resourceID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 643, + "src": "14766:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 811, + "name": "ProposalVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 114, + "src": "14712:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint8_$_t_uint64_$_t_enum$_ProposalStatus_$31_$_t_bytes32_$returns$__$", + "typeString": "function (uint8,uint64,enum Bridge.ProposalStatus,bytes32)" + } + }, + "id": 817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14712:65:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 818, + "nodeType": "EmitStatement", + "src": "14707:70:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 819, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "14842:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 820, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_yesVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 38, + "src": "14842:18:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 821, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14842:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 822, + "name": "_relayerThreshold", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "14871:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14842:46:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 868, + "nodeType": "IfStatement", + "src": "14838:507:0", + "trueBody": { + "id": 867, + "nodeType": "Block", + "src": "14890:455:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 825, + "name": "dataHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "14912:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 826, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "14924:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 827, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_dataHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 35, + "src": "14924:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "14912:30:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6461746120646f65736e2774206d61746368206461746168617368", + "id": 829, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14944:29:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_37d86f109f909109dc6877be2d485881af52bdb007799914a63fc66c911a84aa", + "typeString": "literal_string \"data doesn't match datahash\"" + }, + "value": "data doesn't match datahash" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_37d86f109f909109dc6877be2d485881af52bdb007799914a63fc66c911a84aa", + "typeString": "literal_string \"data doesn't match datahash\"" + } + ], + "id": 824, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14904:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14904:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 831, + "nodeType": "ExpressionStatement", + "src": "14904:70:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 832, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "14989:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 834, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "_status", + "nodeType": "MemberAccess", + "referencedDeclaration": 43, + "src": "14989:16:0", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 835, + "name": "ProposalStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 31, + "src": "15008:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ProposalStatus_$31_$", + "typeString": "type(enum Bridge.ProposalStatus)" + } + }, + "id": 836, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Executed", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15008:23:0", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + }, + "src": "14989:42:0", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + }, + "id": 838, + "nodeType": "ExpressionStatement", + "src": "14989:42:0" + }, + { + "assignments": [ + 840 + ], + "declarations": [ + { + "constant": false, + "id": 840, + "name": "depositHandler", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 867, + "src": "15046:30:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDepositExecute_$5845", + "typeString": "contract IDepositExecute" + }, + "typeName": { + "contractScope": null, + "id": 839, + "name": "IDepositExecute", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5845, + "src": "15046:15:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDepositExecute_$5845", + "typeString": "contract IDepositExecute" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 847, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 842, + "name": "_resourceIDToHandlerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "15095:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + } + }, + "id": 845, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 843, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "15123:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 844, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_resourceID", + "nodeType": "MemberAccess", + "referencedDeclaration": 33, + "src": "15123:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15095:49:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 841, + "name": "IDepositExecute", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5845, + "src": "15079:15:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IDepositExecute_$5845_$", + "typeString": "type(contract IDepositExecute)" + } + }, + "id": 846, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15079:66:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDepositExecute_$5845", + "typeString": "contract IDepositExecute" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15046:99:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 851, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "15191:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 852, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_resourceID", + "nodeType": "MemberAccess", + "referencedDeclaration": 33, + "src": "15191:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 853, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 645, + "src": "15213:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + ], + "expression": { + "argumentTypes": null, + "id": 848, + "name": "depositHandler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 840, + "src": "15160:14:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDepositExecute_$5845", + "typeString": "contract IDepositExecute" + } + }, + "id": 850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "executeProposal", + "nodeType": "MemberAccess", + "referencedDeclaration": 5844, + "src": "15160:30:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (bytes32,bytes memory) external" + } + }, + "id": 854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15160:58:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 855, + "nodeType": "ExpressionStatement", + "src": "15160:58:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 857, + "name": "chainID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 639, + "src": "15252:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 858, + "name": "depositNonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 641, + "src": "15261:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 859, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "15275:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 860, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_status", + "nodeType": "MemberAccess", + "referencedDeclaration": 43, + "src": "15275:16:0", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 861, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "15293:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 862, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_resourceID", + "nodeType": "MemberAccess", + "referencedDeclaration": 33, + "src": "15293:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 863, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "15315:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 864, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_dataHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 35, + "src": "15315:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 856, + "name": "ProposalEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 104, + "src": "15238:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint8_$_t_uint64_$_t_enum$_ProposalStatus_$31_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (uint8,uint64,enum Bridge.ProposalStatus,bytes32,bytes32)" + } + }, + "id": 865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15238:96:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 866, + "nodeType": "EmitStatement", + "src": "15233:101:0" + } + ] + } + } + ] + }, + "documentation": { + "id": 637, + "nodeType": "StructuredDocumentation", + "src": "12560:641:0", + "text": "@notice When called, {msg.sender} will be marked as voting in favor of proposal.\n@notice Only callable by relayers when Bridge is not paused.\n@param chainID ID of chain deposit originated from.\n@param depositNonce ID of deposited generated by origin Bridge contract.\n@param data data provided when deposit was made.\n@notice Proposal must not have already been passed or executed.\n@notice {msg.sender} must not have already voted on proposal.\n@notice Emits {ProposalEvent} event with status indicating the proposal status.\n@notice Emits {ProposalVote} event." + }, + "functionSelector": "c0331b3e", + "id": 870, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 648, + "modifierName": { + "argumentTypes": null, + "id": 647, + "name": "onlyRelayers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 145, + "src": "13314:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13314:12:0" + }, + { + "arguments": null, + "id": 650, + "modifierName": { + "argumentTypes": null, + "id": 649, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5930, + "src": "13327:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13327:13:0" + } + ], + "name": "voteProposal", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 646, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 639, + "name": "chainID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 870, + "src": "13228:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 638, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "13228:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 641, + "name": "depositNonce", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 870, + "src": "13243:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 640, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "13243:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 643, + "name": "resourceID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 870, + "src": "13264:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 642, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13264:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 645, + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 870, + "src": "13284:19:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 644, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "13284:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13227:77:0" + }, + "returnParameters": { + "id": 651, + "nodeType": "ParameterList", + "parameters": [], + "src": "13341:0:0" + }, + "scope": 906, + "src": "13206:2145:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 904, + "nodeType": "Block", + "src": "15842:110:0", + "statements": [ + { + "body": { + "id": 902, + "nodeType": "Block", + "src": "15892:54:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 897, + "name": "amounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 877, + "src": "15924:7:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 899, + "indexExpression": { + "argumentTypes": null, + "id": 898, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 883, + "src": "15932:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15924:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 893, + "name": "addrs", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 874, + "src": "15906:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_payable_$dyn_calldata_ptr", + "typeString": "address payable[] calldata" + } + }, + "id": 895, + "indexExpression": { + "argumentTypes": null, + "id": 894, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 883, + "src": "15912:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15906:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15906:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15906:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 901, + "nodeType": "ExpressionStatement", + "src": "15906:29:0" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 886, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 883, + "src": "15869:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 887, + "name": "addrs", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 874, + "src": "15873:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_payable_$dyn_calldata_ptr", + "typeString": "address payable[] calldata" + } + }, + "id": 888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15873:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15869:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 903, + "initializationExpression": { + "assignments": [ + 883 + ], + "declarations": [ + { + "constant": false, + "id": 883, + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 903, + "src": "15857:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 882, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "15857:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 885, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 884, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15866:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "15857:10:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "15887:3:0", + "subExpression": { + "argumentTypes": null, + "id": 890, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 883, + "src": "15887:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 892, + "nodeType": "ExpressionStatement", + "src": "15887:3:0" + }, + "nodeType": "ForStatement", + "src": "15852:94:0" + } + ] + }, + "documentation": { + "id": 871, + "nodeType": "StructuredDocumentation", + "src": "15357:379:0", + "text": "@notice Transfers eth in the contract to the specified addresses. The parameters addrs and amounts are mapped 1-1.\nThis means that the address at index 0 for addrs will receive the amount (in WEI) from amounts at index 0.\n@param addrs Array of addresses to transfer {amounts} to.\n@param amounts Array of amonuts to transfer to {addrs}." + }, + "functionSelector": "4603ae38", + "id": 905, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 880, + "modifierName": { + "argumentTypes": null, + "id": 879, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "15832:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "15832:9:0" + } + ], + "name": "transferFunds", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 878, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 874, + "name": "addrs", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 905, + "src": "15764:32:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_payable_$dyn_calldata_ptr", + "typeString": "address payable[]" + }, + "typeName": { + "baseType": { + "id": 872, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15764:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 873, + "length": null, + "nodeType": "ArrayTypeName", + "src": "15764:17:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_payable_$dyn_storage_ptr", + "typeString": "address payable[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 877, + "name": "amounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 905, + "src": "15798:23:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 875, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "15798:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 876, + "length": null, + "nodeType": "ArrayTypeName", + "src": "15798:6:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15763:59:0" + }, + "returnParameters": { + "id": 881, + "nodeType": "ParameterList", + "parameters": [], + "src": "15842:0:0" + }, + "scope": 906, + "src": "15741:211:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 907, + "src": "479:15476:0" + } + ], + "src": "0:15956:0" + }, + "legacyAST": { + "absolutePath": "/Users/oleg/Desktop/crosschain/chainbridge-solidity/contracts/Bridge.sol", + "exportedSymbols": { + "Bridge": [ + 906 + ] + }, + "id": 907, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "0.6", + ".4" + ], + "nodeType": "PragmaDirective", + "src": "0:22:0" + }, + { + "id": 2, + "literals": [ + "experimental", + "ABIEncoderV2" + ], + "nodeType": "PragmaDirective", + "src": "23:33:0" + }, + { + "absolutePath": "@openzeppelin/contracts/access/AccessControl.sol", + "file": "@openzeppelin/contracts/access/AccessControl.sol", + "id": 3, + "nodeType": "ImportDirective", + "scope": 907, + "sourceUnit": 6332, + "src": "58:58:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/oleg/Desktop/crosschain/chainbridge-solidity/contracts/utils/Pausable.sol", + "file": "./utils/Pausable.sol", + "id": 4, + "nodeType": "ImportDirective", + "scope": 907, + "sourceUnit": 5991, + "src": "117:30:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/oleg/Desktop/crosschain/chainbridge-solidity/contracts/utils/SafeMath.sol", + "file": "./utils/SafeMath.sol", + "id": 5, + "nodeType": "ImportDirective", + "scope": 907, + "sourceUnit": 6040, + "src": "148:30:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/oleg/Desktop/crosschain/chainbridge-solidity/contracts/interfaces/IDepositExecute.sol", + "file": "./interfaces/IDepositExecute.sol", + "id": 6, + "nodeType": "ImportDirective", + "scope": 907, + "sourceUnit": 5846, + "src": "179:42:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/oleg/Desktop/crosschain/chainbridge-solidity/contracts/interfaces/IBridge.sol", + "file": "./interfaces/IBridge.sol", + "id": 7, + "nodeType": "ImportDirective", + "scope": 907, + "sourceUnit": 5820, + "src": "222:34:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/oleg/Desktop/crosschain/chainbridge-solidity/contracts/interfaces/IERCHandler.sol", + "file": "./interfaces/IERCHandler.sol", + "id": 8, + "nodeType": "ImportDirective", + "scope": 907, + "sourceUnit": 5874, + "src": "257:38:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/Users/oleg/Desktop/crosschain/chainbridge-solidity/contracts/interfaces/IGenericHandler.sol", + "file": "./interfaces/IGenericHandler.sol", + "id": 9, + "nodeType": "ImportDirective", + "scope": 907, + "sourceUnit": 5890, + "src": "296:42:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 11, + "name": "Pausable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5990, + "src": "498:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pausable_$5990", + "typeString": "contract Pausable" + } + }, + "id": 12, + "nodeType": "InheritanceSpecifier", + "src": "498:8:0" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 13, + "name": "AccessControl", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6331, + "src": "508:13:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AccessControl_$6331", + "typeString": "contract AccessControl" + } + }, + "id": 14, + "nodeType": "InheritanceSpecifier", + "src": "508:13:0" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 15, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6039, + "src": "523:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$6039", + "typeString": "contract SafeMath" + } + }, + "id": 16, + "nodeType": "InheritanceSpecifier", + "src": "523:8:0" + } + ], + "contractDependencies": [ + 5990, + 6039, + 6066, + 6331 + ], + "contractKind": "contract", + "documentation": { + "id": 10, + "nodeType": "StructuredDocumentation", + "src": "340:138:0", + "text": "@title Facilitates deposits, creation and votiing of deposit proposals, and deposit executions.\n@author ChainSafe Systems." + }, + "fullyImplemented": true, + "id": 906, + "linearizedBaseContracts": [ + 906, + 6039, + 6331, + 6066, + 5990 + ], + "name": "Bridge", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "beab7131", + "id": 18, + "name": "_chainID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 906, + "src": "539:23:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 17, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "539:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "d7a9cd79", + "id": 20, + "name": "_relayerThreshold", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 906, + "src": "568:32:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "568:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "802aabe8", + "id": 22, + "name": "_totalRelayers", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 906, + "src": "606:29:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "606:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "9d5773e0", + "id": 24, + "name": "_totalProposals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 906, + "src": "641:30:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 23, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "641:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "Bridge.Vote", + "id": 27, + "members": [ + { + "id": 25, + "name": "No", + "nodeType": "EnumValue", + "src": "689:2:0" + }, + { + "id": 26, + "name": "Yes", + "nodeType": "EnumValue", + "src": "693:3:0" + } + ], + "name": "Vote", + "nodeType": "EnumDefinition", + "src": "678:19:0" + }, + { + "canonicalName": "Bridge.ProposalStatus", + "id": 31, + "members": [ + { + "id": 28, + "name": "Inactive", + "nodeType": "EnumValue", + "src": "724:8:0" + }, + { + "id": 29, + "name": "Active", + "nodeType": "EnumValue", + "src": "734:6:0" + }, + { + "id": 30, + "name": "Executed", + "nodeType": "EnumValue", + "src": "742:8:0" + } + ], + "name": "ProposalStatus", + "nodeType": "EnumDefinition", + "src": "703:48:0" + }, + { + "canonicalName": "Bridge.Proposal", + "id": 46, + "members": [ + { + "constant": false, + "id": 33, + "name": "_resourceID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 46, + "src": "783:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 32, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "783:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 35, + "name": "_dataHash", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 46, + "src": "812:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 34, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "812:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 38, + "name": "_yesVotes", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 46, + "src": "839:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 36, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "839:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 37, + "length": null, + "nodeType": "ArrayTypeName", + "src": "839:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 41, + "name": "_noVotes", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 46, + "src": "868:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 39, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "868:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 40, + "length": null, + "nodeType": "ArrayTypeName", + "src": "868:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 43, + "name": "_status", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 46, + "src": "896:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + }, + "typeName": { + "contractScope": null, + "id": 42, + "name": "ProposalStatus", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 31, + "src": "896:14:0", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 45, + "name": "_proposedBlock", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 46, + "src": "928:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 44, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "928:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Proposal", + "nodeType": "StructDefinition", + "scope": 906, + "src": "757:200:0", + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "4b0b919d", + "id": 50, + "name": "_depositCounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 906, + "src": "1011:46:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint8_$_t_uint64_$", + "typeString": "mapping(uint8 => uint64)" + }, + "typeName": { + "id": 49, + "keyType": { + "id": 47, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1019:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Mapping", + "src": "1011:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint8_$_t_uint64_$", + "typeString": "mapping(uint8 => uint64)" + }, + "valueType": { + "id": 48, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1028:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "84db809f", + "id": 54, + "name": "_resourceIDToHandlerAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 906, + "src": "1100:62:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + }, + "typeName": { + "id": 53, + "keyType": { + "id": 51, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1108:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "1100:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + }, + "valueType": { + "id": 52, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1119:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "50598719", + "id": 60, + "name": "_proposals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 906, + "src": "1233:65:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint72_$_t_mapping$_t_bytes32_$_t_struct$_Proposal_$46_storage_$_$", + "typeString": "mapping(uint72 => mapping(bytes32 => struct Bridge.Proposal))" + }, + "typeName": { + "id": 59, + "keyType": { + "id": 55, + "name": "uint72", + "nodeType": "ElementaryTypeName", + "src": "1241:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "nodeType": "Mapping", + "src": "1233:47:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint72_$_t_mapping$_t_bytes32_$_t_struct$_Proposal_$46_storage_$_$", + "typeString": "mapping(uint72 => mapping(bytes32 => struct Bridge.Proposal))" + }, + "valueType": { + "id": 58, + "keyType": { + "id": 56, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1259:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "1251:28:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Proposal_$46_storage_$", + "typeString": "mapping(bytes32 => struct Bridge.Proposal)" + }, + "valueType": { + "contractScope": null, + "id": 57, + "name": "Proposal", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 46, + "src": "1270:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal" + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "7febe63f", + "id": 68, + "name": "_hasVotedOnProposal", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 906, + "src": "1383:90:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint72_$_t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_bool_$_$_$", + "typeString": "mapping(uint72 => mapping(bytes32 => mapping(address => bool)))" + }, + "typeName": { + "id": 67, + "keyType": { + "id": 61, + "name": "uint72", + "nodeType": "ElementaryTypeName", + "src": "1391:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "nodeType": "Mapping", + "src": "1383:63:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint72_$_t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_bool_$_$_$", + "typeString": "mapping(uint72 => mapping(bytes32 => mapping(address => bool)))" + }, + "valueType": { + "id": 66, + "keyType": { + "id": 62, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1409:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "1401:44:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(bytes32 => mapping(address => bool))" + }, + "valueType": { + "id": 65, + "keyType": { + "id": 63, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1428:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1420:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 64, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1439:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "a49e88d9", + "id": 72, + "name": "_fees", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 906, + "src": "1520:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint8_$_t_uint256_$", + "typeString": "mapping(uint8 => uint256)" + }, + "typeName": { + "id": 71, + "keyType": { + "id": 69, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1528:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Mapping", + "src": "1520:25:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint8_$_t_uint256_$", + "typeString": "mapping(uint8 => uint256)" + }, + "valueType": { + "id": 70, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1537:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 76, + "name": "RelayerThresholdChanged", + "nodeType": "EventDefinition", + "parameters": { + "id": 75, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 74, + "indexed": true, + "name": "newThreshold", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 76, + "src": "1595:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 73, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1595:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1594:27:0" + }, + "src": "1565:57:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 80, + "name": "RelayerAdded", + "nodeType": "EventDefinition", + "parameters": { + "id": 79, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 78, + "indexed": true, + "name": "relayer", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 80, + "src": "1646:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 77, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1646:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1645:25:0" + }, + "src": "1627:44:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 84, + "name": "RelayerRemoved", + "nodeType": "EventDefinition", + "parameters": { + "id": 83, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 82, + "indexed": true, + "name": "relayer", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 84, + "src": "1697:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 81, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1697:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1696:25:0" + }, + "src": "1676:46:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 92, + "name": "Deposit", + "nodeType": "EventDefinition", + "parameters": { + "id": 91, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 86, + "indexed": true, + "name": "destinationChainID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 92, + "src": "1750:34:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 85, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1750:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 88, + "indexed": true, + "name": "resourceID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 92, + "src": "1794:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 87, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1794:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 90, + "indexed": true, + "name": "depositNonce", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 92, + "src": "1830:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 89, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1830:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1740:124:0" + }, + "src": "1727:138:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 104, + "name": "ProposalEvent", + "nodeType": "EventDefinition", + "parameters": { + "id": 103, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 94, + "indexed": true, + "name": "originChainID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 104, + "src": "1899:37:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 93, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1899:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 96, + "indexed": true, + "name": "depositNonce", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 104, + "src": "1946:36:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 95, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1946:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 98, + "indexed": true, + "name": "status", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 104, + "src": "1992:30:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + }, + "typeName": { + "contractScope": null, + "id": 97, + "name": "ProposalStatus", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 31, + "src": "1992:14:0", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 100, + "indexed": false, + "name": "resourceID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 104, + "src": "2032:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 99, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2032:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 102, + "indexed": false, + "name": "dataHash", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 104, + "src": "2060:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 101, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2060:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1889:193:0" + }, + "src": "1870:213:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 114, + "name": "ProposalVote", + "nodeType": "EventDefinition", + "parameters": { + "id": 113, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 106, + "indexed": true, + "name": "originChainID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 114, + "src": "2117:29:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 105, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2117:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 108, + "indexed": true, + "name": "depositNonce", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 114, + "src": "2156:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 107, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2156:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 110, + "indexed": true, + "name": "status", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 114, + "src": "2194:29:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + }, + "typeName": { + "contractScope": null, + "id": 109, + "name": "ProposalStatus", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 31, + "src": "2194:14:0", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 112, + "indexed": false, + "name": "resourceID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 114, + "src": "2233:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 111, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2233:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2107:150:0" + }, + "src": "2089:169:0" + }, + { + "constant": true, + "functionSelector": "926d7d7f", + "id": 119, + "name": "RELAYER_ROLE", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 906, + "src": "2264:64:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 115, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2264:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "52454c415945525f524f4c45", + "id": 117, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2313:14:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e2b7fb3b832174769106daebcfd6d1970523240dda11281102db9363b83b0dc4", + "typeString": "literal_string \"RELAYER_ROLE\"" + }, + "value": "RELAYER_ROLE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e2b7fb3b832174769106daebcfd6d1970523240dda11281102db9363b83b0dc4", + "typeString": "literal_string \"RELAYER_ROLE\"" + } + ], + "id": 116, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "2303:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2303:25:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "public" + }, + { + "constant": true, + "functionSelector": "e9347683", + "id": 124, + "name": "FEE_SETTER_ROLE", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 906, + "src": "2334:70:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 120, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2334:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "4645455f5345545445525f524f4c45", + "id": 122, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2386:17:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e6ad9a47fbda1dc18de1eb5eeb7d935e5e81b4748f3cfc61e233e64f88182060", + "typeString": "literal_string \"FEE_SETTER_ROLE\"" + }, + "value": "FEE_SETTER_ROLE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_e6ad9a47fbda1dc18de1eb5eeb7d935e5e81b4748f3cfc61e233e64f88182060", + "typeString": "literal_string \"FEE_SETTER_ROLE\"" + } + ], + "id": 121, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "2376:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 123, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2376:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "public" + }, + { + "body": { + "id": 130, + "nodeType": "Block", + "src": "2432:40:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 126, + "name": "_onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 190, + "src": "2442:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2442:12:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 128, + "nodeType": "ExpressionStatement", + "src": "2442:12:0" + }, + { + "id": 129, + "nodeType": "PlaceholderStatement", + "src": "2464:1:0" + } + ] + }, + "documentation": null, + "id": 131, + "name": "onlyAdmin", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 125, + "nodeType": "ParameterList", + "parameters": [], + "src": "2429:2:0" + }, + "src": "2411:61:0", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 137, + "nodeType": "Block", + "src": "2508:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 133, + "name": "_onlyAdminOrRelayer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 177, + "src": "2518:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2518:21:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 135, + "nodeType": "ExpressionStatement", + "src": "2518:21:0" + }, + { + "id": 136, + "nodeType": "PlaceholderStatement", + "src": "2549:1:0" + } + ] + }, + "documentation": null, + "id": 138, + "name": "onlyAdminOrRelayer", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 132, + "nodeType": "ParameterList", + "parameters": [], + "src": "2505:2:0" + }, + "src": "2478:79:0", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 144, + "nodeType": "Block", + "src": "2587:43:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 140, + "name": "_onlyRelayers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 203, + "src": "2597:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2597:15:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 142, + "nodeType": "ExpressionStatement", + "src": "2597:15:0" + }, + { + "id": 143, + "nodeType": "PlaceholderStatement", + "src": "2622:1:0" + } + ] + }, + "documentation": null, + "id": 145, + "name": "onlyRelayers", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 139, + "nodeType": "ParameterList", + "parameters": [], + "src": "2584:2:0" + }, + "src": "2563:67:0", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 157, + "nodeType": "Block", + "src": "2661:101:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 149, + "name": "FEE_SETTER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "2687:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 150, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2704:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2704:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 148, + "name": "hasRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6129, + "src": "2679:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) view returns (bool)" + } + }, + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2679:36:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "73656e646572206973206e6f742066656520736574746572", + "id": 153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2717:26:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8de2276491d292abb103eed097e5b54c54caff8f8fbcb4389760965d5923bbef", + "typeString": "literal_string \"sender is not fee setter\"" + }, + "value": "sender is not fee setter" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8de2276491d292abb103eed097e5b54c54caff8f8fbcb4389760965d5923bbef", + "typeString": "literal_string \"sender is not fee setter\"" + } + ], + "id": 147, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2671:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2671:73:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 155, + "nodeType": "ExpressionStatement", + "src": "2671:73:0" + }, + { + "id": 156, + "nodeType": "PlaceholderStatement", + "src": "2754:1:0" + } + ] + }, + "documentation": null, + "id": 158, + "name": "onlyFeeSetter", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 146, + "nodeType": "ParameterList", + "parameters": [], + "src": "2658:2:0" + }, + "src": "2636:126:0", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 176, + "nodeType": "Block", + "src": "2812:148:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 163, + "name": "DEFAULT_ADMIN_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6092, + "src": "2838:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 164, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2858:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2858:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 162, + "name": "hasRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6129, + "src": "2830:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) view returns (bool)" + } + }, + "id": 166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2830:39:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 168, + "name": "RELAYER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "2881:12:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 169, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2895:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2895:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 167, + "name": "hasRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6129, + "src": "2873:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) view returns (bool)" + } + }, + "id": 171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2873:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2830:76:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "73656e646572206973206e6f742072656c61796572206f722061646d696e", + "id": 173, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2920:32:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_060530e99bec4f476b8f8f370f65f741cac486899cd6c35c4dd2e82720711afe", + "typeString": "literal_string \"sender is not relayer or admin\"" + }, + "value": "sender is not relayer or admin" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_060530e99bec4f476b8f8f370f65f741cac486899cd6c35c4dd2e82720711afe", + "typeString": "literal_string \"sender is not relayer or admin\"" + } + ], + "id": 161, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2822:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2822:131:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 175, + "nodeType": "ExpressionStatement", + "src": "2822:131:0" + } + ] + }, + "documentation": null, + "id": 177, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_onlyAdminOrRelayer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 159, + "nodeType": "ParameterList", + "parameters": [], + "src": "2796:2:0" + }, + "returnParameters": { + "id": 160, + "nodeType": "ParameterList", + "parameters": [], + "src": "2812:0:0" + }, + "scope": 906, + "src": "2768:192:0", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 189, + "nodeType": "Block", + "src": "3001:99:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 182, + "name": "DEFAULT_ADMIN_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6092, + "src": "3027:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 183, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3047:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3047:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 181, + "name": "hasRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6129, + "src": "3019:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) view returns (bool)" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3019:39:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "73656e64657220646f65736e277420686176652061646d696e20726f6c65", + "id": 186, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3060:32:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cccb3b305edc7308d7027b1001041a46b235f7d3213d690bb469676069d9b205", + "typeString": "literal_string \"sender doesn't have admin role\"" + }, + "value": "sender doesn't have admin role" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cccb3b305edc7308d7027b1001041a46b235f7d3213d690bb469676069d9b205", + "typeString": "literal_string \"sender doesn't have admin role\"" + } + ], + "id": 180, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3011:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3011:82:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 188, + "nodeType": "ExpressionStatement", + "src": "3011:82:0" + } + ] + }, + "documentation": null, + "id": 190, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_onlyAdmin", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 178, + "nodeType": "ParameterList", + "parameters": [], + "src": "2985:2:0" + }, + "returnParameters": { + "id": 179, + "nodeType": "ParameterList", + "parameters": [], + "src": "3001:0:0" + }, + "scope": 906, + "src": "2966:134:0", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 202, + "nodeType": "Block", + "src": "3144:95:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 195, + "name": "RELAYER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "3170:12:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 196, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3184:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3184:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 194, + "name": "hasRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6129, + "src": "3162:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) view returns (bool)" + } + }, + "id": 198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3162:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "73656e64657220646f65736e277420686176652072656c6179657220726f6c65", + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3197:34:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5edc249083609d56bd00194353566fb7b8c09e436c3268ab57a56188319b6d4", + "typeString": "literal_string \"sender doesn't have relayer role\"" + }, + "value": "sender doesn't have relayer role" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c5edc249083609d56bd00194353566fb7b8c09e436c3268ab57a56188319b6d4", + "typeString": "literal_string \"sender doesn't have relayer role\"" + } + ], + "id": 193, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3154:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3154:78:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 201, + "nodeType": "ExpressionStatement", + "src": "3154:78:0" + } + ] + }, + "documentation": null, + "id": 203, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_onlyRelayers", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 191, + "nodeType": "ParameterList", + "parameters": [], + "src": "3128:2:0" + }, + "returnParameters": { + "id": 192, + "nodeType": "ParameterList", + "parameters": [], + "src": "3144:0:0" + }, + "scope": 906, + "src": "3106:133:0", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 261, + "nodeType": "Block", + "src": "3775:401:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 214, + "name": "_chainID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18, + "src": "3785:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 215, + "name": "chainID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 206, + "src": "3796:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "3785:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 217, + "nodeType": "ExpressionStatement", + "src": "3785:18:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 218, + "name": "_relayerThreshold", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "3813:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 219, + "name": "initialRelayerThreshold", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 211, + "src": "3833:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3813:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 221, + "nodeType": "ExpressionStatement", + "src": "3813:43:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 223, + "name": "DEFAULT_ADMIN_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6092, + "src": "3878:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 224, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3898:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3898:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 222, + "name": "_setupRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6266, + "src": "3867:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3867:42:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 227, + "nodeType": "ExpressionStatement", + "src": "3867:42:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 229, + "name": "FEE_SETTER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "3930:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 230, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3947:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3947:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 228, + "name": "_setupRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6266, + "src": "3919:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3919:39:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 233, + "nodeType": "ExpressionStatement", + "src": "3919:39:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 235, + "name": "RELAYER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "3982:12:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 236, + "name": "DEFAULT_ADMIN_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6092, + "src": "3996:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 234, + "name": "_setRoleAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6282, + "src": "3968:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (bytes32,bytes32)" + } + }, + "id": 237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3968:47:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 238, + "nodeType": "ExpressionStatement", + "src": "3968:47:0" + }, + { + "body": { + "id": 259, + "nodeType": "Block", + "src": "4072:98:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 250, + "name": "RELAYER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "4096:12:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 251, + "name": "initialRelayers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 209, + "src": "4110:15:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 253, + "indexExpression": { + "argumentTypes": null, + "id": 252, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 240, + "src": "4126:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4110:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 249, + "name": "grantRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "4086:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4086:43:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 255, + "nodeType": "ExpressionStatement", + "src": "4086:43:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "4143:16:0", + "subExpression": { + "argumentTypes": null, + "id": 256, + "name": "_totalRelayers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22, + "src": "4143:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 258, + "nodeType": "ExpressionStatement", + "src": "4143:16:0" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 242, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 240, + "src": "4039:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 243, + "name": "initialRelayers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 209, + "src": "4043:15:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4043:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4039:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 260, + "initializationExpression": { + "assignments": [ + 240 + ], + "declarations": [ + { + "constant": false, + "id": 240, + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 260, + "src": "4031:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 239, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4031:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 241, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "4031:6:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "4067:3:0", + "subExpression": { + "argumentTypes": null, + "id": 246, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 240, + "src": "4067:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 248, + "nodeType": "ExpressionStatement", + "src": "4067:3:0" + }, + "nodeType": "ForStatement", + "src": "4026:144:0" + } + ] + }, + "documentation": { + "id": 204, + "nodeType": "StructuredDocumentation", + "src": "3245:426:0", + "text": "@notice Initializes Bridge, creates and grants {msg.sender} the admin role,\ncreates and grants {initialRelayers} the relayer role.\n@param chainID ID of chain the Bridge contract exists on.\n@param initialRelayers Addresses that should be initially granted the relayer role.\n@param initialRelayerThreshold Number of votes needed for a deposit proposal to be considered passed." + }, + "id": 262, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 212, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 206, + "name": "chainID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 262, + "src": "3689:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 205, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3689:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 209, + "name": "initialRelayers", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 262, + "src": "3704:32:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 207, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3704:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 208, + "length": null, + "nodeType": "ArrayTypeName", + "src": "3704:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 211, + "name": "initialRelayerThreshold", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 262, + "src": "3738:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 210, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3738:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3688:79:0" + }, + "returnParameters": { + "id": 213, + "nodeType": "ParameterList", + "parameters": [], + "src": "3775:0:0" + }, + "scope": 906, + "src": "3676:500:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 275, + "nodeType": "Block", + "src": "4368:54:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 271, + "name": "RELAYER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "4393:12:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 272, + "name": "relayer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 265, + "src": "4407:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 270, + "name": "hasRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6129, + "src": "4385:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) view returns (bool)" + } + }, + "id": 273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4385:30:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 269, + "id": 274, + "nodeType": "Return", + "src": "4378:37:0" + } + ] + }, + "documentation": { + "id": 263, + "nodeType": "StructuredDocumentation", + "src": "4182:116:0", + "text": "@notice Returns true if {relayer} has the relayer role.\n@param relayer Address to check." + }, + "functionSelector": "541d5548", + "id": 276, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isRelayer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 266, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 265, + "name": "relayer", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 276, + "src": "4322:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 264, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4322:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4321:17:0" + }, + "returnParameters": { + "id": 269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 268, + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 276, + "src": "4362:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 267, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4362:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4361:6:0" + }, + "scope": 906, + "src": "4303:119:0", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 295, + "nodeType": "Block", + "src": "4733:110:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 285, + "name": "DEFAULT_ADMIN_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6092, + "src": "4753:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 286, + "name": "newAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 279, + "src": "4773:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 284, + "name": "grantRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "4743:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4743:39:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 288, + "nodeType": "ExpressionStatement", + "src": "4743:39:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 290, + "name": "DEFAULT_ADMIN_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6092, + "src": "4805:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 291, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4825:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4825:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 289, + "name": "renounceRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6252, + "src": "4792:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4792:44:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 294, + "nodeType": "ExpressionStatement", + "src": "4792:44:0" + } + ] + }, + "documentation": { + "id": 277, + "nodeType": "StructuredDocumentation", + "src": "4428:240:0", + "text": "@notice Removes admin role from {msg.sender} and grants it to {newAdmin}.\n@notice Only callable by an address that currently has the admin role.\n@param newAdmin Address that admin role will be granted to." + }, + "functionSelector": "5e1fab0f", + "id": 296, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 282, + "modifierName": { + "argumentTypes": null, + "id": 281, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "4723:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4723:9:0" + } + ], + "name": "renounceAdmin", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 280, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 279, + "name": "newAdmin", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 296, + "src": "4696:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 278, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4696:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4695:18:0" + }, + "returnParameters": { + "id": 283, + "nodeType": "ParameterList", + "parameters": [], + "src": "4733:0:0" + }, + "scope": 906, + "src": "4673:170:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 305, + "nodeType": "Block", + "src": "5081:25:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 302, + "name": "_pause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5973, + "src": "5091:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5091:8:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 304, + "nodeType": "ExpressionStatement", + "src": "5091:8:0" + } + ] + }, + "documentation": { + "id": 297, + "nodeType": "StructuredDocumentation", + "src": "4849:177:0", + "text": "@notice Pauses deposits, proposal creation and voting, and deposit executions.\n@notice Only callable by an address that currently has the admin role." + }, + "functionSelector": "80ae1c28", + "id": 306, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 300, + "modifierName": { + "argumentTypes": null, + "id": 299, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "5071:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5071:9:0" + } + ], + "name": "adminPauseTransfers", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 298, + "nodeType": "ParameterList", + "parameters": [], + "src": "5059:2:0" + }, + "returnParameters": { + "id": 301, + "nodeType": "ParameterList", + "parameters": [], + "src": "5081:0:0" + }, + "scope": 906, + "src": "5031:75:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 315, + "nodeType": "Block", + "src": "5348:27:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 312, + "name": "_unpause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5989, + "src": "5358:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5358:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 314, + "nodeType": "ExpressionStatement", + "src": "5358:10:0" + } + ] + }, + "documentation": { + "id": 307, + "nodeType": "StructuredDocumentation", + "src": "5112:179:0", + "text": "@notice Unpauses deposits, proposal creation and voting, and deposit executions.\n@notice Only callable by an address that currently has the admin role." + }, + "functionSelector": "ffaac0eb", + "id": 316, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 310, + "modifierName": { + "argumentTypes": null, + "id": 309, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "5338:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5338:9:0" + } + ], + "name": "adminUnpauseTransfers", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 308, + "nodeType": "ParameterList", + "parameters": [], + "src": "5326:2:0" + }, + "returnParameters": { + "id": 311, + "nodeType": "ParameterList", + "parameters": [], + "src": "5348:0:0" + }, + "scope": 906, + "src": "5296:79:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 332, + "nodeType": "Block", + "src": "5774:101:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 324, + "name": "_relayerThreshold", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "5784:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 325, + "name": "newThreshold", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 319, + "src": "5804:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5784:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 327, + "nodeType": "ExpressionStatement", + "src": "5784:32:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 329, + "name": "newThreshold", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 319, + "src": "5855:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 328, + "name": "RelayerThresholdChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 76, + "src": "5831:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5831:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 331, + "nodeType": "EmitStatement", + "src": "5826:42:0" + } + ] + }, + "documentation": { + "id": 317, + "nodeType": "StructuredDocumentation", + "src": "5381:313:0", + "text": "@notice Modifies the number of votes required for a proposal to be considered passed.\n@notice Only callable by an address that currently has the admin role.\n@param newThreshold Value {_relayerThreshold} will be changed to.\n@notice Emits {RelayerThresholdChanged} event." + }, + "functionSelector": "4e056005", + "id": 333, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 322, + "modifierName": { + "argumentTypes": null, + "id": 321, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "5764:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5764:9:0" + } + ], + "name": "adminChangeRelayerThreshold", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 320, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 319, + "name": "newThreshold", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 333, + "src": "5736:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 318, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5736:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5735:19:0" + }, + "returnParameters": { + "id": 323, + "nodeType": "ParameterList", + "parameters": [], + "src": "5774:0:0" + }, + "scope": 906, + "src": "5699:176:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 362, + "nodeType": "Block", + "src": "6244:216:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "6262:38:0", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 343, + "name": "RELAYER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "6271:12:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 344, + "name": "relayerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 336, + "src": "6285:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 342, + "name": "hasRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6129, + "src": "6263:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) view returns (bool)" + } + }, + "id": 345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6263:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6164647220616c7265616479206861732072656c6179657220726f6c6521", + "id": 347, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6302:32:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8513154392cb347d26f1716c23a55342a9b762f4522b7062343455b658c92c85", + "typeString": "literal_string \"addr already has relayer role!\"" + }, + "value": "addr already has relayer role!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8513154392cb347d26f1716c23a55342a9b762f4522b7062343455b658c92c85", + "typeString": "literal_string \"addr already has relayer role!\"" + } + ], + "id": 341, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6254:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6254:81:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 349, + "nodeType": "ExpressionStatement", + "src": "6254:81:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 351, + "name": "RELAYER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "6355:12:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 352, + "name": "relayerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 336, + "src": "6369:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 350, + "name": "grantRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "6345:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6345:39:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 354, + "nodeType": "ExpressionStatement", + "src": "6345:39:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 356, + "name": "relayerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 336, + "src": "6412:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 355, + "name": "RelayerAdded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 80, + "src": "6399:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6399:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 358, + "nodeType": "EmitStatement", + "src": "6394:33:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "6437:16:0", + "subExpression": { + "argumentTypes": null, + "id": 359, + "name": "_totalRelayers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22, + "src": "6437:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 361, + "nodeType": "ExpressionStatement", + "src": "6437:16:0" + } + ] + }, + "documentation": { + "id": 334, + "nodeType": "StructuredDocumentation", + "src": "5881:290:0", + "text": "@notice Grants {relayerAddress} the relayer role and increases {_totalRelayer} count.\n@notice Only callable by an address that currently has the admin role.\n@param relayerAddress Address of relayer to be added.\n@notice Emits {RelayerAdded} event." + }, + "functionSelector": "cdb0f73a", + "id": 363, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 339, + "modifierName": { + "argumentTypes": null, + "id": 338, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "6234:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6234:9:0" + } + ], + "name": "adminAddRelayer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 336, + "name": "relayerAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 363, + "src": "6201:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 335, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6201:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6200:24:0" + }, + "returnParameters": { + "id": 340, + "nodeType": "ParameterList", + "parameters": [], + "src": "6244:0:0" + }, + "scope": 906, + "src": "6176:284:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 391, + "nodeType": "Block", + "src": "6837:219:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 373, + "name": "RELAYER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "6863:12:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 374, + "name": "relayerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 366, + "src": "6877:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 372, + "name": "hasRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6129, + "src": "6855:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_address_$returns$_t_bool_$", + "typeString": "function (bytes32,address) view returns (bool)" + } + }, + "id": 375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6855:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6164647220646f65736e277420686176652072656c6179657220726f6c6521", + "id": 376, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6894:33:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1399520dec2ce6448b61ea4bb9d4980c6bfff25cd5836058c07edd3d56f94864", + "typeString": "literal_string \"addr doesn't have relayer role!\"" + }, + "value": "addr doesn't have relayer role!" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_1399520dec2ce6448b61ea4bb9d4980c6bfff25cd5836058c07edd3d56f94864", + "typeString": "literal_string \"addr doesn't have relayer role!\"" + } + ], + "id": 371, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6847:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6847:81:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 378, + "nodeType": "ExpressionStatement", + "src": "6847:81:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 380, + "name": "RELAYER_ROLE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "6949:12:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 381, + "name": "relayerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 366, + "src": "6963:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 379, + "name": "revokeRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6230, + "src": "6938:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address)" + } + }, + "id": 382, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6938:40:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 383, + "nodeType": "ExpressionStatement", + "src": "6938:40:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 385, + "name": "relayerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 366, + "src": "7008:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 384, + "name": "RelayerRemoved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 84, + "src": "6993:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6993:30:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 387, + "nodeType": "EmitStatement", + "src": "6988:35:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "--", + "prefix": false, + "src": "7033:16:0", + "subExpression": { + "argumentTypes": null, + "id": 388, + "name": "_totalRelayers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 22, + "src": "7033:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 390, + "nodeType": "ExpressionStatement", + "src": "7033:16:0" + } + ] + }, + "documentation": { + "id": 364, + "nodeType": "StructuredDocumentation", + "src": "6466:295:0", + "text": "@notice Removes relayer role for {relayerAddress} and decreases {_totalRelayer} count.\n@notice Only callable by an address that currently has the admin role.\n@param relayerAddress Address of relayer to be removed.\n@notice Emits {RelayerRemoved} event." + }, + "functionSelector": "9d82dd63", + "id": 392, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 369, + "modifierName": { + "argumentTypes": null, + "id": 368, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "6827:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6827:9:0" + } + ], + "name": "adminRemoveRelayer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 367, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 366, + "name": "relayerAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 392, + "src": "6794:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 365, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6794:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6793:24:0" + }, + "returnParameters": { + "id": 370, + "nodeType": "ParameterList", + "parameters": [], + "src": "6837:0:0" + }, + "scope": 906, + "src": "6766:290:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 423, + "nodeType": "Block", + "src": "7708:187:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 404, + "name": "_resourceIDToHandlerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "7718:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + } + }, + "id": 406, + "indexExpression": { + "argumentTypes": null, + "id": 405, + "name": "resourceID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 397, + "src": "7746:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7718:39:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 407, + "name": "handlerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 395, + "src": "7760:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7718:56:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 409, + "nodeType": "ExpressionStatement", + "src": "7718:56:0" + }, + { + "assignments": [ + 411 + ], + "declarations": [ + { + "constant": false, + "id": 411, + "name": "handler", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 423, + "src": "7784:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERCHandler_$5873", + "typeString": "contract IERCHandler" + }, + "typeName": { + "contractScope": null, + "id": 410, + "name": "IERCHandler", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5873, + "src": "7784:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERCHandler_$5873", + "typeString": "contract IERCHandler" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 415, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 413, + "name": "handlerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 395, + "src": "7818:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 412, + "name": "IERCHandler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5873, + "src": "7806:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERCHandler_$5873_$", + "typeString": "type(contract IERCHandler)" + } + }, + "id": 414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7806:27:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERCHandler_$5873", + "typeString": "contract IERCHandler" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7784:49:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 419, + "name": "resourceID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 397, + "src": "7863:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 420, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 399, + "src": "7875:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 416, + "name": "handler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 411, + "src": "7843:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERCHandler_$5873", + "typeString": "contract IERCHandler" + } + }, + "id": 418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setResource", + "nodeType": "MemberAccess", + "referencedDeclaration": 5856, + "src": "7843:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$returns$__$", + "typeString": "function (bytes32,address) external" + } + }, + "id": 421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7843:45:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 422, + "nodeType": "ExpressionStatement", + "src": "7843:45:0" + } + ] + }, + "documentation": { + "id": 393, + "nodeType": "StructuredDocumentation", + "src": "7062:530:0", + "text": "@notice Sets a new resource for handler contracts that use the IERCHandler interface,\nand maps the {handlerAddress} to {resourceID} in {_resourceIDToHandlerAddress}.\n@notice Only callable by an address that currently has the admin role.\n@param handlerAddress Address of handler resource will be set for.\n@param resourceID ResourceID to be used when making deposits.\n@param tokenAddress Address of contract to be called when a deposit is made and a deposited is executed." + }, + "functionSelector": "cb10f215", + "id": 424, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 402, + "modifierName": { + "argumentTypes": null, + "id": 401, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "7698:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7698:9:0" + } + ], + "name": "adminSetResource", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 400, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 395, + "name": "handlerAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 424, + "src": "7623:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 394, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7623:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 397, + "name": "resourceID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 424, + "src": "7647:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 396, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "7647:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 399, + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 424, + "src": "7667:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 398, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7667:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7622:66:0" + }, + "returnParameters": { + "id": 403, + "nodeType": "ParameterList", + "parameters": [], + "src": "7708:0:0" + }, + "scope": 906, + "src": "7597:298:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 461, + "nodeType": "Block", + "src": "8664:238:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 440, + "name": "_resourceIDToHandlerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "8674:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + } + }, + "id": 442, + "indexExpression": { + "argumentTypes": null, + "id": 441, + "name": "resourceID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 429, + "src": "8702:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8674:39:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 443, + "name": "handlerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 427, + "src": "8716:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "8674:56:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 445, + "nodeType": "ExpressionStatement", + "src": "8674:56:0" + }, + { + "assignments": [ + 447 + ], + "declarations": [ + { + "constant": false, + "id": 447, + "name": "handler", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 461, + "src": "8740:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IGenericHandler_$5889", + "typeString": "contract IGenericHandler" + }, + "typeName": { + "contractScope": null, + "id": 446, + "name": "IGenericHandler", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5889, + "src": "8740:15:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IGenericHandler_$5889", + "typeString": "contract IGenericHandler" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 451, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 449, + "name": "handlerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 427, + "src": "8782:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 448, + "name": "IGenericHandler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "8766:15:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IGenericHandler_$5889_$", + "typeString": "type(contract IGenericHandler)" + } + }, + "id": 450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8766:31:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IGenericHandler_$5889", + "typeString": "contract IGenericHandler" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8740:57:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 455, + "name": "resourceID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 429, + "src": "8827:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 456, + "name": "contractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 431, + "src": "8839:15:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 457, + "name": "depositFunctionSig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 433, + "src": "8856:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "argumentTypes": null, + "id": 458, + "name": "executeFunctionSig", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 435, + "src": "8876:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + ], + "expression": { + "argumentTypes": null, + "id": 452, + "name": "handler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 447, + "src": "8807:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IGenericHandler_$5889", + "typeString": "contract IGenericHandler" + } + }, + "id": 454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setResource", + "nodeType": "MemberAccess", + "referencedDeclaration": 5888, + "src": "8807:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_address_$_t_bytes4_$_t_bytes4_$returns$__$", + "typeString": "function (bytes32,address,bytes4,bytes4) external" + } + }, + "id": 459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8807:88:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 460, + "nodeType": "ExpressionStatement", + "src": "8807:88:0" + } + ] + }, + "documentation": { + "id": 425, + "nodeType": "StructuredDocumentation", + "src": "7901:537:0", + "text": "@notice Sets a new resource for handler contracts that use the IGenericHandler interface,\nand maps the {handlerAddress} to {resourceID} in {_resourceIDToHandlerAddress}.\n@notice Only callable by an address that currently has the admin role.\n@param handlerAddress Address of handler resource will be set for.\n@param resourceID ResourceID to be used when making deposits.\n@param contractAddress Address of contract to be called when a deposit is made and a deposited is executed." + }, + "functionSelector": "e8437ee7", + "id": 462, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 438, + "modifierName": { + "argumentTypes": null, + "id": 437, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "8654:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8654:9:0" + } + ], + "name": "adminSetGenericResource", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 436, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 427, + "name": "handlerAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 462, + "src": "8485:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 426, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8485:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 429, + "name": "resourceID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 462, + "src": "8517:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 428, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8517:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 431, + "name": "contractAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 462, + "src": "8545:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 430, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8545:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 433, + "name": "depositFunctionSig", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 462, + "src": "8578:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 432, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "8578:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 435, + "name": "executeFunctionSig", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 462, + "src": "8613:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 434, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "8613:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8475:169:0" + }, + "returnParameters": { + "id": 439, + "nodeType": "ParameterList", + "parameters": [], + "src": "8664:0:0" + }, + "scope": 906, + "src": "8443:459:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 484, + "nodeType": "Block", + "src": "9384:109:0", + "statements": [ + { + "assignments": [ + 473 + ], + "declarations": [ + { + "constant": false, + "id": 473, + "name": "handler", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 484, + "src": "9394:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERCHandler_$5873", + "typeString": "contract IERCHandler" + }, + "typeName": { + "contractScope": null, + "id": 472, + "name": "IERCHandler", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5873, + "src": "9394:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERCHandler_$5873", + "typeString": "contract IERCHandler" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 477, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 475, + "name": "handlerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 465, + "src": "9428:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 474, + "name": "IERCHandler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5873, + "src": "9416:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERCHandler_$5873_$", + "typeString": "type(contract IERCHandler)" + } + }, + "id": 476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9416:27:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERCHandler_$5873", + "typeString": "contract IERCHandler" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9394:49:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 481, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 467, + "src": "9473:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 478, + "name": "handler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 473, + "src": "9453:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERCHandler_$5873", + "typeString": "contract IERCHandler" + } + }, + "id": 480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setBurnable", + "nodeType": "MemberAccess", + "referencedDeclaration": 5862, + "src": "9453:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9453:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 483, + "nodeType": "ExpressionStatement", + "src": "9453:33:0" + } + ] + }, + "documentation": { + "id": 463, + "nodeType": "StructuredDocumentation", + "src": "8908:380:0", + "text": "@notice Sets a resource as burnable for handler contracts that use the IERCHandler interface.\n@notice Only callable by an address that currently has the admin role.\n@param handlerAddress Address of handler resource will be set for.\n@param tokenAddress Address of contract to be called when a deposit is made and a deposited is executed." + }, + "functionSelector": "8c0c2631", + "id": 485, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 470, + "modifierName": { + "argumentTypes": null, + "id": 469, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "9374:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "9374:9:0" + } + ], + "name": "adminSetBurnable", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 468, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 465, + "name": "handlerAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 485, + "src": "9319:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 464, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9319:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 467, + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 485, + "src": "9343:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 466, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9343:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9318:46:0" + }, + "returnParameters": { + "id": 471, + "nodeType": "ParameterList", + "parameters": [], + "src": "9384:0:0" + }, + "scope": 906, + "src": "9293:200:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 518, + "nodeType": "Block", + "src": "10197:137:0", + "statements": [ + { + "assignments": [ + 498 + ], + "declarations": [ + { + "constant": false, + "id": 498, + "name": "nonceAndID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 518, + "src": "10207:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + }, + "typeName": { + "id": 497, + "name": "uint72", + "nodeType": "ElementaryTypeName", + "src": "10207:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 511, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + }, + "id": 510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + }, + "id": 504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 501, + "name": "depositNonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 490, + "src": "10235:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 500, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10228:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint72_$", + "typeString": "type(uint72)" + }, + "typeName": { + "id": 499, + "name": "uint72", + "nodeType": "ElementaryTypeName", + "src": "10228:6:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10228:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "38", + "id": 503, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10252:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "10228:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + } + ], + "id": 505, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "10227:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 508, + "name": "originChainID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 488, + "src": "10264:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 507, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10257:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint72_$", + "typeString": "type(uint72)" + }, + "typeName": { + "id": 506, + "name": "uint72", + "nodeType": "ElementaryTypeName", + "src": "10257:6:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 509, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10257:21:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "src": "10227:51:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10207:71:0" + }, + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 512, + "name": "_proposals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60, + "src": "10295:10:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint72_$_t_mapping$_t_bytes32_$_t_struct$_Proposal_$46_storage_$_$", + "typeString": "mapping(uint72 => mapping(bytes32 => struct Bridge.Proposal storage ref))" + } + }, + "id": 514, + "indexExpression": { + "argumentTypes": null, + "id": 513, + "name": "nonceAndID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 498, + "src": "10306:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10295:22:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Proposal_$46_storage_$", + "typeString": "mapping(bytes32 => struct Bridge.Proposal storage ref)" + } + }, + "id": 516, + "indexExpression": { + "argumentTypes": null, + "id": 515, + "name": "dataHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 492, + "src": "10318:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10295:32:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage", + "typeString": "struct Bridge.Proposal storage ref" + } + }, + "functionReturnParameters": 496, + "id": 517, + "nodeType": "Return", + "src": "10288:39:0" + } + ] + }, + "documentation": { + "id": 486, + "nodeType": "StructuredDocumentation", + "src": "9499:572:0", + "text": "@notice Returns a proposal.\n@param originChainID Chain ID deposit originated from.\n@param depositNonce ID of proposal generated by proposal's origin Bridge contract.\n@param dataHash Hash of data to be provided when deposit proposal is executed.\n@return Proposal which consists of:\n- _dataHash Hash of data to be provided when deposit proposal is executed.\n- _yesVotes Number of votes in favor of proposal.\n- _noVotes Number of votes against proposal.\n- _status Current status of proposal." + }, + "functionSelector": "a9cf69fa", + "id": 519, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getProposal", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 493, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 488, + "name": "originChainID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 519, + "src": "10097:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 487, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "10097:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 490, + "name": "depositNonce", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 519, + "src": "10118:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 489, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "10118:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 492, + "name": "dataHash", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 519, + "src": "10139:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 491, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "10139:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10096:60:0" + }, + "returnParameters": { + "id": 496, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 495, + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 519, + "src": "10180:15:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_memory_ptr", + "typeString": "struct Bridge.Proposal" + }, + "typeName": { + "contractScope": null, + "id": 494, + "name": "Proposal", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 46, + "src": "10180:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10179:17:0" + }, + "scope": 906, + "src": "10076:258:0", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 535, + "nodeType": "Block", + "src": "10590:51:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 529, + "name": "_fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 72, + "src": "10600:5:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint8_$_t_uint256_$", + "typeString": "mapping(uint8 => uint256)" + } + }, + "id": 531, + "indexExpression": { + "argumentTypes": null, + "id": 530, + "name": "destinationChainID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 522, + "src": "10606:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10600:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 532, + "name": "newFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "10628:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10600:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 534, + "nodeType": "ExpressionStatement", + "src": "10600:34:0" + } + ] + }, + "documentation": { + "id": 520, + "nodeType": "StructuredDocumentation", + "src": "10340:164:0", + "text": "@notice Changes deposit fee.\n@notice Only callable by admin.\n@param newFee Value {_fees[destinationChainID]} will be updated to." + }, + "functionSelector": "13a7e54e", + "id": 536, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 527, + "modifierName": { + "argumentTypes": null, + "id": 526, + "name": "onlyFeeSetter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 158, + "src": "10576:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10576:13:0" + } + ], + "name": "changeFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 525, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 522, + "name": "destinationChainID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 536, + "src": "10528:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 521, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "10528:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 524, + "name": "newFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 536, + "src": "10554:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 523, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10554:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10527:39:0" + }, + "returnParameters": { + "id": 528, + "nodeType": "ParameterList", + "parameters": [], + "src": "10590:0:0" + }, + "scope": 906, + "src": "10509:132:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 564, + "nodeType": "Block", + "src": "11179:134:0", + "statements": [ + { + "assignments": [ + 551 + ], + "declarations": [ + { + "constant": false, + "id": 551, + "name": "handler", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 564, + "src": "11189:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERCHandler_$5873", + "typeString": "contract IERCHandler" + }, + "typeName": { + "contractScope": null, + "id": 550, + "name": "IERCHandler", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5873, + "src": "11189:11:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERCHandler_$5873", + "typeString": "contract IERCHandler" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 555, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 553, + "name": "handlerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 539, + "src": "11223:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 552, + "name": "IERCHandler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5873, + "src": "11211:11:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERCHandler_$5873_$", + "typeString": "type(contract IERCHandler)" + } + }, + "id": 554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11211:27:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERCHandler_$5873", + "typeString": "contract IERCHandler" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11189:49:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 559, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "11265:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 560, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 543, + "src": "11279:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 561, + "name": "amountOrTokenID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 545, + "src": "11290:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 556, + "name": "handler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 551, + "src": "11248:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERCHandler_$5873", + "typeString": "contract IERCHandler" + } + }, + "id": 558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdraw", + "nodeType": "MemberAccess", + "referencedDeclaration": 5872, + "src": "11248:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256) external" + } + }, + "id": 562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11248:58:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 563, + "nodeType": "ExpressionStatement", + "src": "11248:58:0" + } + ] + }, + "documentation": { + "id": 537, + "nodeType": "StructuredDocumentation", + "src": "10647:357:0", + "text": "@notice Used to manually withdraw funds from ERC safes.\n@param handlerAddress Address of handler to withdraw from.\n@param tokenAddress Address of token to withdraw.\n@param recipient Address to withdraw tokens to.\n@param amountOrTokenID Either the amount of ERC20 tokens or the ERC721 token ID to withdraw." + }, + "functionSelector": "780cf004", + "id": 565, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 548, + "modifierName": { + "argumentTypes": null, + "id": 547, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "11169:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11169:9:0" + } + ], + "name": "adminWithdraw", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 546, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 539, + "name": "handlerAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 565, + "src": "11041:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 538, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11041:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 541, + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 565, + "src": "11073:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 540, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11073:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 543, + "name": "recipient", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 565, + "src": "11103:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 542, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11103:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 545, + "name": "amountOrTokenID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 565, + "src": "11130:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 544, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11130:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11031:128:0" + }, + "returnParameters": { + "id": 549, + "nodeType": "ParameterList", + "parameters": [], + "src": "11179:0:0" + }, + "scope": 906, + "src": "11009:304:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 635, + "nodeType": "Block", + "src": "12018:536:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 580, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "12036:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 581, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12036:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 582, + "name": "_fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 72, + "src": "12049:5:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint8_$_t_uint256_$", + "typeString": "mapping(uint8 => uint256)" + } + }, + "id": 584, + "indexExpression": { + "argumentTypes": null, + "id": 583, + "name": "destinationChainID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 568, + "src": "12055:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12049:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12036:38:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "496e636f72726563742066656520737570706c696564", + "id": 586, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12076:24:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2a2431514317abe5c8b163ccf132d16516b7e676afbb7d1bf5781dba4082d9d5", + "typeString": "literal_string \"Incorrect fee supplied\"" + }, + "value": "Incorrect fee supplied" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2a2431514317abe5c8b163ccf132d16516b7e676afbb7d1bf5781dba4082d9d5", + "typeString": "literal_string \"Incorrect fee supplied\"" + } + ], + "id": 579, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12028:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12028:73:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 588, + "nodeType": "ExpressionStatement", + "src": "12028:73:0" + }, + { + "assignments": [ + 590 + ], + "declarations": [ + { + "constant": false, + "id": 590, + "name": "handler", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 635, + "src": "12112:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 589, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12112:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 594, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 591, + "name": "_resourceIDToHandlerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "12130:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + } + }, + "id": 593, + "indexExpression": { + "argumentTypes": null, + "id": 592, + "name": "resourceID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 570, + "src": "12158:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12130:39:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12112:57:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 596, + "name": "handler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 590, + "src": "12187:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 599, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12206:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 598, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12198:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 597, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12198:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12198:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "12187:21:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "7265736f757263654944206e6f74206d617070656420746f2068616e646c6572", + "id": 602, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12210:34:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_542d0c0b50539d1853c947fb8449b05e8626e9928b1fbf8fb55da8a4976aae52", + "typeString": "literal_string \"resourceID not mapped to handler\"" + }, + "value": "resourceID not mapped to handler" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_542d0c0b50539d1853c947fb8449b05e8626e9928b1fbf8fb55da8a4976aae52", + "typeString": "literal_string \"resourceID not mapped to handler\"" + } + ], + "id": 595, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12179:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12179:66:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 604, + "nodeType": "ExpressionStatement", + "src": "12179:66:0" + }, + { + "assignments": [ + 606 + ], + "declarations": [ + { + "constant": false, + "id": 606, + "name": "depositNonce", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 635, + "src": "12256:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 605, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "12256:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 611, + "initialValue": { + "argumentTypes": null, + "id": 610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "12278:36:0", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 607, + "name": "_depositCounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 50, + "src": "12280:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint8_$_t_uint64_$", + "typeString": "mapping(uint8 => uint64)" + } + }, + "id": 609, + "indexExpression": { + "argumentTypes": null, + "id": 608, + "name": "destinationChainID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 568, + "src": "12295:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12280:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12256:58:0" + }, + { + "assignments": [ + 613 + ], + "declarations": [ + { + "constant": false, + "id": 613, + "name": "depositHandler", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 635, + "src": "12325:30:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDepositExecute_$5845", + "typeString": "contract IDepositExecute" + }, + "typeName": { + "contractScope": null, + "id": 612, + "name": "IDepositExecute", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5845, + "src": "12325:15:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDepositExecute_$5845", + "typeString": "contract IDepositExecute" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 617, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 615, + "name": "handler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 590, + "src": "12374:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 614, + "name": "IDepositExecute", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5845, + "src": "12358:15:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IDepositExecute_$5845_$", + "typeString": "type(contract IDepositExecute)" + } + }, + "id": 616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12358:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDepositExecute_$5845", + "typeString": "contract IDepositExecute" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12325:57:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 621, + "name": "resourceID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 570, + "src": "12415:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 622, + "name": "destinationChainID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 568, + "src": "12427:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 623, + "name": "depositNonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 606, + "src": "12447:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 624, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "12461:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 625, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12461:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 626, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 572, + "src": "12473:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + ], + "expression": { + "argumentTypes": null, + "id": 618, + "name": "depositHandler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 613, + "src": "12392:14:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDepositExecute_$5845", + "typeString": "contract IDepositExecute" + } + }, + "id": 620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 5836, + "src": "12392:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_uint8_$_t_uint64_$_t_address_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (bytes32,uint8,uint64,address,bytes memory) external" + } + }, + "id": 627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12392:86:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 628, + "nodeType": "ExpressionStatement", + "src": "12392:86:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 630, + "name": "destinationChainID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 568, + "src": "12502:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 631, + "name": "resourceID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 570, + "src": "12522:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 632, + "name": "depositNonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 606, + "src": "12534:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 629, + "name": "Deposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 92, + "src": "12494:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint8_$_t_bytes32_$_t_uint64_$returns$__$", + "typeString": "function (uint8,bytes32,uint64)" + } + }, + "id": 633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12494:53:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 634, + "nodeType": "EmitStatement", + "src": "12489:58:0" + } + ] + }, + "documentation": { + "id": 566, + "nodeType": "StructuredDocumentation", + "src": "11319:554:0", + "text": "@notice Initiates a transfer using a specified handler contract.\n@notice Only callable when Bridge is not paused.\n@param destinationChainID ID of chain deposit will be bridged to.\n@param resourceID ResourceID used to find address of handler to be used for deposit.\n@param data Additional data to be passed to specified handler.\n@param _auxData Unused parameter, can be used for everything, for example, writing IDs of apps from which the deposit was made.\n@notice Emits {Deposit} event." + }, + "functionSelector": "73c45c98", + "id": 636, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 577, + "modifierName": { + "argumentTypes": null, + "id": 576, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5930, + "src": "12004:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "12004:13:0" + } + ], + "name": "deposit", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 575, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 568, + "name": "destinationChainID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 636, + "src": "11895:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 567, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "11895:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 570, + "name": "resourceID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 636, + "src": "11921:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 569, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "11921:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 572, + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 636, + "src": "11941:19:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 571, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "11941:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 574, + "name": "_auxData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 636, + "src": "11962:23:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 573, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "11962:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11894:92:0" + }, + "returnParameters": { + "id": 578, + "nodeType": "ParameterList", + "parameters": [], + "src": "12018:0:0" + }, + "scope": 906, + "src": "11878:676:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 869, + "nodeType": "Block", + "src": "13341:2010:0", + "statements": [ + { + "assignments": [ + 653 + ], + "declarations": [ + { + "constant": false, + "id": 653, + "name": "handler", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 869, + "src": "13351:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 652, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13351:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 657, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 654, + "name": "_resourceIDToHandlerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "13369:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + } + }, + "id": 656, + "indexExpression": { + "argumentTypes": null, + "id": 655, + "name": "resourceID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 643, + "src": "13397:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13369:39:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13351:57:0" + }, + { + "assignments": [ + 659 + ], + "declarations": [ + { + "constant": false, + "id": 659, + "name": "dataHash", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 869, + "src": "13418:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 658, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13418:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 667, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 663, + "name": "handler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 653, + "src": "13464:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 664, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 645, + "src": "13473:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + ], + "expression": { + "argumentTypes": null, + "id": 661, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "13447:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 662, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "13447:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13447:31:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 660, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "13437:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13437:42:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13418:61:0" + }, + { + "assignments": [ + 669 + ], + "declarations": [ + { + "constant": false, + "id": 669, + "name": "nonceAndID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 869, + "src": "13490:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + }, + "typeName": { + "id": 668, + "name": "uint72", + "nodeType": "ElementaryTypeName", + "src": "13490:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 682, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + }, + "id": 681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + }, + "id": 675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 672, + "name": "depositNonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 641, + "src": "13518:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 671, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13511:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint72_$", + "typeString": "type(uint72)" + }, + "typeName": { + "id": 670, + "name": "uint72", + "nodeType": "ElementaryTypeName", + "src": "13511:6:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13511:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "38", + "id": 674, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13535:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_8_by_1", + "typeString": "int_const 8" + }, + "value": "8" + }, + "src": "13511:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + } + ], + "id": 676, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13510:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 679, + "name": "chainID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 639, + "src": "13547:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 678, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13540:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint72_$", + "typeString": "type(uint72)" + }, + "typeName": { + "id": 677, + "name": "uint72", + "nodeType": "ElementaryTypeName", + "src": "13540:6:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 680, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13540:15:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "src": "13510:45:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13490:65:0" + }, + { + "assignments": [ + 684 + ], + "declarations": [ + { + "constant": false, + "id": 684, + "name": "proposal", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 869, + "src": "13565:25:0", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal" + }, + "typeName": { + "contractScope": null, + "id": 683, + "name": "Proposal", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 46, + "src": "13565:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 690, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 685, + "name": "_proposals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60, + "src": "13593:10:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint72_$_t_mapping$_t_bytes32_$_t_struct$_Proposal_$46_storage_$_$", + "typeString": "mapping(uint72 => mapping(bytes32 => struct Bridge.Proposal storage ref))" + } + }, + "id": 687, + "indexExpression": { + "argumentTypes": null, + "id": 686, + "name": "nonceAndID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 669, + "src": "13604:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13593:22:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Proposal_$46_storage_$", + "typeString": "mapping(bytes32 => struct Bridge.Proposal storage ref)" + } + }, + "id": 689, + "indexExpression": { + "argumentTypes": null, + "id": 688, + "name": "dataHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "13616:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13593:32:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage", + "typeString": "struct Bridge.Proposal storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13565:60:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 692, + "name": "_resourceIDToHandlerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "13644:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + } + }, + "id": 694, + "indexExpression": { + "argumentTypes": null, + "id": 693, + "name": "resourceID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 643, + "src": "13672:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13644:39:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 697, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13695:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 696, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13687:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 695, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13687:7:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 698, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13687:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "13644:53:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6e6f2068616e646c657220666f72207265736f757263654944", + "id": 700, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13699:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e9d3c8def96ec5b61b3d5e8e38d358587f69ed955aa1f36ba2f95c28a40ffe20", + "typeString": "literal_string \"no handler for resourceID\"" + }, + "value": "no handler for resourceID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e9d3c8def96ec5b61b3d5e8e38d358587f69ed955aa1f36ba2f95c28a40ffe20", + "typeString": "literal_string \"no handler for resourceID\"" + } + ], + "id": 691, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "13636:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13636:91:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 702, + "nodeType": "ExpressionStatement", + "src": "13636:91:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 706, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "13750:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 707, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_status", + "nodeType": "MemberAccess", + "referencedDeclaration": 43, + "src": "13750:16:0", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + ], + "id": 705, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13745:4:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 704, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13745:4:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13745:22:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 709, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13771:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "13745:27:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "70726f706f73616c20616c7265616479206578656375746564", + "id": 711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13774:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_fcb55c22e4cb4c20ef1baada257b62e82b2a7e0accec2b76ffeb478011fafce5", + "typeString": "literal_string \"proposal already executed\"" + }, + "value": "proposal already executed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_fcb55c22e4cb4c20ef1baada257b62e82b2a7e0accec2b76ffeb478011fafce5", + "typeString": "literal_string \"proposal already executed\"" + } + ], + "id": 703, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "13737:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13737:65:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 713, + "nodeType": "ExpressionStatement", + "src": "13737:65:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "13820:54:0", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 715, + "name": "_hasVotedOnProposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "13821:19:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint72_$_t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_bool_$_$_$", + "typeString": "mapping(uint72 => mapping(bytes32 => mapping(address => bool)))" + } + }, + "id": 717, + "indexExpression": { + "argumentTypes": null, + "id": 716, + "name": "nonceAndID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 669, + "src": "13841:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13821:31:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(bytes32 => mapping(address => bool))" + } + }, + "id": 719, + "indexExpression": { + "argumentTypes": null, + "id": 718, + "name": "dataHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "13853:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13821:41:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 722, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 720, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "13863:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "13863:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13821:53:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "72656c6179657220616c726561647920766f746564", + "id": 724, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13876:23:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0bc9c5100729666c219a147072032fe3fda273fedfa160b31a35f38bd9d0632b", + "typeString": "literal_string \"relayer already voted\"" + }, + "value": "relayer already voted" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0bc9c5100729666c219a147072032fe3fda273fedfa160b31a35f38bd9d0632b", + "typeString": "literal_string \"relayer already voted\"" + } + ], + "id": 714, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "13812:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13812:88:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 726, + "nodeType": "ExpressionStatement", + "src": "13812:88:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 729, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "13920:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 730, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_status", + "nodeType": "MemberAccess", + "referencedDeclaration": 43, + "src": "13920:16:0", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + ], + "id": 728, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "13915:4:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 727, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13915:4:0", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13915:22:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 732, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13941:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "13915:27:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 798, + "nodeType": "Block", + "src": "14485:134:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 782, + "name": "dataHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "14507:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 783, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "14519:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 784, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_dataHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 35, + "src": "14519:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "14507:30:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6461746168617368206d69736d61746368", + "id": 786, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14539:19:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e3209b3b3221a11cdef33af435affcc74bff38eb4aaafc629c451edb5bb6cf58", + "typeString": "literal_string \"datahash mismatch\"" + }, + "value": "datahash mismatch" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e3209b3b3221a11cdef33af435affcc74bff38eb4aaafc629c451edb5bb6cf58", + "typeString": "literal_string \"datahash mismatch\"" + } + ], + "id": 781, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14499:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14499:60:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 788, + "nodeType": "ExpressionStatement", + "src": "14499:60:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 794, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "14597:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14597:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 789, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "14573:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 792, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_yesVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 38, + "src": "14573:18:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14573:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14573:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 797, + "nodeType": "ExpressionStatement", + "src": "14573:35:0" + } + ] + }, + "id": 799, + "nodeType": "IfStatement", + "src": "13911:708:0", + "trueBody": { + "id": 780, + "nodeType": "Block", + "src": "13944:535:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "13958:17:0", + "subExpression": { + "argumentTypes": null, + "id": 734, + "name": "_totalProposals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 24, + "src": "13960:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 736, + "nodeType": "ExpressionStatement", + "src": "13958:17:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 737, + "name": "_proposals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 60, + "src": "13989:10:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint72_$_t_mapping$_t_bytes32_$_t_struct$_Proposal_$46_storage_$_$", + "typeString": "mapping(uint72 => mapping(bytes32 => struct Bridge.Proposal storage ref))" + } + }, + "id": 740, + "indexExpression": { + "argumentTypes": null, + "id": 738, + "name": "nonceAndID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 669, + "src": "14000:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13989:22:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Proposal_$46_storage_$", + "typeString": "mapping(bytes32 => struct Bridge.Proposal storage ref)" + } + }, + "id": 741, + "indexExpression": { + "argumentTypes": null, + "id": 739, + "name": "dataHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "14012:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13989:32:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage", + "typeString": "struct Bridge.Proposal storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 743, + "name": "resourceID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 643, + "src": "14065:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 744, + "name": "dataHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "14105:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 748, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14157:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "id": 747, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "14143:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_$", + "typeString": "function (uint256) pure returns (address[] memory)" + }, + "typeName": { + "baseType": { + "id": 745, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14147:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 746, + "length": null, + "nodeType": "ArrayTypeName", + "src": "14147:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 749, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14143:16:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 753, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14202:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 752, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "14188:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_$", + "typeString": "function (uint256) pure returns (address[] memory)" + }, + "typeName": { + "baseType": { + "id": 750, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14192:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 751, + "length": null, + "nodeType": "ArrayTypeName", + "src": "14192:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 754, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14188:16:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 755, + "name": "ProposalStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 31, + "src": "14232:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ProposalStatus_$31_$", + "typeString": "type(enum Bridge.ProposalStatus)" + } + }, + "id": 756, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Active", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14232:21:0", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 757, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "14288:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14288:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 742, + "name": "Proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46, + "src": "14024:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Proposal_$46_storage_ptr_$", + "typeString": "type(struct Bridge.Proposal storage pointer)" + } + }, + "id": 759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "_resourceID", + "_dataHash", + "_yesVotes", + "_noVotes", + "_status", + "_proposedBlock" + ], + "nodeType": "FunctionCall", + "src": "14024:295:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_memory", + "typeString": "struct Bridge.Proposal memory" + } + }, + "src": "13989:330:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage", + "typeString": "struct Bridge.Proposal storage ref" + } + }, + "id": 761, + "nodeType": "ExpressionStatement", + "src": "13989:330:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 762, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "14334:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 765, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_yesVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 38, + "src": "14334:18:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 766, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 764, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14353:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14334:21:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 767, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "14358:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14358:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "14334:34:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 770, + "nodeType": "ExpressionStatement", + "src": "14334:34:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 772, + "name": "chainID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 639, + "src": "14401:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 773, + "name": "depositNonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 641, + "src": "14410:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 774, + "name": "ProposalStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 31, + "src": "14424:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ProposalStatus_$31_$", + "typeString": "type(enum Bridge.ProposalStatus)" + } + }, + "id": 775, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Active", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14424:21:0", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + }, + { + "argumentTypes": null, + "id": 776, + "name": "resourceID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 643, + "src": "14447:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 777, + "name": "dataHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "14459:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 771, + "name": "ProposalEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 104, + "src": "14387:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint8_$_t_uint64_$_t_enum$_ProposalStatus_$31_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (uint8,uint64,enum Bridge.ProposalStatus,bytes32,bytes32)" + } + }, + "id": 778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14387:81:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 779, + "nodeType": "EmitStatement", + "src": "14382:86:0" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 800, + "name": "_hasVotedOnProposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "14637:19:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint72_$_t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_bool_$_$_$", + "typeString": "mapping(uint72 => mapping(bytes32 => mapping(address => bool)))" + } + }, + "id": 805, + "indexExpression": { + "argumentTypes": null, + "id": 801, + "name": "nonceAndID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 669, + "src": "14657:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint72", + "typeString": "uint72" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14637:31:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(bytes32 => mapping(address => bool))" + } + }, + "id": 806, + "indexExpression": { + "argumentTypes": null, + "id": 802, + "name": "dataHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "14669:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "14637:41:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 807, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 803, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "14679:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14679:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14637:53:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14693:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "14637:60:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 810, + "nodeType": "ExpressionStatement", + "src": "14637:60:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 812, + "name": "chainID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 639, + "src": "14725:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 813, + "name": "depositNonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 641, + "src": "14734:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 814, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "14748:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 815, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_status", + "nodeType": "MemberAccess", + "referencedDeclaration": 43, + "src": "14748:16:0", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + }, + { + "argumentTypes": null, + "id": 816, + "name": "resourceID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 643, + "src": "14766:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 811, + "name": "ProposalVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 114, + "src": "14712:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint8_$_t_uint64_$_t_enum$_ProposalStatus_$31_$_t_bytes32_$returns$__$", + "typeString": "function (uint8,uint64,enum Bridge.ProposalStatus,bytes32)" + } + }, + "id": 817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14712:65:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 818, + "nodeType": "EmitStatement", + "src": "14707:70:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 819, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "14842:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 820, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_yesVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 38, + "src": "14842:18:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 821, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14842:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 822, + "name": "_relayerThreshold", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "14871:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14842:46:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 868, + "nodeType": "IfStatement", + "src": "14838:507:0", + "trueBody": { + "id": 867, + "nodeType": "Block", + "src": "14890:455:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 825, + "name": "dataHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "14912:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 826, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "14924:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 827, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_dataHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 35, + "src": "14924:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "14912:30:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "6461746120646f65736e2774206d61746368206461746168617368", + "id": 829, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14944:29:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_37d86f109f909109dc6877be2d485881af52bdb007799914a63fc66c911a84aa", + "typeString": "literal_string \"data doesn't match datahash\"" + }, + "value": "data doesn't match datahash" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_37d86f109f909109dc6877be2d485881af52bdb007799914a63fc66c911a84aa", + "typeString": "literal_string \"data doesn't match datahash\"" + } + ], + "id": 824, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14904:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14904:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 831, + "nodeType": "ExpressionStatement", + "src": "14904:70:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 832, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "14989:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 834, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "_status", + "nodeType": "MemberAccess", + "referencedDeclaration": 43, + "src": "14989:16:0", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 835, + "name": "ProposalStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 31, + "src": "15008:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ProposalStatus_$31_$", + "typeString": "type(enum Bridge.ProposalStatus)" + } + }, + "id": 836, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Executed", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15008:23:0", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + }, + "src": "14989:42:0", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + }, + "id": 838, + "nodeType": "ExpressionStatement", + "src": "14989:42:0" + }, + { + "assignments": [ + 840 + ], + "declarations": [ + { + "constant": false, + "id": 840, + "name": "depositHandler", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 867, + "src": "15046:30:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDepositExecute_$5845", + "typeString": "contract IDepositExecute" + }, + "typeName": { + "contractScope": null, + "id": 839, + "name": "IDepositExecute", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5845, + "src": "15046:15:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDepositExecute_$5845", + "typeString": "contract IDepositExecute" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 847, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 842, + "name": "_resourceIDToHandlerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "15095:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$", + "typeString": "mapping(bytes32 => address)" + } + }, + "id": 845, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 843, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "15123:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 844, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_resourceID", + "nodeType": "MemberAccess", + "referencedDeclaration": 33, + "src": "15123:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15095:49:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 841, + "name": "IDepositExecute", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5845, + "src": "15079:15:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IDepositExecute_$5845_$", + "typeString": "type(contract IDepositExecute)" + } + }, + "id": 846, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15079:66:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDepositExecute_$5845", + "typeString": "contract IDepositExecute" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15046:99:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 851, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "15191:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 852, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_resourceID", + "nodeType": "MemberAccess", + "referencedDeclaration": 33, + "src": "15191:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "id": 853, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 645, + "src": "15213:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + ], + "expression": { + "argumentTypes": null, + "id": 848, + "name": "depositHandler", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 840, + "src": "15160:14:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDepositExecute_$5845", + "typeString": "contract IDepositExecute" + } + }, + "id": 850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "executeProposal", + "nodeType": "MemberAccess", + "referencedDeclaration": 5844, + "src": "15160:30:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_bytes32_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (bytes32,bytes memory) external" + } + }, + "id": 854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15160:58:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 855, + "nodeType": "ExpressionStatement", + "src": "15160:58:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 857, + "name": "chainID", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 639, + "src": "15252:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "argumentTypes": null, + "id": 858, + "name": "depositNonce", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 641, + "src": "15261:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 859, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "15275:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 860, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_status", + "nodeType": "MemberAccess", + "referencedDeclaration": 43, + "src": "15275:16:0", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 861, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "15293:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 862, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_resourceID", + "nodeType": "MemberAccess", + "referencedDeclaration": 33, + "src": "15293:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 863, + "name": "proposal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 684, + "src": "15315:8:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Proposal_$46_storage_ptr", + "typeString": "struct Bridge.Proposal storage pointer" + } + }, + "id": 864, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_dataHash", + "nodeType": "MemberAccess", + "referencedDeclaration": 35, + "src": "15315:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_enum$_ProposalStatus_$31", + "typeString": "enum Bridge.ProposalStatus" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 856, + "name": "ProposalEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 104, + "src": "15238:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint8_$_t_uint64_$_t_enum$_ProposalStatus_$31_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (uint8,uint64,enum Bridge.ProposalStatus,bytes32,bytes32)" + } + }, + "id": 865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15238:96:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 866, + "nodeType": "EmitStatement", + "src": "15233:101:0" + } + ] + } + } + ] + }, + "documentation": { + "id": 637, + "nodeType": "StructuredDocumentation", + "src": "12560:641:0", + "text": "@notice When called, {msg.sender} will be marked as voting in favor of proposal.\n@notice Only callable by relayers when Bridge is not paused.\n@param chainID ID of chain deposit originated from.\n@param depositNonce ID of deposited generated by origin Bridge contract.\n@param data data provided when deposit was made.\n@notice Proposal must not have already been passed or executed.\n@notice {msg.sender} must not have already voted on proposal.\n@notice Emits {ProposalEvent} event with status indicating the proposal status.\n@notice Emits {ProposalVote} event." + }, + "functionSelector": "c0331b3e", + "id": 870, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 648, + "modifierName": { + "argumentTypes": null, + "id": 647, + "name": "onlyRelayers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 145, + "src": "13314:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13314:12:0" + }, + { + "arguments": null, + "id": 650, + "modifierName": { + "argumentTypes": null, + "id": 649, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5930, + "src": "13327:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13327:13:0" + } + ], + "name": "voteProposal", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 646, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 639, + "name": "chainID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 870, + "src": "13228:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 638, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "13228:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 641, + "name": "depositNonce", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 870, + "src": "13243:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 640, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "13243:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 643, + "name": "resourceID", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 870, + "src": "13264:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 642, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13264:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 645, + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 870, + "src": "13284:19:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 644, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "13284:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13227:77:0" + }, + "returnParameters": { + "id": 651, + "nodeType": "ParameterList", + "parameters": [], + "src": "13341:0:0" + }, + "scope": 906, + "src": "13206:2145:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 904, + "nodeType": "Block", + "src": "15842:110:0", + "statements": [ + { + "body": { + "id": 902, + "nodeType": "Block", + "src": "15892:54:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 897, + "name": "amounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 877, + "src": "15924:7:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 899, + "indexExpression": { + "argumentTypes": null, + "id": 898, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 883, + "src": "15932:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15924:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 893, + "name": "addrs", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 874, + "src": "15906:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_payable_$dyn_calldata_ptr", + "typeString": "address payable[] calldata" + } + }, + "id": 895, + "indexExpression": { + "argumentTypes": null, + "id": 894, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 883, + "src": "15912:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15906:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15906:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15906:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 901, + "nodeType": "ExpressionStatement", + "src": "15906:29:0" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 886, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 883, + "src": "15869:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 887, + "name": "addrs", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 874, + "src": "15873:5:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_payable_$dyn_calldata_ptr", + "typeString": "address payable[] calldata" + } + }, + "id": 888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15873:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15869:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 903, + "initializationExpression": { + "assignments": [ + 883 + ], + "declarations": [ + { + "constant": false, + "id": 883, + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 903, + "src": "15857:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 882, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "15857:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 885, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 884, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15866:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "15857:10:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "15887:3:0", + "subExpression": { + "argumentTypes": null, + "id": 890, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 883, + "src": "15887:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 892, + "nodeType": "ExpressionStatement", + "src": "15887:3:0" + }, + "nodeType": "ForStatement", + "src": "15852:94:0" + } + ] + }, + "documentation": { + "id": 871, + "nodeType": "StructuredDocumentation", + "src": "15357:379:0", + "text": "@notice Transfers eth in the contract to the specified addresses. The parameters addrs and amounts are mapped 1-1.\nThis means that the address at index 0 for addrs will receive the amount (in WEI) from amounts at index 0.\n@param addrs Array of addresses to transfer {amounts} to.\n@param amounts Array of amonuts to transfer to {addrs}." + }, + "functionSelector": "4603ae38", + "id": 905, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 880, + "modifierName": { + "argumentTypes": null, + "id": 879, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "15832:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "15832:9:0" + } + ], + "name": "transferFunds", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 878, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 874, + "name": "addrs", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 905, + "src": "15764:32:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_payable_$dyn_calldata_ptr", + "typeString": "address payable[]" + }, + "typeName": { + "baseType": { + "id": 872, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15764:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 873, + "length": null, + "nodeType": "ArrayTypeName", + "src": "15764:17:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_payable_$dyn_storage_ptr", + "typeString": "address payable[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 877, + "name": "amounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 905, + "src": "15798:23:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 875, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "15798:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 876, + "length": null, + "nodeType": "ArrayTypeName", + "src": "15798:6:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "15763:59:0" + }, + "returnParameters": { + "id": 881, + "nodeType": "ParameterList", + "parameters": [], + "src": "15842:0:0" + }, + "scope": 906, + "src": "15741:211:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 907, + "src": "479:15476:0" + } + ], + "src": "0:15956:0" + }, + "compiler": { + "name": "solc", + "version": "0.6.4+commit.1dca32f3.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.1.0", + "updatedAt": "2021-07-13T16:47:45.769Z", + "devdoc": { + "author": "ChainSafe Systems.", + "methods": { + "adminAddRelayer(address)": { + "params": { + "relayerAddress": "Address of relayer to be added." + } + }, + "adminChangeRelayerThreshold(uint256)": { + "params": { + "newThreshold": "Value {_relayerThreshold} will be changed to." + } + }, + "adminRemoveRelayer(address)": { + "params": { + "relayerAddress": "Address of relayer to be removed." + } + }, + "adminSetBurnable(address,address)": { + "params": { + "handlerAddress": "Address of handler resource will be set for.", + "tokenAddress": "Address of contract to be called when a deposit is made and a deposited is executed." + } + }, + "adminSetGenericResource(address,bytes32,address,bytes4,bytes4)": { + "params": { + "contractAddress": "Address of contract to be called when a deposit is made and a deposited is executed.", + "handlerAddress": "Address of handler resource will be set for.", + "resourceID": "ResourceID to be used when making deposits." + } + }, + "adminSetResource(address,bytes32,address)": { + "params": { + "handlerAddress": "Address of handler resource will be set for.", + "resourceID": "ResourceID to be used when making deposits.", + "tokenAddress": "Address of contract to be called when a deposit is made and a deposited is executed." + } + }, + "adminWithdraw(address,address,address,uint256)": { + "params": { + "amountOrTokenID": "Either the amount of ERC20 tokens or the ERC721 token ID to withdraw.", + "handlerAddress": "Address of handler to withdraw from.", + "recipient": "Address to withdraw tokens to.", + "tokenAddress": "Address of token to withdraw." + } + }, + "changeFee(uint8,uint256)": { + "params": { + "newFee": "Value {_fees[destinationChainID]} will be updated to." + } + }, + "constructor": { + "params": { + "chainID": "ID of chain the Bridge contract exists on.", + "initialRelayerThreshold": "Number of votes needed for a deposit proposal to be considered passed.", + "initialRelayers": "Addresses that should be initially granted the relayer role." + } + }, + "deposit(uint8,bytes32,bytes,bytes)": { + "params": { + "_auxData": "Unused parameter, can be used for everything, for example, writing IDs of apps from which the deposit was made.", + "data": "Additional data to be passed to specified handler.", + "destinationChainID": "ID of chain deposit will be bridged to.", + "resourceID": "ResourceID used to find address of handler to be used for deposit." + } + }, + "getProposal(uint8,uint64,bytes32)": { + "params": { + "dataHash": "Hash of data to be provided when deposit proposal is executed.", + "depositNonce": "ID of proposal generated by proposal's origin Bridge contract.", + "originChainID": "Chain ID deposit originated from." + }, + "returns": { + "_0": "Proposal which consists of: - _dataHash Hash of data to be provided when deposit proposal is executed. - _yesVotes Number of votes in favor of proposal. - _noVotes Number of votes against proposal. - _status Current status of proposal." + } + }, + "getRoleAdmin(bytes32)": { + "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. * To change a role's admin, use {_setRoleAdmin}." + }, + "getRoleMember(bytes32,uint256)": { + "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. * Role bearers are not sorted in any particular way, and their ordering may change at any point. * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." + }, + "getRoleMemberCount(bytes32)": { + "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." + }, + "grantRole(bytes32,address)": { + "details": "Grants `role` to `account`. * If `account` had not been already granted `role`, emits a {RoleGranted} event. * Requirements: * - the caller must have ``role``'s admin role." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "isRelayer(address)": { + "params": { + "relayer": "Address to check." + } + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "renounceAdmin(address)": { + "params": { + "newAdmin": "Address that admin role will be granted to." + } + }, + "renounceRole(bytes32,address)": { + "details": "Revokes `role` from the calling account. * Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). * If the calling account had been granted `role`, emits a {RoleRevoked} event. * Requirements: * - the caller must be `account`." + }, + "revokeRole(bytes32,address)": { + "details": "Revokes `role` from `account`. * If `account` had been granted `role`, emits a {RoleRevoked} event. * Requirements: * - the caller must have ``role``'s admin role." + }, + "transferFunds(address[],uint256[])": { + "params": { + "addrs": "Array of addresses to transfer {amounts} to.", + "amounts": "Array of amonuts to transfer to {addrs}." + } + }, + "voteProposal(uint8,uint64,bytes32,bytes)": { + "params": { + "chainID": "ID of chain deposit originated from.", + "data": "data provided when deposit was made.", + "depositNonce": "ID of deposited generated by origin Bridge contract." + } + } + }, + "title": "Facilitates deposits, creation and votiing of deposit proposals, and deposit executions." + }, + "userdoc": { + "methods": { + "adminAddRelayer(address)": { + "notice": "Grants {relayerAddress} the relayer role and increases {_totalRelayer} count.Only callable by an address that currently has the admin role.Emits {RelayerAdded} event." + }, + "adminChangeRelayerThreshold(uint256)": { + "notice": "Modifies the number of votes required for a proposal to be considered passed.Only callable by an address that currently has the admin role.Emits {RelayerThresholdChanged} event." + }, + "adminPauseTransfers()": { + "notice": "Pauses deposits, proposal creation and voting, and deposit executions.Only callable by an address that currently has the admin role." + }, + "adminRemoveRelayer(address)": { + "notice": "Removes relayer role for {relayerAddress} and decreases {_totalRelayer} count.Only callable by an address that currently has the admin role.Emits {RelayerRemoved} event." + }, + "adminSetBurnable(address,address)": { + "notice": "Sets a resource as burnable for handler contracts that use the IERCHandler interface.Only callable by an address that currently has the admin role." + }, + "adminSetGenericResource(address,bytes32,address,bytes4,bytes4)": { + "notice": "Sets a new resource for handler contracts that use the IGenericHandler interface, and maps the {handlerAddress} to {resourceID} in {_resourceIDToHandlerAddress}.Only callable by an address that currently has the admin role." + }, + "adminSetResource(address,bytes32,address)": { + "notice": "Sets a new resource for handler contracts that use the IERCHandler interface, and maps the {handlerAddress} to {resourceID} in {_resourceIDToHandlerAddress}.Only callable by an address that currently has the admin role." + }, + "adminUnpauseTransfers()": { + "notice": "Unpauses deposits, proposal creation and voting, and deposit executions.Only callable by an address that currently has the admin role." + }, + "adminWithdraw(address,address,address,uint256)": { + "notice": "Used to manually withdraw funds from ERC safes." + }, + "changeFee(uint8,uint256)": { + "notice": "Changes deposit fee.Only callable by admin." + }, + "constructor": "Initializes Bridge, creates and grants {msg.sender} the admin role, creates and grants {initialRelayers} the relayer role.", + "deposit(uint8,bytes32,bytes,bytes)": { + "notice": "Initiates a transfer using a specified handler contract.Only callable when Bridge is not paused.Emits {Deposit} event." + }, + "getProposal(uint8,uint64,bytes32)": { + "notice": "Returns a proposal." + }, + "isRelayer(address)": { + "notice": "Returns true if {relayer} has the relayer role." + }, + "renounceAdmin(address)": { + "notice": "Removes admin role from {msg.sender} and grants it to {newAdmin}.Only callable by an address that currently has the admin role." + }, + "transferFunds(address[],uint256[])": { + "notice": "Transfers eth in the contract to the specified addresses. The parameters addrs and amounts are mapped 1-1. This means that the address at index 0 for addrs will receive the amount (in WEI) from amounts at index 0." + }, + "voteProposal(uint8,uint64,bytes32,bytes)": { + "notice": "When called, {msg.sender} will be marked as voting in favor of proposal.Only callable by relayers when Bridge is not paused.Proposal must not have already been passed or executed.{msg.sender} must not have already voted on proposal.Emits {ProposalEvent} event with status indicating the proposal status.Emits {ProposalVote} event." + } + } + } + } \ No newline at end of file diff --git a/src/constants/chains.ts b/src/constants/chains.ts index 6c258d6..dc0fc95 100644 --- a/src/constants/chains.ts +++ b/src/constants/chains.ts @@ -4,7 +4,7 @@ export enum SupportedChainId { // RINKEBY = 4, // GÖRLI = 5, // KOVAN = 42, - // MATIC = 137, + MATIC = 137, // MATIC_TESTNET = 80001, // FANTOM = 250, // FANTOM_TESTNET = 4002, @@ -15,7 +15,7 @@ export enum SupportedChainId { // ARBITRUM_TESTNET = 79377087078960, // MOONBEAM_TESTNET = 1287, MOONRIVER = 1285, - // AVALANCHE = 43114, + AVALANCHE = 43114, // AVALANCHE_TESTNET = 43113, // HECO = 128, // HECO_TESTNET = 256, diff --git a/src/hooks/useContract.ts b/src/hooks/useContract.ts index 681470a..4f93479 100644 --- a/src/hooks/useContract.ts +++ b/src/hooks/useContract.ts @@ -75,6 +75,7 @@ import WETH9_ABI from '../constants/abis/weth.json' import ZAPPER_ABI from '../constants/abis/zapper.json' import LIMIT_ORDER_ABI from '../constants/abis/limit-order.json' import LIMIT_ORDER_HELPER_ABI from '../constants/abis/limit-order-helper.json' +import RELAY_BRIDGE_ABI from '../constants/abis/relay-bridge.json' import { getContract } from '../functions/contract' import { useActiveWeb3React } from './useActiveWeb3React' import { useMemo } from 'react' @@ -110,6 +111,10 @@ export function useAnyswapTokenContract(tokenAddress?: string, withSignerIfPossi return useContract(tokenAddress, ANYSWAP_ERC20_ABI, withSignerIfPossible) } +export function useRelayBridgeContract(tokenAddress?: string, withSignerIfPossible?: boolean): Contract | null { + return useContract(tokenAddress, RELAY_BRIDGE_ABI.abi, withSignerIfPossible) +} + export function useWETH9Contract(withSignerIfPossible?: boolean): Contract | null { const { chainId } = useActiveWeb3React() return useContract(chainId ? WNATIVE[chainId] : undefined, WETH9_ABI, withSignerIfPossible) diff --git a/src/modals/ChainModal/index.tsx b/src/modals/ChainModal/index.tsx index 3c4f142..2b4e0fd 100644 --- a/src/modals/ChainModal/index.tsx +++ b/src/modals/ChainModal/index.tsx @@ -60,6 +60,28 @@ export const SUPPORTED_NETWORKS: { rpcUrls: ['https://rpc.moonriver.moonbeam.network', 'https://moonriver.api.onfinality.io/public'], blockExplorerUrls: ['https://blockscout.moonriver.moonbeam.network/'], }, + [ChainId.MATIC]: { + chainId: '0x89', + chainName: 'Matic', + nativeCurrency: { + name: 'Matic', + symbol: 'MATIC', + decimals: 18, + }, + rpcUrls: ['https://rpc-mainnet.maticvigil.com/'], + blockExplorerUrls: ['https://polygonscan.com/'], + }, + [ChainId.AVALANCHE]: { + chainId: '0xa86a', + chainName: 'Avalanche', + nativeCurrency: { + name: 'Avalanche', + symbol: 'AVAX', + decimals: 18, + }, + rpcUrls: ['https://api.avax.network/ext/bc/C/rpc'], + blockExplorerUrls: ['https://avascan.info/'], + }, } interface ChainModalProps { diff --git a/src/pages/bridge/index.tsx b/src/pages/bridge/index.tsx index c7ffde2..9fcfca3 100644 --- a/src/pages/bridge/index.tsx +++ b/src/pages/bridge/index.tsx @@ -7,11 +7,14 @@ import { Ether, JSBI, Moonriver, + Matic, + Avalanche, NATIVE, Token, WNATIVE, } from '../../sdk' import React, { useCallback, useEffect, useState } from 'react' +import cookie from 'cookie-cutter' import { AutoRow } from '../../components/Row' import Container from '../../components/Container' @@ -32,12 +35,13 @@ import ChainSelect from '../../components/ChainSelect' import { Chain, DEFAULT_CHAIN_FROM, DEFAULT_CHAIN_TO } from '../../sdk/entities/Chain' import { useBridgeInfo } from '../../features/bridge/hooks' import useSWR, { SWRResponse } from 'swr' +import { BigNumber, utils } from 'ethers'; import { getAddress } from 'ethers/lib/utils' import { formatNumber } from '../../functions' import { SUPPORTED_NETWORKS } from '../../modals/ChainModal' import { NETWORK_ICON, NETWORK_LABEL } from '../../constants/networks' import { ethers } from 'ethers' -import { useAnyswapTokenContract, useTokenContract } from '../../hooks' +import { useAnyswapTokenContract, useRelayBridgeContract, useTokenContract } from '../../hooks' import Loader from '../../components/Loader' import { getWeb3ReactContext, useWeb3React } from '@web3-react/core' import { BridgeContextName } from '../../constants' @@ -47,6 +51,7 @@ import { useTransactionAdder } from '../../state/bridgeTransactions/hooks' import { useRouter } from 'next/router' import Modal from '../../components/Modal' import ModalHeader from '../../components/ModalHeader' +import { getRalayBridgeData, getRalayBridgeFee } from '../../services/covalent' type AnyswapTokenInfo = { ID: string @@ -67,6 +72,9 @@ type AnyswapTokenInfo = { MinimumSwapFee: number PlusGasPricePercentage: number SwapFeeRate: number + ResourceId?: string + BridgeFee?: string + DestChainIdInRelay?: number } type AnyswapResultPairInfo = { @@ -94,15 +102,23 @@ export type AnyswapTokensMap = { [chainId: number]: { [contract: string]: Availa export default function Bridge() { const { i18n } = useLingui() - + const initData: any[] = [] + const initFeeData: any[] = [] + const [relayData, setRelayData] = useState(initData) + const [relayFees, setRelayFees] = useState(initFeeData) + const [hasRelayData, setHasRelayData] = useState(false) + const [hasRelayFees, setHasRelayFees] = useState(false) const { account: activeAccount, chainId: activeChainId } = useActiveWeb3React() const { account, chainId, library, activate } = useWeb3React(BridgeContextName) const { push } = useRouter() + let allChains: number[] = [] + const rbd = getRalayBridgeData(hasRelayData) + const relayFeesData = getRalayBridgeFee(hasRelayFees) const addTransaction = useTransactionAdder() const currentChainFrom = chainId && - SUPPORTED_NETWORKS[chainId] && { id: chainId, icon: NETWORK_ICON[chainId], name: NETWORK_LABEL[chainId] } + SUPPORTED_NETWORKS[chainId] && { id: chainId, icon: NETWORK_ICON[chainId], name: NETWORK_LABEL[chainId], currencyName: SUPPORTED_NETWORKS[chainId].nativeCurrency.symbol } useEffect(() => { activate(bridgeInjected) @@ -119,10 +135,20 @@ export default function Bridge() { const [chainTo, setChainTo] = useState( chainId == ChainId.MOONRIVER ? DEFAULT_CHAIN_FROM : DEFAULT_CHAIN_TO ) + const [relayBridges, setRelayBridges] = useState(false) + useEffect(() => { + const relayChains = [43114, 137] + if (relayChains.includes(chainTo?.id) || relayChains.includes(chainFrom?.id)) { + setRelayBridges(true) + } else { + setRelayBridges(false) + } + }, [chainTo, chainFrom]) const [tokenList, setTokenList] = useState([]) const [currency0, setCurrency0] = useState(null) const [currencyAmount, setCurrencyAmount] = useState('') + const [listSwapTokens, setListSwapTokens] = useState({} as AnyswapTokensMap) const [tokenToBridge, setTokenToBridge] = useState(null) const currencyContract = useTokenContract(currency0?.isToken && currency0?.address, true) const anyswapCurrencyContract = useAnyswapTokenContract( @@ -148,7 +174,6 @@ export default function Bridge() { Object.keys(data || {}).map((key) => { const info: AnyswapResultPairInfo = data[key] - let sourceContractAddress = info.SrcToken.ContractAddress if (!sourceContractAddress) { sourceContractAddress = WNATIVE[parseInt(info.srcChainID)].address @@ -213,33 +238,98 @@ export default function Bridge() { } } }) - return result }) ) + const addRelayData = (res: AnyswapTokensMap, relayBridgeData: any[]) => { + if (relayBridgeData.length && res) { + relayBridgeData.map(data => { + data.tokens.map(token => { + const preparedTokenData = {} as AvailableChainsInfo + const relayBridgeFee = relayFees.length && (relayFees.find(feeData => feeData.chainId === data.networkId)) + preparedTokenData.destChainID = token?.allowedChainsToTransfer[0] + const destinationChainId = relayFees.find(feeData => feeData.chainId === preparedTokenData.destChainID) + preparedTokenData.symbol = token.symbol + preparedTokenData.name = token.symbol + preparedTokenData.id = `${token.symbol}v5` + preparedTokenData.other = {} as AnyswapTokenInfo + preparedTokenData.other.ContractAddress = data?.bridgeAddress + preparedTokenData.other.DestChainIdInRelay = destinationChainId?.chainBridgeId + preparedTokenData.other.BridgeFee = relayBridgeFee?.crosschainFee + preparedTokenData.other.ResourceId = token.resourceId + preparedTokenData.token = {} as AnyswapTokenInfo + preparedTokenData.token.Decimals = token.decimals + preparedTokenData.token.Symbol = token.symbol + if (res[data.networkId]) { + res[data.networkId][token.address.toLowerCase()] = preparedTokenData + } else { + res[data.networkId] = {} as { string, AvailableChainsInfo } + res[data.networkId][token.address.toLowerCase()] = preparedTokenData + } + }) + }) + return res + } + + } + + const relayBridgeContract = useRelayBridgeContract( + tokenToBridge && tokenToBridge.other.ContractAddress, + true + ) useEffect(() => { - let tokens: Currency[] = Object.keys((anyswapInfo && anyswapInfo[chainFrom.id]) || {}) - .filter((r) => anyswapInfo[chainFrom.id][r].destChainID == chainTo.id.toString()) - .map((r) => { - const info: AvailableChainsInfo = anyswapInfo[chainFrom.id][r] - if (r.toLowerCase() == WNATIVE[chainFrom.id].address.toLowerCase()) { - if (chainFrom.id == ChainId.MOONRIVER) { - return Moonriver.onChain(chainFrom.id) + if (rbd) { + rbd + .then((res) => { + if (res.length) { + setRelayData(res) + setHasRelayData(true) } - if (chainFrom.id == ChainId.BSC) { - return Binance.onChain(chainFrom.id) + }) + } + if (relayFeesData) { + relayFeesData + .then(resFees => { + if (resFees.length) { + setRelayFees(resFees) + setHasRelayFees(true) } - if (chainFrom.id == ChainId.MAINNET) { - return Ether.onChain(chainFrom.id) + }) + } + }, [rbd, relayFeesData]) + + useEffect(() => { + setListSwapTokens(addRelayData(anyswapInfo, relayData)) + if (listSwapTokens) { + let tokens: Currency[] = Object.keys((listSwapTokens && listSwapTokens[chainFrom.id]) || {}) + .filter((r) => listSwapTokens[chainFrom.id][r].destChainID == chainTo.id.toString()) + .map((r) => { + const info: AvailableChainsInfo = listSwapTokens[chainFrom.id][r] + if (r.toLowerCase() == WNATIVE[chainFrom.id].address.toLowerCase()) { + if (chainFrom.id == ChainId.MOONRIVER) { + return Moonriver.onChain(chainFrom.id) + } + if (chainFrom.id == ChainId.MATIC) { + return Matic.onChain(chainFrom.id) + } + if (chainFrom.id == ChainId.AVALANCHE) { + return Avalanche.onChain(chainFrom.id) + } + if (chainFrom.id == ChainId.BSC) { + return Binance.onChain(chainFrom.id) + } + if (chainFrom.id == ChainId.MAINNET) { + return Ether.onChain(chainFrom.id) + } } - } - return new Token(chainFrom.id, getAddress(r), info.token.Decimals, info.token.Symbol, info.name) - }) + return new Token(chainFrom.id, getAddress(r), info.token.Decimals, info.token.Symbol, info.name) + }) + setTokenList(tokens) + setCurrency0(null) + setCurrencyAmount('') + } - setTokenList(tokens) - setCurrency0(null) - setCurrencyAmount('') }, [chainFrom, anyswapInfo, chainTo.id]) const handleChainFrom = useCallback( @@ -248,7 +338,7 @@ export default function Bridge() { if (chainTo.id == chain.id) { changeTo = chainFrom } - if (changeTo.id !== ChainId.MOONRIVER && chain.id !== ChainId.MOONRIVER) { + if (changeTo.id === chainFrom.id) { setChainTo(DEFAULT_CHAIN_TO) } else { setChainTo(changeTo) @@ -264,7 +354,7 @@ export default function Bridge() { if (chainFrom.id == chain.id) { changeFrom = chainTo } - if (changeFrom.id !== ChainId.MOONRIVER && chain.id !== ChainId.MOONRIVER) { + if (changeFrom.id === chainTo.id) { setChainFrom(DEFAULT_CHAIN_TO) } else { setChainFrom(changeFrom) @@ -286,14 +376,16 @@ export default function Bridge() { setCurrency0(currency) handleTypeInput('') if (currency) { + console.log("🚀 ~ file: index.tsx ~ line 358 ~ Bridge ~ currency", currency) const tokenTo = - anyswapInfo[chainFrom.id][ - currency.isToken ? currency?.address?.toLowerCase() : currency?.wrapped?.address?.toLowerCase() + listSwapTokens[chainFrom.id][ + currency.isToken ? currency?.address?.toLowerCase() : currency?.wrapped?.address?.toLowerCase() ] + console.log("🚀 ~ file: index.tsx ~ line 359 ~ Bridge ~ tokenTo", chainFrom.id, tokenTo, listSwapTokens) setTokenToBridge(tokenTo) } }, - [anyswapInfo, chainFrom.id, handleTypeInput] + [anyswapInfo, chainFrom.id, handleTypeInput, listSwapTokens] ) const insufficientBalance = () => { @@ -310,12 +402,13 @@ export default function Bridge() { } const aboveMin = () => { + console.log('currencyAmount && tokenToBridge :>> ', currencyAmount, tokenToBridge); if (currencyAmount && tokenToBridge) { const amount = parseFloat(currencyAmount) - const minAmount = parseFloat(tokenToBridge?.other?.MinimumSwap.toString()) + const minAmount = parseFloat(tokenToBridge?.other?.MinimumSwap?.toString()) return amount >= minAmount } - return false + return true } const belowMax = () => { @@ -329,55 +422,59 @@ export default function Bridge() { const getAmountToReceive = () => { if (!tokenToBridge) return 0 + if (tokenToBridge?.other?.SwapFeeRate) { + let fee = parseFloat(currencyAmount) * tokenToBridge?.other?.SwapFeeRate + if (fee < tokenToBridge?.other?.MinimumSwapFee) { + fee = tokenToBridge?.other?.MinimumSwapFee + } else if (fee > tokenToBridge?.other?.MaximumSwapFee) { + fee = tokenToBridge?.other?.MinimumSwapFee + } - let fee = parseFloat(currencyAmount) * tokenToBridge?.other?.SwapFeeRate - if (fee < tokenToBridge?.other?.MinimumSwapFee) { - fee = tokenToBridge?.other?.MinimumSwapFee - } else if (fee > tokenToBridge?.other?.MaximumSwapFee) { - fee = tokenToBridge?.other?.MinimumSwapFee + return (parseFloat(currencyAmount) - fee).toFixed(6) + } else { + return parseFloat(currencyAmount) } - return (parseFloat(currencyAmount) - fee).toFixed(6) } - const buttonDisabled = - (chainFrom && chainFrom.id !== chainId) || - !currency0 || - !currencyAmount || - currencyAmount == '' || - !aboveMin() || - !belowMax() || - insufficientBalance() || - pendingTx + const buttonDisabled = false + // (chainFrom && chainFrom.id !== chainId) || + // !currency0 || + // !currencyAmount || + // currencyAmount == '' || + // !aboveMin() || + // !belowMax() || + // insufficientBalance() || + // pendingTx const buttonText = chainFrom && chainFrom.id !== chainId ? `Switch to ${chainFrom.name} Network` : !currency0 - ? `Select a Token` - : !currencyAmount || currencyAmount == '' - ? 'Enter an Amount' - : !aboveMin() - ? `Below Minimum Amount` - : !belowMax() - ? `Above Maximum Amount` - : insufficientBalance() - ? `Insufficient Balance` - : pendingTx - ? `Confirming Transaction` - : `Bridge ${currency0?.symbol}` + ? `Select a Token` + : !currencyAmount || currencyAmount == '' + ? 'Enter an Amount' + : !aboveMin() + ? `Below Minimum Amount` + : !belowMax() + ? `Above Maximum Amount` + : insufficientBalance() + ? `Insufficient Balance` + : pendingTx + ? `Confirming Transaction` + : `Bridge ${currency0?.symbol}` const bridgeToken = async () => { const token = tokenToBridge.other - const depositAddress = currency0.chainId == ChainId.MOONRIVER ? token.ContractAddress : token.DepositAddress + const depositAddress = currency0?.chainId == ChainId.MOONRIVER ? token.ContractAddress : token.DepositAddress const amountToBridge = ethers.utils.parseUnits(currencyAmount, token.Decimals) setPendingTx(true) try { - if (currency0.chainId == ChainId.MOONRIVER) { - if (currency0.isNative) { - } else if (currency0.isToken) { + if (currency0?.chainId == ChainId.MOONRIVER) { + if (currency0?.isNative) { + } else if (currency0?.isToken) { const fn = anyswapCurrencyContract?.interface?.getFunction('Swapout') const data = anyswapCurrencyContract.interface.encodeFunctionData(fn, [amountToBridge.toString(), account]) const tx = await library.getSigner().sendTransaction({ @@ -394,7 +491,49 @@ export default function Bridge() { }) push('/bridge/history') } - } else { + } + else if (relayBridges) { + // relayBridgeContract + const hexAmount = utils.hexZeroPad(BigNumber.from(amountToBridge).toHexString(), 32).substr(2) + console.log("🚀 ~ file: index.tsx ~ line 484 ~ bridgeToken ~ hexAmount", hexAmount) + const hexAccount = utils.hexZeroPad(utils.hexlify((account.length - 2) / 2), 32).substr(2) + account.substr(2) // len(recipientAddress) (32 bytes) + console.log("🚀 ~ file: index.tsx ~ line 486 ~ bridgeToken ~ hexAccount", hexAccount) + const data = '0x' + hexAmount + hexAccount + + utils.hexZeroPad(utils.hexlify((account.length - 2) / 2), 32).substr(2) + // len(recipientAddress) (32 bytes) + account.substr(2) + const auxData = '0x00' + console.log('tokenToBridge :>> ', tokenToBridge); + console.log("🚀 ~ file: index.tsx ~ line 482 ~ bridgeToken ~ data", data) + const resultDepositTx = await relayBridgeContract + .deposit(tokenToBridge?.other?.DestChainIdInRelay.toString(), tokenToBridge?.other?.ResourceId, data, auxData, { + value: BigNumber.from(utils.parseUnits(tokenToBridge.other?.BridgeFee?.toString(), 18)), + }) + .catch((err: any) => { + console.log(err) + }) + + if (!resultDepositTx) { + return + } + + await resultDepositTx.wait() + // const fn = relayBridgeContract?.interface?.getFunction('deposit') + // const dataForTx = relayBridgeContract?.interface?.encodeFunctionData(fn, [ + // chainTo.id.toString(), tokenToBridge?.other?.ResourceId, data, auxData + // ]) + // , { + // value: BigNumber.from(utils.parseUnits(tokenToBridge.other?.BridgeFee?.toString(), 18)) + // } + //const tx = await library.getSigner().sendTransaction(dataForTx) + addTransaction(resultDepositTx, { + summary: `${i18n._(t`Bridge `)} ${tokenToBridge.symbol}`, + destChainId: chainTo.id.toString(), + srcChaindId: chainFrom.id.toString(), + pairId: tokenToBridge.id, + }) + push('/bridge/history') + } + else { if (currency0.isNative) { const tx = await library.getSigner().sendTransaction({ from: account, @@ -427,10 +566,13 @@ export default function Bridge() { } } } catch (ex) { + console.log("🚀 ~ file: index.tsx ~ line 543 ~ bridgeToken ~ ex", ex) } finally { setPendingTx(false) } } + allChains = (Object.keys(anyswapInfo || {}).map((r) => parseInt(r))) + return ( <> setShowConfirmation(false)}> @@ -523,7 +665,7 @@ export default function Bridge() {
parseInt(r))} + availableChains={allChains} label="From" chain={chainFrom} otherChain={chainTo} @@ -534,7 +676,7 @@ export default function Bridge() { parseInt(r))} + availableChains={allChains} label="To" chain={chainTo} otherChain={chainFrom} @@ -555,7 +697,7 @@ export default function Bridge() { chainFrom={chainFrom} chainTo={chainTo} tokenList={tokenList} - chainList={anyswapInfo} + chainList={listSwapTokens} /> @@ -599,21 +741,21 @@ export default function Bridge() {
)} -
+ {tokenToBridge?.other?.SwapFeeRate &&
Minimum Bridge Amount: {formatNumber(tokenToBridge?.other?.MinimumSwap)}{' '} {tokenToBridge?.other?.Symbol}
-
-
+
} + {tokenToBridge?.other?.SwapFeeRate &&
Maximum Bridge Amount: {formatNumber(tokenToBridge?.other?.MaximumSwap)}{' '} {tokenToBridge?.other?.Symbol}
-
+
}
- Fee: {formatNumber(tokenToBridge?.other?.SwapFeeRate * 100)} % + Fee: {tokenToBridge?.other?.SwapFeeRate ? formatNumber(tokenToBridge?.other?.SwapFeeRate * 100) + '%' : tokenToBridge?.other?.BridgeFee + ' ' + currentChainFrom.currencyName}
@@ -630,7 +772,9 @@ export default function Bridge() { justify={'center'} gap={'0 3px'} > - {i18n._(t`Powered by Anyswap Network`)} + {relayBridges ? + i18n._(t`Powered by Relay`) : + i18n._(t`Powered by Anyswap Network`)}
diff --git a/src/services/covalent/fetchers.ts b/src/services/covalent/fetchers.ts index d99c5b0..e278875 100644 --- a/src/services/covalent/fetchers.ts +++ b/src/services/covalent/fetchers.ts @@ -56,3 +56,9 @@ export const getChainsStatus = () => // TODO: CLASS B export const getSushiSwapLiquidityTransactions = (chainId = ChainId.MAINNET, address) => fetch(`https://api.covalenthq.com/v1/${chainId}/address/${address}/stacks/sushiswap/acts/`).then((res) => res.json()) + +export const getRalayBridgeData = (notloaded: boolean) => + (notloaded) ? null : fetch(`https://relay-api-33e56.ondigitalocean.app/api/crosschain-config?chainIds=2,5`).then((res) => res.json()) + +export const getRalayBridgeFee = (notloaded: boolean) => + (notloaded) ? null : fetch(`https://relay-api-33e56.ondigitalocean.app/api/crosschain-fee`).then((res) => res.json()) \ No newline at end of file From 49ba94363729583b7a1551c3d62f065cc1b2abcb Mon Sep 17 00:00:00 2001 From: mrbot22 Date: Fri, 8 Oct 2021 20:08:46 +0300 Subject: [PATCH 2/3] add relay with matic and avalanche --- package.json | 14 +-- src/pages/bridge/history/index.tsx | 8 +- src/pages/bridge/index.tsx | 137 +++++++++++++++++------------ 3 files changed, 92 insertions(+), 67 deletions(-) diff --git a/package.json b/package.json index cc25622..b3a1a86 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "eslint": "^7.30.0", "eslint-config-next": "^11.0.1", "eth-permit": "^0.1.10", - "ethers": "^5.4.1", + "ethers": "^5.4.7", "fathom-client": "^3.0.0", "feather-icons": "^4.28.0", "fuse.js": "^6.4.6", @@ -100,7 +100,7 @@ "lottie-react": "^2.1.0", "madge": "^5.0.1", "next": "^11.0.1", - "next-pwa": "^5.2.22", + "next-pwa": "^5.3.1", "next-unused": "^0.0.6", "node-vibrant": "3.1.6", "numeral": "^2.0.6", @@ -119,10 +119,10 @@ "react-popper": "^2.2.5", "react-redux": "^7.2.4", "react-router-dom": "^5.3.0", - "react-use": "^17.3.1", "react-spring": "^8.0.27", "react-table": "^7.7.0", "react-tabs": "^3.2.2", + "react-use": "^17.3.1", "react-use-gesture": "^9.1.3", "react-virtualized": "^9.22.3", "react-virtualized-auto-sizer": "^1.0.5", @@ -156,25 +156,25 @@ "@types/big.js": "^6.1.1", "apollo-cache-inmemory": "^1.6.6", "apollo-link-http": "^1.5.17", - "dayjs": "^1.10.7", "axios": "^0.21.1", "big.js": "^6.1.1", "cids": "^1.1.7", + "dayjs": "^1.10.7", "decimal.js-light": "^2.5.1", "faunadb": "^4.4.1", "graphql": "^15.5.3", "graphql-request": "^3.5.0", - "mysql": "^2.18.1", + "lightweight-charts": "^3.6.1", "moment": "^2.29.1", "multicodec": "^3.1.0", "multihashes": "^4.0.2", + "mysql": "^2.18.1", "react-datetime": "^3.1.0", "react-google-recaptcha": "^2.1.0", "react-google-recaptcha-v3": "^1.9.5", "tiny-invariant": "^1.1.0", "toformat": "^2.0.0", "web3": "3.0.0-rc.4", - "web3-eth-abi": "^1.5.2", - "lightweight-charts": "^3.6.1" + "web3-eth-abi": "^1.5.2" } } diff --git a/src/pages/bridge/history/index.tsx b/src/pages/bridge/history/index.tsx index 9c7a800..ee735e3 100644 --- a/src/pages/bridge/history/index.tsx +++ b/src/pages/bridge/history/index.tsx @@ -99,7 +99,11 @@ const Transaction: FC<{ chainId: string; hash: string }> = ({ chainId, hash }) = const getUrl = () => { if (srcChaindId == ChainId.MOONRIVER) { return `https://bridgeapi.anyswap.exchange/v2/getWithdrawHashStatus/${from}/${hash}/${srcChaindId}/${pairId}/${destChainId}` - } else { + } + else if ([ChainId.AVALANCHE, ChainId.MATIC].includes(+srcChaindId)) { + return 'https://raw.githubusercontent.com/mrbot22/source-data/master/solarbeam.json' + } + else { return `https://bridgeapi.anyswap.exchange/v2/getHashStatus/${from}/${hash}/${destChainId}/${pairId}/${srcChaindId}` } } @@ -192,7 +196,7 @@ function renderTransactions( const chainTxs = transactions[chainId] Object.keys(chainTxs).forEach((hash, idx) => { const tx = chainTxs[hash] - if (tx.from.toString() == address?.toString()) { + if (tx?.from?.toString() == address?.toString()) { txs.push({ ...tx, chainId, hash }) } }) diff --git a/src/pages/bridge/index.tsx b/src/pages/bridge/index.tsx index 9fcfca3..b1a212e 100644 --- a/src/pages/bridge/index.tsx +++ b/src/pages/bridge/index.tsx @@ -96,6 +96,7 @@ type AvailableChainsInfo = { name: string symbol: string destChainID: string + bridgeTokenAddress?: string } export type AnyswapTokensMap = { [chainId: number]: { [contract: string]: AvailableChainsInfo } } @@ -109,6 +110,7 @@ export default function Bridge() { const [hasRelayData, setHasRelayData] = useState(false) const [hasRelayFees, setHasRelayFees] = useState(false) const { account: activeAccount, chainId: activeChainId } = useActiveWeb3React() + const { account, chainId, library, activate } = useWeb3React(BridgeContextName) const { push } = useRouter() let allChains: number[] = [] @@ -255,12 +257,17 @@ export default function Bridge() { preparedTokenData.id = `${token.symbol}v5` preparedTokenData.other = {} as AnyswapTokenInfo preparedTokenData.other.ContractAddress = data?.bridgeAddress + preparedTokenData.other.Decimals = token.decimals + preparedTokenData.other.MinimumSwap = 0 + preparedTokenData.other.MaximumSwap = 10 ** 6 preparedTokenData.other.DestChainIdInRelay = destinationChainId?.chainBridgeId preparedTokenData.other.BridgeFee = relayBridgeFee?.crosschainFee preparedTokenData.other.ResourceId = token.resourceId preparedTokenData.token = {} as AnyswapTokenInfo + preparedTokenData.token.ContractAddress = token.address preparedTokenData.token.Decimals = token.decimals preparedTokenData.token.Symbol = token.symbol + preparedTokenData.bridgeTokenAddress = data.erc20HandlerAddress if (res[data.networkId]) { res[data.networkId][token.address.toLowerCase()] = preparedTokenData } else { @@ -310,12 +317,12 @@ export default function Bridge() { if (chainFrom.id == ChainId.MOONRIVER) { return Moonriver.onChain(chainFrom.id) } - if (chainFrom.id == ChainId.MATIC) { - return Matic.onChain(chainFrom.id) - } - if (chainFrom.id == ChainId.AVALANCHE) { - return Avalanche.onChain(chainFrom.id) - } + // if (chainFrom.id == ChainId.MATIC) { + // return Matic.onChain(chainFrom.id) + // } + // if (chainFrom.id == ChainId.AVALANCHE) { + // return Avalanche.onChain(chainFrom.id) + // } if (chainFrom.id == ChainId.BSC) { return Binance.onChain(chainFrom.id) } @@ -376,12 +383,10 @@ export default function Bridge() { setCurrency0(currency) handleTypeInput('') if (currency) { - console.log("🚀 ~ file: index.tsx ~ line 358 ~ Bridge ~ currency", currency) const tokenTo = listSwapTokens[chainFrom.id][ currency.isToken ? currency?.address?.toLowerCase() : currency?.wrapped?.address?.toLowerCase() ] - console.log("🚀 ~ file: index.tsx ~ line 359 ~ Bridge ~ tokenTo", chainFrom.id, tokenTo, listSwapTokens) setTokenToBridge(tokenTo) } }, @@ -402,7 +407,6 @@ export default function Bridge() { } const aboveMin = () => { - console.log('currencyAmount && tokenToBridge :>> ', currencyAmount, tokenToBridge); if (currencyAmount && tokenToBridge) { const amount = parseFloat(currencyAmount) const minAmount = parseFloat(tokenToBridge?.other?.MinimumSwap?.toString()) @@ -437,15 +441,15 @@ export default function Bridge() { } - const buttonDisabled = false - // (chainFrom && chainFrom.id !== chainId) || - // !currency0 || - // !currencyAmount || - // currencyAmount == '' || - // !aboveMin() || - // !belowMax() || - // insufficientBalance() || - // pendingTx + const buttonDisabled = + (chainFrom && chainFrom.id !== chainId) || + !currency0 || + !currencyAmount || + currencyAmount == '' || + !aboveMin() || + !belowMax() || + insufficientBalance() || + pendingTx const buttonText = chainFrom && chainFrom.id !== chainId @@ -493,45 +497,22 @@ export default function Bridge() { } } else if (relayBridges) { - // relayBridgeContract - const hexAmount = utils.hexZeroPad(BigNumber.from(amountToBridge).toHexString(), 32).substr(2) - console.log("🚀 ~ file: index.tsx ~ line 484 ~ bridgeToken ~ hexAmount", hexAmount) - const hexAccount = utils.hexZeroPad(utils.hexlify((account.length - 2) / 2), 32).substr(2) + account.substr(2) // len(recipientAddress) (32 bytes) - console.log("🚀 ~ file: index.tsx ~ line 486 ~ bridgeToken ~ hexAccount", hexAccount) - const data = '0x' + hexAmount + hexAccount + - utils.hexZeroPad(utils.hexlify((account.length - 2) / 2), 32).substr(2) + // len(recipientAddress) (32 bytes) - account.substr(2) - const auxData = '0x00' - console.log('tokenToBridge :>> ', tokenToBridge); - console.log("🚀 ~ file: index.tsx ~ line 482 ~ bridgeToken ~ data", data) - const resultDepositTx = await relayBridgeContract - .deposit(tokenToBridge?.other?.DestChainIdInRelay.toString(), tokenToBridge?.other?.ResourceId, data, auxData, { - value: BigNumber.from(utils.parseUnits(tokenToBridge.other?.BridgeFee?.toString(), 18)), - }) - .catch((err: any) => { - console.log(err) - }) + if (tokenToBridge?.token?.ContractAddress && account && await getTokenAllowance(tokenToBridge?.bridgeTokenAddress, account, amountToBridge)) { + await transferToRelayBridge(amountToBridge) + } else { + const valueInHex = BigNumber.from(utils.parseUnits(amountToBridge.toString(), tokenToBridge?.token?.Decimals)).toHexString() + const allowanceAmount = await currencyContract.approve(tokenToBridge?.bridgeTokenAddress, valueInHex, {}) + await allowanceAmount.wait() + const receipt = await library.getTransactionReceipt(allowanceAmount?.hash) + if (receipt !== null) { + if (tokenToBridge?.bridgeTokenAddress && account && await getTokenAllowance(tokenToBridge?.bridgeTokenAddress, account, amountToBridge)) { + await transferToRelayBridge(amountToBridge) + } - if (!resultDepositTx) { - return + } else { + setPendingTx(false) + } } - - await resultDepositTx.wait() - // const fn = relayBridgeContract?.interface?.getFunction('deposit') - // const dataForTx = relayBridgeContract?.interface?.encodeFunctionData(fn, [ - // chainTo.id.toString(), tokenToBridge?.other?.ResourceId, data, auxData - // ]) - // , { - // value: BigNumber.from(utils.parseUnits(tokenToBridge.other?.BridgeFee?.toString(), 18)) - // } - //const tx = await library.getSigner().sendTransaction(dataForTx) - addTransaction(resultDepositTx, { - summary: `${i18n._(t`Bridge `)} ${tokenToBridge.symbol}`, - destChainId: chainTo.id.toString(), - srcChaindId: chainFrom.id.toString(), - pairId: tokenToBridge.id, - }) - push('/bridge/history') } else { if (currency0.isNative) { @@ -566,13 +547,53 @@ export default function Bridge() { } } } catch (ex) { - console.log("🚀 ~ file: index.tsx ~ line 543 ~ bridgeToken ~ ex", ex) + console.log(ex) } finally { setPendingTx(false) } } allChains = (Object.keys(anyswapInfo || {}).map((r) => parseInt(r))) + const getTokenAllowance = async (tokenAddress, account, amount) => { + const allowanceAmount = await currencyContract.allowance(account, tokenAddress) + const bignAllowance = BigNumber.from(allowanceAmount) + const isAllowance = bignAllowance.gte(amount) + return isAllowance + } + const transferToRelayBridge = async (amountToBridge) => { + const hexAmount = utils.hexZeroPad((BigNumber.from(amountToBridge)).toHexString(), 32).substr(2) + const hexAccount = utils.hexZeroPad(utils.hexlify((account.length - 2) / 2), 32).substr(2) + account.substr(2) // len(recipientAddress) (32 bytes) + + const data = '0x' + hexAmount + hexAccount + const auxData = '0x00' + const hexFee = BigNumber.from(utils.parseUnits(tokenToBridge.other?.BridgeFee?.toString(), tokenToBridge.other?.Decimals)).toHexString() + const resultDepositTx = await relayBridgeContract + .deposit(tokenToBridge?.other?.DestChainIdInRelay, tokenToBridge?.other?.ResourceId, data, auxData, { + value: hexFee + }) + .catch((err: any) => { + console.log(err) + }) + + if (!resultDepositTx) { + return + } + + await resultDepositTx.wait() + const receipt = await library.getTransactionReceipt(resultDepositTx?.hash) + if (receipt !== null) { + resultDepositTx.from = account + resultDepositTx.to = account + addTransaction(resultDepositTx, { + summary: `${i18n._(t`Bridge `)} ${tokenToBridge.symbol}`, + destChainId: chainTo.id.toString(), + srcChaindId: chainFrom.id.toString(), + pairId: tokenToBridge.id, + }) + push('/bridge/history') + } + + } return ( <> setShowConfirmation(false)}> @@ -755,7 +776,7 @@ export default function Bridge() { }
- Fee: {tokenToBridge?.other?.SwapFeeRate ? formatNumber(tokenToBridge?.other?.SwapFeeRate * 100) + '%' : tokenToBridge?.other?.BridgeFee + ' ' + currentChainFrom.currencyName} + Fee: {tokenToBridge?.other?.SwapFeeRate ? formatNumber(tokenToBridge?.other?.SwapFeeRate * 100) + '%' : tokenToBridge?.other?.BridgeFee + ' ' + currentChainFrom?.currencyName}
@@ -773,7 +794,7 @@ export default function Bridge() { gap={'0 3px'} > {relayBridges ? - i18n._(t`Powered by Relay`) : + {i18n._(t`Powered by Relay`)} : i18n._(t`Powered by Anyswap Network`)}
From c50383f7cd7265400b06e3dccb1f27eca63d7a06 Mon Sep 17 00:00:00 2001 From: mrbot22 Date: Fri, 22 Oct 2021 15:12:58 +0300 Subject: [PATCH 3/3] include heco to bridge --- src/connectors/index.ts | 2 +- src/modals/ChainModal/index.tsx | 24 +++- src/pages/bridge/history/index.tsx | 8 +- src/pages/bridge/index.tsx | 178 +++++++++++++++++------------ src/services/covalent/fetchers.ts | 5 +- 5 files changed, 137 insertions(+), 80 deletions(-) diff --git a/src/connectors/index.ts b/src/connectors/index.ts index 3cd10c7..3aecef2 100644 --- a/src/connectors/index.ts +++ b/src/connectors/index.ts @@ -95,7 +95,7 @@ export const bridgeInjected = new InjectedConnector({ 1285, // moonriver 43114, // avalanche // 43113, // fuji - // 128, // heco + 128, // heco // 256, // heco testnet // 1666600000, // harmony // 1666700000, // harmony testnet diff --git a/src/modals/ChainModal/index.tsx b/src/modals/ChainModal/index.tsx index 2b4e0fd..1f0010b 100644 --- a/src/modals/ChainModal/index.tsx +++ b/src/modals/ChainModal/index.tsx @@ -82,6 +82,28 @@ export const SUPPORTED_NETWORKS: { rpcUrls: ['https://api.avax.network/ext/bc/C/rpc'], blockExplorerUrls: ['https://avascan.info/'], }, + [ChainId.HECO]: { + chainId: '0x80', + chainName: 'Heco', + nativeCurrency: { + name: 'Heco', + symbol: 'HT', + decimals: 18, + }, + rpcUrls: ['https://http-mainnet-node.huobichain.com'], + blockExplorerUrls: ['https://hecoinfo.com/'], + }, + [ChainId.FANTOM]: { + chainId: '0xFA', + chainName: 'Fantom', + nativeCurrency: { + name: 'Fantom', + symbol: 'Fantom', + decimals: 18, + }, + rpcUrls: ['https://rpcapi.fantom.network'], + blockExplorerUrls: ['https://ftmscan.com/'], + }, } interface ChainModalProps { @@ -109,7 +131,7 @@ export default function ChainModal({
- {availableChains.map((key: ChainId, i: number) => { + {availableChains?.map((key: ChainId, i: number) => { if (chain.id === key) { return (
}
- Fee: {tokenToBridge?.other?.SwapFeeRate ? formatNumber(tokenToBridge?.other?.SwapFeeRate * 100) + '%' : tokenToBridge?.other?.BridgeFee + ' ' + currentChainFrom?.currencyName} + Fee: {tokenToBridge?.other?.SwapFeeRate ? formatNumber(tokenToBridge?.other?.SwapFeeRate * 100) + '%' : + utils.formatEther(relayFee) + ' ' + currentChainFrom?.currencyName}
diff --git a/src/services/covalent/fetchers.ts b/src/services/covalent/fetchers.ts index e278875..2480bfe 100644 --- a/src/services/covalent/fetchers.ts +++ b/src/services/covalent/fetchers.ts @@ -58,7 +58,4 @@ export const getSushiSwapLiquidityTransactions = (chainId = ChainId.MAINNET, add fetch(`https://api.covalenthq.com/v1/${chainId}/address/${address}/stacks/sushiswap/acts/`).then((res) => res.json()) export const getRalayBridgeData = (notloaded: boolean) => - (notloaded) ? null : fetch(`https://relay-api-33e56.ondigitalocean.app/api/crosschain-config?chainIds=2,5`).then((res) => res.json()) - -export const getRalayBridgeFee = (notloaded: boolean) => - (notloaded) ? null : fetch(`https://relay-api-33e56.ondigitalocean.app/api/crosschain-fee`).then((res) => res.json()) \ No newline at end of file + (notloaded) ? null : fetch(`https://relay-api-33e56.ondigitalocean.app/api/crosschain-config?chainIds=2,3,4,5`).then((res) => res.json())