diff --git a/contracts/bindings/solveinbox.go b/contracts/bindings/solveinbox.go index 8ad0ea091..d32adb26a 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\"}],\"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\":\"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\":\"suggestNativePayment\",\"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\":\"gasLimit\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"gasPrice\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"fulfillFee\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"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\"}],\"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\":\"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: "0x608060405234801561001057600080fd5b5061001961001e565b610080565b63409feecd198054600181161561003d5763f92ee8a96000526004601cfd5b8160c01c808260011c1461007b578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b61249780620000906000396000f3fe60806040526004361061014b5760003560e01c806374eeb847116100b6578063e4725ba11161006f578063e4725ba114610387578063f04e283e146103a7578063f2fde38b146103ba578063f8c8765e146103cd578063fb1e61ca146103ed578063fee81cf41461041a57600080fd5b806374eeb847146102c85780638da5cb5b146102fb578063bd66528a14610314578063c4d252f514610334578063db3ea55314610354578063e17771c81461037457600080fd5b806339acf9f11161010857806339acf9f1146102165780634a4ee7b11461024e5780634aa59afd14610261578063514e62fc1461028157806354d1f13d146102b8578063715018a6146102c057600080fd5b8063183a4f6e146101505780631c10893f146101655780631cd64df41461017857806325692962146101ad5780632de94807146101b5578063337ffe20146101f6575b600080fd5b61016361015e366004611ad0565b61044d565b005b610163610173366004611afe565b61045a565b34801561018457600080fd5b50610198610193366004611afe565b610470565b60405190151581526020015b60405180910390f35b61016361048f565b3480156101c157600080fd5b506101e86101d0366004611b2a565b638b78c6d8600c908152600091909152602090205490565b6040519081526020016101a4565b34801561020257600080fd5b50610163610211366004611b4e565b6104de565b34801561022257600080fd5b50600054610236906001600160a01b031681565b6040516001600160a01b0390911681526020016101a4565b61016361025c366004611afe565b61071a565b34801561026d57600080fd5b506101e861027c366004611b9d565b61072c565b34801561028d57600080fd5b5061019861029c366004611afe565b638b78c6d8600c90815260009290925260209091205416151590565b610163610988565b6101636109c4565b3480156102d457600080fd5b506000546102e990600160a01b900460ff1681565b60405160ff90911681526020016101a4565b34801561030757600080fd5b50638b78c6d81954610236565b34801561032057600080fd5b5061016361032f366004611ad0565b6109d8565b34801561034057600080fd5b5061016361034f366004611ad0565b610b49565b34801561036057600080fd5b5061016361036f366004611c06565b610d12565b6101e8610382366004611c3a565b610e0a565b34801561039357600080fd5b506101636103a2366004611ad0565b610f7e565b6101636103b5366004611b2a565b611078565b6101636103c8366004611b2a565b6110b5565b3480156103d957600080fd5b506101636103e8366004611cd3565b6110dc565b3480156103f957600080fd5b5061040d610408366004611ad0565b611188565b6040516101a49190611e24565b34801561042657600080fd5b506101e8610435366004611b2a565b63389a75e1600c908152600091909152602090205490565b610457338261138a565b50565b610462611396565b61046c82826113b1565b5050565b638b78c6d8600c90815260008390526020902054811681145b92915050565b60006202a3006001600160401b03164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b60005460408051631799380760e11b815281516001600160a01b0390931692632f32700e926004808401939192918290030181865afa158015610525573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105499190611ef2565b8051600180546020909301516001600160a01b0316600160401b026001600160e01b03199093166001600160401b039092169190911791909117905568929eee149b4bd21268543090036105a55763ab143c066000526004601cfd5b3068929eee149b4bd2126855600082815260046020526040902060026001820154600160281b900460ff1660068111156105e1576105e1611d2f565b146105ff5760405163029d79a560e41b815260040160405180910390fd5b600354600154600160401b90046001600160a01b039081169116146106375760405163bda8fc9560e01b815260040160405180910390fd5b60038101546001546001600160401b0390811691161461066a57604051633687f39960e21b815260040160405180910390fd5b6106788346836003016113bd565b821461069757604051631c6060ab60e11b815260040160405180910390fd5b6001810180546505000000000065ffffffffffff199091164264ffffffffff161717905560028101546040516001600160a01b0390911690839085907f7898a125e0970666c80e00bbf2e7041d84dfe5bbe6bcf562ce53d540fd6cd89190600090a450503868929eee149b4bd212685550600180546001600160e01b0319169055565b610722611396565b61046c828261138a565b600080546040805163500b19e760e01b8152905183926001600160a01b03169163500b19e79160048083019260209291908290030181865afa158015610776573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079a9190611f50565b90506000816001600160a01b0316638f9d6ace6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108009190611f6d565b6001600160a01b038316638b7bfd7061081c60208b018b611f86565b6040516001600160e01b031960e084901b1681526001600160401b039091166004820152602401602060405180830381865afa158015610860573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108849190611f6d565b6108929060408a0135611fb9565b61089c9190611fd0565b60008054919250906001600160a01b0316638dd9523c6108bf60208b018b611f86565b6108cc60608c018c611ff2565b8b6040518563ffffffff1660e01b81526004016108ec949392919061203f565b602060405180830381865afa158015610909573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092d9190611f6d565b9050600061093d8761d6d861208b565b6001600160401b03169050655af3107a400086818361095c86886120b6565b61096691906120b6565b61097091906120b6565b61097a91906120b6565b9a9950505050505050505050565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b6109cc611396565b6109d660006113f3565b565b3068929eee149b4bd2126854036109f75763ab143c066000526004601cfd5b3068929eee149b4bd2126855600081815260046020526040902060056001820154600160281b900460ff166006811115610a3357610a33611d2f565b14610a51576040516303de361f60e11b815260040160405180910390fd5b6001810180546506000000000065ffffffffffff199091164264ffffffffff1617179055600281015460068201805460408051602080840282018101909252828152610b0e946001600160a01b0316939092909160009084015b82821015610b055760008481526020908190206040805160608101825260028602909201805460ff81161515845261010090046001600160a01b031683850152600190810154918301919091529083529092019101610aab565b50505050611431565b60405182907feddf608ef698454af2fb41c1df7b7e5154ff0d46969f895e0f39c7dfe7e6380a90600090a2503868929eee149b4bd212685550565b3068929eee149b4bd212685403610b685763ab143c066000526004601cfd5b3068929eee149b4bd21268556000818152600460205260409020600180820154600160281b900460ff166006811115610ba357610ba3611d2f565b14158015610bd1575060036001820154600160281b900460ff166006811115610bce57610bce611d2f565b14155b15610bef57604051631fa4148760e21b815260040160405180910390fd5b6001810154600160301b90046001600160a01b03163314610c22576040516282b42960e81b815260040160405180910390fd5b6001810180546504000000000065ffffffffffff199091164264ffffffffff1617179081905560068201805460408051602080840282018101909252828152610cd794600160301b90046001600160a01b0316939092909160009084018215610b055760008481526020908190206040805160608101825260028602909201805460ff81161515845261010090046001600160a01b031683850152600190810154918301919091529083529092019101610aab565b60405182907fb66b13449e4bb2c30749a37f3081f1988fcee5ff5d98ce740b354d4e2d94409590600090a2503868929eee149b4bd212685550565b6001610d1d8161155c565b3068929eee149b4bd212685403610d3c5763ab143c066000526004601cfd5b3068929eee149b4bd21268556000838152600460205260409020600180820154600160281b900460ff166006811115610d7757610d77611d2f565b14610d9557604051633ee3282d60e11b815260040160405180910390fd5b6001810180546503000000000065ffffffffffff199091164264ffffffffff1617179055826003811115610dcb57610dcb611d2f565b604051339086907f21f84ee3a6e9bc7c10f855f8c9829e22c613861cef10add09eccdbc88df9f59f90600090a4503868929eee149b4bd2126855505050565b60003068929eee149b4bd212685403610e2b5763ab143c066000526004601cfd5b3068929eee149b4bd21268556000610e496040860160208701611b2a565b6001600160a01b031603610e705760405163574b16a760e11b815260040160405180910390fd5b610e7d6020850185611f86565b6001600160401b0316600003610ea65760405163574b16a760e11b815260040160405180910390fd5b610eb36060850185611ff2565b9050600003610ed55760405163574b16a760e11b815260040160405180910390fd5b81158015610ee1575034155b15610eff57604051630558800760e21b815260040160405180910390fd5b6000610f0d33868686611582565b60018101548154604051929350600160301b9091046001600160a01b0316917f3622a563ce1f96b477fa827bf0b60be8aee346b515754f3645f4d7a2ef5d4b2990610f6190600386019060068701906121c2565b60405180910390a3543868929eee149b4bd2126855949350505050565b6001610f898161155c565b3068929eee149b4bd212685403610fa85763ab143c066000526004601cfd5b3068929eee149b4bd21268556000828152600460205260409020600180820154600160281b900460ff166006811115610fe357610fe3611d2f565b1461100157604051633ee3282d60e11b815260040160405180910390fd5b60018101805464ffffffffff421665ffffffffffff1990911617650200000000001790556002810180546001600160a01b0319163390811790915560405184907f9deed34441ca75bb2dbbe101d2201930f40e18a9ce521c77fbdca6690a89996790600090a3503868929eee149b4bd21268555050565b611080611396565b63389a75e1600c52806000526020600c2080544211156110a857636f5e88186000526004601cfd5b60009055610457816113f3565b6110bd611396565b8060601b6110d357637448fbae6000526004601cfd5b610457816113f3565b63409feecd1980546003825580156111135760018160011c14303b1061110a5763f92ee8a96000526004601cfd5b818160ff1b1b91505b5061111d85611842565b6111288460016113b1565b6111318361187e565b600380546001600160a01b0319166001600160a01b0384161790558015611181576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b5050505050565b611190611a46565b600082815260046020908152604091829020825160e08101845281548152600182015464ffffffffff81169382019390935292909190830190600160281b900460ff1660068111156111e4576111e4611d2f565b60068111156111f5576111f5611d2f565b815260018201546001600160a01b03600160301b90910481166020808401919091526002840154821660408085019190915280516080810182526003860180546001600160401b0381168352600160401b90049094169281019290925260048501549082015260058401805460609485019492939284019190611277906120c9565b80601f01602080910402602001604051908101604052809291908181526020018280546112a3906120c9565b80156112f05780601f106112c5576101008083540402835291602001916112f0565b820191906000526020600020905b8154815290600101906020018083116112d357829003601f168201915b505050505081525050815260200160068201805480602002602001604051908101604052809291908181526020016000905b8282101561137c5760008481526020908190206040805160608101825260028602909201805460ff81161515845261010090046001600160a01b031683850152600190810154918301919091529083529092019101611322565b505050915250909392505050565b61046c82826000611921565b638b78c6d8195433146109d6576382b429006000526004601cfd5b61046c82826001611921565b60008383836040516020016113d493929190612246565b6040516020818303038152906040528051906020012090509392505050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b60005b81518110156115575781818151811061144f5761144f61226e565b602002602001015160000151156114f7576000836001600160a01b031683838151811061147e5761147e61226e565b60200260200101516040015160405160006040518083038185875af1925050503d80600081146114ca576040519150601f19603f3d011682016040523d82523d6000602084013e6114cf565b606091505b50509050806114f1576040516312171d8360e31b815260040160405180910390fd5b5061154f565b61154f8383838151811061150d5761150d61226e565b60200260200101516040015184848151811061152b5761152b61226e565b6020026020010151602001516001600160a01b031661197a9092919063ffffffff16565b600101611434565b505050565b638b78c6d8600c5233600052806020600c205416610457576382b429006000526004601cfd5b60008061158d6119ca565b600081815260046020526040902081815560018101805464ffffffffff421665ffffffffffff1990911617600160281b176601000000000000600160d01b031916600160301b6001600160a01b038b16021790559250905084600383016115f48282612393565b5050341561167557604080516060810182526001808252600060208084018281523495850195865260068801805480860182559084529190922093516002909102909301805491516001600160a81b0319909216931515610100600160a81b031916939093176101006001600160a01b039092169190910217825591519101555b60005b83811015611838578484828181106116925761169261226e565b905060400201602001356000036116bc57604051635972996f60e11b815260040160405180910390fd5b60008585838181106116d0576116d061226e565b6116e69260206040909202019081019150611b2a565b6001600160a01b03160361170d57604051635972996f60e11b815260040160405180910390fd5b8260060160405180606001604052806000151581526020018787858181106117375761173761226e565b61174d9260206040909202019081019150611b2a565b6001600160a01b0316815260200187878581811061176d5761176d61226e565b60206040918202939093018301359093525083546001818101865560009586529482902084516002909202018054928501516001600160a01b031661010002610100600160a81b0319921515929092166001600160a81b03199093169290921717815591015191015561183033308787858181106117ed576117ed61226e565b905060400201602001358888868181106118095761180961226e565b61181f9260206040909202019081019150611b2a565b6001600160a01b03169291906119e8565b600101611678565b5050949350505050565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b6001600160a01b0381166118cd5760405162461bcd60e51b8152602060048201526012602482015271584170703a206e6f207a65726f206f6d6e6960701b604482015260640160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f79162c8d053a07e70cdc1ccc536f0440b571f8508377d2bef51094fadab98f479060200160405180910390a150565b638b78c6d8600c52826000526020600c20805483811783611943575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26600080a3505050505050565b816014528060345263a9059cbb60601b60005260206000604460106000875af180600160005114166119bf57803d853b1517106119bf576390b8ec186000526004601cfd5b506000603452505050565b60028054600091826119db83612448565b9091555050600254919050565b60405181606052826040528360601b602c526323b872dd60601b600c52602060006064601c6000895af18060016000511416611a3757803d873b151710611a3757637939f4246000526004601cfd5b50600060605260405250505050565b6040805160e0810182526000808252602082018190529091820190815260200160006001600160a01b0316815260200160006001600160a01b03168152602001611ac3604051806080016040528060006001600160401b0316815260200160006001600160a01b0316815260200160008152602001606081525090565b8152602001606081525090565b600060208284031215611ae257600080fd5b5035919050565b6001600160a01b038116811461045757600080fd5b60008060408385031215611b1157600080fd5b8235611b1c81611ae9565b946020939093013593505050565b600060208284031215611b3c57600080fd5b8135611b4781611ae9565b9392505050565b60008060408385031215611b6157600080fd5b50508035926020909101359150565b600060808284031215611b8257600080fd5b50919050565b6001600160401b038116811461045757600080fd5b60008060008060808587031215611bb357600080fd5b84356001600160401b03811115611bc957600080fd5b611bd587828801611b70565b9450506020850135611be681611b88565b92506040850135611bf681611b88565b9396929550929360600135925050565b60008060408385031215611c1957600080fd5b82359150602083013560048110611c2f57600080fd5b809150509250929050565b600080600060408486031215611c4f57600080fd5b83356001600160401b0380821115611c6657600080fd5b611c7287838801611b70565b94506020860135915080821115611c8857600080fd5b818601915086601f830112611c9c57600080fd5b813581811115611cab57600080fd5b8760208260061b8501011115611cc057600080fd5b6020830194508093505050509250925092565b60008060008060808587031215611ce957600080fd5b8435611cf481611ae9565b93506020850135611d0481611ae9565b92506040850135611d1481611ae9565b91506060850135611d2481611ae9565b939692955090935050565b634e487b7160e01b600052602160045260246000fd5b6001600160401b0381511682526000602060018060a01b03602084015116602085015260408301516040850152606083015160806060860152805180608087015260005b81811015611da55782810184015187820160a001528301611d89565b50600060a0828801015260a0601f19601f830116870101935050505092915050565b60008151808452602080850194506020840160005b83811015611e19578151805115158852838101516001600160a01b0316848901526040908101519088015260609096019590820190600101611ddc565b509495945050505050565b602081528151602082015264ffffffffff60208301511660408201526000604083015160078110611e6557634e487b7160e01b600052602160045260246000fd5b806060840152506060830151611e8660808401826001600160a01b03169052565b5060808301516001600160a01b03811660a08401525060a083015160e060c0840152611eb6610100840182611d45565b905060c0840151601f198483030160e0850152611ed38282611dc7565b95945050505050565b634e487b7160e01b600052604160045260246000fd5b600060408284031215611f0457600080fd5b604051604081018181106001600160401b0382111715611f2657611f26611edc565b6040528251611f3481611b88565b81526020830151611f4481611ae9565b60208201529392505050565b600060208284031215611f6257600080fd5b8151611b4781611ae9565b600060208284031215611f7f57600080fd5b5051919050565b600060208284031215611f9857600080fd5b8135611b4781611b88565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761048957610489611fa3565b600082611fed57634e487b7160e01b600052601260045260246000fd5b500490565b6000808335601e1984360301811261200957600080fd5b8301803591506001600160401b0382111561202357600080fd5b60200191503681900382131561203857600080fd5b9250929050565b60006001600160401b038087168352606060208401528460608401528486608085013760008386016080908101919091529316604083015250601f909201601f19169091010192915050565b6001600160401b038181168382160280821691908281146120ae576120ae611fa3565b505092915050565b8082018082111561048957610489611fa3565b600181811c908216806120dd57607f821691505b602082108103611b8257634e487b7160e01b600052602260045260246000fd5b600081546001600160401b0381168452602060018060a01b038260401c1660208601526001915060018401546040860152600284016080606087015260008154612146816120c9565b8060808a015260a060018316600081146121675760018114612183576121b3565b60ff19841660a08c015260a083151560051b8c010194506121b3565b85600052602060002060005b848110156121aa5781548d820185015290890190880161218f565b8c0160a0019550505b50929998505050505050505050565b600060408083526121d660408401866120fd565b60208482036020860152818654808452602084019150876000526020600020935060005b8181101561223857845460ff81161515845260081c6001600160a01b03168484015260018086015487850152600290950194606090930192016121fa565b509098975050505050505050565b8381526001600160401b0383166020820152606060408201526000611ed360608301846120fd565b634e487b7160e01b600052603260045260246000fd5b601f821115611557576000816000526020600020601f850160051c810160208610156122ad5750805b601f850160051c820191505b818110156122cc578281556001016122b9565b505050505050565b6001600160401b038311156122eb576122eb611edc565b6122ff836122f983546120c9565b83612284565b6000601f841160018114612333576000851561231b5750838201355b600019600387901b1c1916600186901b178355611181565b600083815260209020601f19861690835b828110156123645786850135825560209485019460019092019101612344565b50868210156123815760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b813561239e81611b88565b6001600160401b0380821691508254826001600160401b0319821617845560208501356123ca81611ae9565b6001600160e01b031991909116909217604092831b68010000000000000000600160e01b0316178355908301356001830155600090606084013536859003601e19018112612416578283fd5b8401803582811115612426578384fd5b60208201925080360383131561243a578384fd5b6122cc8184600288016122d4565b60006001820161245a5761245a611fa3565b506001019056fea26469706673582212206d5d3f585dab6fba7cd9154013b058ee7fccf3cb7cb073019d7d7c4bd598922064736f6c63430008180033", + 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\":\"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\":\"suggestNativePayment\",\"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\":\"gasLimit\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"gasPrice\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"fulfillFee\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"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: "0x60806040523480156200001157600080fd5b506200001c62000022565b62000086565b63409feecd1980546001811615620000425763f92ee8a96000526004601cfd5b8160c01c808260011c1462000081578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b61253580620000966000396000f3fe60806040526004361061014b5760003560e01c806374eeb847116100b6578063e4725ba11161006f578063e4725ba114610387578063f04e283e146103a7578063f2fde38b146103ba578063f8c8765e146103cd578063fb1e61ca146103ed578063fee81cf41461041a57600080fd5b806374eeb847146102c85780638da5cb5b146102fb57806396c144f014610314578063c4d252f514610334578063db3ea55314610354578063e17771c81461037457600080fd5b806339acf9f11161010857806339acf9f1146102165780634a4ee7b11461024e5780634aa59afd14610261578063514e62fc1461028157806354d1f13d146102b8578063715018a6146102c057600080fd5b8063183a4f6e146101505780631c10893f146101655780631cd64df41461017857806325692962146101ad5780632de94807146101b5578063337ffe20146101f6575b600080fd5b61016361015e366004611b3c565b61044d565b005b610163610173366004611b6a565b61045a565b34801561018457600080fd5b50610198610193366004611b6a565b610470565b60405190151581526020015b60405180910390f35b61016361048f565b3480156101c157600080fd5b506101e86101d0366004611b96565b638b78c6d8600c908152600091909152602090205490565b6040519081526020016101a4565b34801561020257600080fd5b50610163610211366004611bba565b6104de565b34801561022257600080fd5b50600054610236906001600160a01b031681565b6040516001600160a01b0390911681526020016101a4565b61016361025c366004611b6a565b61071a565b34801561026d57600080fd5b506101e861027c366004611c09565b61072c565b34801561028d57600080fd5b5061019861029c366004611b6a565b638b78c6d8600c90815260009290925260209091205416151590565b610163610988565b6101636109c4565b3480156102d457600080fd5b506000546102e990600160a01b900460ff1681565b60405160ff90911681526020016101a4565b34801561030757600080fd5b50638b78c6d81954610236565b34801561032057600080fd5b5061016361032f366004611c72565b6109d8565b34801561034057600080fd5b5061016361034f366004611b3c565b610b8e565b34801561036057600080fd5b5061016361036f366004611ca2565b610d57565b6101e8610382366004611ccb565b610e4f565b34801561039357600080fd5b506101636103a2366004611b3c565b610fc3565b6101636103b5366004611b96565b6110bd565b6101636103c8366004611b96565b6110fa565b3480156103d957600080fd5b506101636103e8366004611d64565b611121565b3480156103f957600080fd5b5061040d610408366004611b3c565b6111cd565b6040516101a49190611eb5565b34801561042657600080fd5b506101e8610435366004611b96565b63389a75e1600c908152600091909152602090205490565b61045733826113cf565b50565b6104626113db565b61046c82826113f6565b5050565b638b78c6d8600c90815260008390526020902054811681145b92915050565b60006202a3006001600160401b03164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b60005460408051631799380760e11b815281516001600160a01b0390931692632f32700e926004808401939192918290030181865afa158015610525573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105499190611f83565b8051600180546020909301516001600160a01b0316600160401b026001600160e01b03199093166001600160401b039092169190911791909117905568929eee149b4bd21268543090036105a55763ab143c066000526004601cfd5b3068929eee149b4bd2126855600082815260046020526040902060026001820154600160281b900460ff1660068111156105e1576105e1611dc0565b146105ff5760405163029d79a560e41b815260040160405180910390fd5b600354600154600160401b90046001600160a01b039081169116146106375760405163bda8fc9560e01b815260040160405180910390fd5b60038101546001546001600160401b0390811691161461066a57604051633687f39960e21b815260040160405180910390fd5b610678834683600301611402565b821461069757604051631c6060ab60e11b815260040160405180910390fd5b6001810180546505000000000065ffffffffffff199091164264ffffffffff161717905560028101546040516001600160a01b0390911690839085907f7898a125e0970666c80e00bbf2e7041d84dfe5bbe6bcf562ce53d540fd6cd89190600090a450503868929eee149b4bd212685550600180546001600160e01b0319169055565b6107226113db565b61046c82826113cf565b600080546040805163500b19e760e01b8152905183926001600160a01b03169163500b19e79160048083019260209291908290030181865afa158015610776573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079a9190611fe1565b90506000816001600160a01b0316638f9d6ace6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108009190611ffe565b6001600160a01b038316638b7bfd7061081c60208b018b612017565b6040516001600160e01b031960e084901b1681526001600160401b039091166004820152602401602060405180830381865afa158015610860573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108849190611ffe565b6108929060408a013561204a565b61089c9190612061565b60008054919250906001600160a01b0316638dd9523c6108bf60208b018b612017565b6108cc60608c018c612083565b8b6040518563ffffffff1660e01b81526004016108ec94939291906120d0565b602060405180830381865afa158015610909573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092d9190611ffe565b9050600061093d8761d6d861211c565b6001600160401b03169050655af3107a400086818361095c8688612147565b6109669190612147565b6109709190612147565b61097a9190612147565b9a9950505050505050505050565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b6109cc6113db565b6109d66000611438565b565b3068929eee149b4bd2126854036109f75763ab143c066000526004601cfd5b3068929eee149b4bd2126855600082815260046020526040902060056001820154600160281b900460ff166006811115610a3357610a33611dc0565b14610a51576040516303de361f60e11b815260040160405180910390fd5b60028101546001600160a01b03163314610a7d576040516282b42960e81b815260040160405180910390fd5b6001810180546506000000000065ffffffffffff199091164264ffffffffff161717905560068101805460408051602080840282018101909252828152610b2e938693919290919060009084015b82821015610b255760008481526020908190206040805160608101825260028602909201805460ff81161515845261010090046001600160a01b031683850152600190810154918301919091529083529092019101610acb565b50505050611476565b816001600160a01b0316336001600160a01b0316847f1291cec4ea55732527f1ae8ff3e53def0dbe1feb99c094983449e59cdce4674b84600601604051610b7591906121b3565b60405180910390a4503868929eee149b4bd21268555050565b3068929eee149b4bd212685403610bad5763ab143c066000526004601cfd5b3068929eee149b4bd21268556000818152600460205260409020600180820154600160281b900460ff166006811115610be857610be8611dc0565b14158015610c16575060036001820154600160281b900460ff166006811115610c1357610c13611dc0565b14155b15610c3457604051631fa4148760e21b815260040160405180910390fd5b6001810154600160301b90046001600160a01b03163314610c67576040516282b42960e81b815260040160405180910390fd5b6001810180546504000000000065ffffffffffff199091164264ffffffffff1617179081905560068201805460408051602080840282018101909252828152610d1c94600160301b90046001600160a01b0316939092909160009084018215610b255760008481526020908190206040805160608101825260028602909201805460ff81161515845261010090046001600160a01b031683850152600190810154918301919091529083529092019101610acb565b60405182907fb66b13449e4bb2c30749a37f3081f1988fcee5ff5d98ce740b354d4e2d94409590600090a2503868929eee149b4bd212685550565b6001610d62816115c8565b3068929eee149b4bd212685403610d815763ab143c066000526004601cfd5b3068929eee149b4bd21268556000838152600460205260409020600180820154600160281b900460ff166006811115610dbc57610dbc611dc0565b14610dda57604051633ee3282d60e11b815260040160405180910390fd5b6001810180546503000000000065ffffffffffff199091164264ffffffffff1617179055826003811115610e1057610e10611dc0565b604051339086907f21f84ee3a6e9bc7c10f855f8c9829e22c613861cef10add09eccdbc88df9f59f90600090a4503868929eee149b4bd2126855505050565b60003068929eee149b4bd212685403610e705763ab143c066000526004601cfd5b3068929eee149b4bd21268556000610e8e6040860160208701611b96565b6001600160a01b031603610eb55760405163574b16a760e11b815260040160405180910390fd5b610ec26020850185612017565b6001600160401b0316600003610eeb5760405163574b16a760e11b815260040160405180910390fd5b610ef86060850185612083565b9050600003610f1a5760405163574b16a760e11b815260040160405180910390fd5b81158015610f26575034155b15610f4457604051630558800760e21b815260040160405180910390fd5b6000610f52338686866115ee565b60018101548154604051929350600160301b9091046001600160a01b0316917f3622a563ce1f96b477fa827bf0b60be8aee346b515754f3645f4d7a2ef5d4b2990610fa690600386019060068701906122bf565b60405180910390a3543868929eee149b4bd2126855949350505050565b6001610fce816115c8565b3068929eee149b4bd212685403610fed5763ab143c066000526004601cfd5b3068929eee149b4bd21268556000828152600460205260409020600180820154600160281b900460ff16600681111561102857611028611dc0565b1461104657604051633ee3282d60e11b815260040160405180910390fd5b60018101805464ffffffffff421665ffffffffffff1990911617650200000000001790556002810180546001600160a01b0319163390811790915560405184907f9deed34441ca75bb2dbbe101d2201930f40e18a9ce521c77fbdca6690a89996790600090a3503868929eee149b4bd21268555050565b6110c56113db565b63389a75e1600c52806000526020600c2080544211156110ed57636f5e88186000526004601cfd5b6000905561045781611438565b6111026113db565b8060601b61111857637448fbae6000526004601cfd5b61045781611438565b63409feecd1980546003825580156111585760018160011c14303b1061114f5763f92ee8a96000526004601cfd5b818160ff1b1b91505b50611162856118ae565b61116d8460016113f6565b611176836118ea565b600380546001600160a01b0319166001600160a01b03841617905580156111c6576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b5050505050565b6111d5611ab2565b600082815260046020908152604091829020825160e08101845281548152600182015464ffffffffff81169382019390935292909190830190600160281b900460ff16600681111561122957611229611dc0565b600681111561123a5761123a611dc0565b815260018201546001600160a01b03600160301b90910481166020808401919091526002840154821660408085019190915280516080810182526003860180546001600160401b0381168352600160401b900490941692810192909252600485015490820152600584018054606094850194929392840191906112bc906121c6565b80601f01602080910402602001604051908101604052809291908181526020018280546112e8906121c6565b80156113355780601f1061130a57610100808354040283529160200191611335565b820191906000526020600020905b81548152906001019060200180831161131857829003601f168201915b505050505081525050815260200160068201805480602002602001604051908101604052809291908181526020016000905b828210156113c15760008481526020908190206040805160608101825260028602909201805460ff81161515845261010090046001600160a01b031683850152600190810154918301919091529083529092019101611367565b505050915250909392505050565b61046c8282600061198d565b638b78c6d8195433146109d6576382b429006000526004601cfd5b61046c8282600161198d565b6000838383604051602001611419939291906122e4565b6040516020818303038152906040528051906020012090509392505050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b6001600160a01b03821661149d57604051634e46966960e11b815260040160405180910390fd5b60005b81518110156115c3578181815181106114bb576114bb61230c565b60200260200101516000015115611563576000836001600160a01b03168383815181106114ea576114ea61230c565b60200260200101516040015160405160006040518083038185875af1925050503d8060008114611536576040519150601f19603f3d011682016040523d82523d6000602084013e61153b565b606091505b505090508061155d576040516312171d8360e31b815260040160405180910390fd5b506115bb565b6115bb838383815181106115795761157961230c565b6020026020010151604001518484815181106115975761159761230c565b6020026020010151602001516001600160a01b03166119e69092919063ffffffff16565b6001016114a0565b505050565b638b78c6d8600c5233600052806020600c205416610457576382b429006000526004601cfd5b6000806115f9611a36565b600081815260046020526040902081815560018101805464ffffffffff421665ffffffffffff1990911617600160281b176601000000000000600160d01b031916600160301b6001600160a01b038b16021790559250905084600383016116608282612431565b505034156116e157604080516060810182526001808252600060208084018281523495850195865260068801805480860182559084529190922093516002909102909301805491516001600160a81b0319909216931515610100600160a81b031916939093176101006001600160a01b039092169190910217825591519101555b60005b838110156118a4578484828181106116fe576116fe61230c565b9050604002016020013560000361172857604051635972996f60e11b815260040160405180910390fd5b600085858381811061173c5761173c61230c565b6117529260206040909202019081019150611b96565b6001600160a01b03160361177957604051635972996f60e11b815260040160405180910390fd5b8260060160405180606001604052806000151581526020018787858181106117a3576117a361230c565b6117b99260206040909202019081019150611b96565b6001600160a01b031681526020018787858181106117d9576117d961230c565b60206040918202939093018301359093525083546001818101865560009586529482902084516002909202018054928501516001600160a01b031661010002610100600160a81b0319921515929092166001600160a81b03199093169290921717815591015191015561189c33308787858181106118595761185961230c565b905060400201602001358888868181106118755761187561230c565b61188b9260206040909202019081019150611b96565b6001600160a01b0316929190611a54565b6001016116e4565b5050949350505050565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b6001600160a01b0381166119395760405162461bcd60e51b8152602060048201526012602482015271584170703a206e6f207a65726f206f6d6e6960701b604482015260640160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f79162c8d053a07e70cdc1ccc536f0440b571f8508377d2bef51094fadab98f479060200160405180910390a150565b638b78c6d8600c52826000526020600c208054838117836119af575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26600080a3505050505050565b816014528060345263a9059cbb60601b60005260206000604460106000875af18060016000511416611a2b57803d853b151710611a2b576390b8ec186000526004601cfd5b506000603452505050565b6002805460009182611a47836124e6565b9091555050600254919050565b60405181606052826040528360601b602c526323b872dd60601b600c52602060006064601c6000895af18060016000511416611aa357803d873b151710611aa357637939f4246000526004601cfd5b50600060605260405250505050565b6040805160e0810182526000808252602082018190529091820190815260200160006001600160a01b0316815260200160006001600160a01b03168152602001611b2f604051806080016040528060006001600160401b0316815260200160006001600160a01b0316815260200160008152602001606081525090565b8152602001606081525090565b600060208284031215611b4e57600080fd5b5035919050565b6001600160a01b038116811461045757600080fd5b60008060408385031215611b7d57600080fd5b8235611b8881611b55565b946020939093013593505050565b600060208284031215611ba857600080fd5b8135611bb381611b55565b9392505050565b60008060408385031215611bcd57600080fd5b50508035926020909101359150565b600060808284031215611bee57600080fd5b50919050565b6001600160401b038116811461045757600080fd5b60008060008060808587031215611c1f57600080fd5b84356001600160401b03811115611c3557600080fd5b611c4187828801611bdc565b9450506020850135611c5281611bf4565b92506040850135611c6281611bf4565b9396929550929360600135925050565b60008060408385031215611c8557600080fd5b823591506020830135611c9781611b55565b809150509250929050565b60008060408385031215611cb557600080fd5b82359150602083013560048110611c9757600080fd5b600080600060408486031215611ce057600080fd5b83356001600160401b0380821115611cf757600080fd5b611d0387838801611bdc565b94506020860135915080821115611d1957600080fd5b818601915086601f830112611d2d57600080fd5b813581811115611d3c57600080fd5b8760208260061b8501011115611d5157600080fd5b6020830194508093505050509250925092565b60008060008060808587031215611d7a57600080fd5b8435611d8581611b55565b93506020850135611d9581611b55565b92506040850135611da581611b55565b91506060850135611db581611b55565b939692955090935050565b634e487b7160e01b600052602160045260246000fd5b6001600160401b0381511682526000602060018060a01b03602084015116602085015260408301516040850152606083015160806060860152805180608087015260005b81811015611e365782810184015187820160a001528301611e1a565b50600060a0828801015260a0601f19601f830116870101935050505092915050565b60008151808452602080850194506020840160005b83811015611eaa578151805115158852838101516001600160a01b0316848901526040908101519088015260609096019590820190600101611e6d565b509495945050505050565b602081528151602082015264ffffffffff60208301511660408201526000604083015160078110611ef657634e487b7160e01b600052602160045260246000fd5b806060840152506060830151611f1760808401826001600160a01b03169052565b5060808301516001600160a01b03811660a08401525060a083015160e060c0840152611f47610100840182611dd6565b905060c0840151601f198483030160e0850152611f648282611e58565b95945050505050565b634e487b7160e01b600052604160045260246000fd5b600060408284031215611f9557600080fd5b604051604081018181106001600160401b0382111715611fb757611fb7611f6d565b6040528251611fc581611bf4565b81526020830151611fd581611b55565b60208201529392505050565b600060208284031215611ff357600080fd5b8151611bb381611b55565b60006020828403121561201057600080fd5b5051919050565b60006020828403121561202957600080fd5b8135611bb381611bf4565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761048957610489612034565b60008261207e57634e487b7160e01b600052601260045260246000fd5b500490565b6000808335601e1984360301811261209a57600080fd5b8301803591506001600160401b038211156120b457600080fd5b6020019150368190038213156120c957600080fd5b9250929050565b60006001600160401b038087168352606060208401528460608401528486608085013760008386016080908101919091529316604083015250601f909201601f19169091010192915050565b6001600160401b0381811683821602808216919082811461213f5761213f612034565b505092915050565b8082018082111561048957610489612034565b600081548084526020808501945083600052602060002060005b83811015611eaa57815460ff81161515885260081c6001600160a01b031683880152600180830154604089015260609097019660029092019101612174565b602081526000611bb3602083018461215a565b600181811c908216806121da57607f821691505b602082108103611bee57634e487b7160e01b600052602260045260246000fd5b600081546001600160401b0381168452602060018060a01b038260401c1660208601526001915060018401546040860152600284016080606087015260008154612243816121c6565b8060808a015260a060018316600081146122645760018114612280576122b0565b60ff19841660a08c015260a083151560051b8c010194506122b0565b85600052602060002060005b848110156122a75781548d820185015290890190880161228c565b8c0160a0019550505b50929998505050505050505050565b6040815260006122d260408301856121fa565b8281036020840152611f64818561215a565b8381526001600160401b0383166020820152606060408201526000611f6460608301846121fa565b634e487b7160e01b600052603260045260246000fd5b601f8211156115c3576000816000526020600020601f850160051c8101602086101561234b5750805b601f850160051c820191505b8181101561236a57828155600101612357565b505050505050565b6001600160401b0383111561238957612389611f6d565b61239d8361239783546121c6565b83612322565b6000601f8411600181146123d157600085156123b95750838201355b600019600387901b1c1916600186901b1783556111c6565b600083815260209020601f19861690835b8281101561240257868501358255602094850194600190920191016123e2565b508682101561241f5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b813561243c81611bf4565b6001600160401b0380821691508254826001600160401b03198216178455602085013561246881611b55565b6001600160e01b031991909116909217604092831b68010000000000000000600160e01b0316178355908301356001830155600090606084013536859003601e190181126124b4578283fd5b84018035828111156124c4578384fd5b6020820192508036038313156124d8578384fd5b61236a818460028801612372565b6000600182016124f8576124f8612034565b506001019056fea2646970667358221220c966aae0af13b4c874ef23cbe52d046631002275df6c93010f8e490f902a5d5f64736f6c63430008180033", } // SolveInboxABI is the input ABI used to generate the binding from. @@ -576,25 +576,25 @@ func (_SolveInbox *SolveInboxTransactorSession) CancelOwnershipHandover() (*type return _SolveInbox.Contract.CancelOwnershipHandover(&_SolveInbox.TransactOpts) } -// Claim is a paid mutator transaction binding the contract method 0xbd66528a. +// Claim is a paid mutator transaction binding the contract method 0x96c144f0. // -// Solidity: function claim(bytes32 id) returns() -func (_SolveInbox *SolveInboxTransactor) Claim(opts *bind.TransactOpts, id [32]byte) (*types.Transaction, error) { - return _SolveInbox.contract.Transact(opts, "claim", id) +// Solidity: function claim(bytes32 id, address to) returns() +func (_SolveInbox *SolveInboxTransactor) Claim(opts *bind.TransactOpts, id [32]byte, to common.Address) (*types.Transaction, error) { + return _SolveInbox.contract.Transact(opts, "claim", id, to) } -// Claim is a paid mutator transaction binding the contract method 0xbd66528a. +// Claim is a paid mutator transaction binding the contract method 0x96c144f0. // -// Solidity: function claim(bytes32 id) returns() -func (_SolveInbox *SolveInboxSession) Claim(id [32]byte) (*types.Transaction, error) { - return _SolveInbox.Contract.Claim(&_SolveInbox.TransactOpts, id) +// Solidity: function claim(bytes32 id, address to) returns() +func (_SolveInbox *SolveInboxSession) Claim(id [32]byte, to common.Address) (*types.Transaction, error) { + return _SolveInbox.Contract.Claim(&_SolveInbox.TransactOpts, id, to) } -// Claim is a paid mutator transaction binding the contract method 0xbd66528a. +// Claim is a paid mutator transaction binding the contract method 0x96c144f0. // -// Solidity: function claim(bytes32 id) returns() -func (_SolveInbox *SolveInboxTransactorSession) Claim(id [32]byte) (*types.Transaction, error) { - return _SolveInbox.Contract.Claim(&_SolveInbox.TransactOpts, id) +// Solidity: function claim(bytes32 id, address to) returns() +func (_SolveInbox *SolveInboxTransactorSession) Claim(id [32]byte, to common.Address) (*types.Transaction, error) { + return _SolveInbox.Contract.Claim(&_SolveInbox.TransactOpts, id, to) } // CompleteOwnershipHandover is a paid mutator transaction binding the contract method 0xf04e283e. @@ -1050,38 +1050,57 @@ func (it *SolveInboxClaimedIterator) Close() error { // SolveInboxClaimed represents a Claimed event raised by the SolveInbox contract. type SolveInboxClaimed struct { - Id [32]byte - Raw types.Log // Blockchain specific contextual infos + Id [32]byte + By common.Address + To common.Address + Deposits []SolveDeposit + Raw types.Log // Blockchain specific contextual infos } -// FilterClaimed is a free log retrieval operation binding the contract event 0xeddf608ef698454af2fb41c1df7b7e5154ff0d46969f895e0f39c7dfe7e6380a. +// FilterClaimed is a free log retrieval operation binding the contract event 0x1291cec4ea55732527f1ae8ff3e53def0dbe1feb99c094983449e59cdce4674b. // -// Solidity: event Claimed(bytes32 indexed id) -func (_SolveInbox *SolveInboxFilterer) FilterClaimed(opts *bind.FilterOpts, id [][32]byte) (*SolveInboxClaimedIterator, error) { +// Solidity: event Claimed(bytes32 indexed id, address indexed by, address indexed to, (bool,address,uint256)[] deposits) +func (_SolveInbox *SolveInboxFilterer) FilterClaimed(opts *bind.FilterOpts, id [][32]byte, by []common.Address, to []common.Address) (*SolveInboxClaimedIterator, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } + var byRule []interface{} + for _, byItem := range by { + byRule = append(byRule, byItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } - logs, sub, err := _SolveInbox.contract.FilterLogs(opts, "Claimed", idRule) + logs, sub, err := _SolveInbox.contract.FilterLogs(opts, "Claimed", idRule, byRule, toRule) if err != nil { return nil, err } return &SolveInboxClaimedIterator{contract: _SolveInbox.contract, event: "Claimed", logs: logs, sub: sub}, nil } -// WatchClaimed is a free log subscription operation binding the contract event 0xeddf608ef698454af2fb41c1df7b7e5154ff0d46969f895e0f39c7dfe7e6380a. +// WatchClaimed is a free log subscription operation binding the contract event 0x1291cec4ea55732527f1ae8ff3e53def0dbe1feb99c094983449e59cdce4674b. // -// Solidity: event Claimed(bytes32 indexed id) -func (_SolveInbox *SolveInboxFilterer) WatchClaimed(opts *bind.WatchOpts, sink chan<- *SolveInboxClaimed, id [][32]byte) (event.Subscription, error) { +// Solidity: event Claimed(bytes32 indexed id, address indexed by, address indexed to, (bool,address,uint256)[] deposits) +func (_SolveInbox *SolveInboxFilterer) WatchClaimed(opts *bind.WatchOpts, sink chan<- *SolveInboxClaimed, id [][32]byte, by []common.Address, to []common.Address) (event.Subscription, error) { var idRule []interface{} for _, idItem := range id { idRule = append(idRule, idItem) } + var byRule []interface{} + for _, byItem := range by { + byRule = append(byRule, byItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } - logs, sub, err := _SolveInbox.contract.WatchLogs(opts, "Claimed", idRule) + logs, sub, err := _SolveInbox.contract.WatchLogs(opts, "Claimed", idRule, byRule, toRule) if err != nil { return nil, err } @@ -1113,9 +1132,9 @@ func (_SolveInbox *SolveInboxFilterer) WatchClaimed(opts *bind.WatchOpts, sink c }), nil } -// ParseClaimed is a log parse operation binding the contract event 0xeddf608ef698454af2fb41c1df7b7e5154ff0d46969f895e0f39c7dfe7e6380a. +// ParseClaimed is a log parse operation binding the contract event 0x1291cec4ea55732527f1ae8ff3e53def0dbe1feb99c094983449e59cdce4674b. // -// Solidity: event Claimed(bytes32 indexed id) +// Solidity: event Claimed(bytes32 indexed id, address indexed by, address indexed to, (bool,address,uint256)[] deposits) func (_SolveInbox *SolveInboxFilterer) ParseClaimed(log types.Log) (*SolveInboxClaimed, error) { event := new(SolveInboxClaimed) if err := _SolveInbox.contract.UnpackLog(event, "Claimed", log); err != nil { diff --git a/contracts/bindings/solveoutbox.go b/contracts/bindings/solveoutbox.go index 7776dcd12..3a4567493 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\":\"didFulfill\",\"inputs\":[{\"name\":\"reqId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sourceChainId\",\"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\":\"reqId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"sourceChainId\",\"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\":\"sourceChainId\",\"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: "0x608060405234801561001057600080fd5b5061001961001e565b610080565b63409feecd198054600181161561003d5763f92ee8a96000526004601cfd5b8160c01c808260011c1461007b578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6115d88061008f6000396000f3fe6080604052600436106101355760003560e01c80635ba15647116100ab578063b23ade801161006f578063b23ade8014610365578063cb01a09a146103a0578063f04e283e146103b3578063f2fde38b146103c6578063f8c8765e146103d9578063fee81cf4146103f957600080fd5b80635ba15647146102c15780635db9cbe4146102e1578063715018a61461031157806374eeb847146103195780638da5cb5b1461034c57600080fd5b80632b370b67116100fd5780632b370b67146101e45780632de948071461020457806339acf9f1146102375780634a4ee7b11461026f578063514e62fc1461028257806354d1f13d146102b957600080fd5b8063183a4f6e1461013a578063188a97aa1461014f5780631c10893f146101825780631cd64df41461019557806325692962146101dc575b600080fd5b61014d61014836600461104b565b61042c565b005b34801561015b57600080fd5b5061016f61016a366004611081565b610439565b6040519081526020015b60405180910390f35b61014d6101903660046110ba565b610490565b3480156101a157600080fd5b506101cc6101b03660046110ba565b638b78c6d8600c90815260009290925260209091205481161490565b6040519015158152602001610179565b61014d6104a6565b3480156101f057600080fd5b5061014d6101ff3660046110fc565b6104f6565b34801561021057600080fd5b5061016f61021f366004611148565b638b78c6d8600c908152600091909152602090205490565b34801561024357600080fd5b50600054610257906001600160a01b031681565b6040516001600160a01b039091168152602001610179565b61014d61027d3660046110ba565b610575565b34801561028e57600080fd5b506101cc61029d3660046110ba565b638b78c6d8600c90815260009290925260209091205416151590565b61014d610587565b3480156102cd57600080fd5b506101cc6102dc36600461117b565b6105c3565b3480156102ed57600080fd5b506101cc6102fc36600461104b565b60046020526000908152604090205460ff1681565b61014d6105f0565b34801561032557600080fd5b5060005461033a90600160a01b900460ff1681565b60405160ff9091168152602001610179565b34801561035857600080fd5b50638b78c6d81954610257565b34801561037157600080fd5b506101cc6103803660046111d2565b600360209081526000928352604080842090915290825290205460ff1681565b61014d6103ae366004611205565b610604565b61014d6103c1366004611148565b610a9e565b61014d6103d4366004611148565b610adb565b3480156103e557600080fd5b5061014d6103f43660046112b7565b610b02565b34801561040557600080fd5b5061016f610414366004611148565b63389a75e1600c908152600091909152602090205490565b6104363382610bae565b50565b60405160001960248201819052604482015260009061048a90839060640160408051601f198184030181529190526020810180516001600160e01b031663019bfff160e51b179052620186a0610bba565b92915050565b610498610c38565b6104a28282610c53565b5050565b60006202a30067ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b6104fe610c38565b6001600160a01b03831660008181526003602090815260408083206001600160e01b0319871680855290835292819020805460ff191686151590811790915590519081529192917f4a2dc3dabd793cd88cb7b56ba4aa70196892e5b996fc72f4f3d45e20343d305b910160405180910390a3505050565b61057d610c38565b6104a28282610bae565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b6000600460006105d4868686610c5f565b815260208101919091526040016000205460ff16949350505050565b6105f8610c38565b6106026000610c95565b565b600161060f81610cd3565b3068929eee149b4bd21268540361062e5763ab143c066000526004601cfd5b3068929eee149b4bd2126855466106486020860186611081565b67ffffffffffffffff16146106705760405163fd24301760e01b815260040160405180910390fd5b600360006106846040870160208801611148565b6001600160a01b0316815260208101919091526040016000908120906106ad606087018761130b565b6106b691611359565b6001600160e01b031916815260208101919091526040016000205460ff166106f1576040516315dace2d60e21b815260040160405180910390fd5b60006106fe878787610c5f565b60008181526004602052604090205490915060ff161561073157604051630c4a31a760e01b815260040160405180910390fd5b60008367ffffffffffffffff81111561074c5761074c611389565b604051908082528060200260200182016040528015610775578160200160208202803683370190505b50905060005b848110156108bf576107be308787848181106107995761079961139f565b6107af9260206060909202019081019150611148565b6001600160a01b031690610cf9565b8282815181106107d0576107d061139f565b60200260200101818152505061083633308888858181106107f3576107f361139f565b9050606002016040013589898681811061080f5761080f61139f565b6108259260206060909202019081019150611148565b6001600160a01b0316929190610d25565b6108b786868381811061084b5761084b61139f565b90506060020160200160208101906108639190611148565b8787848181106108755761087561139f565b905060600201604001358888858181106108915761089161139f565b6108a79260206060909202019081019150611148565b6001600160a01b03169190610d83565b60010161077b565b5060006108d26040880160208901611148565b6001600160a01b031660408801356108ed60608a018a61130b565b6040516108fb9291906113b5565b60006040518083038185875af1925050503d8060008114610938576040519150601f19603f3d011682016040523d82523d6000602084013e61093d565b606091505b505090508061095f57604051633204506f60e01b815260040160405180910390fd5b60005b858110156109c05782818151811061097c5761097c61139f565b602002602001015161099a308989858181106107995761079961139f565b146109b857604051630979361760e01b815260040160405180910390fd5b600101610962565b50604051602481018a90526044810184905260009060640160408051601f198184030181529190526020810180516001600160e01b031663019bfff160e51b179052600254909150600090610a27908b906004906001600160a01b031685620186a0610dd3565b905080610a3860408b0135346113c5565b1015610a565760405162976f7560e21b815260040160405180910390fd5b604051339086908d907f7898a125e0970666c80e00bbf2e7041d84dfe5bbe6bcf562ce53d540fd6cd89190600090a450505050503868929eee149b4bd2126855505050505050565b610aa6610c38565b63389a75e1600c52806000526020600c208054421115610ace57636f5e88186000526004601cfd5b6000905561043681610c95565b610ae3610c38565b8060601b610af957637448fbae6000526004601cfd5b61043681610c95565b63409feecd198054600382558015610b395760018160011c14303b10610b305763f92ee8a96000526004601cfd5b818160ff1b1b91505b50610b4385610f17565b610b4e846001610c53565b610b5783610f53565b600280546001600160a01b0319166001600160a01b0384161790558015610ba7576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b5050505050565b6104a282826000610ff2565b60008054604051632376548f60e21b81526001600160a01b0390911690638dd9523c90610bef9087908790879060040161142c565b602060405180830381865afa158015610c0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c309190611463565b949350505050565b638b78c6d819543314610602576382b429006000526004601cfd5b6104a282826001610ff2565b6000838383604051602001610c76939291906114a5565b6040516020818303038152906040528051906020012090509392505050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b638b78c6d8600c5233600052806020600c205416610436576382b429006000526004601cfd5b6000816014526370a0823160601b60005260208060246010865afa601f3d111660205102905092915050565b60405181606052826040528360601b602c526323b872dd60601b600c52602060006064601c6000895af18060016000511416610d7457803d873b151710610d7457637939f4246000526004601cfd5b50600060605260405250505050565b816014528060345263095ea7b360601b60005260206000604460106000875af18060016000511416610dc857803d853b151710610dc857633e3f8f736000526004601cfd5b506000603452505050565b60008054604051632376548f60e21b815282916001600160a01b031690638dd9523c90610e08908a908890889060040161142c565b602060405180830381865afa158015610e25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e499190611463565b905080471015610ea05760405162461bcd60e51b815260206004820152601860248201527f584170703a20696e73756666696369656e742066756e6473000000000000000060448201526064015b60405180910390fd5b60005460405163c21dda4f60e01b81526001600160a01b039091169063c21dda4f908390610eda908b908b908b908b908b90600401611552565b6000604051808303818588803b158015610ef357600080fd5b505af1158015610f07573d6000803e3d6000fd5b50939a9950505050505050505050565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b6001600160a01b038116610f9e5760405162461bcd60e51b8152602060048201526012602482015271584170703a206e6f207a65726f206f6d6e6960701b6044820152606401610e97565b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f79162c8d053a07e70cdc1ccc536f0440b571f8508377d2bef51094fadab98f479060200160405180910390a150565b638b78c6d8600c52826000526020600c20805483811783611014575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26600080a3505050505050565b60006020828403121561105d57600080fd5b5035919050565b803567ffffffffffffffff8116811461107c57600080fd5b919050565b60006020828403121561109357600080fd5b61109c82611064565b9392505050565b80356001600160a01b038116811461107c57600080fd5b600080604083850312156110cd57600080fd5b6110d6836110a3565b946020939093013593505050565b80356001600160e01b03198116811461107c57600080fd5b60008060006060848603121561111157600080fd5b61111a846110a3565b9250611128602085016110e4565b91506040840135801515811461113d57600080fd5b809150509250925092565b60006020828403121561115a57600080fd5b61109c826110a3565b60006080828403121561117557600080fd5b50919050565b60008060006060848603121561119057600080fd5b833592506111a060208501611064565b9150604084013567ffffffffffffffff8111156111bc57600080fd5b6111c886828701611163565b9150509250925092565b600080604083850312156111e557600080fd5b6111ee836110a3565b91506111fc602084016110e4565b90509250929050565b60008060008060006080868803121561121d57600080fd5b8535945061122d60208701611064565b9350604086013567ffffffffffffffff8082111561124a57600080fd5b61125689838a01611163565b9450606088013591508082111561126c57600080fd5b818801915088601f83011261128057600080fd5b81358181111561128f57600080fd5b8960206060830285010111156112a457600080fd5b9699959850939650602001949392505050565b600080600080608085870312156112cd57600080fd5b6112d6856110a3565b93506112e4602086016110a3565b92506112f2604086016110a3565b9150611300606086016110a3565b905092959194509250565b6000808335601e1984360301811261132257600080fd5b83018035915067ffffffffffffffff82111561133d57600080fd5b60200191503681900382131561135257600080fd5b9250929050565b6001600160e01b031981358181169160048510156113815780818660040360031b1b83161692505b505092915050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b8181038181111561048a57634e487b7160e01b600052601160045260246000fd5b6000815180845260005b8181101561140c576020818501810151868301820152016113f0565b506000602082860101526020601f19601f83011685010191505092915050565b600067ffffffffffffffff80861683526060602084015261145060608401866113e6565b9150808416604084015250949350505050565b60006020828403121561147557600080fd5b5051919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b838152600067ffffffffffffffff808516602084015260606040840152806114cc85611064565b1660608401526001600160a01b036114e6602086016110a3565b166080840152604084013560a08401526060840135601e1985360301811261150d57600080fd5b84016020810190358281111561152257600080fd5b80360382131561153157600080fd5b608060c086015261154660e08601828461147c565b98975050505050505050565b600067ffffffffffffffff808816835260ff8716602084015260018060a01b038616604084015260a0606084015261158d60a08401866113e6565b9150808416608084015250969550505050505056fea264697066735822122036944fcc635dc9db23e32848a8677cf08d0ff4e7d387b30a1f313e436009b9b564736f6c63430008180033", + Bin: "0x608060405234801561001057600080fd5b5061001961001e565b610080565b63409feecd198054600181161561003d5763f92ee8a96000526004601cfd5b8160c01c808260011c1461007b578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6115d88061008f6000396000f3fe6080604052600436106101355760003560e01c80635ba15647116100ab578063b23ade801161006f578063b23ade8014610365578063cb01a09a146103a0578063f04e283e146103b3578063f2fde38b146103c6578063f8c8765e146103d9578063fee81cf4146103f957600080fd5b80635ba15647146102c15780635db9cbe4146102e1578063715018a61461031157806374eeb847146103195780638da5cb5b1461034c57600080fd5b80632b370b67116100fd5780632b370b67146101e45780632de948071461020457806339acf9f1146102375780634a4ee7b11461026f578063514e62fc1461028257806354d1f13d146102b957600080fd5b8063183a4f6e1461013a578063188a97aa1461014f5780631c10893f146101825780631cd64df41461019557806325692962146101dc575b600080fd5b61014d61014836600461104b565b61042c565b005b34801561015b57600080fd5b5061016f61016a366004611081565b610439565b6040519081526020015b60405180910390f35b61014d6101903660046110ba565b610490565b3480156101a157600080fd5b506101cc6101b03660046110ba565b638b78c6d8600c90815260009290925260209091205481161490565b6040519015158152602001610179565b61014d6104a6565b3480156101f057600080fd5b5061014d6101ff3660046110fc565b6104f6565b34801561021057600080fd5b5061016f61021f366004611148565b638b78c6d8600c908152600091909152602090205490565b34801561024357600080fd5b50600054610257906001600160a01b031681565b6040516001600160a01b039091168152602001610179565b61014d61027d3660046110ba565b610575565b34801561028e57600080fd5b506101cc61029d3660046110ba565b638b78c6d8600c90815260009290925260209091205416151590565b61014d610587565b3480156102cd57600080fd5b506101cc6102dc36600461117b565b6105c3565b3480156102ed57600080fd5b506101cc6102fc36600461104b565b60046020526000908152604090205460ff1681565b61014d6105f0565b34801561032557600080fd5b5060005461033a90600160a01b900460ff1681565b60405160ff9091168152602001610179565b34801561035857600080fd5b50638b78c6d81954610257565b34801561037157600080fd5b506101cc6103803660046111d2565b600360209081526000928352604080842090915290825290205460ff1681565b61014d6103ae366004611205565b610604565b61014d6103c1366004611148565b610a9e565b61014d6103d4366004611148565b610adb565b3480156103e557600080fd5b5061014d6103f43660046112b7565b610b02565b34801561040557600080fd5b5061016f610414366004611148565b63389a75e1600c908152600091909152602090205490565b6104363382610bae565b50565b60405160001960248201819052604482015260009061048a90839060640160408051601f198184030181529190526020810180516001600160e01b031663019bfff160e51b179052620186a0610bba565b92915050565b610498610c38565b6104a28282610c53565b5050565b60006202a30067ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b6104fe610c38565b6001600160a01b03831660008181526003602090815260408083206001600160e01b0319871680855290835292819020805460ff191686151590811790915590519081529192917f4a2dc3dabd793cd88cb7b56ba4aa70196892e5b996fc72f4f3d45e20343d305b910160405180910390a3505050565b61057d610c38565b6104a28282610bae565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b6000600460006105d4868686610c5f565b815260208101919091526040016000205460ff16949350505050565b6105f8610c38565b6106026000610c95565b565b600161060f81610cd3565b3068929eee149b4bd21268540361062e5763ab143c066000526004601cfd5b3068929eee149b4bd2126855466106486020860186611081565b67ffffffffffffffff16146106705760405163fd24301760e01b815260040160405180910390fd5b600360006106846040870160208801611148565b6001600160a01b0316815260208101919091526040016000908120906106ad606087018761130b565b6106b691611359565b6001600160e01b031916815260208101919091526040016000205460ff166106f1576040516315dace2d60e21b815260040160405180910390fd5b60006106fe878787610c5f565b60008181526004602052604090205490915060ff161561073157604051630c4a31a760e01b815260040160405180910390fd5b60008367ffffffffffffffff81111561074c5761074c611389565b604051908082528060200260200182016040528015610775578160200160208202803683370190505b50905060005b848110156108bf576107be308787848181106107995761079961139f565b6107af9260206060909202019081019150611148565b6001600160a01b031690610cf9565b8282815181106107d0576107d061139f565b60200260200101818152505061083633308888858181106107f3576107f361139f565b9050606002016040013589898681811061080f5761080f61139f565b6108259260206060909202019081019150611148565b6001600160a01b0316929190610d25565b6108b786868381811061084b5761084b61139f565b90506060020160200160208101906108639190611148565b8787848181106108755761087561139f565b905060600201604001358888858181106108915761089161139f565b6108a79260206060909202019081019150611148565b6001600160a01b03169190610d83565b60010161077b565b5060006108d26040880160208901611148565b6001600160a01b031660408801356108ed60608a018a61130b565b6040516108fb9291906113b5565b60006040518083038185875af1925050503d8060008114610938576040519150601f19603f3d011682016040523d82523d6000602084013e61093d565b606091505b505090508061095f57604051633204506f60e01b815260040160405180910390fd5b60005b858110156109c05782818151811061097c5761097c61139f565b602002602001015161099a308989858181106107995761079961139f565b146109b857604051630979361760e01b815260040160405180910390fd5b600101610962565b50604051602481018a90526044810184905260009060640160408051601f198184030181529190526020810180516001600160e01b031663019bfff160e51b179052600254909150600090610a27908b906004906001600160a01b031685620186a0610dd3565b905080610a3860408b0135346113c5565b1015610a565760405162976f7560e21b815260040160405180910390fd5b604051339086908d907f7898a125e0970666c80e00bbf2e7041d84dfe5bbe6bcf562ce53d540fd6cd89190600090a450505050503868929eee149b4bd2126855505050505050565b610aa6610c38565b63389a75e1600c52806000526020600c208054421115610ace57636f5e88186000526004601cfd5b6000905561043681610c95565b610ae3610c38565b8060601b610af957637448fbae6000526004601cfd5b61043681610c95565b63409feecd198054600382558015610b395760018160011c14303b10610b305763f92ee8a96000526004601cfd5b818160ff1b1b91505b50610b4385610f17565b610b4e846001610c53565b610b5783610f53565b600280546001600160a01b0319166001600160a01b0384161790558015610ba7576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b5050505050565b6104a282826000610ff2565b60008054604051632376548f60e21b81526001600160a01b0390911690638dd9523c90610bef9087908790879060040161142c565b602060405180830381865afa158015610c0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c309190611463565b949350505050565b638b78c6d819543314610602576382b429006000526004601cfd5b6104a282826001610ff2565b6000838383604051602001610c76939291906114a5565b6040516020818303038152906040528051906020012090509392505050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b638b78c6d8600c5233600052806020600c205416610436576382b429006000526004601cfd5b6000816014526370a0823160601b60005260208060246010865afa601f3d111660205102905092915050565b60405181606052826040528360601b602c526323b872dd60601b600c52602060006064601c6000895af18060016000511416610d7457803d873b151710610d7457637939f4246000526004601cfd5b50600060605260405250505050565b816014528060345263095ea7b360601b60005260206000604460106000875af18060016000511416610dc857803d853b151710610dc857633e3f8f736000526004601cfd5b506000603452505050565b60008054604051632376548f60e21b815282916001600160a01b031690638dd9523c90610e08908a908890889060040161142c565b602060405180830381865afa158015610e25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e499190611463565b905080471015610ea05760405162461bcd60e51b815260206004820152601860248201527f584170703a20696e73756666696369656e742066756e6473000000000000000060448201526064015b60405180910390fd5b60005460405163c21dda4f60e01b81526001600160a01b039091169063c21dda4f908390610eda908b908b908b908b908b90600401611552565b6000604051808303818588803b158015610ef357600080fd5b505af1158015610f07573d6000803e3d6000fd5b50939a9950505050505050505050565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b6001600160a01b038116610f9e5760405162461bcd60e51b8152602060048201526012602482015271584170703a206e6f207a65726f206f6d6e6960701b6044820152606401610e97565b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f79162c8d053a07e70cdc1ccc536f0440b571f8508377d2bef51094fadab98f479060200160405180910390a150565b638b78c6d8600c52826000526020600c20805483811783611014575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26600080a3505050505050565b60006020828403121561105d57600080fd5b5035919050565b803567ffffffffffffffff8116811461107c57600080fd5b919050565b60006020828403121561109357600080fd5b61109c82611064565b9392505050565b80356001600160a01b038116811461107c57600080fd5b600080604083850312156110cd57600080fd5b6110d6836110a3565b946020939093013593505050565b80356001600160e01b03198116811461107c57600080fd5b60008060006060848603121561111157600080fd5b61111a846110a3565b9250611128602085016110e4565b91506040840135801515811461113d57600080fd5b809150509250925092565b60006020828403121561115a57600080fd5b61109c826110a3565b60006080828403121561117557600080fd5b50919050565b60008060006060848603121561119057600080fd5b833592506111a060208501611064565b9150604084013567ffffffffffffffff8111156111bc57600080fd5b6111c886828701611163565b9150509250925092565b600080604083850312156111e557600080fd5b6111ee836110a3565b91506111fc602084016110e4565b90509250929050565b60008060008060006080868803121561121d57600080fd5b8535945061122d60208701611064565b9350604086013567ffffffffffffffff8082111561124a57600080fd5b61125689838a01611163565b9450606088013591508082111561126c57600080fd5b818801915088601f83011261128057600080fd5b81358181111561128f57600080fd5b8960206060830285010111156112a457600080fd5b9699959850939650602001949392505050565b600080600080608085870312156112cd57600080fd5b6112d6856110a3565b93506112e4602086016110a3565b92506112f2604086016110a3565b9150611300606086016110a3565b905092959194509250565b6000808335601e1984360301811261132257600080fd5b83018035915067ffffffffffffffff82111561133d57600080fd5b60200191503681900382131561135257600080fd5b9250929050565b6001600160e01b031981358181169160048510156113815780818660040360031b1b83161692505b505092915050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b8181038181111561048a57634e487b7160e01b600052601160045260246000fd5b6000815180845260005b8181101561140c576020818501810151868301820152016113f0565b506000602082860101526020601f19601f83011685010191505092915050565b600067ffffffffffffffff80861683526060602084015261145060608401866113e6565b9150808416604084015250949350505050565b60006020828403121561147557600080fd5b5051919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b838152600067ffffffffffffffff808516602084015260606040840152806114cc85611064565b1660608401526001600160a01b036114e6602086016110a3565b166080840152604084013560a08401526060840135601e1985360301811261150d57600080fd5b84016020810190358281111561152257600080fd5b80360382131561153157600080fd5b608060c086015261154660e08601828461147c565b98975050505050505050565b600067ffffffffffffffff808816835260ff8716602084015260018060a01b038616604084015260a0606084015261158d60a08401866113e6565b9150808416608084015250969550505050505056fea264697066735822122011c1d969aadfaac04426294c7ad04678461f98502e0a88851843393e77f081ec64736f6c63430008180033", } // SolveOutboxABI is the input ABI used to generate the binding from. diff --git a/contracts/solve/.gas-snapshot b/contracts/solve/.gas-snapshot index aac160bf1..bae596651 100644 --- a/contracts/solve/.gas-snapshot +++ b/contracts/solve/.gas-snapshot @@ -1,26 +1,30 @@ -SolveInbox_accept_Test:test_accept_one_request() (gas: 395190) -SolveInbox_accept_Test:test_accept_reverts() (gas: 1046338) -SolveInbox_accept_Test:test_accept_skip_first() (gas: 703125) -SolveInbox_accept_Test:test_accept_two_requests() (gas: 727140) -SolveInbox_cancel_Test:test_cancel_multiToken() (gas: 548524) -SolveInbox_cancel_Test:test_cancel_nativeMultiToken() (gas: 637564) -SolveInbox_cancel_Test:test_cancel_oldest_request() (gas: 693985) -SolveInbox_cancel_Test:test_cancel_one_request() (gas: 396185) -SolveInbox_cancel_Test:test_cancel_rejected_nativeMultiToken_request() (gas: 647092) -SolveInbox_cancel_Test:test_cancel_rejected_nativeToken_request() (gas: 405226) -SolveInbox_cancel_Test:test_cancel_reverts() (gas: 1068205) -SolveInbox_cancel_Test:test_cancel_singleToken() (gas: 427729) -SolveInbox_cancel_Test:test_cancel_two_requests() (gas: 705750) -SolveInbox_markFulfilled_Test:test_markFulfilled_reverts() (gas: 506851) -SolveInbox_markFulfilled_Test:test_markFulfilled_success() (gas: 417191) -SolveInbox_reject_Test:test_reject_nativeMultiToken() (gas: 601388) -SolveInbox_reject_Test:test_reject_oldest_request() (gas: 666425) -SolveInbox_reject_Test:test_reject_one_request() (gas: 368118) -SolveInbox_reject_Test:test_reject_reverts() (gas: 749070) -SolveInbox_reject_Test:test_reject_two_requests() (gas: 670785) -SolveInbox_request_Test:test_request_multiToken() (gas: 551295) -SolveInbox_request_Test:test_request_nativeMultiToken() (gas: 609496) -SolveInbox_request_Test:test_request_reverts() (gas: 930379) -SolveInbox_request_Test:test_request_singleNative() (gas: 370023) -SolveInbox_request_Test:test_request_singleToken() (gas: 431537) -SolveInbox_request_Test:test_request_two() (gas: 678981) \ No newline at end of file +SolveInbox_accept_Test:test_accept_one_request() (gas: 395222) +SolveInbox_accept_Test:test_accept_reverts() (gas: 1046469) +SolveInbox_accept_Test:test_accept_skip_first() (gas: 703189) +SolveInbox_accept_Test:test_accept_two_requests() (gas: 727204) +SolveInbox_cancel_Test:test_cancel_multiToken() (gas: 548591) +SolveInbox_cancel_Test:test_cancel_nativeMultiToken() (gas: 637631) +SolveInbox_cancel_Test:test_cancel_oldest_request() (gas: 694084) +SolveInbox_cancel_Test:test_cancel_one_request() (gas: 396252) +SolveInbox_cancel_Test:test_cancel_rejected_nativeMultiToken_request() (gas: 647159) +SolveInbox_cancel_Test:test_cancel_rejected_nativeToken_request() (gas: 405293) +SolveInbox_cancel_Test:test_cancel_reverts() (gas: 1068371) +SolveInbox_cancel_Test:test_cancel_singleToken() (gas: 427796) +SolveInbox_cancel_Test:test_cancel_two_requests() (gas: 705884) +SolveInbox_claim_Test:test_claim_multiDeposit() (gas: 719086) +SolveInbox_claim_Test:test_claim_reverts() (gas: 448914) +SolveInbox_claim_Test:test_claim_singleNative() (gas: 471302) +SolveInbox_claim_Test:test_claim_singleToken() (gas: 502224) +SolveInbox_markFulfilled_Test:test_markFulfilled_reverts() (gas: 506883) +SolveInbox_markFulfilled_Test:test_markFulfilled_success() (gas: 417223) +SolveInbox_reject_Test:test_reject_nativeMultiToken() (gas: 601420) +SolveInbox_reject_Test:test_reject_oldest_request() (gas: 666489) +SolveInbox_reject_Test:test_reject_one_request() (gas: 368150) +SolveInbox_reject_Test:test_reject_reverts() (gas: 749169) +SolveInbox_reject_Test:test_reject_two_requests() (gas: 670849) +SolveInbox_request_Test:test_request_multiToken() (gas: 551327) +SolveInbox_request_Test:test_request_nativeMultiToken() (gas: 609528) +SolveInbox_request_Test:test_request_reverts() (gas: 930411) +SolveInbox_request_Test:test_request_singleNative() (gas: 370055) +SolveInbox_request_Test:test_request_singleToken() (gas: 431569) +SolveInbox_request_Test:test_request_two() (gas: 679045) \ No newline at end of file diff --git a/contracts/solve/src/SolveInbox.sol b/contracts/solve/src/SolveInbox.sol index fab175df2..216a43b25 100644 --- a/contracts/solve/src/SolveInbox.sol +++ b/contracts/solve/src/SolveInbox.sol @@ -33,8 +33,9 @@ contract SolveInbox is OwnableRoles, ReentrancyGuard, Initializable, XAppBase, I error WrongCallHash(); error WrongSourceChain(); - // General errors + // Transfer errors error TransferFailed(); + error InvalidRecipient(); /** * @notice Role for solvers. @@ -176,17 +177,19 @@ contract SolveInbox is OwnableRoles, ReentrancyGuard, Initializable, XAppBase, I /** * @notice Claim a fulfilled request. * @param id ID of the request. + * @param to Address to send deposits to. */ - function claim(bytes32 id) external nonReentrant { + function claim(bytes32 id, address to) external nonReentrant { Solve.Request storage req = _requests[id]; if (req.status != Solve.Status.Fulfilled) revert NotFulfilled(); + if (req.acceptedBy != msg.sender) revert Unauthorized(); req.updatedAt = uint40(block.timestamp); req.status = Solve.Status.Claimed; - _transferDeposits(req.acceptedBy, req.deposits); + _transferDeposits(to, req.deposits); - emit Claimed(id); + emit Claimed(id, msg.sender, to, req.deposits); } /** @@ -215,6 +218,8 @@ contract SolveInbox is OwnableRoles, ReentrancyGuard, Initializable, XAppBase, I * @dev Transfer deposits to recipient. Used regardless of refund or claim. */ function _transferDeposits(address recipient, Solve.Deposit[] memory deposits) internal { + if (recipient == address(0)) revert InvalidRecipient(); + for (uint256 i; i < deposits.length; ++i) { if (deposits[i].isNative) { (bool success,) = payable(recipient).call{ value: deposits[i].amount }(""); diff --git a/contracts/solve/src/interfaces/ISolveInbox.sol b/contracts/solve/src/interfaces/ISolveInbox.sol index 81c479ecd..2a75a9d64 100644 --- a/contracts/solve/src/interfaces/ISolveInbox.sol +++ b/contracts/solve/src/interfaces/ISolveInbox.sol @@ -44,9 +44,12 @@ interface ISolveInbox { /** * @notice Emitted when a request is claimed. - * @param id ID of the request. + * @param id ID of the request. + * @param by The solver address that claimed the request. + * @param to The recipient of claimed deposits. + * @param deposits Array of deposits claimed */ - event Claimed(bytes32 indexed id); + event Claimed(bytes32 indexed id, address indexed by, address indexed to, Solve.Deposit[] deposits); /** * /** @@ -107,6 +110,7 @@ interface ISolveInbox { /** * @notice Claim a fulfilled request. * @param id ID of the request. + * @param to Address to send deposits to. */ - function claim(bytes32 id) external; + function claim(bytes32 id, address to) external; } diff --git a/contracts/solve/test/Inbox_claim.t.sol b/contracts/solve/test/Inbox_claim.t.sol new file mode 100644 index 000000000..3818920e3 --- /dev/null +++ b/contracts/solve/test/Inbox_claim.t.sol @@ -0,0 +1,142 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity =0.8.24; + +import { Ownable } from "solady/src/auth/Ownable.sol"; +import { SolveInbox, ISolveInbox } from "src/SolveInbox.sol"; +import { Solve } from "src/Solve.sol"; +import { InboxBase } from "./InboxBase.sol"; + +/** + * @title SolveInbox_claim_Test + * @notice Test suite for SolveInbox.claim(...) + */ +contract SolveInbox_claim_Test is InboxBase { + address claimTo = makeAddr("claim-to"); + + function test_claim_reverts() public { + // no request + vm.expectRevert(SolveInbox.NotFulfilled.selector); + inbox.claim(bytes32(0), claimTo); + + // open request + vm.deal(user, 1 ether); + Solve.Call memory call = randCall(); + Solve.TokenDeposit[] memory deposits = new Solve.TokenDeposit[](0); + vm.prank(user); + bytes32 id = inbox.request{ value: 1 ether }(call, deposits); + + // pending (not fulfilled) + vm.expectRevert(SolveInbox.NotFulfilled.selector); + inbox.claim(id, claimTo); + + // accept + vm.prank(solver); + inbox.accept(id); + + // accepted (not fulfilled) + vm.expectRevert(SolveInbox.NotFulfilled.selector); + inbox.claim(id, claimTo); + + // mark fulfilled + portal.mockXCall({ + sourceChainId: call.destChainId, + sender: address(outbox), + data: abi.encodeCall(inbox.markFulfilled, (id, callHash(id, call))), + to: address(inbox) + }); + + // not acceptedBy + vm.expectRevert(Ownable.Unauthorized.selector); + vm.prank(makeAddr("not-solver")); + inbox.claim(id, claimTo); + + // no claimTo zero + vm.expectRevert(SolveInbox.InvalidRecipient.selector); + vm.prank(solver); + inbox.claim(id, address(0)); + } + + function test_claim_singleNative() public { + // open, accept, fulfill + Solve.Call memory call = randCall(); + Solve.TokenDeposit[] memory deposits = new Solve.TokenDeposit[](0); + bytes32 id = openAcceptFulfill(call, deposits, 1 ether); + + // claim + vm.expectEmit(address(inbox)); + emit ISolveInbox.Claimed(id, solver, claimTo, inbox.getRequest(id).deposits); + vm.prank(solver); + inbox.claim(id, claimTo); + + // assert claimed + Solve.Request memory req = inbox.getRequest(id); + assertEq(uint8(req.status), uint8(Solve.Status.Claimed), "req.status"); + assertEq(claimTo.balance, 1 ether, "claimTo.balance"); + } + + function test_claim_singleToken() public { + // open, accept, fulfill + Solve.Call memory call = randCall(); + Solve.TokenDeposit[] memory deposits = new Solve.TokenDeposit[](1); + deposits[0] = Solve.TokenDeposit({ token: address(token1), amount: 1 ether }); + bytes32 id = openAcceptFulfill(call, deposits, 0); + + // claim + vm.expectEmit(address(inbox)); + emit ISolveInbox.Claimed(id, solver, claimTo, inbox.getRequest(id).deposits); + vm.prank(solver); + inbox.claim(id, claimTo); + + // assert claimed + Solve.Request memory req = inbox.getRequest(id); + assertEq(uint8(req.status), uint8(Solve.Status.Claimed), "req.status"); + assertEq(token1.balanceOf(claimTo), 1 ether, "token.balanceOf(claimTo)"); + } + + function test_claim_multiDeposit() public { + // open, accept, fulfill + Solve.Call memory call = randCall(); + Solve.TokenDeposit[] memory deposits = new Solve.TokenDeposit[](2); + deposits[0] = Solve.TokenDeposit({ token: address(token1), amount: 1 ether }); + deposits[1] = Solve.TokenDeposit({ token: address(token2), amount: 2 ether }); + bytes32 id = openAcceptFulfill(call, deposits, 3 ether); + + // claim + vm.expectEmit(address(inbox)); + emit ISolveInbox.Claimed(id, solver, claimTo, inbox.getRequest(id).deposits); + vm.prank(solver); + inbox.claim(id, claimTo); + + // assert claimed + Solve.Request memory req = inbox.getRequest(id); + assertEq(uint8(req.status), uint8(Solve.Status.Claimed), "req.status"); + assertEq(claimTo.balance, 3 ether, "claimTo.balance"); + assertEq(token1.balanceOf(claimTo), 1 ether, "token1.balanceOf(claimTo)"); + assertEq(token2.balanceOf(claimTo), 2 ether, "token2.balanceOf(claimTo)"); + } + + /// @dev Open a request, accept it, mark it as fulfilled, and return the request ID. + function openAcceptFulfill(Solve.Call memory call, Solve.TokenDeposit[] memory tokenDeposits, uint256 nativeDeposit) + internal + returns (bytes32 id) + { + // open request + vm.deal(user, nativeDeposit); + vm.startPrank(user); + mintAndApprove(tokenDeposits); + id = inbox.request{ value: nativeDeposit }(call, tokenDeposits); + vm.stopPrank(); + + // accept + vm.prank(solver); + inbox.accept(id); + + // mark fulfilled + portal.mockXCall({ + sourceChainId: call.destChainId, + sender: address(outbox), + data: abi.encodeCall(inbox.markFulfilled, (id, callHash(id, call))), + to: address(inbox) + }); + } +} diff --git a/solver/app/deps.go b/solver/app/deps.go index 2c284e60c..fe33bc1f8 100644 --- a/solver/app/deps.go +++ b/solver/app/deps.go @@ -1,4 +1,4 @@ -//nolint:dupl,unused // It's okay to have similar code for different events +//nolint:unused // Some functions are unused but are kept for future use package app import ( @@ -48,7 +48,9 @@ func newClaimer( return err } - tx, err := inbox.Claim(txOpts, req.Id) + // Claim to solver address for now + // TODO: consider claiming to hot / cold funding wallet + tx, err := inbox.Claim(txOpts, req.Id, solverAddr) if err != nil { return errors.Wrap(err, "claim request") } else if _, err := backend.WaitMined(ctx, tx); err != nil {