diff --git a/contracts/bindings/solveinbox.go b/contracts/bindings/solveinbox.go index caa2a3354..f86c22dff 100644 --- a/contracts/bindings/solveinbox.go +++ b/contracts/bindings/solveinbox.go @@ -64,7 +64,7 @@ type SolveTokenDeposit struct { // SolveInboxMetaData contains all meta data concerning the SolveInbox contract. var SolveInboxMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"accept\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"cancel\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"cancelOwnershipHandover\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"claim\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"completeOwnershipHandover\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"defaultConfLevel\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deployedAt\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRequest\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structSolve.Request\",\"components\":[{\"name\":\"id\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"updatedAt\",\"type\":\"uint40\",\"internalType\":\"uint40\"},{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enumSolve.Status\"},{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"acceptedBy\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"call\",\"type\":\"tuple\",\"internalType\":\"structSolve.Call\",\"components\":[{\"name\":\"destChainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"deposits\",\"type\":\"tuple[]\",\"internalType\":\"structSolve.Deposit[]\",\"components\":[{\"name\":\"isNative\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"grantRoles\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"roles\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"hasAllRoles\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"roles\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"hasAnyRole\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"roles\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"owner_\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"solver_\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"omni_\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"outbox_\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"markFulfilled\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"callHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"omni\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIOmniPortal\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"result\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"ownershipHandoverExpiresAt\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"result\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"reject\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"reason\",\"type\":\"uint8\",\"internalType\":\"enumSolve.RejectReason\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"renounceRoles\",\"inputs\":[{\"name\":\"roles\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"request\",\"inputs\":[{\"name\":\"call\",\"type\":\"tuple\",\"internalType\":\"structSolve.Call\",\"components\":[{\"name\":\"destChainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"deposits\",\"type\":\"tuple[]\",\"internalType\":\"structSolve.TokenDeposit[]\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"requestOwnershipHandover\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"revokeRoles\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"roles\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"rolesOf\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"roles\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"event\",\"name\":\"Accepted\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"by\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Claimed\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"by\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"deposits\",\"type\":\"tuple[]\",\"indexed\":false,\"internalType\":\"structSolve.Deposit[]\",\"components\":[{\"name\":\"isNative\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DefaultConfLevelSet\",\"inputs\":[{\"name\":\"conf\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Fulfilled\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"callHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"creditedTo\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OmniPortalSet\",\"inputs\":[{\"name\":\"omni\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipHandoverCanceled\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipHandoverRequested\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"oldOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Rejected\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"by\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"reason\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"enumSolve.RejectReason\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Requested\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"call\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structSolve.Call\",\"components\":[{\"name\":\"destChainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"deposits\",\"type\":\"tuple[]\",\"indexed\":false,\"internalType\":\"structSolve.Deposit[]\",\"components\":[{\"name\":\"isNative\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Reverted\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RolesUpdated\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"roles\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AlreadyInitialized\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidDeposit\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidRecipient\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NewOwnerIsZeroAddress\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoDeposits\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoHandoverRequest\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotAccepted\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotFulfilled\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotOutbox\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotPending\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotPendingOrRejected\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"Reentrancy\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TransferFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"Unauthorized\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WrongCallHash\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WrongSourceChain\",\"inputs\":[]}]", - Bin: "0x60a060405234801561001057600080fd5b504360805261001d610022565b610084565b63409feecd19805460018116156100415763f92ee8a96000526004601cfd5b8160c01c808260011c1461007f578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b608051612174620000a060003960006103b001526121746000f3fe60806040526004361061014b5760003560e01c80638da5cb5b116100b6578063eae4c19f1161006f578063eae4c19f1461039e578063f04e283e146103d2578063f2fde38b146103e5578063f8c8765e146103f8578063fb1e61ca14610418578063fee81cf41461044557600080fd5b80638da5cb5b146102f257806396c144f01461030b578063c4d252f51461032b578063db3ea5531461034b578063e17771c81461036b578063e4725ba11461037e57600080fd5b806339acf9f11161010857806339acf9f11461022d5780634a4ee7b114610265578063514e62fc1461027857806354d1f13d146102af578063715018a6146102b757806374eeb847146102bf57600080fd5b8063183a4f6e146101505780631c10893f146101655780631cd64df41461017857806325692962146101c45780632de94807146101cc578063337ffe201461020d575b600080fd5b61016361015e3660046118ec565b610478565b005b61016361017336600461191a565b610485565b34801561018457600080fd5b506101af61019336600461191a565b638b78c6d8600c90815260009290925260209091205481161490565b60405190151581526020015b60405180910390f35b61016361049b565b3480156101d857600080fd5b506101ff6101e7366004611946565b638b78c6d8600c908152600091909152602090205490565b6040519081526020016101bb565b34801561021957600080fd5b5061016361022836600461196a565b6104ea565b34801561023957600080fd5b5060005461024d906001600160a01b031681565b6040516001600160a01b0390911681526020016101bb565b61016361027336600461191a565b610726565b34801561028457600080fd5b506101af61029336600461191a565b638b78c6d8600c90815260009290925260209091205416151590565b610163610738565b610163610774565b3480156102cb57600080fd5b506000546102e090600160a01b900460ff1681565b60405160ff90911681526020016101bb565b3480156102fe57600080fd5b50638b78c6d8195461024d565b34801561031757600080fd5b5061016361032636600461198c565b610788565b34801561033757600080fd5b506101636103463660046118ec565b61093e565b34801561035757600080fd5b506101636103663660046119bc565b610b07565b6101ff6103793660046119e5565b610bff565b34801561038a57600080fd5b506101636103993660046118ec565b610d73565b3480156103aa57600080fd5b506101ff7f000000000000000000000000000000000000000000000000000000000000000081565b6101636103e0366004611946565b610e6d565b6101636103f3366004611946565b610eaa565b34801561040457600080fd5b50610163610413366004611a86565b610ed1565b34801561042457600080fd5b506104386104333660046118ec565b610f7d565b6040516101bb9190611bd7565b34801561045157600080fd5b506101ff610460366004611946565b63389a75e1600c908152600091909152602090205490565b610482338261117f565b50565b61048d61118b565b61049782826111a6565b5050565b60006202a3006001600160401b03164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b60005460408051631799380760e11b815281516001600160a01b0390931692632f32700e926004808401939192918290030181865afa158015610531573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105559190611cba565b8051600180546020909301516001600160a01b0316600160401b026001600160e01b03199093166001600160401b039092169190911791909117905568929eee149b4bd21268543090036105b15763ab143c066000526004601cfd5b3068929eee149b4bd2126855600082815260046020526040902060026001820154600160281b900460ff1660068111156105ed576105ed611ae2565b1461060b5760405163029d79a560e41b815260040160405180910390fd5b600354600154600160401b90046001600160a01b039081169116146106435760405163bda8fc9560e01b815260040160405180910390fd5b60038101546001546001600160401b0390811691161461067657604051633687f39960e21b815260040160405180910390fd5b6106848346836003016111b2565b82146106a357604051631c6060ab60e11b815260040160405180910390fd5b6001810180546505000000000065ffffffffffff199091164264ffffffffff161717905560028101546040516001600160a01b0390911690839085907f7898a125e0970666c80e00bbf2e7041d84dfe5bbe6bcf562ce53d540fd6cd89190600090a450503868929eee149b4bd212685550600180546001600160e01b0319169055565b61072e61118b565b610497828261117f565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b61077c61118b565b61078660006111e8565b565b3068929eee149b4bd2126854036107a75763ab143c066000526004601cfd5b3068929eee149b4bd2126855600082815260046020526040902060056001820154600160281b900460ff1660068111156107e3576107e3611ae2565b14610801576040516303de361f60e11b815260040160405180910390fd5b60028101546001600160a01b0316331461082d576040516282b42960e81b815260040160405180910390fd5b6001810180546506000000000065ffffffffffff199091164264ffffffffff1617179055600681018054604080516020808402820181019092528281526108de938693919290919060009084015b828210156108d55760008481526020908190206040805160608101825260028602909201805460ff81161515845261010090046001600160a01b03168385015260019081015491830191909152908352909201910161087b565b50505050611226565b816001600160a01b0316336001600160a01b0316847f1291cec4ea55732527f1ae8ff3e53def0dbe1feb99c094983449e59cdce4674b846006016040516109259190611d71565b60405180910390a4503868929eee149b4bd21268555050565b3068929eee149b4bd21268540361095d5763ab143c066000526004601cfd5b3068929eee149b4bd21268556000818152600460205260409020600180820154600160281b900460ff16600681111561099857610998611ae2565b141580156109c6575060036001820154600160281b900460ff1660068111156109c3576109c3611ae2565b14155b156109e457604051631fa4148760e21b815260040160405180910390fd5b6001810154600160301b90046001600160a01b03163314610a17576040516282b42960e81b815260040160405180910390fd5b6001810180546504000000000065ffffffffffff199091164264ffffffffff1617179081905560068201805460408051602080840282018101909252828152610acc94600160301b90046001600160a01b03169390929091600090840182156108d55760008481526020908190206040805160608101825260028602909201805460ff81161515845261010090046001600160a01b03168385015260019081015491830191909152908352909201910161087b565b60405182907fb66b13449e4bb2c30749a37f3081f1988fcee5ff5d98ce740b354d4e2d94409590600090a2503868929eee149b4bd212685550565b6001610b1281611378565b3068929eee149b4bd212685403610b315763ab143c066000526004601cfd5b3068929eee149b4bd21268556000838152600460205260409020600180820154600160281b900460ff166006811115610b6c57610b6c611ae2565b14610b8a57604051633ee3282d60e11b815260040160405180910390fd5b6001810180546503000000000065ffffffffffff199091164264ffffffffff1617179055826003811115610bc057610bc0611ae2565b604051339086907f21f84ee3a6e9bc7c10f855f8c9829e22c613861cef10add09eccdbc88df9f59f90600090a4503868929eee149b4bd2126855505050565b60003068929eee149b4bd212685403610c205763ab143c066000526004601cfd5b3068929eee149b4bd21268556000610c3e6040860160208701611946565b6001600160a01b031603610c655760405163574b16a760e11b815260040160405180910390fd5b610c726020850185611d84565b6001600160401b0316600003610c9b5760405163574b16a760e11b815260040160405180910390fd5b610ca86060850185611da1565b9050600003610cca5760405163574b16a760e11b815260040160405180910390fd5b81158015610cd6575034155b15610cf457604051630558800760e21b815260040160405180910390fd5b6000610d023386868661139e565b60018101548154604051929350600160301b9091046001600160a01b0316917f3622a563ce1f96b477fa827bf0b60be8aee346b515754f3645f4d7a2ef5d4b2990610d569060038601906006870190611eed565b60405180910390a3543868929eee149b4bd2126855949350505050565b6001610d7e81611378565b3068929eee149b4bd212685403610d9d5763ab143c066000526004601cfd5b3068929eee149b4bd21268556000828152600460205260409020600180820154600160281b900460ff166006811115610dd857610dd8611ae2565b14610df657604051633ee3282d60e11b815260040160405180910390fd5b60018101805464ffffffffff421665ffffffffffff1990911617650200000000001790556002810180546001600160a01b0319163390811790915560405184907f9deed34441ca75bb2dbbe101d2201930f40e18a9ce521c77fbdca6690a89996790600090a3503868929eee149b4bd21268555050565b610e7561118b565b63389a75e1600c52806000526020600c208054421115610e9d57636f5e88186000526004601cfd5b60009055610482816111e8565b610eb261118b565b8060601b610ec857637448fbae6000526004601cfd5b610482816111e8565b63409feecd198054600382558015610f085760018160011c14303b10610eff5763f92ee8a96000526004601cfd5b818160ff1b1b91505b50610f128561165e565b610f1d8460016111a6565b610f268361169a565b600380546001600160a01b0319166001600160a01b0384161790558015610f76576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b5050505050565b610f85611862565b600082815260046020908152604091829020825160e08101845281548152600182015464ffffffffff81169382019390935292909190830190600160281b900460ff166006811115610fd957610fd9611ae2565b6006811115610fea57610fea611ae2565b815260018201546001600160a01b03600160301b90910481166020808401919091526002840154821660408085019190915280516080810182526003860180546001600160401b0381168352600160401b9004909416928101929092526004850154908201526005840180546060948501949293928401919061106c90611dee565b80601f016020809104026020016040519081016040528092919081815260200182805461109890611dee565b80156110e55780601f106110ba576101008083540402835291602001916110e5565b820191906000526020600020905b8154815290600101906020018083116110c857829003601f168201915b505050505081525050815260200160068201805480602002602001604051908101604052809291908181526020016000905b828210156111715760008481526020908190206040805160608101825260028602909201805460ff81161515845261010090046001600160a01b031683850152600190810154918301919091529083529092019101611117565b505050915250909392505050565b6104978282600061173d565b638b78c6d819543314610786576382b429006000526004601cfd5b6104978282600161173d565b60008383836040516020016111c993929190611f12565b6040516020818303038152906040528051906020012090509392505050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b6001600160a01b03821661124d57604051634e46966960e11b815260040160405180910390fd5b60005b81518110156113735781818151811061126b5761126b611f3a565b60200260200101516000015115611313576000836001600160a01b031683838151811061129a5761129a611f3a565b60200260200101516040015160405160006040518083038185875af1925050503d80600081146112e6576040519150601f19603f3d011682016040523d82523d6000602084013e6112eb565b606091505b505090508061130d576040516312171d8360e31b815260040160405180910390fd5b5061136b565b61136b8383838151811061132957611329611f3a565b60200260200101516040015184848151811061134757611347611f3a565b6020026020010151602001516001600160a01b03166117969092919063ffffffff16565b600101611250565b505050565b638b78c6d8600c5233600052806020600c205416610482576382b429006000526004601cfd5b6000806113a96117e6565b600081815260046020526040902081815560018101805464ffffffffff421665ffffffffffff1990911617600160281b176601000000000000600160d01b031916600160301b6001600160a01b038b1602179055925090508460038301611410828261205f565b5050341561149157604080516060810182526001808252600060208084018281523495850195865260068801805480860182559084529190922093516002909102909301805491516001600160a81b0319909216931515610100600160a81b031916939093176101006001600160a01b039092169190910217825591519101555b60005b83811015611654578484828181106114ae576114ae611f3a565b905060400201602001356000036114d857604051635972996f60e11b815260040160405180910390fd5b60008585838181106114ec576114ec611f3a565b6115029260206040909202019081019150611946565b6001600160a01b03160361152957604051635972996f60e11b815260040160405180910390fd5b82600601604051806060016040528060001515815260200187878581811061155357611553611f3a565b6115699260206040909202019081019150611946565b6001600160a01b0316815260200187878581811061158957611589611f3a565b60206040918202939093018301359093525083546001818101865560009586529482902084516002909202018054928501516001600160a01b031661010002610100600160a81b0319921515929092166001600160a81b03199093169290921717815591015191015561164c333087878581811061160957611609611f3a565b9050604002016020013588888681811061162557611625611f3a565b61163b9260206040909202019081019150611946565b6001600160a01b0316929190611804565b600101611494565b5050949350505050565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b6001600160a01b0381166116e95760405162461bcd60e51b8152602060048201526012602482015271584170703a206e6f207a65726f206f6d6e6960701b604482015260640160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f79162c8d053a07e70cdc1ccc536f0440b571f8508377d2bef51094fadab98f479060200160405180910390a150565b638b78c6d8600c52826000526020600c2080548381178361175f575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26600080a3505050505050565b816014528060345263a9059cbb60601b60005260206000604460106000875af180600160005114166117db57803d853b1517106117db576390b8ec186000526004601cfd5b506000603452505050565b60028054600091826117f783612117565b9091555050600254919050565b60405181606052826040528360601b602c526323b872dd60601b600c52602060006064601c6000895af1806001600051141661185357803d873b15171061185357637939f4246000526004601cfd5b50600060605260405250505050565b6040805160e0810182526000808252602082018190529091820190815260200160006001600160a01b0316815260200160006001600160a01b031681526020016118df604051806080016040528060006001600160401b0316815260200160006001600160a01b0316815260200160008152602001606081525090565b8152602001606081525090565b6000602082840312156118fe57600080fd5b5035919050565b6001600160a01b038116811461048257600080fd5b6000806040838503121561192d57600080fd5b823561193881611905565b946020939093013593505050565b60006020828403121561195857600080fd5b813561196381611905565b9392505050565b6000806040838503121561197d57600080fd5b50508035926020909101359150565b6000806040838503121561199f57600080fd5b8235915060208301356119b181611905565b809150509250929050565b600080604083850312156119cf57600080fd5b823591506020830135600481106119b157600080fd5b6000806000604084860312156119fa57600080fd5b83356001600160401b0380821115611a1157600080fd5b9085019060808288031215611a2557600080fd5b90935060208501359080821115611a3b57600080fd5b818601915086601f830112611a4f57600080fd5b813581811115611a5e57600080fd5b8760208260061b8501011115611a7357600080fd5b6020830194508093505050509250925092565b60008060008060808587031215611a9c57600080fd5b8435611aa781611905565b93506020850135611ab781611905565b92506040850135611ac781611905565b91506060850135611ad781611905565b939692955090935050565b634e487b7160e01b600052602160045260246000fd5b6001600160401b0381511682526000602060018060a01b03602084015116602085015260408301516040850152606083015160806060860152805180608087015260005b81811015611b585782810184015187820160a001528301611b3c565b50600060a0828801015260a0601f19601f830116870101935050505092915050565b60008151808452602080850194506020840160005b83811015611bcc578151805115158852838101516001600160a01b0316848901526040908101519088015260609096019590820190600101611b8f565b509495945050505050565b602081528151602082015264ffffffffff60208301511660408201526000604083015160078110611c1857634e487b7160e01b600052602160045260246000fd5b806060840152506060830151611c3960808401826001600160a01b03169052565b5060808301516001600160a01b03811660a08401525060a083015160e060c0840152611c69610100840182611af8565b905060c0840151601f198483030160e0850152611c868282611b7a565b95945050505050565b634e487b7160e01b600052604160045260246000fd5b6001600160401b038116811461048257600080fd5b600060408284031215611ccc57600080fd5b604051604081018181106001600160401b0382111715611cee57611cee611c8f565b6040528251611cfc81611ca5565b81526020830151611d0c81611905565b60208201529392505050565b600081548084526020808501945083600052602060002060005b83811015611bcc57815460ff81161515885260081c6001600160a01b031683880152600180830154604089015260609097019660029092019101611d32565b6020815260006119636020830184611d18565b600060208284031215611d9657600080fd5b813561196381611ca5565b6000808335601e19843603018112611db857600080fd5b8301803591506001600160401b03821115611dd257600080fd5b602001915036819003821315611de757600080fd5b9250929050565b600181811c90821680611e0257607f821691505b602082108103611e2257634e487b7160e01b600052602260045260246000fd5b50919050565b600081546001600160401b0381168452602060018060a01b038260401c1660208601526001915060018401546040860152600284016080606087015260008154611e7181611dee565b8060808a015260a06001831660008114611e925760018114611eae57611ede565b60ff19841660a08c015260a083151560051b8c01019450611ede565b85600052602060002060005b84811015611ed55781548d8201850152908901908801611eba565b8c0160a0019550505b50929998505050505050505050565b604081526000611f006040830185611e28565b8281036020840152611c868185611d18565b8381526001600160401b0383166020820152606060408201526000611c866060830184611e28565b634e487b7160e01b600052603260045260246000fd5b601f821115611373576000816000526020600020601f850160051c81016020861015611f795750805b601f850160051c820191505b81811015611f9857828155600101611f85565b505050505050565b6001600160401b03831115611fb757611fb7611c8f565b611fcb83611fc58354611dee565b83611f50565b6000601f841160018114611fff5760008515611fe75750838201355b600019600387901b1c1916600186901b178355610f76565b600083815260209020601f19861690835b828110156120305786850135825560209485019460019092019101612010565b508682101561204d5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b813561206a81611ca5565b6001600160401b0380821691508254826001600160401b03198216178455602085013561209681611905565b6001600160e01b031991909116909217604092831b68010000000000000000600160e01b031617835590830135600183015560608301359036849003601e190182126120e157600080fd5b908301908135818111156120f457600080fd5b60208301925080360383131561210957600080fd5b610f76818460028701611fa0565b60006001820161213757634e487b7160e01b600052601160045260246000fd5b506001019056fea26469706673582212208cfd635f16afe9804ac8bbfa64b6a3c13cee2e0230a8b706c68aeaf449db117464736f6c63430008180033", + Bin: "0x60a06040523480156200001157600080fd5b504661a4b1141580156200002857504662066eee14155b15620000385743608052620000a2565b60646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000078573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200009e919062000116565b6080525b620000ac620000b2565b62000130565b63409feecd1980546001811615620000d25763f92ee8a96000526004601cfd5b8160c01c808260011c1462000111578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6000602082840312156200012957600080fd5b5051919050565b6080516121746200014c60003960006103b001526121746000f3fe60806040526004361061014b5760003560e01c80638da5cb5b116100b6578063eae4c19f1161006f578063eae4c19f1461039e578063f04e283e146103d2578063f2fde38b146103e5578063f8c8765e146103f8578063fb1e61ca14610418578063fee81cf41461044557600080fd5b80638da5cb5b146102f257806396c144f01461030b578063c4d252f51461032b578063db3ea5531461034b578063e17771c81461036b578063e4725ba11461037e57600080fd5b806339acf9f11161010857806339acf9f11461022d5780634a4ee7b114610265578063514e62fc1461027857806354d1f13d146102af578063715018a6146102b757806374eeb847146102bf57600080fd5b8063183a4f6e146101505780631c10893f146101655780631cd64df41461017857806325692962146101c45780632de94807146101cc578063337ffe201461020d575b600080fd5b61016361015e3660046118ec565b610478565b005b61016361017336600461191a565b610485565b34801561018457600080fd5b506101af61019336600461191a565b638b78c6d8600c90815260009290925260209091205481161490565b60405190151581526020015b60405180910390f35b61016361049b565b3480156101d857600080fd5b506101ff6101e7366004611946565b638b78c6d8600c908152600091909152602090205490565b6040519081526020016101bb565b34801561021957600080fd5b5061016361022836600461196a565b6104ea565b34801561023957600080fd5b5060005461024d906001600160a01b031681565b6040516001600160a01b0390911681526020016101bb565b61016361027336600461191a565b610726565b34801561028457600080fd5b506101af61029336600461191a565b638b78c6d8600c90815260009290925260209091205416151590565b610163610738565b610163610774565b3480156102cb57600080fd5b506000546102e090600160a01b900460ff1681565b60405160ff90911681526020016101bb565b3480156102fe57600080fd5b50638b78c6d8195461024d565b34801561031757600080fd5b5061016361032636600461198c565b610788565b34801561033757600080fd5b506101636103463660046118ec565b61093e565b34801561035757600080fd5b506101636103663660046119bc565b610b07565b6101ff6103793660046119e5565b610bff565b34801561038a57600080fd5b506101636103993660046118ec565b610d73565b3480156103aa57600080fd5b506101ff7f000000000000000000000000000000000000000000000000000000000000000081565b6101636103e0366004611946565b610e6d565b6101636103f3366004611946565b610eaa565b34801561040457600080fd5b50610163610413366004611a86565b610ed1565b34801561042457600080fd5b506104386104333660046118ec565b610f7d565b6040516101bb9190611bd7565b34801561045157600080fd5b506101ff610460366004611946565b63389a75e1600c908152600091909152602090205490565b610482338261117f565b50565b61048d61118b565b61049782826111a6565b5050565b60006202a3006001600160401b03164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b60005460408051631799380760e11b815281516001600160a01b0390931692632f32700e926004808401939192918290030181865afa158015610531573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105559190611cba565b8051600180546020909301516001600160a01b0316600160401b026001600160e01b03199093166001600160401b039092169190911791909117905568929eee149b4bd21268543090036105b15763ab143c066000526004601cfd5b3068929eee149b4bd2126855600082815260046020526040902060026001820154600160281b900460ff1660068111156105ed576105ed611ae2565b1461060b5760405163029d79a560e41b815260040160405180910390fd5b600354600154600160401b90046001600160a01b039081169116146106435760405163bda8fc9560e01b815260040160405180910390fd5b60038101546001546001600160401b0390811691161461067657604051633687f39960e21b815260040160405180910390fd5b6106848346836003016111b2565b82146106a357604051631c6060ab60e11b815260040160405180910390fd5b6001810180546505000000000065ffffffffffff199091164264ffffffffff161717905560028101546040516001600160a01b0390911690839085907f7898a125e0970666c80e00bbf2e7041d84dfe5bbe6bcf562ce53d540fd6cd89190600090a450503868929eee149b4bd212685550600180546001600160e01b0319169055565b61072e61118b565b610497828261117f565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b61077c61118b565b61078660006111e8565b565b3068929eee149b4bd2126854036107a75763ab143c066000526004601cfd5b3068929eee149b4bd2126855600082815260046020526040902060056001820154600160281b900460ff1660068111156107e3576107e3611ae2565b14610801576040516303de361f60e11b815260040160405180910390fd5b60028101546001600160a01b0316331461082d576040516282b42960e81b815260040160405180910390fd5b6001810180546506000000000065ffffffffffff199091164264ffffffffff1617179055600681018054604080516020808402820181019092528281526108de938693919290919060009084015b828210156108d55760008481526020908190206040805160608101825260028602909201805460ff81161515845261010090046001600160a01b03168385015260019081015491830191909152908352909201910161087b565b50505050611226565b816001600160a01b0316336001600160a01b0316847f1291cec4ea55732527f1ae8ff3e53def0dbe1feb99c094983449e59cdce4674b846006016040516109259190611d71565b60405180910390a4503868929eee149b4bd21268555050565b3068929eee149b4bd21268540361095d5763ab143c066000526004601cfd5b3068929eee149b4bd21268556000818152600460205260409020600180820154600160281b900460ff16600681111561099857610998611ae2565b141580156109c6575060036001820154600160281b900460ff1660068111156109c3576109c3611ae2565b14155b156109e457604051631fa4148760e21b815260040160405180910390fd5b6001810154600160301b90046001600160a01b03163314610a17576040516282b42960e81b815260040160405180910390fd5b6001810180546504000000000065ffffffffffff199091164264ffffffffff1617179081905560068201805460408051602080840282018101909252828152610acc94600160301b90046001600160a01b03169390929091600090840182156108d55760008481526020908190206040805160608101825260028602909201805460ff81161515845261010090046001600160a01b03168385015260019081015491830191909152908352909201910161087b565b60405182907fb66b13449e4bb2c30749a37f3081f1988fcee5ff5d98ce740b354d4e2d94409590600090a2503868929eee149b4bd212685550565b6001610b1281611378565b3068929eee149b4bd212685403610b315763ab143c066000526004601cfd5b3068929eee149b4bd21268556000838152600460205260409020600180820154600160281b900460ff166006811115610b6c57610b6c611ae2565b14610b8a57604051633ee3282d60e11b815260040160405180910390fd5b6001810180546503000000000065ffffffffffff199091164264ffffffffff1617179055826003811115610bc057610bc0611ae2565b604051339086907f21f84ee3a6e9bc7c10f855f8c9829e22c613861cef10add09eccdbc88df9f59f90600090a4503868929eee149b4bd2126855505050565b60003068929eee149b4bd212685403610c205763ab143c066000526004601cfd5b3068929eee149b4bd21268556000610c3e6040860160208701611946565b6001600160a01b031603610c655760405163574b16a760e11b815260040160405180910390fd5b610c726020850185611d84565b6001600160401b0316600003610c9b5760405163574b16a760e11b815260040160405180910390fd5b610ca86060850185611da1565b9050600003610cca5760405163574b16a760e11b815260040160405180910390fd5b81158015610cd6575034155b15610cf457604051630558800760e21b815260040160405180910390fd5b6000610d023386868661139e565b60018101548154604051929350600160301b9091046001600160a01b0316917f3622a563ce1f96b477fa827bf0b60be8aee346b515754f3645f4d7a2ef5d4b2990610d569060038601906006870190611eed565b60405180910390a3543868929eee149b4bd2126855949350505050565b6001610d7e81611378565b3068929eee149b4bd212685403610d9d5763ab143c066000526004601cfd5b3068929eee149b4bd21268556000828152600460205260409020600180820154600160281b900460ff166006811115610dd857610dd8611ae2565b14610df657604051633ee3282d60e11b815260040160405180910390fd5b60018101805464ffffffffff421665ffffffffffff1990911617650200000000001790556002810180546001600160a01b0319163390811790915560405184907f9deed34441ca75bb2dbbe101d2201930f40e18a9ce521c77fbdca6690a89996790600090a3503868929eee149b4bd21268555050565b610e7561118b565b63389a75e1600c52806000526020600c208054421115610e9d57636f5e88186000526004601cfd5b60009055610482816111e8565b610eb261118b565b8060601b610ec857637448fbae6000526004601cfd5b610482816111e8565b63409feecd198054600382558015610f085760018160011c14303b10610eff5763f92ee8a96000526004601cfd5b818160ff1b1b91505b50610f128561165e565b610f1d8460016111a6565b610f268361169a565b600380546001600160a01b0319166001600160a01b0384161790558015610f76576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b5050505050565b610f85611862565b600082815260046020908152604091829020825160e08101845281548152600182015464ffffffffff81169382019390935292909190830190600160281b900460ff166006811115610fd957610fd9611ae2565b6006811115610fea57610fea611ae2565b815260018201546001600160a01b03600160301b90910481166020808401919091526002840154821660408085019190915280516080810182526003860180546001600160401b0381168352600160401b9004909416928101929092526004850154908201526005840180546060948501949293928401919061106c90611dee565b80601f016020809104026020016040519081016040528092919081815260200182805461109890611dee565b80156110e55780601f106110ba576101008083540402835291602001916110e5565b820191906000526020600020905b8154815290600101906020018083116110c857829003601f168201915b505050505081525050815260200160068201805480602002602001604051908101604052809291908181526020016000905b828210156111715760008481526020908190206040805160608101825260028602909201805460ff81161515845261010090046001600160a01b031683850152600190810154918301919091529083529092019101611117565b505050915250909392505050565b6104978282600061173d565b638b78c6d819543314610786576382b429006000526004601cfd5b6104978282600161173d565b60008383836040516020016111c993929190611f12565b6040516020818303038152906040528051906020012090509392505050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b6001600160a01b03821661124d57604051634e46966960e11b815260040160405180910390fd5b60005b81518110156113735781818151811061126b5761126b611f3a565b60200260200101516000015115611313576000836001600160a01b031683838151811061129a5761129a611f3a565b60200260200101516040015160405160006040518083038185875af1925050503d80600081146112e6576040519150601f19603f3d011682016040523d82523d6000602084013e6112eb565b606091505b505090508061130d576040516312171d8360e31b815260040160405180910390fd5b5061136b565b61136b8383838151811061132957611329611f3a565b60200260200101516040015184848151811061134757611347611f3a565b6020026020010151602001516001600160a01b03166117969092919063ffffffff16565b600101611250565b505050565b638b78c6d8600c5233600052806020600c205416610482576382b429006000526004601cfd5b6000806113a96117e6565b600081815260046020526040902081815560018101805464ffffffffff421665ffffffffffff1990911617600160281b176601000000000000600160d01b031916600160301b6001600160a01b038b1602179055925090508460038301611410828261205f565b5050341561149157604080516060810182526001808252600060208084018281523495850195865260068801805480860182559084529190922093516002909102909301805491516001600160a81b0319909216931515610100600160a81b031916939093176101006001600160a01b039092169190910217825591519101555b60005b83811015611654578484828181106114ae576114ae611f3a565b905060400201602001356000036114d857604051635972996f60e11b815260040160405180910390fd5b60008585838181106114ec576114ec611f3a565b6115029260206040909202019081019150611946565b6001600160a01b03160361152957604051635972996f60e11b815260040160405180910390fd5b82600601604051806060016040528060001515815260200187878581811061155357611553611f3a565b6115699260206040909202019081019150611946565b6001600160a01b0316815260200187878581811061158957611589611f3a565b60206040918202939093018301359093525083546001818101865560009586529482902084516002909202018054928501516001600160a01b031661010002610100600160a81b0319921515929092166001600160a81b03199093169290921717815591015191015561164c333087878581811061160957611609611f3a565b9050604002016020013588888681811061162557611625611f3a565b61163b9260206040909202019081019150611946565b6001600160a01b0316929190611804565b600101611494565b5050949350505050565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b6001600160a01b0381166116e95760405162461bcd60e51b8152602060048201526012602482015271584170703a206e6f207a65726f206f6d6e6960701b604482015260640160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f79162c8d053a07e70cdc1ccc536f0440b571f8508377d2bef51094fadab98f479060200160405180910390a150565b638b78c6d8600c52826000526020600c2080548381178361175f575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26600080a3505050505050565b816014528060345263a9059cbb60601b60005260206000604460106000875af180600160005114166117db57803d853b1517106117db576390b8ec186000526004601cfd5b506000603452505050565b60028054600091826117f783612117565b9091555050600254919050565b60405181606052826040528360601b602c526323b872dd60601b600c52602060006064601c6000895af1806001600051141661185357803d873b15171061185357637939f4246000526004601cfd5b50600060605260405250505050565b6040805160e0810182526000808252602082018190529091820190815260200160006001600160a01b0316815260200160006001600160a01b031681526020016118df604051806080016040528060006001600160401b0316815260200160006001600160a01b0316815260200160008152602001606081525090565b8152602001606081525090565b6000602082840312156118fe57600080fd5b5035919050565b6001600160a01b038116811461048257600080fd5b6000806040838503121561192d57600080fd5b823561193881611905565b946020939093013593505050565b60006020828403121561195857600080fd5b813561196381611905565b9392505050565b6000806040838503121561197d57600080fd5b50508035926020909101359150565b6000806040838503121561199f57600080fd5b8235915060208301356119b181611905565b809150509250929050565b600080604083850312156119cf57600080fd5b823591506020830135600481106119b157600080fd5b6000806000604084860312156119fa57600080fd5b83356001600160401b0380821115611a1157600080fd5b9085019060808288031215611a2557600080fd5b90935060208501359080821115611a3b57600080fd5b818601915086601f830112611a4f57600080fd5b813581811115611a5e57600080fd5b8760208260061b8501011115611a7357600080fd5b6020830194508093505050509250925092565b60008060008060808587031215611a9c57600080fd5b8435611aa781611905565b93506020850135611ab781611905565b92506040850135611ac781611905565b91506060850135611ad781611905565b939692955090935050565b634e487b7160e01b600052602160045260246000fd5b6001600160401b0381511682526000602060018060a01b03602084015116602085015260408301516040850152606083015160806060860152805180608087015260005b81811015611b585782810184015187820160a001528301611b3c565b50600060a0828801015260a0601f19601f830116870101935050505092915050565b60008151808452602080850194506020840160005b83811015611bcc578151805115158852838101516001600160a01b0316848901526040908101519088015260609096019590820190600101611b8f565b509495945050505050565b602081528151602082015264ffffffffff60208301511660408201526000604083015160078110611c1857634e487b7160e01b600052602160045260246000fd5b806060840152506060830151611c3960808401826001600160a01b03169052565b5060808301516001600160a01b03811660a08401525060a083015160e060c0840152611c69610100840182611af8565b905060c0840151601f198483030160e0850152611c868282611b7a565b95945050505050565b634e487b7160e01b600052604160045260246000fd5b6001600160401b038116811461048257600080fd5b600060408284031215611ccc57600080fd5b604051604081018181106001600160401b0382111715611cee57611cee611c8f565b6040528251611cfc81611ca5565b81526020830151611d0c81611905565b60208201529392505050565b600081548084526020808501945083600052602060002060005b83811015611bcc57815460ff81161515885260081c6001600160a01b031683880152600180830154604089015260609097019660029092019101611d32565b6020815260006119636020830184611d18565b600060208284031215611d9657600080fd5b813561196381611ca5565b6000808335601e19843603018112611db857600080fd5b8301803591506001600160401b03821115611dd257600080fd5b602001915036819003821315611de757600080fd5b9250929050565b600181811c90821680611e0257607f821691505b602082108103611e2257634e487b7160e01b600052602260045260246000fd5b50919050565b600081546001600160401b0381168452602060018060a01b038260401c1660208601526001915060018401546040860152600284016080606087015260008154611e7181611dee565b8060808a015260a06001831660008114611e925760018114611eae57611ede565b60ff19841660a08c015260a083151560051b8c01019450611ede565b85600052602060002060005b84811015611ed55781548d8201850152908901908801611eba565b8c0160a0019550505b50929998505050505050505050565b604081526000611f006040830185611e28565b8281036020840152611c868185611d18565b8381526001600160401b0383166020820152606060408201526000611c866060830184611e28565b634e487b7160e01b600052603260045260246000fd5b601f821115611373576000816000526020600020601f850160051c81016020861015611f795750805b601f850160051c820191505b81811015611f9857828155600101611f85565b505050505050565b6001600160401b03831115611fb757611fb7611c8f565b611fcb83611fc58354611dee565b83611f50565b6000601f841160018114611fff5760008515611fe75750838201355b600019600387901b1c1916600186901b178355610f76565b600083815260209020601f19861690835b828110156120305786850135825560209485019460019092019101612010565b508682101561204d5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b813561206a81611ca5565b6001600160401b0380821691508254826001600160401b03198216178455602085013561209681611905565b6001600160e01b031991909116909217604092831b68010000000000000000600160e01b031617835590830135600183015560608301359036849003601e190182126120e157600080fd5b908301908135818111156120f457600080fd5b60208301925080360383131561210957600080fd5b610f76818460028701611fa0565b60006001820161213757634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220a8b1701179a52b824f9abad4f49c3f5214b745cf0408c01b2e6d4549a4e7d4f264736f6c63430008180033", } // SolveInboxABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/solveoutbox.go b/contracts/bindings/solveoutbox.go index ed4e7b55b..97e0ff81d 100644 --- a/contracts/bindings/solveoutbox.go +++ b/contracts/bindings/solveoutbox.go @@ -48,7 +48,7 @@ type SolveTokenPrereq struct { // SolveOutboxMetaData contains all meta data concerning the SolveOutbox contract. var SolveOutboxMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"allowedCalls\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"selector\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"cancelOwnershipHandover\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"completeOwnershipHandover\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"defaultConfLevel\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deployedAt\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"didFulfill\",\"inputs\":[{\"name\":\"srcReqId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"srcChainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"call\",\"type\":\"tuple\",\"internalType\":\"structSolve.Call\",\"components\":[{\"name\":\"destChainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"fulfill\",\"inputs\":[{\"name\":\"srcReqId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"srcChainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"call\",\"type\":\"tuple\",\"internalType\":\"structSolve.Call\",\"components\":[{\"name\":\"destChainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"prereqs\",\"type\":\"tuple[]\",\"internalType\":\"structSolve.TokenPrereq[]\",\"components\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"fulfillFee\",\"inputs\":[{\"name\":\"srcChainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"fulfilledCalls\",\"inputs\":[{\"name\":\"callHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"fulfilled\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"grantRoles\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"roles\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"hasAllRoles\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"roles\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"hasAnyRole\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"roles\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"owner_\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"solver_\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"omni_\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"inbox_\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"omni\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIOmniPortal\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"result\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"ownershipHandoverExpiresAt\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"result\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"renounceRoles\",\"inputs\":[{\"name\":\"roles\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"requestOwnershipHandover\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"revokeRoles\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"roles\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"rolesOf\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"roles\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setAllowedCall\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"selector\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"allowed\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"event\",\"name\":\"AllowedCallSet\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"selector\",\"type\":\"bytes4\",\"indexed\":true,\"internalType\":\"bytes4\"},{\"name\":\"allowed\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DefaultConfLevelSet\",\"inputs\":[{\"name\":\"conf\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Fulfilled\",\"inputs\":[{\"name\":\"reqId\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"callHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"solvedBy\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OmniPortalSet\",\"inputs\":[{\"name\":\"omni\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipHandoverCanceled\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipHandoverRequested\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"oldOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RolesUpdated\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"roles\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AlreadyInitialized\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"AreadyFulfilled\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CallFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"CallNotAllowed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IncorrectPrereqs\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InsufficientFee\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NewOwnerIsZeroAddress\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoHandoverRequest\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"Reentrancy\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"Unauthorized\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WrongDestChain\",\"inputs\":[]}]", - Bin: "0x60a060405234801561001057600080fd5b504360805261001d610022565b610084565b63409feecd19805460018116156100415763f92ee8a96000526004601cfd5b8160c01c808260011c1461007f578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b60805161162e61009f60003960006103d0015261162e6000f3fe6080604052600436106101405760003560e01c80635ba15647116100b6578063cb01a09a1161006f578063cb01a09a146103ab578063eae4c19f146103be578063f04e283e146103f2578063f2fde38b14610405578063f8c8765e14610418578063fee81cf41461043857600080fd5b80635ba15647146102cc5780635db9cbe4146102ec578063715018a61461031c57806374eeb847146103245780638da5cb5b14610357578063b23ade801461037057600080fd5b80632b370b67116101085780632b370b67146101ef5780632de948071461020f57806339acf9f1146102425780634a4ee7b11461027a578063514e62fc1461028d57806354d1f13d146102c457600080fd5b8063183a4f6e14610145578063188a97aa1461015a5780631c10893f1461018d5780631cd64df4146101a057806325692962146101e7575b600080fd5b6101586101533660046110a1565b61046b565b005b34801561016657600080fd5b5061017a6101753660046110d7565b610478565b6040519081526020015b60405180910390f35b61015861019b366004611110565b6104cf565b3480156101ac57600080fd5b506101d76101bb366004611110565b638b78c6d8600c90815260009290925260209091205481161490565b6040519015158152602001610184565b6101586104e5565b3480156101fb57600080fd5b5061015861020a366004611152565b610535565b34801561021b57600080fd5b5061017a61022a36600461119e565b638b78c6d8600c908152600091909152602090205490565b34801561024e57600080fd5b50600054610262906001600160a01b031681565b6040516001600160a01b039091168152602001610184565b610158610288366004611110565b6105b4565b34801561029957600080fd5b506101d76102a8366004611110565b638b78c6d8600c90815260009290925260209091205416151590565b6101586105c6565b3480156102d857600080fd5b506101d76102e73660046111d1565b610602565b3480156102f857600080fd5b506101d76103073660046110a1565b60046020526000908152604090205460ff1681565b61015861062f565b34801561033057600080fd5b5060005461034590600160a01b900460ff1681565b60405160ff9091168152602001610184565b34801561036357600080fd5b50638b78c6d81954610262565b34801561037c57600080fd5b506101d761038b366004611228565b600360209081526000928352604080842090915290825290205460ff1681565b6101586103b936600461125b565b610643565b3480156103ca57600080fd5b5061017a7f000000000000000000000000000000000000000000000000000000000000000081565b61015861040036600461119e565b610af4565b61015861041336600461119e565b610b31565b34801561042457600080fd5b5061015861043336600461130d565b610b58565b34801561044457600080fd5b5061017a61045336600461119e565b63389a75e1600c908152600091909152602090205490565b6104753382610c04565b50565b6040516000196024820181905260448201526000906104c990839060640160408051601f198184030181529190526020810180516001600160e01b031663019bfff160e51b179052620186a0610c10565b92915050565b6104d7610c8e565b6104e18282610ca9565b5050565b60006202a30067ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b61053d610c8e565b6001600160a01b03831660008181526003602090815260408083206001600160e01b0319871680855290835292819020805460ff191686151590811790915590519081529192917f4a2dc3dabd793cd88cb7b56ba4aa70196892e5b996fc72f4f3d45e20343d305b910160405180910390a3505050565b6105bc610c8e565b6104e18282610c04565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b600060046000610613868686610cb5565b815260208101919091526040016000205460ff16949350505050565b610637610c8e565b6106416000610ceb565b565b600161064e81610d29565b3068929eee149b4bd21268540361066d5763ab143c066000526004601cfd5b3068929eee149b4bd21268554661068760208601866110d7565b67ffffffffffffffff16146106af5760405163fd24301760e01b815260040160405180910390fd5b600360006106c3604087016020880161119e565b6001600160a01b0316815260208101919091526040016000908120906106ec6060870187611361565b6106f5916113af565b6001600160e01b031916815260208101919091526040016000205460ff16610730576040516315dace2d60e21b815260040160405180910390fd5b600061073d878787610cb5565b60008181526004602052604090205490915060ff161561077057604051630c4a31a760e01b815260040160405180910390fd5b6000818152600460205260408120805460ff191660011790558367ffffffffffffffff8111156107a2576107a26113df565b6040519080825280602002602001820160405280156107cb578160200160208202803683370190505b50905060005b8481101561091557610814308787848181106107ef576107ef6113f5565b610805926020606090920201908101915061119e565b6001600160a01b031690610d4f565b828281518110610826576108266113f5565b60200260200101818152505061088c3330888885818110610849576108496113f5565b90506060020160400135898986818110610865576108656113f5565b61087b926020606090920201908101915061119e565b6001600160a01b0316929190610d7b565b61090d8686838181106108a1576108a16113f5565b90506060020160200160208101906108b9919061119e565b8787848181106108cb576108cb6113f5565b905060600201604001358888858181106108e7576108e76113f5565b6108fd926020606090920201908101915061119e565b6001600160a01b03169190610dd9565b6001016107d1565b506000610928604088016020890161119e565b6001600160a01b0316604088013561094360608a018a611361565b60405161095192919061140b565b60006040518083038185875af1925050503d806000811461098e576040519150601f19603f3d011682016040523d82523d6000602084013e610993565b606091505b50509050806109b557604051633204506f60e01b815260040160405180910390fd5b60005b85811015610a16578281815181106109d2576109d26113f5565b60200260200101516109f0308989858181106107ef576107ef6113f5565b14610a0e5760405163903c78cd60e01b815260040160405180910390fd5b6001016109b8565b50604051602481018a90526044810184905260009060640160408051601f198184030181529190526020810180516001600160e01b031663019bfff160e51b179052600254909150600090610a7d908b906004906001600160a01b031685620186a0610e29565b905080610a8e60408b01353461141b565b1015610aac5760405162976f7560e21b815260040160405180910390fd5b604051339086908d907f7898a125e0970666c80e00bbf2e7041d84dfe5bbe6bcf562ce53d540fd6cd89190600090a450505050503868929eee149b4bd2126855505050505050565b610afc610c8e565b63389a75e1600c52806000526020600c208054421115610b2457636f5e88186000526004601cfd5b6000905561047581610ceb565b610b39610c8e565b8060601b610b4f57637448fbae6000526004601cfd5b61047581610ceb565b63409feecd198054600382558015610b8f5760018160011c14303b10610b865763f92ee8a96000526004601cfd5b818160ff1b1b91505b50610b9985610f6d565b610ba4846001610ca9565b610bad83610fa9565b600280546001600160a01b0319166001600160a01b0384161790558015610bfd576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b5050505050565b6104e182826000611048565b60008054604051632376548f60e21b81526001600160a01b0390911690638dd9523c90610c4590879087908790600401611482565b602060405180830381865afa158015610c62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8691906114b9565b949350505050565b638b78c6d819543314610641576382b429006000526004601cfd5b6104e182826001611048565b6000838383604051602001610ccc939291906114fb565b6040516020818303038152906040528051906020012090509392505050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b638b78c6d8600c5233600052806020600c205416610475576382b429006000526004601cfd5b6000816014526370a0823160601b60005260208060246010865afa601f3d111660205102905092915050565b60405181606052826040528360601b602c526323b872dd60601b600c52602060006064601c6000895af18060016000511416610dca57803d873b151710610dca57637939f4246000526004601cfd5b50600060605260405250505050565b816014528060345263095ea7b360601b60005260206000604460106000875af18060016000511416610e1e57803d853b151710610e1e57633e3f8f736000526004601cfd5b506000603452505050565b60008054604051632376548f60e21b815282916001600160a01b031690638dd9523c90610e5e908a9088908890600401611482565b602060405180830381865afa158015610e7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9f91906114b9565b905080471015610ef65760405162461bcd60e51b815260206004820152601860248201527f584170703a20696e73756666696369656e742066756e6473000000000000000060448201526064015b60405180910390fd5b60005460405163c21dda4f60e01b81526001600160a01b039091169063c21dda4f908390610f30908b908b908b908b908b906004016115a8565b6000604051808303818588803b158015610f4957600080fd5b505af1158015610f5d573d6000803e3d6000fd5b50939a9950505050505050505050565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b6001600160a01b038116610ff45760405162461bcd60e51b8152602060048201526012602482015271584170703a206e6f207a65726f206f6d6e6960701b6044820152606401610eed565b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f79162c8d053a07e70cdc1ccc536f0440b571f8508377d2bef51094fadab98f479060200160405180910390a150565b638b78c6d8600c52826000526020600c2080548381178361106a575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26600080a3505050505050565b6000602082840312156110b357600080fd5b5035919050565b803567ffffffffffffffff811681146110d257600080fd5b919050565b6000602082840312156110e957600080fd5b6110f2826110ba565b9392505050565b80356001600160a01b03811681146110d257600080fd5b6000806040838503121561112357600080fd5b61112c836110f9565b946020939093013593505050565b80356001600160e01b0319811681146110d257600080fd5b60008060006060848603121561116757600080fd5b611170846110f9565b925061117e6020850161113a565b91506040840135801515811461119357600080fd5b809150509250925092565b6000602082840312156111b057600080fd5b6110f2826110f9565b6000608082840312156111cb57600080fd5b50919050565b6000806000606084860312156111e657600080fd5b833592506111f6602085016110ba565b9150604084013567ffffffffffffffff81111561121257600080fd5b61121e868287016111b9565b9150509250925092565b6000806040838503121561123b57600080fd5b611244836110f9565b91506112526020840161113a565b90509250929050565b60008060008060006080868803121561127357600080fd5b85359450611283602087016110ba565b9350604086013567ffffffffffffffff808211156112a057600080fd5b6112ac89838a016111b9565b945060608801359150808211156112c257600080fd5b818801915088601f8301126112d657600080fd5b8135818111156112e557600080fd5b8960206060830285010111156112fa57600080fd5b9699959850939650602001949392505050565b6000806000806080858703121561132357600080fd5b61132c856110f9565b935061133a602086016110f9565b9250611348604086016110f9565b9150611356606086016110f9565b905092959194509250565b6000808335601e1984360301811261137857600080fd5b83018035915067ffffffffffffffff82111561139357600080fd5b6020019150368190038213156113a857600080fd5b9250929050565b6001600160e01b031981358181169160048510156113d75780818660040360031b1b83161692505b505092915050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b818103818111156104c957634e487b7160e01b600052601160045260246000fd5b6000815180845260005b8181101561146257602081850181015186830182015201611446565b506000602082860101526020601f19601f83011685010191505092915050565b600067ffffffffffffffff8086168352606060208401526114a6606084018661143c565b9150808416604084015250949350505050565b6000602082840312156114cb57600080fd5b5051919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b838152600067ffffffffffffffff80851660208401526060604084015280611522856110ba565b1660608401526001600160a01b0361153c602086016110f9565b166080840152604084013560a08401526060840135601e1985360301811261156357600080fd5b84016020810190358281111561157857600080fd5b80360382131561158757600080fd5b608060c086015261159c60e0860182846114d2565b98975050505050505050565b600067ffffffffffffffff808816835260ff8716602084015260018060a01b038616604084015260a060608401526115e360a084018661143c565b9150808416608084015250969550505050505056fea26469706673582212206264b3c8240a029301973a0653764cf3248c883df78f717d5e5de9c0c8594da464736f6c63430008180033", + Bin: "0x60a06040523480156200001157600080fd5b504661a4b1141580156200002857504662066eee14155b15620000385743608052620000a2565b60646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000078573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200009e919062000116565b6080525b620000ac620000b2565b62000130565b63409feecd1980546001811615620000d25763f92ee8a96000526004601cfd5b8160c01c808260011c1462000111578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6000602082840312156200012957600080fd5b5051919050565b60805161162e6200014c60003960006103d0015261162e6000f3fe6080604052600436106101405760003560e01c80635ba15647116100b6578063cb01a09a1161006f578063cb01a09a146103ab578063eae4c19f146103be578063f04e283e146103f2578063f2fde38b14610405578063f8c8765e14610418578063fee81cf41461043857600080fd5b80635ba15647146102cc5780635db9cbe4146102ec578063715018a61461031c57806374eeb847146103245780638da5cb5b14610357578063b23ade801461037057600080fd5b80632b370b67116101085780632b370b67146101ef5780632de948071461020f57806339acf9f1146102425780634a4ee7b11461027a578063514e62fc1461028d57806354d1f13d146102c457600080fd5b8063183a4f6e14610145578063188a97aa1461015a5780631c10893f1461018d5780631cd64df4146101a057806325692962146101e7575b600080fd5b6101586101533660046110a1565b61046b565b005b34801561016657600080fd5b5061017a6101753660046110d7565b610478565b6040519081526020015b60405180910390f35b61015861019b366004611110565b6104cf565b3480156101ac57600080fd5b506101d76101bb366004611110565b638b78c6d8600c90815260009290925260209091205481161490565b6040519015158152602001610184565b6101586104e5565b3480156101fb57600080fd5b5061015861020a366004611152565b610535565b34801561021b57600080fd5b5061017a61022a36600461119e565b638b78c6d8600c908152600091909152602090205490565b34801561024e57600080fd5b50600054610262906001600160a01b031681565b6040516001600160a01b039091168152602001610184565b610158610288366004611110565b6105b4565b34801561029957600080fd5b506101d76102a8366004611110565b638b78c6d8600c90815260009290925260209091205416151590565b6101586105c6565b3480156102d857600080fd5b506101d76102e73660046111d1565b610602565b3480156102f857600080fd5b506101d76103073660046110a1565b60046020526000908152604090205460ff1681565b61015861062f565b34801561033057600080fd5b5060005461034590600160a01b900460ff1681565b60405160ff9091168152602001610184565b34801561036357600080fd5b50638b78c6d81954610262565b34801561037c57600080fd5b506101d761038b366004611228565b600360209081526000928352604080842090915290825290205460ff1681565b6101586103b936600461125b565b610643565b3480156103ca57600080fd5b5061017a7f000000000000000000000000000000000000000000000000000000000000000081565b61015861040036600461119e565b610af4565b61015861041336600461119e565b610b31565b34801561042457600080fd5b5061015861043336600461130d565b610b58565b34801561044457600080fd5b5061017a61045336600461119e565b63389a75e1600c908152600091909152602090205490565b6104753382610c04565b50565b6040516000196024820181905260448201526000906104c990839060640160408051601f198184030181529190526020810180516001600160e01b031663019bfff160e51b179052620186a0610c10565b92915050565b6104d7610c8e565b6104e18282610ca9565b5050565b60006202a30067ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b61053d610c8e565b6001600160a01b03831660008181526003602090815260408083206001600160e01b0319871680855290835292819020805460ff191686151590811790915590519081529192917f4a2dc3dabd793cd88cb7b56ba4aa70196892e5b996fc72f4f3d45e20343d305b910160405180910390a3505050565b6105bc610c8e565b6104e18282610c04565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b600060046000610613868686610cb5565b815260208101919091526040016000205460ff16949350505050565b610637610c8e565b6106416000610ceb565b565b600161064e81610d29565b3068929eee149b4bd21268540361066d5763ab143c066000526004601cfd5b3068929eee149b4bd21268554661068760208601866110d7565b67ffffffffffffffff16146106af5760405163fd24301760e01b815260040160405180910390fd5b600360006106c3604087016020880161119e565b6001600160a01b0316815260208101919091526040016000908120906106ec6060870187611361565b6106f5916113af565b6001600160e01b031916815260208101919091526040016000205460ff16610730576040516315dace2d60e21b815260040160405180910390fd5b600061073d878787610cb5565b60008181526004602052604090205490915060ff161561077057604051630c4a31a760e01b815260040160405180910390fd5b6000818152600460205260408120805460ff191660011790558367ffffffffffffffff8111156107a2576107a26113df565b6040519080825280602002602001820160405280156107cb578160200160208202803683370190505b50905060005b8481101561091557610814308787848181106107ef576107ef6113f5565b610805926020606090920201908101915061119e565b6001600160a01b031690610d4f565b828281518110610826576108266113f5565b60200260200101818152505061088c3330888885818110610849576108496113f5565b90506060020160400135898986818110610865576108656113f5565b61087b926020606090920201908101915061119e565b6001600160a01b0316929190610d7b565b61090d8686838181106108a1576108a16113f5565b90506060020160200160208101906108b9919061119e565b8787848181106108cb576108cb6113f5565b905060600201604001358888858181106108e7576108e76113f5565b6108fd926020606090920201908101915061119e565b6001600160a01b03169190610dd9565b6001016107d1565b506000610928604088016020890161119e565b6001600160a01b0316604088013561094360608a018a611361565b60405161095192919061140b565b60006040518083038185875af1925050503d806000811461098e576040519150601f19603f3d011682016040523d82523d6000602084013e610993565b606091505b50509050806109b557604051633204506f60e01b815260040160405180910390fd5b60005b85811015610a16578281815181106109d2576109d26113f5565b60200260200101516109f0308989858181106107ef576107ef6113f5565b14610a0e5760405163903c78cd60e01b815260040160405180910390fd5b6001016109b8565b50604051602481018a90526044810184905260009060640160408051601f198184030181529190526020810180516001600160e01b031663019bfff160e51b179052600254909150600090610a7d908b906004906001600160a01b031685620186a0610e29565b905080610a8e60408b01353461141b565b1015610aac5760405162976f7560e21b815260040160405180910390fd5b604051339086908d907f7898a125e0970666c80e00bbf2e7041d84dfe5bbe6bcf562ce53d540fd6cd89190600090a450505050503868929eee149b4bd2126855505050505050565b610afc610c8e565b63389a75e1600c52806000526020600c208054421115610b2457636f5e88186000526004601cfd5b6000905561047581610ceb565b610b39610c8e565b8060601b610b4f57637448fbae6000526004601cfd5b61047581610ceb565b63409feecd198054600382558015610b8f5760018160011c14303b10610b865763f92ee8a96000526004601cfd5b818160ff1b1b91505b50610b9985610f6d565b610ba4846001610ca9565b610bad83610fa9565b600280546001600160a01b0319166001600160a01b0384161790558015610bfd576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b5050505050565b6104e182826000611048565b60008054604051632376548f60e21b81526001600160a01b0390911690638dd9523c90610c4590879087908790600401611482565b602060405180830381865afa158015610c62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8691906114b9565b949350505050565b638b78c6d819543314610641576382b429006000526004601cfd5b6104e182826001611048565b6000838383604051602001610ccc939291906114fb565b6040516020818303038152906040528051906020012090509392505050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b638b78c6d8600c5233600052806020600c205416610475576382b429006000526004601cfd5b6000816014526370a0823160601b60005260208060246010865afa601f3d111660205102905092915050565b60405181606052826040528360601b602c526323b872dd60601b600c52602060006064601c6000895af18060016000511416610dca57803d873b151710610dca57637939f4246000526004601cfd5b50600060605260405250505050565b816014528060345263095ea7b360601b60005260206000604460106000875af18060016000511416610e1e57803d853b151710610e1e57633e3f8f736000526004601cfd5b506000603452505050565b60008054604051632376548f60e21b815282916001600160a01b031690638dd9523c90610e5e908a9088908890600401611482565b602060405180830381865afa158015610e7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9f91906114b9565b905080471015610ef65760405162461bcd60e51b815260206004820152601860248201527f584170703a20696e73756666696369656e742066756e6473000000000000000060448201526064015b60405180910390fd5b60005460405163c21dda4f60e01b81526001600160a01b039091169063c21dda4f908390610f30908b908b908b908b908b906004016115a8565b6000604051808303818588803b158015610f4957600080fd5b505af1158015610f5d573d6000803e3d6000fd5b50939a9950505050505050505050565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b6001600160a01b038116610ff45760405162461bcd60e51b8152602060048201526012602482015271584170703a206e6f207a65726f206f6d6e6960701b6044820152606401610eed565b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f79162c8d053a07e70cdc1ccc536f0440b571f8508377d2bef51094fadab98f479060200160405180910390a150565b638b78c6d8600c52826000526020600c2080548381178361106a575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26600080a3505050505050565b6000602082840312156110b357600080fd5b5035919050565b803567ffffffffffffffff811681146110d257600080fd5b919050565b6000602082840312156110e957600080fd5b6110f2826110ba565b9392505050565b80356001600160a01b03811681146110d257600080fd5b6000806040838503121561112357600080fd5b61112c836110f9565b946020939093013593505050565b80356001600160e01b0319811681146110d257600080fd5b60008060006060848603121561116757600080fd5b611170846110f9565b925061117e6020850161113a565b91506040840135801515811461119357600080fd5b809150509250925092565b6000602082840312156111b057600080fd5b6110f2826110f9565b6000608082840312156111cb57600080fd5b50919050565b6000806000606084860312156111e657600080fd5b833592506111f6602085016110ba565b9150604084013567ffffffffffffffff81111561121257600080fd5b61121e868287016111b9565b9150509250925092565b6000806040838503121561123b57600080fd5b611244836110f9565b91506112526020840161113a565b90509250929050565b60008060008060006080868803121561127357600080fd5b85359450611283602087016110ba565b9350604086013567ffffffffffffffff808211156112a057600080fd5b6112ac89838a016111b9565b945060608801359150808211156112c257600080fd5b818801915088601f8301126112d657600080fd5b8135818111156112e557600080fd5b8960206060830285010111156112fa57600080fd5b9699959850939650602001949392505050565b6000806000806080858703121561132357600080fd5b61132c856110f9565b935061133a602086016110f9565b9250611348604086016110f9565b9150611356606086016110f9565b905092959194509250565b6000808335601e1984360301811261137857600080fd5b83018035915067ffffffffffffffff82111561139357600080fd5b6020019150368190038213156113a857600080fd5b9250929050565b6001600160e01b031981358181169160048510156113d75780818660040360031b1b83161692505b505092915050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b818103818111156104c957634e487b7160e01b600052601160045260246000fd5b6000815180845260005b8181101561146257602081850181015186830182015201611446565b506000602082860101526020601f19601f83011685010191505092915050565b600067ffffffffffffffff8086168352606060208401526114a6606084018661143c565b9150808416604084015250949350505050565b6000602082840312156114cb57600080fd5b5051919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b838152600067ffffffffffffffff80851660208401526060604084015280611522856110ba565b1660608401526001600160a01b0361153c602086016110f9565b166080840152604084013560a08401526060840135601e1985360301811261156357600080fd5b84016020810190358281111561157857600080fd5b80360382131561158757600080fd5b608060c086015261159c60e0860182846114d2565b98975050505050505050565b600067ffffffffffffffff808816835260ff8716602084015260018060a01b038616604084015260a060608401526115e360a084018661143c565b9150808416608084015250969550505050505056fea2646970667358221220280a7d78d1f344d5819608dd2493959571b5223d952dd71039004bfa2805c7b864736f6c63430008180033", } // SolveOutboxABI is the input ABI used to generate the binding from. diff --git a/contracts/solve/src/SolveInbox.sol b/contracts/solve/src/SolveInbox.sol index 49ca39fcb..cda763f87 100644 --- a/contracts/solve/src/SolveInbox.sol +++ b/contracts/solve/src/SolveInbox.sol @@ -7,6 +7,7 @@ import { Initializable } from "solady/src/utils/Initializable.sol"; import { SafeTransferLib } from "solady/src/utils/SafeTransferLib.sol"; import { XAppBase } from "core/src/pkg/XAppBase.sol"; import { ISolveInbox } from "./interfaces/ISolveInbox.sol"; +import { IArbSys } from "./interfaces/IArbSys.sol"; import { Solve } from "./Solve.sol"; /** @@ -47,6 +48,12 @@ contract SolveInbox is OwnableRoles, ReentrancyGuard, Initializable, XAppBase, I */ uint256 internal constant SOLVER = _ROLE_0; + /** + * @notice Arbitrum's ArbSys precompile (0x0000000000000000000000000000000000000064) + * @dev Used to get Arbitrum block number. + */ + address internal constant ARB_SYS = 0x0000000000000000000000000000000000000064; + /** * @dev uint repr of last assigned request ID. */ @@ -63,7 +70,10 @@ contract SolveInbox is OwnableRoles, ReentrancyGuard, Initializable, XAppBase, I mapping(bytes32 id => Solve.Request) internal _requests; constructor() { - deployedAt = block.number; + // Must get Arbitrum block number from ArbSys precompile, block.number returns L1 block number on Arbitrum. + // This is a temporary fix, we need a robust way of properly setting this value when on any Arbitrum chain. + if (block.chainid != 42_161 && block.chainid != 421_614) deployedAt = block.number; + else deployedAt = IArbSys(ARB_SYS).arbBlockNumber(); _disableInitializers(); } diff --git a/contracts/solve/src/SolveOutbox.sol b/contracts/solve/src/SolveOutbox.sol index 46c668e50..fc64ec063 100644 --- a/contracts/solve/src/SolveOutbox.sol +++ b/contracts/solve/src/SolveOutbox.sol @@ -12,6 +12,7 @@ import { TypeMax } from "core/src/libraries/TypeMax.sol"; import { Solve } from "./Solve.sol"; import { ISolveInbox } from "./interfaces/ISolveInbox.sol"; +import { IArbSys } from "./interfaces/IArbSys.sol"; /** * @title SolveOutbox @@ -48,6 +49,12 @@ contract SolveOutbox is OwnableRoles, ReentrancyGuard, Initializable, XAppBase { */ uint256 internal constant SOLVER = _ROLE_0; + /** + * @notice Arbitrum's ArbSys precompile (0x0000000000000000000000000000000000000064) + * @dev Used to get Arbitrum block number. + */ + address internal constant ARB_SYS = 0x0000000000000000000000000000000000000064; + /** * @notice Gas limit for SolveInbox.markFulfilled callback. */ @@ -77,7 +84,10 @@ contract SolveOutbox is OwnableRoles, ReentrancyGuard, Initializable, XAppBase { mapping(bytes32 callHash => bool fulfilled) public fulfilledCalls; constructor() { - deployedAt = block.number; + // Must get Arbitrum block number from ArbSys precompile, block.number returns L1 block number on Arbitrum. + // This is a temporary fix, we need a robust way of properly setting this value when on any Arbitrum chain. + if (block.chainid != 42_161 && block.chainid != 421_614) deployedAt = block.number; + else deployedAt = IArbSys(ARB_SYS).arbBlockNumber(); _disableInitializers(); } diff --git a/contracts/solve/src/interfaces/IArbSys.sol b/contracts/solve/src/interfaces/IArbSys.sol new file mode 100644 index 000000000..7904f58fc --- /dev/null +++ b/contracts/solve/src/interfaces/IArbSys.sol @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity =0.8.24; + +/** + * @title IArbSys + * @notice Interface for Arbitrum's ArbSys precompile (0x0000000000000000000000000000000000000064) + * @custom:source https://github.com/OffchainLabs/nitro-contracts/blob/main/src/precompiles/ArbSys.sol + */ +interface IArbSys { + /** + * @notice Get Arbitrum block number (distinct from L1 block number; Arbitrum genesis block has block number 0) + * @return block number as int + */ + function arbBlockNumber() external view returns (uint256); +}