UNPKG

@ethsub/sol

Version:
1,006 lines 1.64 MB
{ "contractName": "Bridge", "abi": [ { "inputs": [ { "internalType": "uint8", "name": "domainID", "type": "uint8" }, { "internalType": "address[]", "name": "initialRelayers", "type": "address[]" }, { "internalType": "uint256", "name": "initialRelayerThreshold", "type": "uint256" }, { "internalType": "uint256", "name": "fee", "type": "uint256" }, { "internalType": "uint256", "name": "expiry", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint8", "name": "destinationDomainID", "type": "uint8" }, { "indexed": false, "internalType": "bytes32", "name": "resourceID", "type": "bytes32" }, { "indexed": false, "internalType": "uint64", "name": "depositNonce", "type": "uint64" }, { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "bytes", "name": "data", "type": "bytes" }, { "indexed": false, "internalType": "bytes", "name": "handlerResponse", "type": "bytes" } ], "name": "Deposit", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bytes", "name": "lowLevelData", "type": "bytes" } ], "name": "FailedHandlerExecution", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "account", "type": "address" } ], "name": "Paused", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint8", "name": "originDomainID", "type": "uint8" }, { "indexed": false, "internalType": "uint64", "name": "depositNonce", "type": "uint64" }, { "indexed": false, "internalType": "enum Bridge.ProposalStatus", "name": "status", "type": "uint8" }, { "indexed": false, "internalType": "bytes32", "name": "dataHash", "type": "bytes32" } ], "name": "ProposalEvent", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint8", "name": "originDomainID", "type": "uint8" }, { "indexed": false, "internalType": "uint64", "name": "depositNonce", "type": "uint64" }, { "indexed": false, "internalType": "enum Bridge.ProposalStatus", "name": "status", "type": "uint8" }, { "indexed": false, "internalType": "bytes32", "name": "dataHash", "type": "bytes32" } ], "name": "ProposalVote", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "relayer", "type": "address" } ], "name": "RelayerAdded", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "relayer", "type": "address" } ], "name": "RelayerRemoved", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "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": "MAX_RELAYERS", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "RELAYER_ROLE", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "name": "_depositCounts", "outputs": [ { "internalType": "uint64", "name": "", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_domainID", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_expiry", "outputs": [ { "internalType": "uint40", "name": "", "type": "uint40" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_fee", "outputs": [ { "internalType": "uint128", "name": "", "type": "uint128" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_relayerThreshold", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "name": "_resourceIDToHandlerAddress", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "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": "getRoleMemberIndex", "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": "uint72", "name": "destNonce", "type": "uint72" }, { "internalType": "bytes32", "name": "dataHash", "type": "bytes32" }, { "internalType": "address", "name": "relayer", "type": "address" } ], "name": "_hasVotedOnProposal", "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": [ { "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": "uint256", "name": "depositFunctionDepositerOffset", "type": "uint256" }, { "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": "domainID", "type": "uint8" }, { "internalType": "uint64", "name": "nonce", "type": "uint64" } ], "name": "adminSetDepositNonce", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint8", "name": "originDomainID", "type": "uint8" }, { "internalType": "uint64", "name": "depositNonce", "type": "uint64" }, { "internalType": "bytes32", "name": "dataHash", "type": "bytes32" } ], "name": "getProposal", "outputs": [ { "components": [ { "internalType": "enum Bridge.ProposalStatus", "name": "_status", "type": "uint8" }, { "internalType": "uint200", "name": "_yesVotes", "type": "uint200" }, { "internalType": "uint8", "name": "_yesVotesTotal", "type": "uint8" }, { "internalType": "uint40", "name": "_proposedBlock", "type": "uint40" } ], "internalType": "struct Bridge.Proposal", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_totalRelayers", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "newFee", "type": "uint256" } ], "name": "adminChangeFee", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "handlerAddress", "type": "address" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "adminWithdraw", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint8", "name": "destinationDomainID", "type": "uint8" }, { "internalType": "bytes32", "name": "resourceID", "type": "bytes32" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "deposit", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "uint8", "name": "domainID", "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": "uint8", "name": "domainID", "type": "uint8" }, { "internalType": "uint64", "name": "depositNonce", "type": "uint64" }, { "internalType": "bytes32", "name": "dataHash", "type": "bytes32" } ], "name": "cancelProposal", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint8", "name": "domainID", "type": "uint8" }, { "internalType": "uint64", "name": "depositNonce", "type": "uint64" }, { "internalType": "bytes", "name": "data", "type": "bytes" }, { "internalType": "bytes32", "name": "resourceID", "type": "bytes32" }, { "internalType": "bool", "name": "revertOnFail", "type": "bool" } ], "name": "executeProposal", "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.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"domainID\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"initialRelayers\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"initialRelayerThreshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"destinationDomainID\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"resourceID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"depositNonce\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"handlerResponse\",\"type\":\"bytes\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"lowLevelData\",\"type\":\"bytes\"}],\"name\":\"FailedHandlerExecution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"originDomainID\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"depositNonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"enum Bridge.ProposalStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"dataHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"originDomainID\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"depositNonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"enum Bridge.ProposalStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"dataHash\",\"type\":\"bytes32\"}],\"name\":\"ProposalVote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"}],\"name\":\"RelayerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"}],\"name\":\"RelayerRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"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\":\"MAX_RELAYERS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RELAYER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"_depositCounts\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_domainID\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_expiry\",\"outputs\":[{\"internalType\":\"uint40\",\"name\":\"\",\"type\":\"uint40\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_fee\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint72\",\"name\":\"destNonce\",\"type\":\"uint72\"},{\"internalType\":\"bytes32\",\"name\":\"dataHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"relayer\",\"type\":\"address\"}],\"name\":\"_hasVotedOnProposal\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_relayerThreshold\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"_resourceIDToHandlerAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"newFee\",\"type\":\"uint256\"}],\"name\":\"adminChangeFee\",\"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\":\"uint8\",\"name\":\"domainID\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"}],\"name\":\"adminSetDepositNonce\",\"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\":\"uint256\",\"name\":\"depositFunctionDepositerOffset\",\"type\":\"uint256\"},{\"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\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"adminWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"domainID\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"depositNonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"dataHash\",\"type\":\"bytes32\"}],\"name\":\"cancelProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"destinationDomainID\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"resourceID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"domainID\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"depositNonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"resourceID\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"revertOnFail\",\"type\":\"bool\"}],\"name\":\"executeProposal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"originDomainID\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"depositNonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"dataHash\",\"type\":\"bytes32\"}],\"name\":\"getProposal\",\"outputs\":[{\"components\":[{\"internalType\":\"enum Bridge.ProposalStatus\",\"name\":\"_status\",\"type\":\"uint8\"},{\"internalType\":\"uint200\",\"name\":\"_yesVotes\",\"type\":\"uint200\"},{\"internalType\":\"uint8\",\"name\":\"_yesVotesTotal\",\"type\":\"uint8\"},{\"internalType\":\"uint40\",\"name\":\"_proposedBlock\",\"type\":\"uint40\"}],\"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\":\"getRoleMemberIndex\",\"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\":\"domainID\",\"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.\",\"kind\":\"dev\",\"methods\":{\"_hasVotedOnProposal(uint72,bytes32,address)\":{\"params\":{\"dataHash\":\"Hash of data to be provided when deposit proposal is executed.\",\"destNonce\":\"destinationDomainID + depositNonce of the proposal.\",\"relayer\":\"Address to check.\"}},\"adminAddRelayer(address)\":{\"params\":{\"relayerAddress\":\"Address of relayer to be added.\"}},\"adminChangeFee(uint256)\":{\"params\":{\"newFee\":\"Value {_fee} will be updated to.\"}},\"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.\"}},\"adminSetDepositNonce(uint8,uint64)\":{\"params\":{\"domainID\":\"Domain ID for increasing nonce.\",\"nonce\":\"The nonce value to be set.\"}},\"adminSetGenericResource(address,bytes32,address,bytes4,uint256,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,bytes)\":{\"params\":{\"data\":\"ABI-encoded withdrawal params relevant to the specified handler.\",\"handlerAddress\":\"Address of handler to withdraw from.\"}},\"cancelProposal(uint8,uint64,bytes32)\":{\"params\":{\"dataHash\":\"Hash of data originally provided when deposit was made.\",\"depositNonce\":\"ID of deposited generated by origin Bridge contract.\",\"domainID\":\"ID of chain deposit originated from.\"}},\"constructor\":{\"params\":{\"domainID\":\"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)\":{\"params\":{\"data\":\"Additional data to be passed to specified handler.\",\"destinationDomainID\":\"ID of chain deposit will be bridged to.\",\"resourceID\":\"ResourceID used to find address of handler to be used for deposit.\"}},\"executeProposal(uint8,uint64,bytes,bytes32,bool)\":{\"params\":{\"data\":\"Data originally provided when deposit was made.\",\"depositNonce\":\"ID of deposited generated by origin Bridge contract.\",\"domainID\":\"ID of chain deposit originated from.\",\"resourceID\":\"ResourceID to be used when making deposits.\",\"revertOnFail\":\"Decision if the transaction should be reverted in case of handler's executeProposal is reverted or not.\"}},\"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.\",\"originDomainID\":\"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.\"},\"getRoleMemberIndex(bytes32,address)\":{\"details\":\"Returns the index of the account that have `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\":{\"data\":\"Data originally provided when deposit was made.\",\"depositNonce\":\"ID of deposited generated by origin Bridge contract.\",\"domainID\":\"ID of chain deposit originated from.\"}}},\"title\":\"Facilitates deposits, creation and voting of deposit proposals, and deposit executions.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"_hasVotedOnProposal(uint72,bytes32,address)\":{\"notice\":\"Returns true if {relayer} has voted on {destNonce} {dataHash} proposal.Naming left unchanged for backward compatibility.\"},\"_totalRelayers()\":{\"notice\":\"Returns total relayers number.Added for backwards compatibility.\"},\"adminAddRelayer(address)\":{\"notice\":\"Grants {relayerAddress} the relayer role.Only callable by an address that currently has the admin role, which is checked in grantRole().Emits {RelayerAdded} event.\"},\"adminChangeFee(uint256)\":{\"notice\":\"Changes deposit fee.Only callable by admin.\"},\"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}.Only callable by an address that currently has the admin role, which is checked in revokeRole().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.\"},\"adminSetDepositNonce(uint8,uint64)\":{\"notice\":\"Sets the nonce for the specific domainID.Only callable by an address that currently has the admin role.\"},\"adminSetGenericResource(address,bytes32,address,bytes4,uint256,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,bytes)\":{\"notice\":\"Used to manually withdraw funds from ERC safes.\"},\"cancelProposal(uint8,uint64,bytes32)\":{\"notice\":\"Cancels a deposit proposal that has not been executed yet.Only callable by relayers when Bridge is not paused.Proposal must be past expiry threshold.Emits {ProposalEvent} event with status {Cancelled}.\"},\"constructor\":\"Initializes Bridge, creates and grants {msg.sender} the admin role, creates and grants {initialRelayers} the relayer role.\",\"deposit(uint8,bytes32,bytes)\":{\"notice\":\"Initiates a transfer using a specified handler contract.Only callable when Bridge is not paused.Emits {Deposit} event with all necessary parameters and a handler response. - ERC20Handler: responds with an empty data. - ERC721Handler: responds with the deposited token metadata acquired by calling a tokenURI method in the token contract. - GenericHandler: responds with the raw bytes returned from the call to the target contract.\"},\"executeProposal(uint8,uint64,bytes,bytes32,bool)\":{\"notice\":\"Executes a deposit proposal that is considered passed using a specified handler contract.Only callable by relayers when Bridge is not paused.Proposal must have Passed status.Hash of {data} must equal proposal's {dataHash}.Emits {ProposalEvent} event with status {Executed}.Emits {FailedExecution} event with the failed reason.\"},\"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.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/Bridge.sol\":\"Bridge\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x9486045e189facd2e868ece35249872598ef03f1087fb6fa4d1161842daa2287\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://77c3a04ef8453788b14b1ebbc24dd3f0a18ceb2615cd156aac949a611e552af8\",\"dweb:/ipfs/QmcmqWGguRM3iLuF57tcyrN3F6EA63kzeNkDfQuteBnurr\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://256c8c8af5eb072bc473226ab2b2187149b8fc04f5f4a4820db22527f5ce8e3c\",\"dweb:/ipfs/QmRvi5BhnL7Rxf85KrJhwM6RRhukm4tzoctRdgQEheNyiN\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"@openzeppelin/contracts/utils/EnumerableSet.sol\":{\"keccak256\":\"0x1562cd9922fbf739edfb979f506809e2743789cbde3177515542161c3d04b164\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4580d57781513d98870d9738c7d39094336e0a70cdb90d68dad549c6ced466ec\",\"dweb:/ipfs/Qmf9YZzzRFuvMnav9dgmeRUpdYMMECiZX8w25sHWVbA18V\"]},\"project:/contracts/Bridge.sol\":{\"keccak256\":\"0xcc0c0545480f06d0ff744e81c79adff922a715cedd2ba78814f996103f634cdd\",\"license\":\"LGPL-3.0-only\",\"urls\":[\"bzz-raw://36a8b261f04e9bc75dfa81e5bdc23315fba21ae12cb66a2a8afc336215b05d34\",\"dweb:/ipfs/QmfD7VuDHVox5bWqRSEK8ejREpEVMSAm77XFyebWGAwf7s\"]},\"project:/contracts/interfaces/IDepositExecute.sol\":{\"keccak256\":\"0x3623f906ae6f354cbf27ffd4eeccbfc2c3baa94783c5dd854b2e0f50db2a7c8d\",\"license\":\"LGPL-3.0-only\",\"urls\":[\"bzz-raw://26f8ddafd8655375eeb861a033fe390b3235c4f8de9a54e0524b91d2d1992674\",\"dweb:/ipfs/QmUAsxc8j4UdaDZ5HVp73kAwLpgTqqrgZG1sX86iRKZTqv\"]},\"project:/contracts/interfaces/IERCHandler.sol\":{\"keccak256\":\"0x4384276611a789db6481e1158d92c280fe5990ec0c375df30dd5e8f8a97cbb4c\",\"license\":\"LGPL-3.0-only\",\"urls\":[\"bzz-raw://3af488536c6d8f6b3090ca9b5fa54718941604a30f58bd66db641a6599a9f296\",\"dweb:/ipfs/QmSm988tQV4XtkCQpTbf2SbdCHp8AcjYZhQLhftPFXrUf2\"]},\"project:/contracts/interfaces/IGenericHandler.sol\":{\"keccak256\":\"0xb08694c5d5e003ab884d7f22fd616d9603ae60a9d8d48901feb2c2daebfe0d40\",\"license\":\"LGPL-3.0-only\",\"urls\":[\"bzz-raw://310082dd159a2b23c4cf8589a19ef3e31146d2879145c452e4edf63b11389008\",\"dweb:/ipfs/QmRzAnt66RzitcJrwTfxQeK1X1GSo9TEQF7y3WWbYZYxGS\"]},\"project:/contracts/utils/AccessControl.sol\":{\"keccak256\":\"0x0188570bd646df63dd236b997edf12d2e5a566d9fd54b9405c67c6d7eeca353e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://eaa8a02b8fda3d9a50019cb96fec11cfb80b90250e37e91e0ec6cd945efa9810\",\"dweb:/ipfs/QmZ2nuod9fjYvsCjRr4Bhk6FTES4zsofxsQSDFS24JFaGq\"]}