From d419b5731ca5069b44f3433e8f37d53a5f3943d5 Mon Sep 17 00:00:00 2001 From: Kevin Halliday Date: Tue, 17 Dec 2024 11:21:48 -0500 Subject: [PATCH] chore(contracts/solve): no enum reject reason (#2710) Switching to uint8 rather than enum, so we can add revert reasons without upgrading contracts. issue: none --- contracts/bindings/solveinbox.go | 4 ++-- contracts/bindings/solveoutbox.go | 2 +- contracts/solve/.gas-snapshot | 18 +++++++++--------- contracts/solve/src/Solve.sol | 11 ----------- contracts/solve/src/SolveInbox.sol | 3 ++- contracts/solve/src/interfaces/ISolveInbox.sol | 7 ++++--- contracts/solve/test/Inbox_accept.t.sol | 2 +- contracts/solve/test/Inbox_cancel.t.sol | 6 +++--- contracts/solve/test/Inbox_reject.t.sol | 18 +++++++++--------- 9 files changed, 31 insertions(+), 40 deletions(-) diff --git a/contracts/bindings/solveinbox.go b/contracts/bindings/solveinbox.go index 122d23451..07021d41d 100644 --- a/contracts/bindings/solveinbox.go +++ b/contracts/bindings/solveinbox.go @@ -63,8 +63,8 @@ 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\":\"getLatestRequestByStatus\",\"inputs\":[{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enumSolve.Status\"}],\"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\":\"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: "0x60a06040523480156200001157600080fd5b5063ffffffff60643b1615620000975760646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156200007f575060408051601f3d908101601f191682019092526200007c9181019062000110565b60015b6200008e57436080526200009c565b6080526200009c565b436080525b620000a6620000ac565b6200012a565b63409feecd1980546001811615620000cc5763f92ee8a96000526004601cfd5b8160c01c808260011c146200010b578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6000602082840312156200012357600080fd5b5051919050565b60805161237a6200014660003960006103f8015261237a6000f3fe6080604052600436106101665760003560e01c80637667fd69116100d1578063e4725ba11161008a578063f2fde38b11610064578063f2fde38b1461042d578063f8c8765e14610440578063fb1e61ca14610460578063fee81cf41461048057600080fd5b8063e4725ba1146103c6578063eae4c19f146103e6578063f04e283e1461041a57600080fd5b80637667fd691461030d5780638da5cb5b1461033a57806396c144f014610353578063c4d252f514610373578063db3ea55314610393578063e17771c8146103b357600080fd5b806339acf9f11161012357806339acf9f1146102485780634a4ee7b114610280578063514e62fc1461029357806354d1f13d146102ca578063715018a6146102d257806374eeb847146102da57600080fd5b8063183a4f6e1461016b5780631c10893f146101805780631cd64df41461019357806325692962146101df5780632de94807146101e7578063337ffe2014610228575b600080fd5b61017e610179366004611ad1565b6104b3565b005b61017e61018e366004611aff565b6104c0565b34801561019f57600080fd5b506101ca6101ae366004611aff565b638b78c6d8600c90815260009290925260209091205481161490565b60405190151581526020015b60405180910390f35b61017e6104d6565b3480156101f357600080fd5b5061021a610202366004611b2b565b638b78c6d8600c908152600091909152602090205490565b6040519081526020016101d6565b34801561023457600080fd5b5061017e610243366004611b4f565b610525565b34801561025457600080fd5b50600054610268906001600160a01b031681565b6040516001600160a01b0390911681526020016101d6565b61017e61028e366004611aff565b61078f565b34801561029f57600080fd5b506101ca6102ae366004611aff565b638b78c6d8600c90815260009290925260209091205416151590565b61017e6107a1565b61017e6107dd565b3480156102e657600080fd5b506000546102fb90600160a01b900460ff1681565b60405160ff90911681526020016101d6565b34801561031957600080fd5b5061032d610328366004611b71565b6107f1565b6040516101d69190611c87565b34801561034657600080fd5b50638b78c6d81954610268565b34801561035f57600080fd5b5061017e61036e366004611d3f565b610a30565b34801561037f57600080fd5b5061017e61038e366004611ad1565b610c12565b34801561039f57600080fd5b5061017e6103ae366004611d6f565b610e07565b61021a6103c1366004611d98565b610f2d565b3480156103d257600080fd5b5061017e6103e1366004611ad1565b6110a1565b3480156103f257600080fd5b5061021a7f000000000000000000000000000000000000000000000000000000000000000081565b61017e610428366004611b2b565b6111ca565b61017e61043b366004611b2b565b611207565b34801561044c57600080fd5b5061017e61045b366004611e39565b61122e565b34801561046c57600080fd5b5061032d61047b366004611ad1565b6112da565b34801561048c57600080fd5b5061021a61049b366004611b2b565b63389a75e1600c908152600091909152602090205490565b6104bd3382611336565b50565b6104c8611342565b6104d2828261135d565b5050565b60006202a3006001600160401b03164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b60005460408051631799380760e11b815281516001600160a01b0390931692632f32700e926004808401939192918290030181865afa15801561056c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105909190611ec0565b8051600180546020909301516001600160a01b0316600160401b026001600160e01b03199093166001600160401b039092169190911791909117905568929eee149b4bd21268543090036105ec5763ab143c066000526004601cfd5b3068929eee149b4bd2126855600082815260046020526040902060026001820154600160281b900460ff16600681111561062857610628611b92565b146106465760405163029d79a560e41b815260040160405180910390fd5b600354600154600160401b90046001600160a01b0390811691161461067e5760405163bda8fc9560e01b815260040160405180910390fd5b60038101546001546001600160401b039081169116146106b157604051633687f39960e21b815260040160405180910390fd5b6106bf834683600301611369565b82146106de57604051631c6060ab60e11b815260040160405180910390fd5b60018101805464ffffffffff421665ffffffffffff199091161765050000000000179055600560008181526020919091527f458b30c2d72bfd2c6317304a4594ecbafe5f729d3111b65fdc3a33bd48e5432d84905560028201546040516001600160a01b0390911691849186917f7898a125e0970666c80e00bbf2e7041d84dfe5bbe6bcf562ce53d540fd6cd89191a450503868929eee149b4bd212685550600180546001600160e01b0319169055565b610797611342565b6104d28282611336565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b6107e5611342565b6107ef600061139f565b565b6107f9611a47565b600460006005600085600681111561081357610813611b92565b600681111561082457610824611b92565b81526020808201929092526040908101600090812054845283830194909452918201909220815160e08101835281548152600182015464ffffffffff811694820194909452929091830190600160281b900460ff16600681111561088a5761088a611b92565b600681111561089b5761089b611b92565b815260018201546001600160a01b03600160301b90910481166020808401919091526002840154821660408085019190915280516080810182526003860180546001600160401b0381168352600160401b9004909416928101929092526004850154908201526005840180546060948501949293928401919061091d90611f1e565b80601f016020809104026020016040519081016040528092919081815260200182805461094990611f1e565b80156109965780601f1061096b57610100808354040283529160200191610996565b820191906000526020600020905b81548152906001019060200180831161097957829003601f168201915b505050505081525050815260200160068201805480602002602001604051908101604052809291908181526020016000905b82821015610a225760008481526020908190206040805160608101825260028602909201805460ff81161515845261010090046001600160a01b0316838501526001908101549183019190915290835290920191016109c8565b505050915250909392505050565b3068929eee149b4bd212685403610a4f5763ab143c066000526004601cfd5b3068929eee149b4bd2126855600082815260046020526040902060056001820154600160281b900460ff166006811115610a8b57610a8b611b92565b14610aa9576040516303de361f60e11b815260040160405180910390fd5b60028101546001600160a01b03163314610ad5576040516282b42960e81b815260040160405180910390fd5b60018101805464ffffffffff421665ffffffffffff19909116176506000000000017905560066000818152600560209081527f069400f22b28c6c362558d92f66163cec5671cba50b61abd2eecfcd0eaeac51886905591830180546040805182860281018601909152818152610bb2948794919392919084015b82821015610ba95760008481526020908190206040805160608101825260028602909201805460ff81161515845261010090046001600160a01b031683850152600190810154918301919091529083529092019101610b4f565b505050506113dd565b816001600160a01b0316336001600160a01b0316847f1291cec4ea55732527f1ae8ff3e53def0dbe1feb99c094983449e59cdce4674b84600601604051610bf99190611fb1565b60405180910390a4503868929eee149b4bd21268555050565b3068929eee149b4bd212685403610c315763ab143c066000526004601cfd5b3068929eee149b4bd21268556000818152600460205260409020600180820154600160281b900460ff166006811115610c6c57610c6c611b92565b14158015610c9a575060036001820154600160281b900460ff166006811115610c9757610c97611b92565b14155b15610cb857604051631fa4148760e21b815260040160405180910390fd5b6001810154600160301b90046001600160a01b03163314610ceb576040516282b42960e81b815260040160405180910390fd5b6001810180546504000000000065ffffffffffff199091164264ffffffffff161717815560046000908152600560209081527f3eec716f11ba9e820c81ca75eb978ffb45831ef8b7a53e5e422c26008e1ca6d585905591546006840180546040805182870281018701909152818152610dcc95600160301b9094046001600160a01b031694909384018215610ba95760008481526020908190206040805160608101825260028602909201805460ff81161515845261010090046001600160a01b031683850152600190810154918301919091529083529092019101610b4f565b60405182907fb66b13449e4bb2c30749a37f3081f1988fcee5ff5d98ce740b354d4e2d94409590600090a2503868929eee149b4bd212685550565b6001610e128161152f565b3068929eee149b4bd212685403610e315763ab143c066000526004601cfd5b3068929eee149b4bd21268556000838152600460205260409020600180820154600160281b900460ff166006811115610e6c57610e6c611b92565b14610e8a57604051633ee3282d60e11b815260040160405180910390fd5b60018101805464ffffffffff421665ffffffffffff199091161765030000000000179055600360005260056020527fa9bc9a3a348c357ba16b37005d7e6b3236198c0e939f4af8c5f19b8deeb8ebc0849055826004811115610eee57610eee611b92565b604051339086907f21f84ee3a6e9bc7c10f855f8c9829e22c613861cef10add09eccdbc88df9f59f90600090a4503868929eee149b4bd2126855505050565b60003068929eee149b4bd212685403610f4e5763ab143c066000526004601cfd5b3068929eee149b4bd21268556000610f6c6040860160208701611b2b565b6001600160a01b031603610f935760405163574b16a760e11b815260040160405180910390fd5b610fa06020850185611fc4565b6001600160401b0316600003610fc95760405163574b16a760e11b815260040160405180910390fd5b610fd66060850185611fe1565b9050600003610ff85760405163574b16a760e11b815260040160405180910390fd5b81158015611004575034155b1561102257604051630558800760e21b815260040160405180910390fd5b600061103033868686611555565b60018101548154604051929350600160301b9091046001600160a01b0316917f3622a563ce1f96b477fa827bf0b60be8aee346b515754f3645f4d7a2ef5d4b299061108490600386019060068701906120f3565b60405180910390a3543868929eee149b4bd2126855949350505050565b60016110ac8161152f565b3068929eee149b4bd2126854036110cb5763ab143c066000526004601cfd5b3068929eee149b4bd21268556000828152600460205260409020600180820154600160281b900460ff16600681111561110657611106611b92565b1461112457604051633ee3282d60e11b815260040160405180910390fd5b60018101805464ffffffffff421665ffffffffffff199091161765020000000000179055600280820180546001600160a01b03191633908117909155600091825260056020527f89832631fb3c3307a103ba2c84ab569c64d6182a18893dcd163f0f1c2090733a859055604051909185917f9deed34441ca75bb2dbbe101d2201930f40e18a9ce521c77fbdca6690a8999679190a3503868929eee149b4bd21268555050565b6111d2611342565b63389a75e1600c52806000526020600c2080544211156111fa57636f5e88186000526004601cfd5b600090556104bd8161139f565b61120f611342565b8060601b61122557637448fbae6000526004601cfd5b6104bd8161139f565b63409feecd1980546003825580156112655760018160011c14303b1061125c5763f92ee8a96000526004601cfd5b818160ff1b1b91505b5061126f85611843565b61127a84600161135d565b6112838361187f565b600380546001600160a01b0319166001600160a01b03841617905580156112d3576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b5050505050565b6112e2611a47565b600082815260046020908152604091829020825160e08101845281548152600182015464ffffffffff81169382019390935292909190830190600160281b900460ff16600681111561088a5761088a611b92565b6104d282826000611922565b638b78c6d8195433146107ef576382b429006000526004601cfd5b6104d282826001611922565b600083838360405160200161138093929190612118565b6040516020818303038152906040528051906020012090509392505050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b6001600160a01b03821661140457604051634e46966960e11b815260040160405180910390fd5b60005b815181101561152a5781818151811061142257611422612140565b602002602001015160000151156114ca576000836001600160a01b031683838151811061145157611451612140565b60200260200101516040015160405160006040518083038185875af1925050503d806000811461149d576040519150601f19603f3d011682016040523d82523d6000602084013e6114a2565b606091505b50509050806114c4576040516312171d8360e31b815260040160405180910390fd5b50611522565b611522838383815181106114e0576114e0612140565b6020026020010151604001518484815181106114fe576114fe612140565b6020026020010151602001516001600160a01b031661197b9092919063ffffffff16565b600101611407565b505050565b638b78c6d8600c5233600052806020600c2054166104bd576382b429006000526004601cfd5b6000806115606119cb565b600081815260046020526040902081815560018101805464ffffffffff421665ffffffffffff1990911617600160281b176601000000000000600160d01b031916600160301b6001600160a01b038b16021790559250905084600383016115c78282612265565b5050600160005260056020527f1471eb6eb2c5e789fc3de43f8ce62938c7d1836ec861730447e2ada8fd81017b819055341561167657604080516060810182526001808252600060208084018281523495850195865260068801805480860182559084529190922093516002909102909301805491516001600160a81b0319909216931515610100600160a81b031916939093176101006001600160a01b039092169190910217825591519101555b60005b838110156118395784848281811061169357611693612140565b905060400201602001356000036116bd57604051635972996f60e11b815260040160405180910390fd5b60008585838181106116d1576116d1612140565b6116e79260206040909202019081019150611b2b565b6001600160a01b03160361170e57604051635972996f60e11b815260040160405180910390fd5b82600601604051806060016040528060001515815260200187878581811061173857611738612140565b61174e9260206040909202019081019150611b2b565b6001600160a01b0316815260200187878581811061176e5761176e612140565b60206040918202939093018301359093525083546001818101865560009586529482902084516002909202018054928501516001600160a01b031661010002610100600160a81b0319921515929092166001600160a81b03199093169290921717815591015191015561183133308787858181106117ee576117ee612140565b9050604002016020013588888681811061180a5761180a612140565b6118209260206040909202019081019150611b2b565b6001600160a01b03169291906119e9565b600101611679565b5050949350505050565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b6001600160a01b0381166118ce5760405162461bcd60e51b8152602060048201526012602482015271584170703a206e6f207a65726f206f6d6e6960701b604482015260640160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f79162c8d053a07e70cdc1ccc536f0440b571f8508377d2bef51094fadab98f479060200160405180910390a150565b638b78c6d8600c52826000526020600c20805483811783611944575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26600080a3505050505050565b816014528060345263a9059cbb60601b60005260206000604460106000875af180600160005114166119c057803d853b1517106119c0576390b8ec186000526004601cfd5b506000603452505050565b60028054600091826119dc8361231d565b9091555050600254919050565b60405181606052826040528360601b602c526323b872dd60601b600c52602060006064601c6000895af18060016000511416611a3857803d873b151710611a3857637939f4246000526004601cfd5b50600060605260405250505050565b6040805160e0810182526000808252602082018190529091820190815260200160006001600160a01b0316815260200160006001600160a01b03168152602001611ac4604051806080016040528060006001600160401b0316815260200160006001600160a01b0316815260200160008152602001606081525090565b8152602001606081525090565b600060208284031215611ae357600080fd5b5035919050565b6001600160a01b03811681146104bd57600080fd5b60008060408385031215611b1257600080fd5b8235611b1d81611aea565b946020939093013593505050565b600060208284031215611b3d57600080fd5b8135611b4881611aea565b9392505050565b60008060408385031215611b6257600080fd5b50508035926020909101359150565b600060208284031215611b8357600080fd5b813560078110611b4857600080fd5b634e487b7160e01b600052602160045260246000fd5b6001600160401b0381511682526000602060018060a01b03602084015116602085015260408301516040850152606083015160806060860152805180608087015260005b81811015611c085782810184015187820160a001528301611bec565b50600060a0828801015260a0601f19601f830116870101935050505092915050565b60008151808452602080850194506020840160005b83811015611c7c578151805115158852838101516001600160a01b0316848901526040908101519088015260609096019590820190600101611c3f565b509495945050505050565b602081528151602082015264ffffffffff60208301511660408201526000604083015160078110611cc857634e487b7160e01b600052602160045260246000fd5b806060840152506060830151611ce960808401826001600160a01b03169052565b5060808301516001600160a01b03811660a08401525060a083015160e060c0840152611d19610100840182611ba8565b905060c0840151601f198483030160e0850152611d368282611c2a565b95945050505050565b60008060408385031215611d5257600080fd5b823591506020830135611d6481611aea565b809150509250929050565b60008060408385031215611d8257600080fd5b82359150602083013560058110611d6457600080fd5b600080600060408486031215611dad57600080fd5b83356001600160401b0380821115611dc457600080fd5b9085019060808288031215611dd857600080fd5b90935060208501359080821115611dee57600080fd5b818601915086601f830112611e0257600080fd5b813581811115611e1157600080fd5b8760208260061b8501011115611e2657600080fd5b6020830194508093505050509250925092565b60008060008060808587031215611e4f57600080fd5b8435611e5a81611aea565b93506020850135611e6a81611aea565b92506040850135611e7a81611aea565b91506060850135611e8a81611aea565b939692955090935050565b634e487b7160e01b600052604160045260246000fd5b6001600160401b03811681146104bd57600080fd5b600060408284031215611ed257600080fd5b604051604081018181106001600160401b0382111715611ef457611ef4611e95565b6040528251611f0281611eab565b81526020830151611f1281611aea565b60208201529392505050565b600181811c90821680611f3257607f821691505b602082108103611f5257634e487b7160e01b600052602260045260246000fd5b50919050565b600081548084526020808501945083600052602060002060005b83811015611c7c57815460ff81161515885260081c6001600160a01b031683880152600180830154604089015260609097019660029092019101611f72565b602081526000611b486020830184611f58565b600060208284031215611fd657600080fd5b8135611b4881611eab565b6000808335601e19843603018112611ff857600080fd5b8301803591506001600160401b0382111561201257600080fd5b60200191503681900382131561202757600080fd5b9250929050565b600081546001600160401b0381168452602060018060a01b038260401c166020860152600191506001840154604086015260028401608060608701526000815461207781611f1e565b8060808a015260a0600183166000811461209857600181146120b4576120e4565b60ff19841660a08c015260a083151560051b8c010194506120e4565b85600052602060002060005b848110156120db5781548d82018501529089019088016120c0565b8c0160a0019550505b50929998505050505050505050565b604081526000612106604083018561202e565b8281036020840152611d368185611f58565b8381526001600160401b0383166020820152606060408201526000611d36606083018461202e565b634e487b7160e01b600052603260045260246000fd5b601f82111561152a576000816000526020600020601f850160051c8101602086101561217f5750805b601f850160051c820191505b8181101561219e5782815560010161218b565b505050505050565b6001600160401b038311156121bd576121bd611e95565b6121d1836121cb8354611f1e565b83612156565b6000601f84116001811461220557600085156121ed5750838201355b600019600387901b1c1916600186901b1783556112d3565b600083815260209020601f19861690835b828110156122365786850135825560209485019460019092019101612216565b50868210156122535760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b813561227081611eab565b6001600160401b0380821691508254826001600160401b03198216178455602085013561229c81611aea565b6001600160e01b031991909116909217604092831b68010000000000000000600160e01b031617835590830135600183015560608301359036849003601e190182126122e757600080fd5b908301908135818111156122fa57600080fd5b60208301925080360383131561230f57600080fd5b6112d38184600287016121a6565b60006001820161233d57634e487b7160e01b600052601160045260246000fd5b506001019056fea264697066735822122017f40a4797219f7c00f21ecc0dcaf3dc887be666a6dd56161a8351d8a38b26c964736f6c63430008180033", + 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\":\"getLatestRequestByStatus\",\"inputs\":[{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enumSolve.Status\"}],\"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\":\"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\":\"uint8\"}],\"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\":\"uint8\"}],\"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: "0x60a06040523480156200001157600080fd5b5063ffffffff60643b1615620000975760646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156200007f575060408051601f3d908101601f191682019092526200007c9181019062000110565b60015b6200008e57436080526200009c565b6080526200009c565b436080525b620000a6620000ac565b6200012a565b63409feecd1980546001811615620000cc5763f92ee8a96000526004601cfd5b8160c01c808260011c146200010b578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6000602082840312156200012357600080fd5b5051919050565b60805161236e6200014660003960006103f8015261236e6000f3fe6080604052600436106101665760003560e01c80637667fd69116100d1578063e4725ba11161008a578063f2fde38b11610064578063f2fde38b1461042d578063f8c8765e14610440578063fb1e61ca14610460578063fee81cf41461048057600080fd5b8063e4725ba1146103c6578063eae4c19f146103e6578063f04e283e1461041a57600080fd5b80637667fd691461030d5780638da5cb5b1461033a57806396c144f014610353578063c4d252f514610373578063db3ea55314610393578063e17771c8146103b357600080fd5b806339acf9f11161012357806339acf9f1146102485780634a4ee7b114610280578063514e62fc1461029357806354d1f13d146102ca578063715018a6146102d257806374eeb847146102da57600080fd5b8063183a4f6e1461016b5780631c10893f146101805780631cd64df41461019357806325692962146101df5780632de94807146101e7578063337ffe2014610228575b600080fd5b61017e610179366004611ac3565b6104b3565b005b61017e61018e366004611af1565b6104c0565b34801561019f57600080fd5b506101ca6101ae366004611af1565b638b78c6d8600c90815260009290925260209091205481161490565b60405190151581526020015b60405180910390f35b61017e6104d6565b3480156101f357600080fd5b5061021a610202366004611b1d565b638b78c6d8600c908152600091909152602090205490565b6040519081526020016101d6565b34801561023457600080fd5b5061017e610243366004611b41565b610525565b34801561025457600080fd5b50600054610268906001600160a01b031681565b6040516001600160a01b0390911681526020016101d6565b61017e61028e366004611af1565b61078f565b34801561029f57600080fd5b506101ca6102ae366004611af1565b638b78c6d8600c90815260009290925260209091205416151590565b61017e6107a1565b61017e6107dd565b3480156102e657600080fd5b506000546102fb90600160a01b900460ff1681565b60405160ff90911681526020016101d6565b34801561031957600080fd5b5061032d610328366004611b63565b6107f1565b6040516101d69190611c79565b34801561034657600080fd5b50638b78c6d81954610268565b34801561035f57600080fd5b5061017e61036e366004611d31565b610a30565b34801561037f57600080fd5b5061017e61038e366004611ac3565b610c12565b34801561039f57600080fd5b5061017e6103ae366004611d61565b610e07565b61021a6103c1366004611d8c565b610f1f565b3480156103d257600080fd5b5061017e6103e1366004611ac3565b611093565b3480156103f257600080fd5b5061021a7f000000000000000000000000000000000000000000000000000000000000000081565b61017e610428366004611b1d565b6111bc565b61017e61043b366004611b1d565b6111f9565b34801561044c57600080fd5b5061017e61045b366004611e2d565b611220565b34801561046c57600080fd5b5061032d61047b366004611ac3565b6112cc565b34801561048c57600080fd5b5061021a61049b366004611b1d565b63389a75e1600c908152600091909152602090205490565b6104bd3382611328565b50565b6104c8611334565b6104d2828261134f565b5050565b60006202a3006001600160401b03164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b60005460408051631799380760e11b815281516001600160a01b0390931692632f32700e926004808401939192918290030181865afa15801561056c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105909190611eb4565b8051600180546020909301516001600160a01b0316600160401b026001600160e01b03199093166001600160401b039092169190911791909117905568929eee149b4bd21268543090036105ec5763ab143c066000526004601cfd5b3068929eee149b4bd2126855600082815260046020526040902060026001820154600160281b900460ff16600681111561062857610628611b84565b146106465760405163029d79a560e41b815260040160405180910390fd5b600354600154600160401b90046001600160a01b0390811691161461067e5760405163bda8fc9560e01b815260040160405180910390fd5b60038101546001546001600160401b039081169116146106b157604051633687f39960e21b815260040160405180910390fd5b6106bf83468360030161135b565b82146106de57604051631c6060ab60e11b815260040160405180910390fd5b60018101805464ffffffffff421665ffffffffffff199091161765050000000000179055600560008181526020919091527f458b30c2d72bfd2c6317304a4594ecbafe5f729d3111b65fdc3a33bd48e5432d84905560028201546040516001600160a01b0390911691849186917f7898a125e0970666c80e00bbf2e7041d84dfe5bbe6bcf562ce53d540fd6cd89191a450503868929eee149b4bd212685550600180546001600160e01b0319169055565b610797611334565b6104d28282611328565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b6107e5611334565b6107ef6000611391565b565b6107f9611a39565b600460006005600085600681111561081357610813611b84565b600681111561082457610824611b84565b81526020808201929092526040908101600090812054845283830194909452918201909220815160e08101835281548152600182015464ffffffffff811694820194909452929091830190600160281b900460ff16600681111561088a5761088a611b84565b600681111561089b5761089b611b84565b815260018201546001600160a01b03600160301b90910481166020808401919091526002840154821660408085019190915280516080810182526003860180546001600160401b0381168352600160401b9004909416928101929092526004850154908201526005840180546060948501949293928401919061091d90611f12565b80601f016020809104026020016040519081016040528092919081815260200182805461094990611f12565b80156109965780601f1061096b57610100808354040283529160200191610996565b820191906000526020600020905b81548152906001019060200180831161097957829003601f168201915b505050505081525050815260200160068201805480602002602001604051908101604052809291908181526020016000905b82821015610a225760008481526020908190206040805160608101825260028602909201805460ff81161515845261010090046001600160a01b0316838501526001908101549183019190915290835290920191016109c8565b505050915250909392505050565b3068929eee149b4bd212685403610a4f5763ab143c066000526004601cfd5b3068929eee149b4bd2126855600082815260046020526040902060056001820154600160281b900460ff166006811115610a8b57610a8b611b84565b14610aa9576040516303de361f60e11b815260040160405180910390fd5b60028101546001600160a01b03163314610ad5576040516282b42960e81b815260040160405180910390fd5b60018101805464ffffffffff421665ffffffffffff19909116176506000000000017905560066000818152600560209081527f069400f22b28c6c362558d92f66163cec5671cba50b61abd2eecfcd0eaeac51886905591830180546040805182860281018601909152818152610bb2948794919392919084015b82821015610ba95760008481526020908190206040805160608101825260028602909201805460ff81161515845261010090046001600160a01b031683850152600190810154918301919091529083529092019101610b4f565b505050506113cf565b816001600160a01b0316336001600160a01b0316847f1291cec4ea55732527f1ae8ff3e53def0dbe1feb99c094983449e59cdce4674b84600601604051610bf99190611fa5565b60405180910390a4503868929eee149b4bd21268555050565b3068929eee149b4bd212685403610c315763ab143c066000526004601cfd5b3068929eee149b4bd21268556000818152600460205260409020600180820154600160281b900460ff166006811115610c6c57610c6c611b84565b14158015610c9a575060036001820154600160281b900460ff166006811115610c9757610c97611b84565b14155b15610cb857604051631fa4148760e21b815260040160405180910390fd5b6001810154600160301b90046001600160a01b03163314610ceb576040516282b42960e81b815260040160405180910390fd5b6001810180546504000000000065ffffffffffff199091164264ffffffffff161717815560046000908152600560209081527f3eec716f11ba9e820c81ca75eb978ffb45831ef8b7a53e5e422c26008e1ca6d585905591546006840180546040805182870281018701909152818152610dcc95600160301b9094046001600160a01b031694909384018215610ba95760008481526020908190206040805160608101825260028602909201805460ff81161515845261010090046001600160a01b031683850152600190810154918301919091529083529092019101610b4f565b60405182907fb66b13449e4bb2c30749a37f3081f1988fcee5ff5d98ce740b354d4e2d94409590600090a2503868929eee149b4bd212685550565b6001610e1281611521565b3068929eee149b4bd212685403610e315763ab143c066000526004601cfd5b3068929eee149b4bd21268556000838152600460205260409020600180820154600160281b900460ff166006811115610e6c57610e6c611b84565b14610e8a57604051633ee3282d60e11b815260040160405180910390fd5b60018101805464ffffffffff421665ffffffffffff1990911617650300000000001790556003600090815260056020527fa9bc9a3a348c357ba16b37005d7e6b3236198c0e939f4af8c5f19b8deeb8ebc085905560405160ff851691339187917f21f84ee3a6e9bc7c10f855f8c9829e22c613861cef10add09eccdbc88df9f59f91a4503868929eee149b4bd2126855505050565b60003068929eee149b4bd212685403610f405763ab143c066000526004601cfd5b3068929eee149b4bd21268556000610f5e6040860160208701611b1d565b6001600160a01b031603610f855760405163574b16a760e11b815260040160405180910390fd5b610f926020850185611fb8565b6001600160401b0316600003610fbb5760405163574b16a760e11b815260040160405180910390fd5b610fc86060850185611fd5565b9050600003610fea5760405163574b16a760e11b815260040160405180910390fd5b81158015610ff6575034155b1561101457604051630558800760e21b815260040160405180910390fd5b600061102233868686611547565b60018101548154604051929350600160301b9091046001600160a01b0316917f3622a563ce1f96b477fa827bf0b60be8aee346b515754f3645f4d7a2ef5d4b299061107690600386019060068701906120e7565b60405180910390a3543868929eee149b4bd2126855949350505050565b600161109e81611521565b3068929eee149b4bd2126854036110bd5763ab143c066000526004601cfd5b3068929eee149b4bd21268556000828152600460205260409020600180820154600160281b900460ff1660068111156110f8576110f8611b84565b1461111657604051633ee3282d60e11b815260040160405180910390fd5b60018101805464ffffffffff421665ffffffffffff199091161765020000000000179055600280820180546001600160a01b03191633908117909155600091825260056020527f89832631fb3c3307a103ba2c84ab569c64d6182a18893dcd163f0f1c2090733a859055604051909185917f9deed34441ca75bb2dbbe101d2201930f40e18a9ce521c77fbdca6690a8999679190a3503868929eee149b4bd21268555050565b6111c4611334565b63389a75e1600c52806000526020600c2080544211156111ec57636f5e88186000526004601cfd5b600090556104bd81611391565b611201611334565b8060601b61121757637448fbae6000526004601cfd5b6104bd81611391565b63409feecd1980546003825580156112575760018160011c14303b1061124e5763f92ee8a96000526004601cfd5b818160ff1b1b91505b5061126185611835565b61126c84600161134f565b61127583611871565b600380546001600160a01b0319166001600160a01b03841617905580156112c5576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b5050505050565b6112d4611a39565b600082815260046020908152604091829020825160e08101845281548152600182015464ffffffffff81169382019390935292909190830190600160281b900460ff16600681111561088a5761088a611b84565b6104d282826000611914565b638b78c6d8195433146107ef576382b429006000526004601cfd5b6104d282826001611914565b60008383836040516020016113729392919061210c565b6040516020818303038152906040528051906020012090509392505050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b6001600160a01b0382166113f657604051634e46966960e11b815260040160405180910390fd5b60005b815181101561151c5781818151811061141457611414612134565b602002602001015160000151156114bc576000836001600160a01b031683838151811061144357611443612134565b60200260200101516040015160405160006040518083038185875af1925050503d806000811461148f576040519150601f19603f3d011682016040523d82523d6000602084013e611494565b606091505b50509050806114b6576040516312171d8360e31b815260040160405180910390fd5b50611514565b611514838383815181106114d2576114d2612134565b6020026020010151604001518484815181106114f0576114f0612134565b6020026020010151602001516001600160a01b031661196d9092919063ffffffff16565b6001016113f9565b505050565b638b78c6d8600c5233600052806020600c2054166104bd576382b429006000526004601cfd5b6000806115526119bd565b600081815260046020526040902081815560018101805464ffffffffff421665ffffffffffff1990911617600160281b176601000000000000600160d01b031916600160301b6001600160a01b038b16021790559250905084600383016115b98282612259565b5050600160005260056020527f1471eb6eb2c5e789fc3de43f8ce62938c7d1836ec861730447e2ada8fd81017b819055341561166857604080516060810182526001808252600060208084018281523495850195865260068801805480860182559084529190922093516002909102909301805491516001600160a81b0319909216931515610100600160a81b031916939093176101006001600160a01b039092169190910217825591519101555b60005b8381101561182b5784848281811061168557611685612134565b905060400201602001356000036116af57604051635972996f60e11b815260040160405180910390fd5b60008585838181106116c3576116c3612134565b6116d99260206040909202019081019150611b1d565b6001600160a01b03160361170057604051635972996f60e11b815260040160405180910390fd5b82600601604051806060016040528060001515815260200187878581811061172a5761172a612134565b6117409260206040909202019081019150611b1d565b6001600160a01b0316815260200187878581811061176057611760612134565b60206040918202939093018301359093525083546001818101865560009586529482902084516002909202018054928501516001600160a01b031661010002610100600160a81b0319921515929092166001600160a81b03199093169290921717815591015191015561182333308787858181106117e0576117e0612134565b905060400201602001358888868181106117fc576117fc612134565b6118129260206040909202019081019150611b1d565b6001600160a01b03169291906119db565b60010161166b565b5050949350505050565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b6001600160a01b0381166118c05760405162461bcd60e51b8152602060048201526012602482015271584170703a206e6f207a65726f206f6d6e6960701b604482015260640160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f79162c8d053a07e70cdc1ccc536f0440b571f8508377d2bef51094fadab98f479060200160405180910390a150565b638b78c6d8600c52826000526020600c20805483811783611936575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26600080a3505050505050565b816014528060345263a9059cbb60601b60005260206000604460106000875af180600160005114166119b257803d853b1517106119b2576390b8ec186000526004601cfd5b506000603452505050565b60028054600091826119ce83612311565b9091555050600254919050565b60405181606052826040528360601b602c526323b872dd60601b600c52602060006064601c6000895af18060016000511416611a2a57803d873b151710611a2a57637939f4246000526004601cfd5b50600060605260405250505050565b6040805160e0810182526000808252602082018190529091820190815260200160006001600160a01b0316815260200160006001600160a01b03168152602001611ab6604051806080016040528060006001600160401b0316815260200160006001600160a01b0316815260200160008152602001606081525090565b8152602001606081525090565b600060208284031215611ad557600080fd5b5035919050565b6001600160a01b03811681146104bd57600080fd5b60008060408385031215611b0457600080fd5b8235611b0f81611adc565b946020939093013593505050565b600060208284031215611b2f57600080fd5b8135611b3a81611adc565b9392505050565b60008060408385031215611b5457600080fd5b50508035926020909101359150565b600060208284031215611b7557600080fd5b813560078110611b3a57600080fd5b634e487b7160e01b600052602160045260246000fd5b6001600160401b0381511682526000602060018060a01b03602084015116602085015260408301516040850152606083015160806060860152805180608087015260005b81811015611bfa5782810184015187820160a001528301611bde565b50600060a0828801015260a0601f19601f830116870101935050505092915050565b60008151808452602080850194506020840160005b83811015611c6e578151805115158852838101516001600160a01b0316848901526040908101519088015260609096019590820190600101611c31565b509495945050505050565b602081528151602082015264ffffffffff60208301511660408201526000604083015160078110611cba57634e487b7160e01b600052602160045260246000fd5b806060840152506060830151611cdb60808401826001600160a01b03169052565b5060808301516001600160a01b03811660a08401525060a083015160e060c0840152611d0b610100840182611b9a565b905060c0840151601f198483030160e0850152611d288282611c1c565b95945050505050565b60008060408385031215611d4457600080fd5b823591506020830135611d5681611adc565b809150509250929050565b60008060408385031215611d7457600080fd5b82359150602083013560ff81168114611d5657600080fd5b600080600060408486031215611da157600080fd5b83356001600160401b0380821115611db857600080fd5b9085019060808288031215611dcc57600080fd5b90935060208501359080821115611de257600080fd5b818601915086601f830112611df657600080fd5b813581811115611e0557600080fd5b8760208260061b8501011115611e1a57600080fd5b6020830194508093505050509250925092565b60008060008060808587031215611e4357600080fd5b8435611e4e81611adc565b93506020850135611e5e81611adc565b92506040850135611e6e81611adc565b91506060850135611e7e81611adc565b939692955090935050565b634e487b7160e01b600052604160045260246000fd5b6001600160401b03811681146104bd57600080fd5b600060408284031215611ec657600080fd5b604051604081018181106001600160401b0382111715611ee857611ee8611e89565b6040528251611ef681611e9f565b81526020830151611f0681611adc565b60208201529392505050565b600181811c90821680611f2657607f821691505b602082108103611f4657634e487b7160e01b600052602260045260246000fd5b50919050565b600081548084526020808501945083600052602060002060005b83811015611c6e57815460ff81161515885260081c6001600160a01b031683880152600180830154604089015260609097019660029092019101611f66565b602081526000611b3a6020830184611f4c565b600060208284031215611fca57600080fd5b8135611b3a81611e9f565b6000808335601e19843603018112611fec57600080fd5b8301803591506001600160401b0382111561200657600080fd5b60200191503681900382131561201b57600080fd5b9250929050565b600081546001600160401b0381168452602060018060a01b038260401c166020860152600191506001840154604086015260028401608060608701526000815461206b81611f12565b8060808a015260a0600183166000811461208c57600181146120a8576120d8565b60ff19841660a08c015260a083151560051b8c010194506120d8565b85600052602060002060005b848110156120cf5781548d82018501529089019088016120b4565b8c0160a0019550505b50929998505050505050505050565b6040815260006120fa6040830185612022565b8281036020840152611d288185611f4c565b8381526001600160401b0383166020820152606060408201526000611d286060830184612022565b634e487b7160e01b600052603260045260246000fd5b601f82111561151c576000816000526020600020601f850160051c810160208610156121735750805b601f850160051c820191505b818110156121925782815560010161217f565b505050505050565b6001600160401b038311156121b1576121b1611e89565b6121c5836121bf8354611f12565b8361214a565b6000601f8411600181146121f957600085156121e15750838201355b600019600387901b1c1916600186901b1783556112c5565b600083815260209020601f19861690835b8281101561222a578685013582556020948501946001909201910161220a565b50868210156122475760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b813561226481611e9f565b6001600160401b0380821691508254826001600160401b03198216178455602085013561229081611adc565b6001600160e01b031991909116909217604092831b68010000000000000000600160e01b031617835590830135600183015560608301359036849003601e190182126122db57600080fd5b908301908135818111156122ee57600080fd5b60208301925080360383131561230357600080fd5b6112c581846002870161219a565b60006001820161233157634e487b7160e01b600052601160045260246000fd5b506001019056fea264697066735822122007ec7e45f3d811cb159f4a7b9a03656f5aae204b984cf866160cd0c3c83748a564736f6c63430008180033", } // SolveInboxABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/solveoutbox.go b/contracts/bindings/solveoutbox.go index cac58eeb5..780dae758 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: "0x60a06040523480156200001157600080fd5b5063ffffffff60643b1615620000975760646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156200007f575060408051601f3d908101601f191682019092526200007c9181019062000110565b60015b6200008e57436080526200009c565b6080526200009c565b436080525b620000a6620000ac565b6200012a565b63409feecd1980546001811615620000cc5763f92ee8a96000526004601cfd5b8160c01c808260011c146200010b578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6000602082840312156200012357600080fd5b5051919050565b60805161162e6200014660003960006103d0015261162e6000f3fe6080604052600436106101405760003560e01c80635ba15647116100b6578063cb01a09a1161006f578063cb01a09a146103ab578063eae4c19f146103be578063f04e283e146103f2578063f2fde38b14610405578063f8c8765e14610418578063fee81cf41461043857600080fd5b80635ba15647146102cc5780635db9cbe4146102ec578063715018a61461031c57806374eeb847146103245780638da5cb5b14610357578063b23ade801461037057600080fd5b80632b370b67116101085780632b370b67146101ef5780632de948071461020f57806339acf9f1146102425780634a4ee7b11461027a578063514e62fc1461028d57806354d1f13d146102c457600080fd5b8063183a4f6e14610145578063188a97aa1461015a5780631c10893f1461018d5780631cd64df4146101a057806325692962146101e7575b600080fd5b6101586101533660046110a1565b61046b565b005b34801561016657600080fd5b5061017a6101753660046110d7565b610478565b6040519081526020015b60405180910390f35b61015861019b366004611110565b6104cf565b3480156101ac57600080fd5b506101d76101bb366004611110565b638b78c6d8600c90815260009290925260209091205481161490565b6040519015158152602001610184565b6101586104e5565b3480156101fb57600080fd5b5061015861020a366004611152565b610535565b34801561021b57600080fd5b5061017a61022a36600461119e565b638b78c6d8600c908152600091909152602090205490565b34801561024e57600080fd5b50600054610262906001600160a01b031681565b6040516001600160a01b039091168152602001610184565b610158610288366004611110565b6105b4565b34801561029957600080fd5b506101d76102a8366004611110565b638b78c6d8600c90815260009290925260209091205416151590565b6101586105c6565b3480156102d857600080fd5b506101d76102e73660046111d1565b610602565b3480156102f857600080fd5b506101d76103073660046110a1565b60046020526000908152604090205460ff1681565b61015861062f565b34801561033057600080fd5b5060005461034590600160a01b900460ff1681565b60405160ff9091168152602001610184565b34801561036357600080fd5b50638b78c6d81954610262565b34801561037c57600080fd5b506101d761038b366004611228565b600360209081526000928352604080842090915290825290205460ff1681565b6101586103b936600461125b565b610643565b3480156103ca57600080fd5b5061017a7f000000000000000000000000000000000000000000000000000000000000000081565b61015861040036600461119e565b610af4565b61015861041336600461119e565b610b31565b34801561042457600080fd5b5061015861043336600461130d565b610b58565b34801561044457600080fd5b5061017a61045336600461119e565b63389a75e1600c908152600091909152602090205490565b6104753382610c04565b50565b6040516000196024820181905260448201526000906104c990839060640160408051601f198184030181529190526020810180516001600160e01b031663019bfff160e51b179052620186a0610c10565b92915050565b6104d7610c8e565b6104e18282610ca9565b5050565b60006202a30067ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b61053d610c8e565b6001600160a01b03831660008181526003602090815260408083206001600160e01b0319871680855290835292819020805460ff191686151590811790915590519081529192917f4a2dc3dabd793cd88cb7b56ba4aa70196892e5b996fc72f4f3d45e20343d305b910160405180910390a3505050565b6105bc610c8e565b6104e18282610c04565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b600060046000610613868686610cb5565b815260208101919091526040016000205460ff16949350505050565b610637610c8e565b6106416000610ceb565b565b600161064e81610d29565b3068929eee149b4bd21268540361066d5763ab143c066000526004601cfd5b3068929eee149b4bd21268554661068760208601866110d7565b67ffffffffffffffff16146106af5760405163fd24301760e01b815260040160405180910390fd5b600360006106c3604087016020880161119e565b6001600160a01b0316815260208101919091526040016000908120906106ec6060870187611361565b6106f5916113af565b6001600160e01b031916815260208101919091526040016000205460ff16610730576040516315dace2d60e21b815260040160405180910390fd5b600061073d878787610cb5565b60008181526004602052604090205490915060ff161561077057604051630c4a31a760e01b815260040160405180910390fd5b6000818152600460205260408120805460ff191660011790558367ffffffffffffffff8111156107a2576107a26113df565b6040519080825280602002602001820160405280156107cb578160200160208202803683370190505b50905060005b8481101561091557610814308787848181106107ef576107ef6113f5565b610805926020606090920201908101915061119e565b6001600160a01b031690610d4f565b828281518110610826576108266113f5565b60200260200101818152505061088c3330888885818110610849576108496113f5565b90506060020160400135898986818110610865576108656113f5565b61087b926020606090920201908101915061119e565b6001600160a01b0316929190610d7b565b61090d8686838181106108a1576108a16113f5565b90506060020160200160208101906108b9919061119e565b8787848181106108cb576108cb6113f5565b905060600201604001358888858181106108e7576108e76113f5565b6108fd926020606090920201908101915061119e565b6001600160a01b03169190610dd9565b6001016107d1565b506000610928604088016020890161119e565b6001600160a01b0316604088013561094360608a018a611361565b60405161095192919061140b565b60006040518083038185875af1925050503d806000811461098e576040519150601f19603f3d011682016040523d82523d6000602084013e610993565b606091505b50509050806109b557604051633204506f60e01b815260040160405180910390fd5b60005b85811015610a16578281815181106109d2576109d26113f5565b60200260200101516109f0308989858181106107ef576107ef6113f5565b14610a0e5760405163903c78cd60e01b815260040160405180910390fd5b6001016109b8565b50604051602481018a90526044810184905260009060640160408051601f198184030181529190526020810180516001600160e01b031663019bfff160e51b179052600254909150600090610a7d908b906004906001600160a01b031685620186a0610e29565b905080610a8e60408b01353461141b565b1015610aac5760405162976f7560e21b815260040160405180910390fd5b604051339086908d907f7898a125e0970666c80e00bbf2e7041d84dfe5bbe6bcf562ce53d540fd6cd89190600090a450505050503868929eee149b4bd2126855505050505050565b610afc610c8e565b63389a75e1600c52806000526020600c208054421115610b2457636f5e88186000526004601cfd5b6000905561047581610ceb565b610b39610c8e565b8060601b610b4f57637448fbae6000526004601cfd5b61047581610ceb565b63409feecd198054600382558015610b8f5760018160011c14303b10610b865763f92ee8a96000526004601cfd5b818160ff1b1b91505b50610b9985610f6d565b610ba4846001610ca9565b610bad83610fa9565b600280546001600160a01b0319166001600160a01b0384161790558015610bfd576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b5050505050565b6104e182826000611048565b60008054604051632376548f60e21b81526001600160a01b0390911690638dd9523c90610c4590879087908790600401611482565b602060405180830381865afa158015610c62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8691906114b9565b949350505050565b638b78c6d819543314610641576382b429006000526004601cfd5b6104e182826001611048565b6000838383604051602001610ccc939291906114fb565b6040516020818303038152906040528051906020012090509392505050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b638b78c6d8600c5233600052806020600c205416610475576382b429006000526004601cfd5b6000816014526370a0823160601b60005260208060246010865afa601f3d111660205102905092915050565b60405181606052826040528360601b602c526323b872dd60601b600c52602060006064601c6000895af18060016000511416610dca57803d873b151710610dca57637939f4246000526004601cfd5b50600060605260405250505050565b816014528060345263095ea7b360601b60005260206000604460106000875af18060016000511416610e1e57803d853b151710610e1e57633e3f8f736000526004601cfd5b506000603452505050565b60008054604051632376548f60e21b815282916001600160a01b031690638dd9523c90610e5e908a9088908890600401611482565b602060405180830381865afa158015610e7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9f91906114b9565b905080471015610ef65760405162461bcd60e51b815260206004820152601860248201527f584170703a20696e73756666696369656e742066756e6473000000000000000060448201526064015b60405180910390fd5b60005460405163c21dda4f60e01b81526001600160a01b039091169063c21dda4f908390610f30908b908b908b908b908b906004016115a8565b6000604051808303818588803b158015610f4957600080fd5b505af1158015610f5d573d6000803e3d6000fd5b50939a9950505050505050505050565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b6001600160a01b038116610ff45760405162461bcd60e51b8152602060048201526012602482015271584170703a206e6f207a65726f206f6d6e6960701b6044820152606401610eed565b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f79162c8d053a07e70cdc1ccc536f0440b571f8508377d2bef51094fadab98f479060200160405180910390a150565b638b78c6d8600c52826000526020600c2080548381178361106a575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26600080a3505050505050565b6000602082840312156110b357600080fd5b5035919050565b803567ffffffffffffffff811681146110d257600080fd5b919050565b6000602082840312156110e957600080fd5b6110f2826110ba565b9392505050565b80356001600160a01b03811681146110d257600080fd5b6000806040838503121561112357600080fd5b61112c836110f9565b946020939093013593505050565b80356001600160e01b0319811681146110d257600080fd5b60008060006060848603121561116757600080fd5b611170846110f9565b925061117e6020850161113a565b91506040840135801515811461119357600080fd5b809150509250925092565b6000602082840312156111b057600080fd5b6110f2826110f9565b6000608082840312156111cb57600080fd5b50919050565b6000806000606084860312156111e657600080fd5b833592506111f6602085016110ba565b9150604084013567ffffffffffffffff81111561121257600080fd5b61121e868287016111b9565b9150509250925092565b6000806040838503121561123b57600080fd5b611244836110f9565b91506112526020840161113a565b90509250929050565b60008060008060006080868803121561127357600080fd5b85359450611283602087016110ba565b9350604086013567ffffffffffffffff808211156112a057600080fd5b6112ac89838a016111b9565b945060608801359150808211156112c257600080fd5b818801915088601f8301126112d657600080fd5b8135818111156112e557600080fd5b8960206060830285010111156112fa57600080fd5b9699959850939650602001949392505050565b6000806000806080858703121561132357600080fd5b61132c856110f9565b935061133a602086016110f9565b9250611348604086016110f9565b9150611356606086016110f9565b905092959194509250565b6000808335601e1984360301811261137857600080fd5b83018035915067ffffffffffffffff82111561139357600080fd5b6020019150368190038213156113a857600080fd5b9250929050565b6001600160e01b031981358181169160048510156113d75780818660040360031b1b83161692505b505092915050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b818103818111156104c957634e487b7160e01b600052601160045260246000fd5b6000815180845260005b8181101561146257602081850181015186830182015201611446565b506000602082860101526020601f19601f83011685010191505092915050565b600067ffffffffffffffff8086168352606060208401526114a6606084018661143c565b9150808416604084015250949350505050565b6000602082840312156114cb57600080fd5b5051919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b838152600067ffffffffffffffff80851660208401526060604084015280611522856110ba565b1660608401526001600160a01b0361153c602086016110f9565b166080840152604084013560a08401526060840135601e1985360301811261156357600080fd5b84016020810190358281111561157857600080fd5b80360382131561158757600080fd5b608060c086015261159c60e0860182846114d2565b98975050505050505050565b600067ffffffffffffffff808816835260ff8716602084015260018060a01b038616604084015260a060608401526115e360a084018661143c565b9150808416608084015250969550505050505056fea26469706673582212207f26baf95a31487958516d115bdac6e941b4e5106515f92e6369527e334f50fe64736f6c63430008180033", + Bin: "0x60a06040523480156200001157600080fd5b5063ffffffff60643b1615620000975760646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156200007f575060408051601f3d908101601f191682019092526200007c9181019062000110565b60015b6200008e57436080526200009c565b6080526200009c565b436080525b620000a6620000ac565b6200012a565b63409feecd1980546001811615620000cc5763f92ee8a96000526004601cfd5b8160c01c808260011c146200010b578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6000602082840312156200012357600080fd5b5051919050565b60805161162e6200014660003960006103d0015261162e6000f3fe6080604052600436106101405760003560e01c80635ba15647116100b6578063cb01a09a1161006f578063cb01a09a146103ab578063eae4c19f146103be578063f04e283e146103f2578063f2fde38b14610405578063f8c8765e14610418578063fee81cf41461043857600080fd5b80635ba15647146102cc5780635db9cbe4146102ec578063715018a61461031c57806374eeb847146103245780638da5cb5b14610357578063b23ade801461037057600080fd5b80632b370b67116101085780632b370b67146101ef5780632de948071461020f57806339acf9f1146102425780634a4ee7b11461027a578063514e62fc1461028d57806354d1f13d146102c457600080fd5b8063183a4f6e14610145578063188a97aa1461015a5780631c10893f1461018d5780631cd64df4146101a057806325692962146101e7575b600080fd5b6101586101533660046110a1565b61046b565b005b34801561016657600080fd5b5061017a6101753660046110d7565b610478565b6040519081526020015b60405180910390f35b61015861019b366004611110565b6104cf565b3480156101ac57600080fd5b506101d76101bb366004611110565b638b78c6d8600c90815260009290925260209091205481161490565b6040519015158152602001610184565b6101586104e5565b3480156101fb57600080fd5b5061015861020a366004611152565b610535565b34801561021b57600080fd5b5061017a61022a36600461119e565b638b78c6d8600c908152600091909152602090205490565b34801561024e57600080fd5b50600054610262906001600160a01b031681565b6040516001600160a01b039091168152602001610184565b610158610288366004611110565b6105b4565b34801561029957600080fd5b506101d76102a8366004611110565b638b78c6d8600c90815260009290925260209091205416151590565b6101586105c6565b3480156102d857600080fd5b506101d76102e73660046111d1565b610602565b3480156102f857600080fd5b506101d76103073660046110a1565b60046020526000908152604090205460ff1681565b61015861062f565b34801561033057600080fd5b5060005461034590600160a01b900460ff1681565b60405160ff9091168152602001610184565b34801561036357600080fd5b50638b78c6d81954610262565b34801561037c57600080fd5b506101d761038b366004611228565b600360209081526000928352604080842090915290825290205460ff1681565b6101586103b936600461125b565b610643565b3480156103ca57600080fd5b5061017a7f000000000000000000000000000000000000000000000000000000000000000081565b61015861040036600461119e565b610af4565b61015861041336600461119e565b610b31565b34801561042457600080fd5b5061015861043336600461130d565b610b58565b34801561044457600080fd5b5061017a61045336600461119e565b63389a75e1600c908152600091909152602090205490565b6104753382610c04565b50565b6040516000196024820181905260448201526000906104c990839060640160408051601f198184030181529190526020810180516001600160e01b031663019bfff160e51b179052620186a0610c10565b92915050565b6104d7610c8e565b6104e18282610ca9565b5050565b60006202a30067ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b61053d610c8e565b6001600160a01b03831660008181526003602090815260408083206001600160e01b0319871680855290835292819020805460ff191686151590811790915590519081529192917f4a2dc3dabd793cd88cb7b56ba4aa70196892e5b996fc72f4f3d45e20343d305b910160405180910390a3505050565b6105bc610c8e565b6104e18282610c04565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b600060046000610613868686610cb5565b815260208101919091526040016000205460ff16949350505050565b610637610c8e565b6106416000610ceb565b565b600161064e81610d29565b3068929eee149b4bd21268540361066d5763ab143c066000526004601cfd5b3068929eee149b4bd21268554661068760208601866110d7565b67ffffffffffffffff16146106af5760405163fd24301760e01b815260040160405180910390fd5b600360006106c3604087016020880161119e565b6001600160a01b0316815260208101919091526040016000908120906106ec6060870187611361565b6106f5916113af565b6001600160e01b031916815260208101919091526040016000205460ff16610730576040516315dace2d60e21b815260040160405180910390fd5b600061073d878787610cb5565b60008181526004602052604090205490915060ff161561077057604051630c4a31a760e01b815260040160405180910390fd5b6000818152600460205260408120805460ff191660011790558367ffffffffffffffff8111156107a2576107a26113df565b6040519080825280602002602001820160405280156107cb578160200160208202803683370190505b50905060005b8481101561091557610814308787848181106107ef576107ef6113f5565b610805926020606090920201908101915061119e565b6001600160a01b031690610d4f565b828281518110610826576108266113f5565b60200260200101818152505061088c3330888885818110610849576108496113f5565b90506060020160400135898986818110610865576108656113f5565b61087b926020606090920201908101915061119e565b6001600160a01b0316929190610d7b565b61090d8686838181106108a1576108a16113f5565b90506060020160200160208101906108b9919061119e565b8787848181106108cb576108cb6113f5565b905060600201604001358888858181106108e7576108e76113f5565b6108fd926020606090920201908101915061119e565b6001600160a01b03169190610dd9565b6001016107d1565b506000610928604088016020890161119e565b6001600160a01b0316604088013561094360608a018a611361565b60405161095192919061140b565b60006040518083038185875af1925050503d806000811461098e576040519150601f19603f3d011682016040523d82523d6000602084013e610993565b606091505b50509050806109b557604051633204506f60e01b815260040160405180910390fd5b60005b85811015610a16578281815181106109d2576109d26113f5565b60200260200101516109f0308989858181106107ef576107ef6113f5565b14610a0e5760405163903c78cd60e01b815260040160405180910390fd5b6001016109b8565b50604051602481018a90526044810184905260009060640160408051601f198184030181529190526020810180516001600160e01b031663019bfff160e51b179052600254909150600090610a7d908b906004906001600160a01b031685620186a0610e29565b905080610a8e60408b01353461141b565b1015610aac5760405162976f7560e21b815260040160405180910390fd5b604051339086908d907f7898a125e0970666c80e00bbf2e7041d84dfe5bbe6bcf562ce53d540fd6cd89190600090a450505050503868929eee149b4bd2126855505050505050565b610afc610c8e565b63389a75e1600c52806000526020600c208054421115610b2457636f5e88186000526004601cfd5b6000905561047581610ceb565b610b39610c8e565b8060601b610b4f57637448fbae6000526004601cfd5b61047581610ceb565b63409feecd198054600382558015610b8f5760018160011c14303b10610b865763f92ee8a96000526004601cfd5b818160ff1b1b91505b50610b9985610f6d565b610ba4846001610ca9565b610bad83610fa9565b600280546001600160a01b0319166001600160a01b0384161790558015610bfd576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b5050505050565b6104e182826000611048565b60008054604051632376548f60e21b81526001600160a01b0390911690638dd9523c90610c4590879087908790600401611482565b602060405180830381865afa158015610c62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8691906114b9565b949350505050565b638b78c6d819543314610641576382b429006000526004601cfd5b6104e182826001611048565b6000838383604051602001610ccc939291906114fb565b6040516020818303038152906040528051906020012090509392505050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b638b78c6d8600c5233600052806020600c205416610475576382b429006000526004601cfd5b6000816014526370a0823160601b60005260208060246010865afa601f3d111660205102905092915050565b60405181606052826040528360601b602c526323b872dd60601b600c52602060006064601c6000895af18060016000511416610dca57803d873b151710610dca57637939f4246000526004601cfd5b50600060605260405250505050565b816014528060345263095ea7b360601b60005260206000604460106000875af18060016000511416610e1e57803d853b151710610e1e57633e3f8f736000526004601cfd5b506000603452505050565b60008054604051632376548f60e21b815282916001600160a01b031690638dd9523c90610e5e908a9088908890600401611482565b602060405180830381865afa158015610e7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9f91906114b9565b905080471015610ef65760405162461bcd60e51b815260206004820152601860248201527f584170703a20696e73756666696369656e742066756e6473000000000000000060448201526064015b60405180910390fd5b60005460405163c21dda4f60e01b81526001600160a01b039091169063c21dda4f908390610f30908b908b908b908b908b906004016115a8565b6000604051808303818588803b158015610f4957600080fd5b505af1158015610f5d573d6000803e3d6000fd5b50939a9950505050505050505050565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b6001600160a01b038116610ff45760405162461bcd60e51b8152602060048201526012602482015271584170703a206e6f207a65726f206f6d6e6960701b6044820152606401610eed565b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f79162c8d053a07e70cdc1ccc536f0440b571f8508377d2bef51094fadab98f479060200160405180910390a150565b638b78c6d8600c52826000526020600c2080548381178361106a575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26600080a3505050505050565b6000602082840312156110b357600080fd5b5035919050565b803567ffffffffffffffff811681146110d257600080fd5b919050565b6000602082840312156110e957600080fd5b6110f2826110ba565b9392505050565b80356001600160a01b03811681146110d257600080fd5b6000806040838503121561112357600080fd5b61112c836110f9565b946020939093013593505050565b80356001600160e01b0319811681146110d257600080fd5b60008060006060848603121561116757600080fd5b611170846110f9565b925061117e6020850161113a565b91506040840135801515811461119357600080fd5b809150509250925092565b6000602082840312156111b057600080fd5b6110f2826110f9565b6000608082840312156111cb57600080fd5b50919050565b6000806000606084860312156111e657600080fd5b833592506111f6602085016110ba565b9150604084013567ffffffffffffffff81111561121257600080fd5b61121e868287016111b9565b9150509250925092565b6000806040838503121561123b57600080fd5b611244836110f9565b91506112526020840161113a565b90509250929050565b60008060008060006080868803121561127357600080fd5b85359450611283602087016110ba565b9350604086013567ffffffffffffffff808211156112a057600080fd5b6112ac89838a016111b9565b945060608801359150808211156112c257600080fd5b818801915088601f8301126112d657600080fd5b8135818111156112e557600080fd5b8960206060830285010111156112fa57600080fd5b9699959850939650602001949392505050565b6000806000806080858703121561132357600080fd5b61132c856110f9565b935061133a602086016110f9565b9250611348604086016110f9565b9150611356606086016110f9565b905092959194509250565b6000808335601e1984360301811261137857600080fd5b83018035915067ffffffffffffffff82111561139357600080fd5b6020019150368190038213156113a857600080fd5b9250929050565b6001600160e01b031981358181169160048510156113d75780818660040360031b1b83161692505b505092915050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b818103818111156104c957634e487b7160e01b600052601160045260246000fd5b6000815180845260005b8181101561146257602081850181015186830182015201611446565b506000602082860101526020601f19601f83011685010191505092915050565b600067ffffffffffffffff8086168352606060208401526114a6606084018661143c565b9150808416604084015250949350505050565b6000602082840312156114cb57600080fd5b5051919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b838152600067ffffffffffffffff80851660208401526060604084015280611522856110ba565b1660608401526001600160a01b0361153c602086016110f9565b166080840152604084013560a08401526060840135601e1985360301811261156357600080fd5b84016020810190358281111561157857600080fd5b80360382131561158757600080fd5b608060c086015261159c60e0860182846114d2565b98975050505050505050565b600067ffffffffffffffff808816835260ff8716602084015260018060a01b038616604084015260a060608401526115e360a084018661143c565b9150808416608084015250969550505050505056fea26469706673582212203858573b59885ae3aeeeb06d7830e87400da93c9658b084b9ad8d3bbee2f02c764736f6c63430008180033", } // SolveOutboxABI is the input ABI used to generate the binding from. diff --git a/contracts/solve/.gas-snapshot b/contracts/solve/.gas-snapshot index d0633a349..b62652445 100644 --- a/contracts/solve/.gas-snapshot +++ b/contracts/solve/.gas-snapshot @@ -1,14 +1,14 @@ SolveInbox_accept_Test:test_accept_one_request() (gas: 449411) -SolveInbox_accept_Test:test_accept_reverts() (gas: 1135393) +SolveInbox_accept_Test:test_accept_reverts() (gas: 1135308) SolveInbox_accept_Test:test_accept_skip_first() (gas: 757442) SolveInbox_accept_Test:test_accept_two_requests() (gas: 781616) SolveInbox_cancel_Test:test_cancel_multiToken() (gas: 604009) SolveInbox_cancel_Test:test_cancel_nativeMultiToken() (gas: 694160) SolveInbox_cancel_Test:test_cancel_oldest_request() (gas: 758515) SolveInbox_cancel_Test:test_cancel_one_request() (gas: 450572) -SolveInbox_cancel_Test:test_cancel_rejected_nativeMultiToken_request() (gas: 737998) -SolveInbox_cancel_Test:test_cancel_rejected_nativeToken_request() (gas: 491776) -SolveInbox_cancel_Test:test_cancel_reverts() (gas: 1157381) +SolveInbox_cancel_Test:test_cancel_rejected_nativeMultiToken_request() (gas: 737913) +SolveInbox_cancel_Test:test_cancel_rejected_nativeToken_request() (gas: 491691) +SolveInbox_cancel_Test:test_cancel_reverts() (gas: 1157296) SolveInbox_cancel_Test:test_cancel_singleToken() (gas: 482102) SolveInbox_cancel_Test:test_cancel_two_requests() (gas: 760517) SolveInbox_claim_Test:test_claim_multiDeposit() (gas: 819751) @@ -17,11 +17,11 @@ SolveInbox_claim_Test:test_claim_singleNative() (gas: 569792) SolveInbox_claim_Test:test_claim_singleToken() (gas: 600715) SolveInbox_markFulfilled_Test:test_markFulfilled_reverts() (gas: 551134) SolveInbox_markFulfilled_Test:test_markFulfilled_success() (gas: 493564) -SolveInbox_reject_Test:test_reject_nativeMultiToken() (gas: 657800) -SolveInbox_reject_Test:test_reject_oldest_request() (gas: 730796) -SolveInbox_reject_Test:test_reject_one_request() (gas: 422357) -SolveInbox_reject_Test:test_reject_reverts() (gas: 815736) -SolveInbox_reject_Test:test_reject_two_requests() (gas: 725261) +SolveInbox_reject_Test:test_reject_nativeMultiToken() (gas: 657715) +SolveInbox_reject_Test:test_reject_oldest_request() (gas: 730711) +SolveInbox_reject_Test:test_reject_one_request() (gas: 422272) +SolveInbox_reject_Test:test_reject_reverts() (gas: 815464) +SolveInbox_reject_Test:test_reject_two_requests() (gas: 725091) SolveInbox_request_Test:test_request_multiToken() (gas: 584500) SolveInbox_request_Test:test_request_nativeMultiToken() (gas: 643788) SolveInbox_request_Test:test_request_reverts() (gas: 1018635) diff --git a/contracts/solve/src/Solve.sol b/contracts/solve/src/Solve.sol index ddf9c610b..cb6191d75 100644 --- a/contracts/solve/src/Solve.sol +++ b/contracts/solve/src/Solve.sol @@ -15,17 +15,6 @@ library Solve { Claimed } - /** - * @notice Reason for rejecting a request. - */ - enum RejectReason { - None, - DestCallReverts, - InsufficientFee, - InsufficientInventory, - InvalidTarget - } - /** * @notice A request to execute a call on another chain, backed by a deposit. * @param id ID for the request, globally unique per inbox. diff --git a/contracts/solve/src/SolveInbox.sol b/contracts/solve/src/SolveInbox.sol index 88ad9fd58..27d5c7822 100644 --- a/contracts/solve/src/SolveInbox.sol +++ b/contracts/solve/src/SolveInbox.sol @@ -162,8 +162,9 @@ contract SolveInbox is OwnableRoles, ReentrancyGuard, Initializable, XAppBase, I * @notice Reject an open request. * @dev Only a whitelisted solver can reject. * @param id ID of the request. + * @param reason Reason code for rejecting the request (see solver/app/reject.go for current codes) */ - function reject(bytes32 id, Solve.RejectReason reason) external onlyRoles(SOLVER) nonReentrant { + function reject(bytes32 id, uint8 reason) external onlyRoles(SOLVER) nonReentrant { Solve.Request storage req = _requests[id]; if (req.status != Solve.Status.Pending) revert NotPending(); diff --git a/contracts/solve/src/interfaces/ISolveInbox.sol b/contracts/solve/src/interfaces/ISolveInbox.sol index 78dea9bd2..ae8bdcd8f 100644 --- a/contracts/solve/src/interfaces/ISolveInbox.sol +++ b/contracts/solve/src/interfaces/ISolveInbox.sol @@ -24,9 +24,9 @@ interface ISolveInbox { * @notice Emitted when a request is rejected. * @param id ID of the request. * @param by Address of the solver who rejected the request. - * @param reason Reason for rejecting the request. + * @param reason Reason code for rejecting the request (see solver/app/reject.go for current codes) */ - event Rejected(bytes32 indexed id, address indexed by, Solve.RejectReason indexed reason); + event Rejected(bytes32 indexed id, address indexed by, uint8 indexed reason); /** * @notice Emitted when a request is cancelled. @@ -83,8 +83,9 @@ interface ISolveInbox { * @notice Reject an open request. * @dev Only a whitelisted solver can reject. * @param id ID of the request. + * @param reason Reason code for rejecting the request (see solver/app/reject.go for current codes) */ - function reject(bytes32 id, Solve.RejectReason reason) external; + function reject(bytes32 id, uint8 reason) external; /** * @notice Cancel an open or rejected request and refund deposits. diff --git a/contracts/solve/test/Inbox_accept.t.sol b/contracts/solve/test/Inbox_accept.t.sol index 9d6a3cd73..24a4361a3 100644 --- a/contracts/solve/test/Inbox_accept.t.sol +++ b/contracts/solve/test/Inbox_accept.t.sol @@ -42,7 +42,7 @@ contract SolveInbox_accept_Test is InboxBase { // cannot accept rejected request vm.startPrank(solver); - inbox.reject(id, Solve.RejectReason.None); + inbox.reject({ id: id, reason: 0 }); vm.expectRevert(SolveInbox.NotPending.selector); inbox.accept(id); vm.stopPrank(); diff --git a/contracts/solve/test/Inbox_cancel.t.sol b/contracts/solve/test/Inbox_cancel.t.sol index dd3e79f5c..0ed803c74 100644 --- a/contracts/solve/test/Inbox_cancel.t.sol +++ b/contracts/solve/test/Inbox_cancel.t.sol @@ -36,7 +36,7 @@ contract SolveInbox_cancel_Test is InboxBase { // cannot double cancel rejected request vm.prank(solver); - inbox.reject(id, Solve.RejectReason.None); + inbox.reject({ id: id, reason: 0 }); vm.startPrank(user); inbox.cancel(id); vm.expectRevert(SolveInbox.NotPendingOrRejected.selector); @@ -230,7 +230,7 @@ contract SolveInbox_cancel_Test is InboxBase { // reject request vm.prank(solver); - inbox.reject(id, Solve.RejectReason.None); + inbox.reject({ id: id, reason: 0 }); // cancel rejected request vm.prank(user); @@ -265,7 +265,7 @@ contract SolveInbox_cancel_Test is InboxBase { // reject request vm.prank(solver); - inbox.reject(id, Solve.RejectReason.None); + inbox.reject({ id: id, reason: 0 }); // cancel rejected request vm.prank(user); diff --git a/contracts/solve/test/Inbox_reject.t.sol b/contracts/solve/test/Inbox_reject.t.sol index 4aa04255f..57e90a9bf 100644 --- a/contracts/solve/test/Inbox_reject.t.sol +++ b/contracts/solve/test/Inbox_reject.t.sol @@ -15,11 +15,11 @@ contract SolveInbox_reject_Test is InboxBase { // cannot reject non-existent request vm.prank(solver); vm.expectRevert(SolveInbox.NotPending.selector); - inbox.reject(bytes32(0), Solve.RejectReason.None); + inbox.reject({ id: bytes32(0), reason: 0 }); // needs to have solver role vm.expectRevert(Ownable.Unauthorized.selector); - inbox.reject(bytes32(0), Solve.RejectReason.None); + inbox.reject({ id: bytes32(0), reason: 0 }); // create request to cancel before rejecting vm.deal(user, 1 ether); @@ -33,7 +33,7 @@ contract SolveInbox_reject_Test is InboxBase { // cannot reject cancelled request vm.prank(solver); vm.expectRevert(SolveInbox.NotPending.selector); - inbox.reject(id, Solve.RejectReason.None); + inbox.reject({ id: id, reason: 0 }); // create request to accept before rejecting vm.deal(user, 1 ether); @@ -44,7 +44,7 @@ contract SolveInbox_reject_Test is InboxBase { vm.startPrank(solver); inbox.accept(id); vm.expectRevert(SolveInbox.NotPending.selector); - inbox.reject(id, Solve.RejectReason.None); + inbox.reject({ id: id, reason: 0 }); vm.stopPrank(); } @@ -58,7 +58,7 @@ contract SolveInbox_reject_Test is InboxBase { // reject request vm.prank(solver); - inbox.reject(id, Solve.RejectReason.None); + inbox.reject({ id: id, reason: 0 }); assertEq(address(inbox).balance, 1 ether, "address(inbox).balance"); assertEq(address(user).balance, 0, "address(user).balance"); @@ -82,8 +82,8 @@ contract SolveInbox_reject_Test is InboxBase { // reject both requests vm.startPrank(solver); - inbox.reject(id1, Solve.RejectReason.None); - inbox.reject(id2, Solve.RejectReason.None); + inbox.reject({ id: id1, reason: 0 }); + inbox.reject({ id: id2, reason: 0 }); vm.stopPrank(); assertEq(address(inbox).balance, 2 ether, "address(inbox).balance"); @@ -109,7 +109,7 @@ contract SolveInbox_reject_Test is InboxBase { // reject oldest request vm.startPrank(solver); - inbox.reject(id1, Solve.RejectReason.None); + inbox.reject({ id: id1, reason: 0 }); vm.stopPrank(); assertEq(address(inbox).balance, 2 ether, "address(inbox).balance"); @@ -142,7 +142,7 @@ contract SolveInbox_reject_Test is InboxBase { // reject request vm.prank(solver); - inbox.reject(id, Solve.RejectReason.None); + inbox.reject({ id: id, reason: 0 }); assertEq(address(inbox).balance, 1 ether, "address(inbox).balance"); assertEq(address(user).balance, 0, "address(user).balance");