From 8916cd51b1b2a7cb45b1aee0d3ca95fefd0748ed Mon Sep 17 00:00:00 2001 From: Zodomo Date: Thu, 23 Jan 2025 16:16:55 -0600 Subject: [PATCH] add support for opening orders for other users --- contracts/bindings/isolvernetbindings.go | 15 ++-- contracts/bindings/solvernetinbox.go | 2 +- contracts/bindings/solvernetoutbox.go | 2 +- contracts/solve/.gas-snapshot | 84 ++++++++++--------- .../solve/src/ERC7683/SolverNetInbox.sol | 2 +- .../src/ERC7683/interfaces/ISolverNet.sol | 2 + contracts/solve/test/ERC7683/E2E.t.sol | 2 +- contracts/solve/test/ERC7683/TestBase.sol | 14 ++-- .../solve/test/ERC7683/inbox/Cancel.t.sol | 63 ++++++++++++++ contracts/solve/test/ERC7683/inbox/Open.t.sol | 67 +++++++++++++-- 10 files changed, 190 insertions(+), 63 deletions(-) diff --git a/contracts/bindings/isolvernetbindings.go b/contracts/bindings/isolvernetbindings.go index 93377a7e4..41db7a416 100644 --- a/contracts/bindings/isolvernetbindings.go +++ b/contracts/bindings/isolvernetbindings.go @@ -52,6 +52,7 @@ type ISolverNetFillOriginData struct { // ISolverNetOrderData is an auto generated low-level Go binding around an user-defined struct. type ISolverNetOrderData struct { + User common.Address Call ISolverNetCall Deposits []ISolverNetDeposit } @@ -65,7 +66,7 @@ type ISolverNetTokenExpense struct { // ISolverNetBindingsMetaData contains all meta data concerning the ISolverNetBindings contract. var ISolverNetBindingsMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"function\",\"name\":\"call\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structISolverNet.Call\",\"components\":[{\"name\":\"chainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"target\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"expenses\",\"type\":\"tuple[]\",\"internalType\":\"structISolverNet.TokenExpense[]\",\"components\":[{\"name\":\"token\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"spender\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deposit\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structISolverNet.Deposit\",\"components\":[{\"name\":\"token\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"fillOriginData\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structISolverNet.FillOriginData\",\"components\":[{\"name\":\"srcChainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"call\",\"type\":\"tuple\",\"internalType\":\"structISolverNet.Call\",\"components\":[{\"name\":\"chainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"target\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"expenses\",\"type\":\"tuple[]\",\"internalType\":\"structISolverNet.TokenExpense[]\",\"components\":[{\"name\":\"token\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"spender\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}]}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"orderData\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structISolverNet.OrderData\",\"components\":[{\"name\":\"call\",\"type\":\"tuple\",\"internalType\":\"structISolverNet.Call\",\"components\":[{\"name\":\"chainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"target\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"expenses\",\"type\":\"tuple[]\",\"internalType\":\"structISolverNet.TokenExpense[]\",\"components\":[{\"name\":\"token\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"spender\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]},{\"name\":\"deposits\",\"type\":\"tuple[]\",\"internalType\":\"structISolverNet.Deposit[]\",\"components\":[{\"name\":\"token\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"tokenExpense\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structISolverNet.TokenExpense\",\"components\":[{\"name\":\"token\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"spender\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"view\"}]", + ABI: "[{\"type\":\"function\",\"name\":\"call\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structISolverNet.Call\",\"components\":[{\"name\":\"chainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"target\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"expenses\",\"type\":\"tuple[]\",\"internalType\":\"structISolverNet.TokenExpense[]\",\"components\":[{\"name\":\"token\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"spender\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deposit\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structISolverNet.Deposit\",\"components\":[{\"name\":\"token\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"fillOriginData\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structISolverNet.FillOriginData\",\"components\":[{\"name\":\"srcChainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"call\",\"type\":\"tuple\",\"internalType\":\"structISolverNet.Call\",\"components\":[{\"name\":\"chainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"target\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"expenses\",\"type\":\"tuple[]\",\"internalType\":\"structISolverNet.TokenExpense[]\",\"components\":[{\"name\":\"token\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"spender\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}]}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"orderData\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structISolverNet.OrderData\",\"components\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"call\",\"type\":\"tuple\",\"internalType\":\"structISolverNet.Call\",\"components\":[{\"name\":\"chainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"target\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"expenses\",\"type\":\"tuple[]\",\"internalType\":\"structISolverNet.TokenExpense[]\",\"components\":[{\"name\":\"token\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"spender\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]},{\"name\":\"deposits\",\"type\":\"tuple[]\",\"internalType\":\"structISolverNet.Deposit[]\",\"components\":[{\"name\":\"token\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"tokenExpense\",\"inputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structISolverNet.TokenExpense\",\"components\":[{\"name\":\"token\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"spender\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"view\"}]", } // ISolverNetBindingsABI is the input ABI used to generate the binding from. @@ -301,9 +302,9 @@ func (_ISolverNetBindings *ISolverNetBindingsCallerSession) FillOriginData(arg0 return _ISolverNetBindings.Contract.FillOriginData(&_ISolverNetBindings.CallOpts, arg0) } -// OrderData is a free data retrieval call binding the contract method 0x0f5c779a. +// OrderData is a free data retrieval call binding the contract method 0xcf2d2dfa. // -// Solidity: function orderData(((uint64,bytes32,uint256,bytes,(bytes32,bytes32,uint256)[]),(bytes32,uint256)[]) ) view returns() +// Solidity: function orderData((address,(uint64,bytes32,uint256,bytes,(bytes32,bytes32,uint256)[]),(bytes32,uint256)[]) ) view returns() func (_ISolverNetBindings *ISolverNetBindingsCaller) OrderData(opts *bind.CallOpts, arg0 ISolverNetOrderData) error { var out []interface{} err := _ISolverNetBindings.contract.Call(opts, &out, "orderData", arg0) @@ -316,16 +317,16 @@ func (_ISolverNetBindings *ISolverNetBindingsCaller) OrderData(opts *bind.CallOp } -// OrderData is a free data retrieval call binding the contract method 0x0f5c779a. +// OrderData is a free data retrieval call binding the contract method 0xcf2d2dfa. // -// Solidity: function orderData(((uint64,bytes32,uint256,bytes,(bytes32,bytes32,uint256)[]),(bytes32,uint256)[]) ) view returns() +// Solidity: function orderData((address,(uint64,bytes32,uint256,bytes,(bytes32,bytes32,uint256)[]),(bytes32,uint256)[]) ) view returns() func (_ISolverNetBindings *ISolverNetBindingsSession) OrderData(arg0 ISolverNetOrderData) error { return _ISolverNetBindings.Contract.OrderData(&_ISolverNetBindings.CallOpts, arg0) } -// OrderData is a free data retrieval call binding the contract method 0x0f5c779a. +// OrderData is a free data retrieval call binding the contract method 0xcf2d2dfa. // -// Solidity: function orderData(((uint64,bytes32,uint256,bytes,(bytes32,bytes32,uint256)[]),(bytes32,uint256)[]) ) view returns() +// Solidity: function orderData((address,(uint64,bytes32,uint256,bytes,(bytes32,bytes32,uint256)[]),(bytes32,uint256)[]) ) view returns() func (_ISolverNetBindings *ISolverNetBindingsCallerSession) OrderData(arg0 ISolverNetOrderData) error { return _ISolverNetBindings.Contract.OrderData(&_ISolverNetBindings.CallOpts, arg0) } diff --git a/contracts/bindings/solvernetinbox.go b/contracts/bindings/solvernetinbox.go index 46dc0efbf..5147f7120 100644 --- a/contracts/bindings/solvernetinbox.go +++ b/contracts/bindings/solvernetinbox.go @@ -78,7 +78,7 @@ type ISolverNetInboxStatusUpdate struct { // SolverNetInboxMetaData contains all meta data concerning the SolverNetInbox contract. var SolverNetInboxMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"accept\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"cancel\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"cancelOwnershipHandover\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"claim\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"completeOwnershipHandover\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"defaultConfLevel\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deployedAt\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getLatestOrderIdByStatus\",\"inputs\":[{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enumISolverNetInbox.Status\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getNextId\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOrder\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"resolved\",\"type\":\"tuple\",\"internalType\":\"structIERC7683.ResolvedCrossChainOrder\",\"components\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"originChainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"openDeadline\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"fillDeadline\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"orderId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"maxSpent\",\"type\":\"tuple[]\",\"internalType\":\"structIERC7683.Output[]\",\"components\":[{\"name\":\"token\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"recipient\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"minReceived\",\"type\":\"tuple[]\",\"internalType\":\"structIERC7683.Output[]\",\"components\":[{\"name\":\"token\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"recipient\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"fillInstructions\",\"type\":\"tuple[]\",\"internalType\":\"structIERC7683.FillInstruction[]\",\"components\":[{\"name\":\"destinationChainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"destinationSettler\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"originData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}]},{\"name\":\"state\",\"type\":\"tuple\",\"internalType\":\"structISolverNetInbox.OrderState\",\"components\":[{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enumISolverNetInbox.Status\"},{\"name\":\"acceptedBy\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"name\":\"history\",\"type\":\"tuple[]\",\"internalType\":\"structISolverNetInbox.StatusUpdate[]\",\"components\":[{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enumISolverNetInbox.Status\"},{\"name\":\"timestamp\",\"type\":\"uint40\",\"internalType\":\"uint40\"}]}],\"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\":\"markFilled\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"fillHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"omni\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIOmniPortal\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"open\",\"inputs\":[{\"name\":\"order\",\"type\":\"tuple\",\"internalType\":\"structIERC7683.OnchainCrossChainOrder\",\"components\":[{\"name\":\"fillDeadline\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"orderDataType\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"orderData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"result\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"ownershipHandoverExpiresAt\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"result\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"reject\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"reason\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"renounceRoles\",\"inputs\":[{\"name\":\"roles\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"requestOwnershipHandover\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"resolve\",\"inputs\":[{\"name\":\"order\",\"type\":\"tuple\",\"internalType\":\"structIERC7683.OnchainCrossChainOrder\",\"components\":[{\"name\":\"fillDeadline\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"orderDataType\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"orderData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIERC7683.ResolvedCrossChainOrder\",\"components\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"originChainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"openDeadline\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"fillDeadline\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"orderId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"maxSpent\",\"type\":\"tuple[]\",\"internalType\":\"structIERC7683.Output[]\",\"components\":[{\"name\":\"token\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"recipient\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"minReceived\",\"type\":\"tuple[]\",\"internalType\":\"structIERC7683.Output[]\",\"components\":[{\"name\":\"token\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"recipient\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"fillInstructions\",\"type\":\"tuple[]\",\"internalType\":\"structIERC7683.FillInstruction[]\",\"components\":[{\"name\":\"destinationChainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"destinationSettler\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"originData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"revokeRoles\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"roles\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"rolesOf\",\"inputs\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"roles\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"validate\",\"inputs\":[{\"name\":\"order\",\"type\":\"tuple\",\"internalType\":\"structIERC7683.OnchainCrossChainOrder\",\"components\":[{\"name\":\"fillDeadline\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"orderDataType\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"orderData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"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\":\"structIERC7683.Output[]\",\"components\":[{\"name\":\"token\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"recipient\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DefaultConfLevelSet\",\"inputs\":[{\"name\":\"conf\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Filled\",\"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\":\"Open\",\"inputs\":[{\"name\":\"orderId\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"resolvedOrder\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIERC7683.ResolvedCrossChainOrder\",\"components\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"originChainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"openDeadline\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"fillDeadline\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"orderId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"maxSpent\",\"type\":\"tuple[]\",\"internalType\":\"structIERC7683.Output[]\",\"components\":[{\"name\":\"token\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"recipient\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"minReceived\",\"type\":\"tuple[]\",\"internalType\":\"structIERC7683.Output[]\",\"components\":[{\"name\":\"token\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"recipient\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"fillInstructions\",\"type\":\"tuple[]\",\"internalType\":\"structIERC7683.FillInstruction[]\",\"components\":[{\"name\":\"destinationChainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"destinationSettler\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"originData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipHandoverCanceled\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipHandoverRequested\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"oldOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Rejected\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"by\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"reason\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"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\":\"DuplicateNativeDeposit\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidFillDeadline\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidNativeDeposit\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOrderData\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidOrderDataTypehash\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidRecipient\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NewOwnerIsZeroAddress\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoCallChainId\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoCallTarget\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoDepositAmount\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoDeposits\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoExpenseAmount\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoExpenseSender\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoExpenseToken\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoHandoverRequest\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotOutbox\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OrderNotAccepted\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OrderNotFilled\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OrderNotPending\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"Reentrancy\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"Unauthorized\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WrongFillHash\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WrongSourceChain\",\"inputs\":[]}]", - Bin: "0x60a06040523480156200001157600080fd5b5063ffffffff60643b1615620000975760646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156200007f575060408051601f3d908101601f191682019092526200007c9181019062000110565b60015b6200008e57436080526200009c565b6080526200009c565b436080525b620000a6620000ac565b6200012a565b63409feecd1980546001811615620000cc5763f92ee8a96000526004601cfd5b8160c01c808260011c146200010b578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6000602082840312156200012357600080fd5b5051919050565b6080516139eb6200014660003960006104b601526139eb6000f3fe6080604052600436106101b75760003560e01c80638da5cb5b116100ec578063e4725ba11161008a578063f04e283e11610064578063f04e283e146104d8578063f2fde38b146104eb578063f8c8765e146104fe578063fee81cf41461051e57600080fd5b8063e4725ba114610471578063e917a96214610491578063eae4c19f146104a457600080fd5b8063bc968326116100c6578063bc968326146103fc578063c4d252f514610411578063d9e8407c14610431578063db3ea5531461045157600080fd5b80638da5cb5b146103a357806396c144f0146103bc578063af844c9b146103dc57600080fd5b80634a4ee7b1116101595780635778472a116101335780635778472a14610319578063715018a61461034857806374eeb847146103505780637b0f383b1461038357600080fd5b80634a4ee7b1146102c7578063514e62fc146102da57806354d1f13d1461031157600080fd5b8063256929621161019557806325692962146102195780632de948071461022157806339acf9f11461026257806341b477dd1461029a57600080fd5b8063183a4f6e146101bc5780631c10893f146101d15780631cd64df4146101e4575b600080fd5b6101cf6101ca366004612c83565b610551565b005b6101cf6101df366004612cb1565b61055e565b3480156101f057600080fd5b506102046101ff366004612cb1565b610574565b60405190151581526020015b60405180910390f35b6101cf610593565b34801561022d57600080fd5b5061025461023c366004612cdd565b638b78c6d8600c908152600091909152602090205490565b604051908152602001610210565b34801561026e57600080fd5b50600054610282906001600160a01b031681565b6040516001600160a01b039091168152602001610210565b3480156102a657600080fd5b506102ba6102b5366004612d01565b6105e2565b6040516102109190612f09565b6101cf6102d5366004612cb1565b6109ff565b3480156102e657600080fd5b506102046102f5366004612cb1565b638b78c6d8600c90815260009290925260209091205416151590565b6101cf610a11565b34801561032557600080fd5b50610339610334366004612c83565b610a4d565b60405161021093929190612f54565b6101cf610de3565b34801561035c57600080fd5b5060005461037190600160a01b900460ff1681565b60405160ff9091168152602001610210565b34801561038f57600080fd5b506101cf61039e366004612fe6565b610df7565b3480156103af57600080fd5b50638b78c6d81954610282565b3480156103c857600080fd5b506101cf6103d7366004613008565b611314565b3480156103e857600080fd5b506102546103f7366004613038565b6116f3565b34801561040857600080fd5b50610254611732565b34801561041d57600080fd5b506101cf61042c366004612c83565b611741565b34801561043d57600080fd5b5061020461044c366004612d01565b611afb565b34801561045d57600080fd5b506101cf61046c366004613059565b611b0f565b34801561047d57600080fd5b506101cf61048c366004612c83565b611eb4565b6101cf61049f366004612d01565b611fc9565b3480156104b057600080fd5b506102547f000000000000000000000000000000000000000000000000000000000000000081565b6101cf6104e6366004612cdd565b612068565b6101cf6104f9366004612cdd565b6120a5565b34801561050a57600080fd5b506101cf610519366004613084565b6120cc565b34801561052a57600080fd5b50610254610539366004612cdd565b63389a75e1600c908152600091909152602090205490565b61055b3382612178565b50565b610566612184565b610570828261219f565b5050565b638b78c6d8600c90815260008390526020902054811681145b92915050565b60006202a3006001600160401b03164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b6105ea612c26565b60006105f5836121ab565b8051602082015160408201519293509091151560008161061a5783608001515161062b565b60808401515161062b9060016130f6565b6001600160401b0381111561064257610642613109565b60405190808252806020026020018201604052801561069457816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816106605790505b50905060005b84608001515181101561074b576040518060800160405280866080015183815181106106c8576106c861311f565b6020026020010151600001518152602001866080015183815181106106ef576106ef61311f565b6020908102919091018101516040015182526003549101906001600160a01b0316815260200186600001516001600160401b03168152508282815181106107385761073861311f565b602090810291909101015260010161069a565b5081156107b357604080516080810182526000815285820151602082015260035490918201906001600160a01b0316815260200185600001516001600160401b031681525081856080015151815181106107a7576107a761311f565b60200260200101819052505b600083516001600160401b038111156107ce576107ce613109565b60405190808252806020026020018201604052801561082057816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816107ec5790505b50905060005b84518110156108b257604051806080016040528086838151811061084c5761084c61311f565b602002602001015160000151815260200186838151811061086f5761086f61311f565b60200260200101516020015181526020016000801b81526020014681525082828151811061089f5761089f61311f565b6020908102919091010152600101610826565b50604080516001808252818301909252600091816020015b604080516060808201835260008083526020830152918101919091528152602001906001900390816108ca57905050604080516060810190915287516001600160401b031681526003549192509060208201906001600160a01b031681526020016040518060400160405280466001600160401b03168152602001898152506040516020016109599190613135565b6040516020818303038152906040528152508160008151811061097e5761097e61311f565b6020026020010181905250604051806101000160405280336001600160a01b031681526020014681526020014263ffffffff1681526020018a60000160208101906109c991906131f4565b63ffffffff1681526020016109dc612434565b815260200184815260200183815260200182815250975050505050505050919050565b610a07612184565b6105708282612178565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b610a55612c26565b604080518082018252600080825260208083018290528582526004808252848320600583528584206006845286852087516101008101895283546001600160a01b03168152600184015481870152600284015463ffffffff808216838c0152640100000000909104166060808301919091526003850154608083015294840180548a5181890281018901909b52808b52989995989497939692959194889460a087019484015b82821015610b55578382906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820154815260200160038201548152505081526020019060010190610afb565b50505050815260200160058201805480602002602001604051908101604052809291908181526020016000905b82821015610bdc578382906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820154815260200160038201548152505081526020019060010190610b82565b50505050815260200160068201805480602002602001604051908101604052809291908181526020016000905b82821015610ced576000848152602090819020604080516060810182526003860290920180546001600160401b0316835260018101549383019390935260028301805492939291840191610c5c9061321a565b80601f0160208091040260200160405190810160405280929190818152602001828054610c889061321a565b8015610cd55780601f10610caa57610100808354040283529160200191610cd5565b820191906000526020600020905b815481529060010190602001808311610cb857829003601f168201915b50505050508152505081526020019060010190610c09565b50505091525050604080518082019091528354919450908390829060ff166006811115610d1c57610d1c612f1c565b6006811115610d2d57610d2d612f1c565b8152905461010090046001600160a01b031660209182015282546040805182840281018401909152818152929450839160009084015b82821015610dd057600084815260209020604080518082019091529083018054829060ff166006811115610d9957610d99612f1c565b6006811115610daa57610daa612f1c565b81529054610100900464ffffffffff166020918201529082526001929092019101610d63565b5050505090509250925092509193909250565b610deb612184565b610df5600061244a565b565b60005460408051631799380760e11b815281516001600160a01b0390931692632f32700e926004808401939192918290030181865afa158015610e3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e629190613305565b8051600180546020909301516001600160a01b0316600160401b026001600160e01b03199093166001600160401b039092169190911791909117905568929eee149b4bd2126854309003610ebe5763ab143c066000526004601cfd5b3068929eee149b4bd2126855600082815260046020818152604080842081516101008101835281546001600160a01b03168152600182015481850152600282015463ffffffff80821683860152640100000000909104166060820152600382015460808201529381018054835181860281018601909452808452919360a08601939290879084015b82821015610fa0578382906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820154815260200160038201548152505081526020019060010190610f46565b50505050815260200160058201805480602002602001604051908101604052809291908181526020016000905b82821015611027578382906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820154815260200160038201548152505081526020019060010190610fcd565b50505050815260200160068201805480602002602001604051908101604052809291908181526020016000905b82821015611138576000848152602090819020604080516060810182526003860290920180546001600160401b03168352600181015493830193909352600283018054929392918401916110a79061321a565b80601f01602080910402602001604051908101604052809291908181526020018280546110d39061321a565b80156111205780601f106110f557610100808354040283529160200191611120565b820191906000526020600020905b81548152906001019060200180831161110357829003601f168201915b50505050508152505081526020019060010190611054565b50505091525050600084815260056020526040808220815180830190925280549394509192909190829060ff16600681111561117657611176612f1c565b600681111561118757611187612f1c565b8152905461010090046001600160a01b031660209091015290506002815160068111156111b6576111b6612f1c565b146111d457604051631ac6e42d60e21b815260040160405180910390fd5b600354600154600160401b90046001600160a01b0390811691161461120c5760405163bda8fc9560e01b815260040160405180910390fd5b8160e001516000815181106112235761122361311f565b6020908102919091010151516001546001600160401b0390811691161461125d57604051633687f39960e21b815260040160405180910390fd5b611289848360e001516000815181106112785761127861311f565b602002602001015160400151612488565b83146112a857604051631f53eaed60e21b815260040160405180910390fd5b600581526112b684826124bb565b80602001516001600160a01b031683857fa7e64de5f8345186f3a39d8f0664d7d6b534e35ca818dbfb1465bb12f80562fc60405160405180910390a450503868929eee149b4bd21268555050600180546001600160e01b0319169055565b3068929eee149b4bd2126854036113335763ab143c066000526004601cfd5b3068929eee149b4bd2126855600082815260046020818152604080842081516101008101835281546001600160a01b03168152600182015481850152600282015463ffffffff80821683860152640100000000909104166060820152600382015460808201529381018054835181860281018601909452808452919360a08601939290879084015b828210156114155783829060005260206000209060040201604051806080016040529081600082015481526020016001820154815260200160028201548152602001600382015481525050815260200190600101906113bb565b50505050815260200160058201805480602002602001604051908101604052809291908181526020016000905b8282101561149c578382906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820154815260200160038201548152505081526020019060010190611442565b50505050815260200160068201805480602002602001604051908101604052809291908181526020016000905b828210156115ad576000848152602090819020604080516060810182526003860290920180546001600160401b031683526001810154938301939093526002830180549293929184019161151c9061321a565b80601f01602080910402602001604051908101604052809291908181526020018280546115489061321a565b80156115955780601f1061156a57610100808354040283529160200191611595565b820191906000526020600020905b81548152906001019060200180831161157857829003601f168201915b505050505081525050815260200190600101906114c9565b50505091525050600084815260056020526040808220815180830190925280549394509192909190829060ff1660068111156115eb576115eb612f1c565b60068111156115fc576115fc612f1c565b8152905461010090046001600160a01b0316602090910152905060058151600681111561162b5761162b612f1c565b146116495760405163789bae3560e01b815260040160405180910390fd5b60208101516001600160a01b03163314611675576040516282b42960e81b815260040160405180910390fd5b6006815261168384826124bb565b611691838360c001516125f7565b826001600160a01b0316336001600160a01b0316857f5ae74a16c0fd0f3e7623ae06502b7778a38c1da581f44c9ea5ce10994f2a5fcb8560c001516040516116d99190613346565b60405180910390a450503868929eee149b4bd21268555050565b60006007600083600681111561170b5761170b612f1c565b600681111561171c5761171c612f1c565b8152602001908152602001600020549050919050565b600061173c612434565b905090565b3068929eee149b4bd2126854036117605763ab143c066000526004601cfd5b3068929eee149b4bd2126855600081815260046020818152604080842081516101008101835281546001600160a01b03168152600182015481850152600282015463ffffffff80821683860152640100000000909104166060820152600382015460808201529381018054835181860281018601909452808452919360a08601939290879084015b828210156118425783829060005260206000209060040201604051806080016040529081600082015481526020016001820154815260200160028201548152602001600382015481525050815260200190600101906117e8565b50505050815260200160058201805480602002602001604051908101604052809291908181526020016000905b828210156118c957838290600052602060002090600402016040518060800160405290816000820154815260200160018201548152602001600282015481526020016003820154815250508152602001906001019061186f565b50505050815260200160068201805480602002602001604051908101604052809291908181526020016000905b828210156119da576000848152602090819020604080516060810182526003860290920180546001600160401b03168352600181015493830193909352600283018054929392918401916119499061321a565b80601f01602080910402602001604051908101604052809291908181526020018280546119759061321a565b80156119c25780601f10611997576101008083540402835291602001916119c2565b820191906000526020600020905b8154815290600101906020018083116119a557829003601f168201915b505050505081525050815260200190600101906118f6565b50505091525050600083815260056020526040808220815180830190925280549394509192909190829060ff166006811115611a1857611a18612f1c565b6006811115611a2957611a29612f1c565b8152905461010090046001600160a01b03166020909101529050600181516006811115611a5857611a58612f1c565b14611a7657604051635d12a4a360e11b815260040160405180910390fd5b81516001600160a01b03163314611a9f576040516282b42960e81b815260040160405180910390fd5b60048152611aad83826124bb565b611abf82600001518360c001516125f7565b60405183907fb66b13449e4bb2c30749a37f3081f1988fcee5ff5d98ce740b354d4e2d94409590600090a250503868929eee149b4bd212685550565b6000611b06826121ab565b50600192915050565b6001611b1a8161269d565b3068929eee149b4bd212685403611b395763ab143c066000526004601cfd5b3068929eee149b4bd2126855600083815260046020818152604080842081516101008101835281546001600160a01b03168152600182015481850152600282015463ffffffff80821683860152640100000000909104166060820152600382015460808201529381018054835181860281018601909452808452919360a08601939290879084015b82821015611c1b578382906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820154815260200160038201548152505081526020019060010190611bc1565b50505050815260200160058201805480602002602001604051908101604052809291908181526020016000905b82821015611ca2578382906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820154815260200160038201548152505081526020019060010190611c48565b50505050815260200160068201805480602002602001604051908101604052809291908181526020016000905b82821015611db3576000848152602090819020604080516060810182526003860290920180546001600160401b0316835260018101549383019390935260028301805492939291840191611d229061321a565b80601f0160208091040260200160405190810160405280929190818152602001828054611d4e9061321a565b8015611d9b5780601f10611d7057610100808354040283529160200191611d9b565b820191906000526020600020905b815481529060010190602001808311611d7e57829003601f168201915b50505050508152505081526020019060010190611ccf565b50505091525050600085815260056020526040808220815180830190925280549394509192909190829060ff166006811115611df157611df1612f1c565b6006811115611e0257611e02612f1c565b8152905461010090046001600160a01b03166020909101529050600181516006811115611e3157611e31612f1c565b14611e4f57604051635d12a4a360e11b815260040160405180910390fd5b60038152611e5d85826124bb565b611e6f82600001518360c001516125f7565b60405160ff851690339087907f21f84ee3a6e9bc7c10f855f8c9829e22c613861cef10add09eccdbc88df9f59f90600090a450503868929eee149b4bd2126855505050565b6001611ebf8161269d565b3068929eee149b4bd212685403611ede5763ab143c066000526004601cfd5b3068929eee149b4bd212685560008281526005602052604080822081518083019092528054829060ff166006811115611f1957611f19612f1c565b6006811115611f2a57611f2a612f1c565b8152905461010090046001600160a01b03166020909101529050600181516006811115611f5957611f59612f1c565b14611f7757604051635d12a4a360e11b815260040160405180910390fd5b60028152336020820152611f8b83826124bb565b604051339084907f9deed34441ca75bb2dbbe101d2201930f40e18a9ce521c77fbdca6690a89996790600090a3503868929eee149b4bd21268555050565b3068929eee149b4bd212685403611fe85763ab143c066000526004601cfd5b3068929eee149b4bd21268556000611fff826121ab565b905061200e81602001516126c3565b6000612019836127b9565b905080600301547fa576d0af275d0c6207ef43ceee8c498a5d7a26b8157a32d3fdf361e64371628c8260405161204f91906134e3565b60405180910390a250503868929eee149b4bd212685550565b612070612184565b63389a75e1600c52806000526020600c20805442111561209857636f5e88186000526004601cfd5b6000905561055b8161244a565b6120ad612184565b8060601b6120c357637448fbae6000526004601cfd5b61055b8161244a565b63409feecd1980546003825580156121035760018160011c14303b106120fa5763f92ee8a96000526004601cfd5b818160ff1b1b91505b5061210d85612a09565b61211884600161219f565b61212183612a45565b600380546001600160a01b0319166001600160a01b0384161790558015612171576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b5050505050565b61057082826000612ae8565b638b78c6d819543314610df5576382b429006000526004601cfd5b61057082826001612ae8565b6040805160e08101825260009181018281526060808301849052608083019390935260a0820183905260c0820183905281526020810191909152426121f360208401846131f4565b63ffffffff1610156122185760405163582e388960e01b815260040160405180910390fd5b7fe5be6bd381a38cd250f9aa1a05935cbcd261fe0e77e9ef6f6d07bf3b7e5d22e282602001351461225c57604051632b76841b60e21b815260040160405180910390fd5b612269604083018361358f565b905060000361228b5760405163a342e7d960e01b815260040160405180910390fd5b600061229a604084018461358f565b8101906122a79190613715565b80516020820151815192935090916001600160401b03166000036122de57604051632400ced560e01b815260040160405180910390fd5b6020820151612300576040516357949a6b60e11b815260040160405180910390fd5b805160000361232257604051630558800760e21b815260040160405180910390fd5b6000805b82518110156123a55760008382815181106123435761234361311f565b6020026020010151905080602001516000036123725760405163c692c2e760e01b815260040160405180910390fd5b805161239c5782156123975760405163c28b268960e01b815260040160405180910390fd5b600192505b50600101612326565b5060005b836080015151811015612429576000846080015182815181106123ce576123ce61311f565b602090810291909101015180519091506123fb576040516342f0bd3560e11b815260040160405180910390fd5b806040015160000361242057604051631af6706f60e01b815260040160405180910390fd5b506001016123a9565b509295945050505050565b6000600254600161244591906130f6565b919050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b6000828260405160200161249d92919061386c565b60405160208183030381529060405280519060200120905092915050565b60008281526005602052604090208151815483929190829060ff191660018360068111156124eb576124eb612f1c565b021790555060209182015181546001600160a01b0390911661010002610100600160a81b0319909116179055600083815260069182905260409081902081518083019092528351909282919081111561254657612546612f1c565b815264ffffffffff4216602091820152825460018181018555600094855291909320825193018054929390929091839160ff19169083600681111561258d5761258d612f1c565b021790555060209190910151815464ffffffffff9091166101000265ffffffffff00199091161790558051829060079060009060068111156125d1576125d1612f1c565b60068111156125e2576125e2612f1c565b81526020810191909152604001600020555050565b6001600160a01b03821661261e57604051634e46966960e11b815260040160405180910390fd5b60005b815181101561269857600082828151811061263e5761263e61311f565b6020908102919091010151805190915061267057602081015161266b906001600160a01b03861690612b41565b61268f565b8051602082015161268d906001600160a01b038316908790612b5d565b505b50600101612621565b505050565b638b78c6d8600c5233600052806020600c20541661055b576382b429006000526004601cfd5b3415156000805b835181101561278f5760008482815181106126e7576126e761311f565b6020908102919091010151805190915061276557836127195760405163036f810f60e41b815260040160405180910390fd5b3481602001511461273d5760405163036f810f60e41b815260040160405180910390fd5b821561275c5760405163c28b268960e01b815260040160405180910390fd5b60019250612786565b80516020820151612784906001600160a01b0383169033903090612bad565b505b506001016126ca565b5081801561279b575080155b156126985760405163036f810f60e41b815260040160405180910390fd5b6000806127c5836105e2565b905060006127d1612c0b565b6000818152600460209081526040808320865181546001600160a01b039091166001600160a01b0319909116178155918601516001830155850151600282018054606088015163ffffffff9081166401000000000267ffffffffffffffff199092169316929092179190911790556003810183905594509091505b8260a00151518110156128be57836004018360a0015182815181106128735761287361311f565b6020908102919091018101518254600181810185556000948552938390208251600490920201908155918101518284015560408101516002830155606001516003909101550161284c565b5060005b8260c001515181101561293457836005018360c0015182815181106128e9576128e961311f565b602090810291909101810151825460018181018555600094855293839020825160049092020190815591810151828401556040810151600283015560600151600390910155016128c2565b5060005b8260e00151518110156129d057836006018360e00151828151811061295f5761295f61311f565b6020908102919091018101518254600180820185556000948552938390208251600390920201805467ffffffffffffffff19166001600160401b039092169190911781559181015192820192909255604082015160028201906129c290826138dd565b505050806001019050612938565b50612a02816040518060400160405280600160068111156129f3576129f3612f1c565b815260006020909101526124bb565b5050919050565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b6001600160a01b038116612a945760405162461bcd60e51b8152602060048201526012602482015271584170703a206e6f207a65726f206f6d6e6960701b604482015260640160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f79162c8d053a07e70cdc1ccc536f0440b571f8508377d2bef51094fadab98f479060200160405180910390a150565b638b78c6d8600c52826000526020600c20805483811783612b0a575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26600080a3505050505050565b60003860003884865af16105705763b12d13eb6000526004601cfd5b816014528060345263a9059cbb60601b60005260206000604460106000875af18060016000511416612ba257803d853b151710612ba2576390b8ec186000526004601cfd5b506000603452505050565b60405181606052826040528360601b602c526323b872dd60601b600c52602060006064601c6000895af18060016000511416612bfc57803d873b151710612bfc57637939f4246000526004601cfd5b50600060605260405250505050565b6000600260008154612c1c9061399c565b9182905550919050565b60405180610100016040528060006001600160a01b0316815260200160008152602001600063ffffffff168152602001600063ffffffff168152602001600080191681526020016060815260200160608152602001606081525090565b600060208284031215612c9557600080fd5b5035919050565b6001600160a01b038116811461055b57600080fd5b60008060408385031215612cc457600080fd5b8235612ccf81612c9c565b946020939093013593505050565b600060208284031215612cef57600080fd5b8135612cfa81612c9c565b9392505050565b600060208284031215612d1357600080fd5b81356001600160401b03811115612d2957600080fd5b820160608185031215612cfa57600080fd5b60008151808452602080850194506020840160005b83811015612d8e5781518051885260208082015190890152604080820151908901526060908101519088015260808701965090820190600101612d50565b509495945050505050565b6000815180845260005b81811015612dbf57602081850181015186830182015201612da3565b506000602082860101526020601f19601f83011685010191505092915050565b600082825180855260208086019550808260051b84010181860160005b84811015612e5357858303601f19018952815180516001600160401b031684528481015185850152604090810151606091850182905290612e3f81860183612d99565b9a86019a9450505090830190600101612dfc565b5090979650505050505050565b600061010060018060a01b038351168452602083015160208501526040830151612e92604086018263ffffffff169052565b506060830151612eaa606086018263ffffffff169052565b506080830151608085015260a08301518160a0860152612ecc82860182612d3b565b91505060c083015184820360c0860152612ee68282612d3b565b91505060e083015184820360e0860152612f008282612ddf565b95945050505050565b602081526000612cfa6020830184612e60565b634e487b7160e01b600052602160045260246000fd5b60078110612f5057634e487b7160e01b600052602160045260246000fd5b9052565b608081526000612f676080830186612e60565b6020612f768185018751612f32565b858101516001600160a01b031660408581019190915284830360608601528551808452868301938301919060005b81811015612fd7578551612fb9858251612f32565b85015164ffffffffff16848601529484019492820192600101612fa4565b50919998505050505050505050565b60008060408385031215612ff957600080fd5b50508035926020909101359150565b6000806040838503121561301b57600080fd5b82359150602083013561302d81612c9c565b809150509250929050565b60006020828403121561304a57600080fd5b813560078110612cfa57600080fd5b6000806040838503121561306c57600080fd5b82359150602083013560ff8116811461302d57600080fd5b6000806000806080858703121561309a57600080fd5b84356130a581612c9c565b935060208501356130b581612c9c565b925060408501356130c581612c9c565b915060608501356130d581612c9c565b939692955090935050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561058d5761058d6130e0565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000602080835260606001600160401b038086511683860152828601516040806040880152828251166060880152848201516080880152604082015160a08801526060820151925060a060c0880152613192610100880184612d99565b60809290920151878303605f190160e0890152805180845290860193506000928601905b808410156131e7578451805183528781015188840152830151838301529386019360019390930192908501906131b6565b5098975050505050505050565b60006020828403121561320657600080fd5b813563ffffffff81168114612cfa57600080fd5b600181811c9082168061322e57607f821691505b60208210810361324e57634e487b7160e01b600052602260045260246000fd5b50919050565b604080519081016001600160401b038111828210171561327657613276613109565b60405290565b604051606081016001600160401b038111828210171561327657613276613109565b60405160a081016001600160401b038111828210171561327657613276613109565b604051601f8201601f191681016001600160401b03811182821017156132e8576132e8613109565b604052919050565b6001600160401b038116811461055b57600080fd5b60006040828403121561331757600080fd5b61331f613254565b825161332a816132f0565b8152602083015161333a81612c9c565b60208201529392505050565b6020808252825182820181905260009190848201906040850190845b818110156133a05783518051845260208082015190850152604080820151908501526060908101519084015260808301938501939250600101613362565b50909695505050505050565b600081548084526020808501945083600052602060002060005b83811015612d8e5781548752600180830154848901526002830154604089015260038301546060890152608090970196600490920191016133c6565b6000828254808552602080860195506005818360051b8501016000878152838120815b86811015612fd757601f19888503018b5260606001600160401b03835416855260018084015488870152600284018260408801528581546134658161321a565b9489018590526080948185168015613484576001811461349d576134c8565b60ff1983168b8801528115158c1b8b01870193506134c8565b848a528c8a208a5b838110156134c05781548d82018a0152908701908e016134a5565b8c0188019450505b5050509d89019d965050506003929092019150600101613425565b6020815261350c602082016134ff84546001600160a01b031690565b6001600160a01b03169052565b60018201546040820152600282015463ffffffff808216606084015260209190911c166080820152600382015460a082015261010060c0820181905260009061355c6101208401600486016133ac565b601f19808583030160e086015261357682600588016133ac565b915080858303018386015250612f008160068701613402565b6000808335601e198436030181126135a657600080fd5b8301803591506001600160401b038211156135c057600080fd5b6020019150368190038213156135d557600080fd5b9250929050565b60006001600160401b038211156135f5576135f5613109565b5060051b60200190565b600082601f83011261361057600080fd5b81356020613625613620836135dc565b6132c0565b8281526060928302850182019282820191908785111561364457600080fd5b8387015b85811015612e535781818a0312156136605760008081fd5b61366861327c565b813581528582013586820152604080830135908201528452928401928101613648565b600082601f83011261369c57600080fd5b813560206136ac613620836135dc565b82815260069290921b840181019181810190868411156136cb57600080fd5b8286015b8481101561370a57604081890312156136e85760008081fd5b6136f0613254565b8135815284820135858201528352918301916040016136cf565b509695505050505050565b6000602080838503121561372857600080fd5b82356001600160401b038082111561373f57600080fd5b908401906040828703121561375357600080fd5b61375b613254565b82358281111561376a57600080fd5b830160a0818903121561377c57600080fd5b61378461329e565b813561378f816132f0565b81528186013586820152604080830135908201526060820135848111156137b557600080fd5b8201601f81018a136137c657600080fd5b8035858111156137d8576137d8613109565b6137ea601f8201601f191689016132c0565b8181528b898385010111156137fe57600080fd5b818984018a830137600089838301015280606085015250505060808201358481111561382957600080fd5b6138358a8285016135ff565b608083015250825250828401358281111561384f57600080fd5b61385b8882860161368b565b948201949094529695505050505050565b8281526040602082015260006138856040830184612d99565b949350505050565b601f821115612698576000816000526020600020601f850160051c810160208610156138b65750805b601f850160051c820191505b818110156138d5578281556001016138c2565b505050505050565b81516001600160401b038111156138f6576138f6613109565b61390a81613904845461321a565b8461388d565b602080601f83116001811461393f57600084156139275750858301515b600019600386901b1c1916600185901b1785556138d5565b600085815260208120601f198616915b8281101561396e5788860151825594840194600190910190840161394f565b508582101561398c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000600182016139ae576139ae6130e0565b506001019056fea264697066735822122074f24e3516202b4f8ee5e3f131ddcd6fafc93a74be77d645c6ba41d8f95e5b9964736f6c63430008180033", + Bin: "0x60a06040523480156200001157600080fd5b5063ffffffff60643b1615620000975760646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156200007f575060408051601f3d908101601f191682019092526200007c9181019062000110565b60015b6200008e57436080526200009c565b6080526200009c565b436080525b620000a6620000ac565b6200012a565b63409feecd1980546001811615620000cc5763f92ee8a96000526004601cfd5b8160c01c808260011c146200010b578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6000602082840312156200012357600080fd5b5051919050565b608051613a526200014660003960006104b60152613a526000f3fe6080604052600436106101b75760003560e01c80638da5cb5b116100ec578063e4725ba11161008a578063f04e283e11610064578063f04e283e146104d8578063f2fde38b146104eb578063f8c8765e146104fe578063fee81cf41461051e57600080fd5b8063e4725ba114610471578063e917a96214610491578063eae4c19f146104a457600080fd5b8063bc968326116100c6578063bc968326146103fc578063c4d252f514610411578063d9e8407c14610431578063db3ea5531461045157600080fd5b80638da5cb5b146103a357806396c144f0146103bc578063af844c9b146103dc57600080fd5b80634a4ee7b1116101595780635778472a116101335780635778472a14610319578063715018a61461034857806374eeb847146103505780637b0f383b1461038357600080fd5b80634a4ee7b1146102c7578063514e62fc146102da57806354d1f13d1461031157600080fd5b8063256929621161019557806325692962146102195780632de948071461022157806339acf9f11461026257806341b477dd1461029a57600080fd5b8063183a4f6e146101bc5780631c10893f146101d15780631cd64df4146101e4575b600080fd5b6101cf6101ca366004612cd6565b610551565b005b6101cf6101df366004612d04565b61055e565b3480156101f057600080fd5b506102046101ff366004612d04565b610574565b60405190151581526020015b60405180910390f35b6101cf610593565b34801561022d57600080fd5b5061025461023c366004612d30565b638b78c6d8600c908152600091909152602090205490565b604051908152602001610210565b34801561026e57600080fd5b50600054610282906001600160a01b031681565b6040516001600160a01b039091168152602001610210565b3480156102a657600080fd5b506102ba6102b5366004612d54565b6105e2565b6040516102109190612f5c565b6101cf6102d5366004612d04565b610a1b565b3480156102e657600080fd5b506102046102f5366004612d04565b638b78c6d8600c90815260009290925260209091205416151590565b6101cf610a2d565b34801561032557600080fd5b50610339610334366004612cd6565b610a69565b60405161021093929190612fa7565b6101cf610dff565b34801561035c57600080fd5b5060005461037190600160a01b900460ff1681565b60405160ff9091168152602001610210565b34801561038f57600080fd5b506101cf61039e366004613039565b610e13565b3480156103af57600080fd5b50638b78c6d81954610282565b3480156103c857600080fd5b506101cf6103d736600461305b565b611330565b3480156103e857600080fd5b506102546103f736600461308b565b61170f565b34801561040857600080fd5b5061025461174e565b34801561041d57600080fd5b506101cf61042c366004612cd6565b61175d565b34801561043d57600080fd5b5061020461044c366004612d54565b611b17565b34801561045d57600080fd5b506101cf61046c3660046130ac565b611b2b565b34801561047d57600080fd5b506101cf61048c366004612cd6565b611ed0565b6101cf61049f366004612d54565b611fe5565b3480156104b057600080fd5b506102547f000000000000000000000000000000000000000000000000000000000000000081565b6101cf6104e6366004612d30565b612084565b6101cf6104f9366004612d30565b6120c1565b34801561050a57600080fd5b506101cf6105193660046130d7565b6120e8565b34801561052a57600080fd5b50610254610539366004612d30565b63389a75e1600c908152600091909152602090205490565b61055b3382612194565b50565b6105666121a0565b61057082826121bb565b5050565b638b78c6d8600c90815260008390526020902054811681145b92915050565b60006202a3006001600160401b03164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b6105ea612c13565b60006105f5836121c7565b6020810151604080830151908201519293509091151560008161061d5783608001515161062e565b60808401515161062e906001613149565b6001600160401b038111156106455761064561315c565b60405190808252806020026020018201604052801561069757816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816106635790505b50905060005b84608001515181101561074e576040518060800160405280866080015183815181106106cb576106cb613172565b6020026020010151600001518152602001866080015183815181106106f2576106f2613172565b6020908102919091018101516040015182526003549101906001600160a01b0316815260200186600001516001600160401b031681525082828151811061073b5761073b613172565b602090810291909101015260010161069d565b5081156107b657604080516080810182526000815285820151602082015260035490918201906001600160a01b0316815260200185600001516001600160401b031681525081856080015151815181106107aa576107aa613172565b60200260200101819052505b600083516001600160401b038111156107d1576107d161315c565b60405190808252806020026020018201604052801561082357816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816107ef5790505b50905060005b84518110156108b557604051806080016040528086838151811061084f5761084f613172565b602002602001015160000151815260200186838151811061087257610872613172565b60200260200101516020015181526020016000801b8152602001468152508282815181106108a2576108a2613172565b6020908102919091010152600101610829565b50604080516001808252818301909252600091816020015b604080516060808201835260008083526020830152918101919091528152602001906001900390816108cd57905050604080516060810190915287516001600160401b031681526003549192509060208201906001600160a01b031681526020016040518060400160405280466001600160401b031681526020018981525060405160200161095c9190613188565b6040516020818303038152906040528152508160008151811061098157610981613172565b6020908102919091010152604080516101008101909152875181906001600160a01b03166109af57336109b2565b88515b6001600160a01b031681526020014681526020014263ffffffff1681526020018a60000160208101906109e59190613247565b63ffffffff1681526020016109f8612421565b815260200184815260200183815260200182815250975050505050505050919050565b610a236121a0565b6105708282612194565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b610a71612c13565b604080518082018252600080825260208083018290528582526004808252848320600583528584206006845286852087516101008101895283546001600160a01b03168152600184015481870152600284015463ffffffff808216838c0152640100000000909104166060808301919091526003850154608083015294840180548a5181890281018901909b52808b52989995989497939692959194889460a087019484015b82821015610b71578382906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820154815260200160038201548152505081526020019060010190610b17565b50505050815260200160058201805480602002602001604051908101604052809291908181526020016000905b82821015610bf8578382906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820154815260200160038201548152505081526020019060010190610b9e565b50505050815260200160068201805480602002602001604051908101604052809291908181526020016000905b82821015610d09576000848152602090819020604080516060810182526003860290920180546001600160401b0316835260018101549383019390935260028301805492939291840191610c789061326d565b80601f0160208091040260200160405190810160405280929190818152602001828054610ca49061326d565b8015610cf15780601f10610cc657610100808354040283529160200191610cf1565b820191906000526020600020905b815481529060010190602001808311610cd457829003601f168201915b50505050508152505081526020019060010190610c25565b50505091525050604080518082019091528354919450908390829060ff166006811115610d3857610d38612f6f565b6006811115610d4957610d49612f6f565b8152905461010090046001600160a01b031660209182015282546040805182840281018401909152818152929450839160009084015b82821015610dec57600084815260209020604080518082019091529083018054829060ff166006811115610db557610db5612f6f565b6006811115610dc657610dc6612f6f565b81529054610100900464ffffffffff166020918201529082526001929092019101610d7f565b5050505090509250925092509193909250565b610e076121a0565b610e116000612437565b565b60005460408051631799380760e11b815281516001600160a01b0390931692632f32700e926004808401939192918290030181865afa158015610e5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7e9190613358565b8051600180546020909301516001600160a01b0316600160401b026001600160e01b03199093166001600160401b039092169190911791909117905568929eee149b4bd2126854309003610eda5763ab143c066000526004601cfd5b3068929eee149b4bd2126855600082815260046020818152604080842081516101008101835281546001600160a01b03168152600182015481850152600282015463ffffffff80821683860152640100000000909104166060820152600382015460808201529381018054835181860281018601909452808452919360a08601939290879084015b82821015610fbc578382906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820154815260200160038201548152505081526020019060010190610f62565b50505050815260200160058201805480602002602001604051908101604052809291908181526020016000905b82821015611043578382906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820154815260200160038201548152505081526020019060010190610fe9565b50505050815260200160068201805480602002602001604051908101604052809291908181526020016000905b82821015611154576000848152602090819020604080516060810182526003860290920180546001600160401b03168352600181015493830193909352600283018054929392918401916110c39061326d565b80601f01602080910402602001604051908101604052809291908181526020018280546110ef9061326d565b801561113c5780601f106111115761010080835404028352916020019161113c565b820191906000526020600020905b81548152906001019060200180831161111f57829003601f168201915b50505050508152505081526020019060010190611070565b50505091525050600084815260056020526040808220815180830190925280549394509192909190829060ff16600681111561119257611192612f6f565b60068111156111a3576111a3612f6f565b8152905461010090046001600160a01b031660209091015290506002815160068111156111d2576111d2612f6f565b146111f057604051631ac6e42d60e21b815260040160405180910390fd5b600354600154600160401b90046001600160a01b039081169116146112285760405163bda8fc9560e01b815260040160405180910390fd5b8160e0015160008151811061123f5761123f613172565b6020908102919091010151516001546001600160401b0390811691161461127957604051633687f39960e21b815260040160405180910390fd5b6112a5848360e0015160008151811061129457611294613172565b602002602001015160400151612475565b83146112c457604051631f53eaed60e21b815260040160405180910390fd5b600581526112d284826124a8565b80602001516001600160a01b031683857fa7e64de5f8345186f3a39d8f0664d7d6b534e35ca818dbfb1465bb12f80562fc60405160405180910390a450503868929eee149b4bd21268555050600180546001600160e01b0319169055565b3068929eee149b4bd21268540361134f5763ab143c066000526004601cfd5b3068929eee149b4bd2126855600082815260046020818152604080842081516101008101835281546001600160a01b03168152600182015481850152600282015463ffffffff80821683860152640100000000909104166060820152600382015460808201529381018054835181860281018601909452808452919360a08601939290879084015b828210156114315783829060005260206000209060040201604051806080016040529081600082015481526020016001820154815260200160028201548152602001600382015481525050815260200190600101906113d7565b50505050815260200160058201805480602002602001604051908101604052809291908181526020016000905b828210156114b857838290600052602060002090600402016040518060800160405290816000820154815260200160018201548152602001600282015481526020016003820154815250508152602001906001019061145e565b50505050815260200160068201805480602002602001604051908101604052809291908181526020016000905b828210156115c9576000848152602090819020604080516060810182526003860290920180546001600160401b03168352600181015493830193909352600283018054929392918401916115389061326d565b80601f01602080910402602001604051908101604052809291908181526020018280546115649061326d565b80156115b15780601f10611586576101008083540402835291602001916115b1565b820191906000526020600020905b81548152906001019060200180831161159457829003601f168201915b505050505081525050815260200190600101906114e5565b50505091525050600084815260056020526040808220815180830190925280549394509192909190829060ff16600681111561160757611607612f6f565b600681111561161857611618612f6f565b8152905461010090046001600160a01b0316602090910152905060058151600681111561164757611647612f6f565b146116655760405163789bae3560e01b815260040160405180910390fd5b60208101516001600160a01b03163314611691576040516282b42960e81b815260040160405180910390fd5b6006815261169f84826124a8565b6116ad838360c001516125e4565b826001600160a01b0316336001600160a01b0316857f5ae74a16c0fd0f3e7623ae06502b7778a38c1da581f44c9ea5ce10994f2a5fcb8560c001516040516116f59190613399565b60405180910390a450503868929eee149b4bd21268555050565b60006007600083600681111561172757611727612f6f565b600681111561173857611738612f6f565b8152602001908152602001600020549050919050565b6000611758612421565b905090565b3068929eee149b4bd21268540361177c5763ab143c066000526004601cfd5b3068929eee149b4bd2126855600081815260046020818152604080842081516101008101835281546001600160a01b03168152600182015481850152600282015463ffffffff80821683860152640100000000909104166060820152600382015460808201529381018054835181860281018601909452808452919360a08601939290879084015b8282101561185e578382906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820154815260200160038201548152505081526020019060010190611804565b50505050815260200160058201805480602002602001604051908101604052809291908181526020016000905b828210156118e557838290600052602060002090600402016040518060800160405290816000820154815260200160018201548152602001600282015481526020016003820154815250508152602001906001019061188b565b50505050815260200160068201805480602002602001604051908101604052809291908181526020016000905b828210156119f6576000848152602090819020604080516060810182526003860290920180546001600160401b03168352600181015493830193909352600283018054929392918401916119659061326d565b80601f01602080910402602001604051908101604052809291908181526020018280546119919061326d565b80156119de5780601f106119b3576101008083540402835291602001916119de565b820191906000526020600020905b8154815290600101906020018083116119c157829003601f168201915b50505050508152505081526020019060010190611912565b50505091525050600083815260056020526040808220815180830190925280549394509192909190829060ff166006811115611a3457611a34612f6f565b6006811115611a4557611a45612f6f565b8152905461010090046001600160a01b03166020909101529050600181516006811115611a7457611a74612f6f565b14611a9257604051635d12a4a360e11b815260040160405180910390fd5b81516001600160a01b03163314611abb576040516282b42960e81b815260040160405180910390fd5b60048152611ac983826124a8565b611adb82600001518360c001516125e4565b60405183907fb66b13449e4bb2c30749a37f3081f1988fcee5ff5d98ce740b354d4e2d94409590600090a250503868929eee149b4bd212685550565b6000611b22826121c7565b50600192915050565b6001611b368161268a565b3068929eee149b4bd212685403611b555763ab143c066000526004601cfd5b3068929eee149b4bd2126855600083815260046020818152604080842081516101008101835281546001600160a01b03168152600182015481850152600282015463ffffffff80821683860152640100000000909104166060820152600382015460808201529381018054835181860281018601909452808452919360a08601939290879084015b82821015611c37578382906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820154815260200160038201548152505081526020019060010190611bdd565b50505050815260200160058201805480602002602001604051908101604052809291908181526020016000905b82821015611cbe578382906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820154815260200160038201548152505081526020019060010190611c64565b50505050815260200160068201805480602002602001604051908101604052809291908181526020016000905b82821015611dcf576000848152602090819020604080516060810182526003860290920180546001600160401b0316835260018101549383019390935260028301805492939291840191611d3e9061326d565b80601f0160208091040260200160405190810160405280929190818152602001828054611d6a9061326d565b8015611db75780601f10611d8c57610100808354040283529160200191611db7565b820191906000526020600020905b815481529060010190602001808311611d9a57829003601f168201915b50505050508152505081526020019060010190611ceb565b50505091525050600085815260056020526040808220815180830190925280549394509192909190829060ff166006811115611e0d57611e0d612f6f565b6006811115611e1e57611e1e612f6f565b8152905461010090046001600160a01b03166020909101529050600181516006811115611e4d57611e4d612f6f565b14611e6b57604051635d12a4a360e11b815260040160405180910390fd5b60038152611e7985826124a8565b611e8b82600001518360c001516125e4565b60405160ff851690339087907f21f84ee3a6e9bc7c10f855f8c9829e22c613861cef10add09eccdbc88df9f59f90600090a450503868929eee149b4bd2126855505050565b6001611edb8161268a565b3068929eee149b4bd212685403611efa5763ab143c066000526004601cfd5b3068929eee149b4bd212685560008281526005602052604080822081518083019092528054829060ff166006811115611f3557611f35612f6f565b6006811115611f4657611f46612f6f565b8152905461010090046001600160a01b03166020909101529050600181516006811115611f7557611f75612f6f565b14611f9357604051635d12a4a360e11b815260040160405180910390fd5b60028152336020820152611fa783826124a8565b604051339084907f9deed34441ca75bb2dbbe101d2201930f40e18a9ce521c77fbdca6690a89996790600090a3503868929eee149b4bd21268555050565b3068929eee149b4bd2126854036120045763ab143c066000526004601cfd5b3068929eee149b4bd2126855600061201b826121c7565b905061202a81604001516126b0565b6000612035836127a6565b905080600301547fa576d0af275d0c6207ef43ceee8c498a5d7a26b8157a32d3fdf361e64371628c8260405161206b9190613536565b60405180910390a250503868929eee149b4bd212685550565b61208c6121a0565b63389a75e1600c52806000526020600c2080544211156120b457636f5e88186000526004601cfd5b6000905561055b81612437565b6120c96121a0565b8060601b6120df57637448fbae6000526004601cfd5b61055b81612437565b63409feecd19805460038255801561211f5760018160011c14303b106121165763f92ee8a96000526004601cfd5b818160ff1b1b91505b50612129856129f6565b6121348460016121bb565b61213d83612a32565b600380546001600160a01b0319166001600160a01b038416179055801561218d576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b5050505050565b61057082826000612ad5565b638b78c6d819543314610e11576382b429006000526004601cfd5b61057082826001612ad5565b6121cf612c70565b426121dd6020840184613247565b63ffffffff1610156122025760405163582e388960e01b815260040160405180910390fd5b7fe5be6bd381a38cd250f9aa1a05935cbcd261fe0e77e9ef6f6d07bf3b7e5d22e282602001351461224657604051632b76841b60e21b815260040160405180910390fd5b61225360408301836135e2565b90506000036122755760405163a342e7d960e01b815260040160405180910390fd5b600061228460408401846135e2565b8101906122919190613768565b60208101516040820151815192935090916001600160401b03166000036122cb57604051632400ced560e01b815260040160405180910390fd5b60208201516122ed576040516357949a6b60e11b815260040160405180910390fd5b805160000361230f57604051630558800760e21b815260040160405180910390fd5b6000805b825181101561239257600083828151811061233057612330613172565b60200260200101519050806020015160000361235f5760405163c692c2e760e01b815260040160405180910390fd5b80516123895782156123845760405163c28b268960e01b815260040160405180910390fd5b600192505b50600101612313565b5060005b836080015151811015612416576000846080015182815181106123bb576123bb613172565b602090810291909101015180519091506123e8576040516342f0bd3560e11b815260040160405180910390fd5b806040015160000361240d57604051631af6706f60e01b815260040160405180910390fd5b50600101612396565b509295945050505050565b600060025460016124329190613149565b919050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b6000828260405160200161248a9291906138d3565b60405160208183030381529060405280519060200120905092915050565b60008281526005602052604090208151815483929190829060ff191660018360068111156124d8576124d8612f6f565b021790555060209182015181546001600160a01b0390911661010002610100600160a81b0319909116179055600083815260069182905260409081902081518083019092528351909282919081111561253357612533612f6f565b815264ffffffffff4216602091820152825460018181018555600094855291909320825193018054929390929091839160ff19169083600681111561257a5761257a612f6f565b021790555060209190910151815464ffffffffff9091166101000265ffffffffff00199091161790558051829060079060009060068111156125be576125be612f6f565b60068111156125cf576125cf612f6f565b81526020810191909152604001600020555050565b6001600160a01b03821661260b57604051634e46966960e11b815260040160405180910390fd5b60005b815181101561268557600082828151811061262b5761262b613172565b6020908102919091010151805190915061265d576020810151612658906001600160a01b03861690612b2e565b61267c565b8051602082015161267a906001600160a01b038316908790612b4a565b505b5060010161260e565b505050565b638b78c6d8600c5233600052806020600c20541661055b576382b429006000526004601cfd5b3415156000805b835181101561277c5760008482815181106126d4576126d4613172565b6020908102919091010151805190915061275257836127065760405163036f810f60e41b815260040160405180910390fd5b3481602001511461272a5760405163036f810f60e41b815260040160405180910390fd5b82156127495760405163c28b268960e01b815260040160405180910390fd5b60019250612773565b80516020820151612771906001600160a01b0383169033903090612b9a565b505b506001016126b7565b50818015612788575080155b156126855760405163036f810f60e41b815260040160405180910390fd5b6000806127b2836105e2565b905060006127be612bf8565b6000818152600460209081526040808320865181546001600160a01b039091166001600160a01b0319909116178155918601516001830155850151600282018054606088015163ffffffff9081166401000000000267ffffffffffffffff199092169316929092179190911790556003810183905594509091505b8260a00151518110156128ab57836004018360a00151828151811061286057612860613172565b60209081029190910181015182546001818101855560009485529383902082516004909202019081559181015182840155604081015160028301556060015160039091015501612839565b5060005b8260c001515181101561292157836005018360c0015182815181106128d6576128d6613172565b602090810291909101810151825460018181018555600094855293839020825160049092020190815591810151828401556040810151600283015560600151600390910155016128af565b5060005b8260e00151518110156129bd57836006018360e00151828151811061294c5761294c613172565b6020908102919091018101518254600180820185556000948552938390208251600390920201805467ffffffffffffffff19166001600160401b039092169190911781559181015192820192909255604082015160028201906129af9082613944565b505050806001019050612925565b506129ef816040518060400160405280600160068111156129e0576129e0612f6f565b815260006020909101526124a8565b5050919050565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b6001600160a01b038116612a815760405162461bcd60e51b8152602060048201526012602482015271584170703a206e6f207a65726f206f6d6e6960701b604482015260640160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f79162c8d053a07e70cdc1ccc536f0440b571f8508377d2bef51094fadab98f479060200160405180910390a150565b638b78c6d8600c52826000526020600c20805483811783612af7575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26600080a3505050505050565b60003860003884865af16105705763b12d13eb6000526004601cfd5b816014528060345263a9059cbb60601b60005260206000604460106000875af18060016000511416612b8f57803d853b151710612b8f576390b8ec186000526004601cfd5b506000603452505050565b60405181606052826040528360601b602c526323b872dd60601b600c52602060006064601c6000895af18060016000511416612be957803d873b151710612be957637939f4246000526004601cfd5b50600060605260405250505050565b6000600260008154612c0990613a03565b9182905550919050565b60405180610100016040528060006001600160a01b0316815260200160008152602001600063ffffffff168152602001600063ffffffff168152602001600080191681526020016060815260200160608152602001606081525090565b604051806060016040528060006001600160a01b03168152602001612cc96040518060a0016040528060006001600160401b03168152602001600080191681526020016000815260200160608152602001606081525090565b8152602001606081525090565b600060208284031215612ce857600080fd5b5035919050565b6001600160a01b038116811461055b57600080fd5b60008060408385031215612d1757600080fd5b8235612d2281612cef565b946020939093013593505050565b600060208284031215612d4257600080fd5b8135612d4d81612cef565b9392505050565b600060208284031215612d6657600080fd5b81356001600160401b03811115612d7c57600080fd5b820160608185031215612d4d57600080fd5b60008151808452602080850194506020840160005b83811015612de15781518051885260208082015190890152604080820151908901526060908101519088015260808701965090820190600101612da3565b509495945050505050565b6000815180845260005b81811015612e1257602081850181015186830182015201612df6565b506000602082860101526020601f19601f83011685010191505092915050565b600082825180855260208086019550808260051b84010181860160005b84811015612ea657858303601f19018952815180516001600160401b031684528481015185850152604090810151606091850182905290612e9281860183612dec565b9a86019a9450505090830190600101612e4f565b5090979650505050505050565b600061010060018060a01b038351168452602083015160208501526040830151612ee5604086018263ffffffff169052565b506060830151612efd606086018263ffffffff169052565b506080830151608085015260a08301518160a0860152612f1f82860182612d8e565b91505060c083015184820360c0860152612f398282612d8e565b91505060e083015184820360e0860152612f538282612e32565b95945050505050565b602081526000612d4d6020830184612eb3565b634e487b7160e01b600052602160045260246000fd5b60078110612fa357634e487b7160e01b600052602160045260246000fd5b9052565b608081526000612fba6080830186612eb3565b6020612fc98185018751612f85565b858101516001600160a01b031660408581019190915284830360608601528551808452868301938301919060005b8181101561302a57855161300c858251612f85565b85015164ffffffffff16848601529484019492820192600101612ff7565b50919998505050505050505050565b6000806040838503121561304c57600080fd5b50508035926020909101359150565b6000806040838503121561306e57600080fd5b82359150602083013561308081612cef565b809150509250929050565b60006020828403121561309d57600080fd5b813560078110612d4d57600080fd5b600080604083850312156130bf57600080fd5b82359150602083013560ff8116811461308057600080fd5b600080600080608085870312156130ed57600080fd5b84356130f881612cef565b9350602085013561310881612cef565b9250604085013561311881612cef565b9150606085013561312881612cef565b939692955090935050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561058d5761058d613133565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000602080835260606001600160401b038086511683860152828601516040806040880152828251166060880152848201516080880152604082015160a08801526060820151925060a060c08801526131e5610100880184612dec565b60809290920151878303605f190160e0890152805180845290860193506000928601905b8084101561323a57845180518352878101518884015283015183830152938601936001939093019290850190613209565b5098975050505050505050565b60006020828403121561325957600080fd5b813563ffffffff81168114612d4d57600080fd5b600181811c9082168061328157607f821691505b6020821081036132a157634e487b7160e01b600052602260045260246000fd5b50919050565b604080519081016001600160401b03811182821017156132c9576132c961315c565b60405290565b604051606081016001600160401b03811182821017156132c9576132c961315c565b60405160a081016001600160401b03811182821017156132c9576132c961315c565b604051601f8201601f191681016001600160401b038111828210171561333b5761333b61315c565b604052919050565b6001600160401b038116811461055b57600080fd5b60006040828403121561336a57600080fd5b6133726132a7565b825161337d81613343565b8152602083015161338d81612cef565b60208201529392505050565b6020808252825182820181905260009190848201906040850190845b818110156133f357835180518452602080820151908501526040808201519085015260609081015190840152608083019385019392506001016133b5565b50909695505050505050565b600081548084526020808501945083600052602060002060005b83811015612de1578154875260018083015484890152600283015460408901526003830154606089015260809097019660049092019101613419565b6000828254808552602080860195506005818360051b8501016000878152838120815b8681101561302a57601f19888503018b5260606001600160401b03835416855260018084015488870152600284018260408801528581546134b88161326d565b94890185905260809481851680156134d757600181146134f05761351b565b60ff1983168b8801528115158c1b8b018701935061351b565b848a528c8a208a5b838110156135135781548d82018a0152908701908e016134f8565b8c0188019450505b5050509d89019d965050506003929092019150600101613478565b6020815261355f6020820161355284546001600160a01b031690565b6001600160a01b03169052565b60018201546040820152600282015463ffffffff808216606084015260209190911c166080820152600382015460a082015261010060c082018190526000906135af6101208401600486016133ff565b601f19808583030160e08601526135c982600588016133ff565b915080858303018386015250612f538160068701613455565b6000808335601e198436030181126135f957600080fd5b8301803591506001600160401b0382111561361357600080fd5b60200191503681900382131561362857600080fd5b9250929050565b60006001600160401b038211156136485761364861315c565b5060051b60200190565b600082601f83011261366357600080fd5b813560206136786136738361362f565b613313565b8281526060928302850182019282820191908785111561369757600080fd5b8387015b85811015612ea65781818a0312156136b35760008081fd5b6136bb6132cf565b81358152858201358682015260408083013590820152845292840192810161369b565b600082601f8301126136ef57600080fd5b813560206136ff6136738361362f565b82815260069290921b8401810191818101908684111561371e57600080fd5b8286015b8481101561375d576040818903121561373b5760008081fd5b6137436132a7565b813581528482013585820152835291830191604001613722565b509695505050505050565b6000602080838503121561377b57600080fd5b82356001600160401b038082111561379257600080fd5b90840190606082870312156137a657600080fd5b6137ae6132cf565b82356137b981612cef565b815282840135828111156137cc57600080fd5b830160a081890312156137de57600080fd5b6137e66132f1565b81356137f181613343565b815281860135868201526040808301359082015260608201358481111561381757600080fd5b8201601f81018a1361382857600080fd5b80358581111561383a5761383a61315c565b61384c601f8201601f19168901613313565b8181528b8983850101111561386057600080fd5b818984018a830137600089838301015280606085015250505060808201358481111561388b57600080fd5b6138978a828501613652565b6080830152508086840152505060408301359350818411156138b857600080fd5b6138c4878585016136de565b60408201529695505050505050565b8281526040602082015260006138ec6040830184612dec565b949350505050565b601f821115612685576000816000526020600020601f850160051c8101602086101561391d5750805b601f850160051c820191505b8181101561393c57828155600101613929565b505050505050565b81516001600160401b0381111561395d5761395d61315c565b6139718161396b845461326d565b846138f4565b602080601f8311600181146139a6576000841561398e5750858301515b600019600386901b1c1916600185901b17855561393c565b600085815260208120601f198616915b828110156139d5578886015182559484019460019091019084016139b6565b50858210156139f35787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060018201613a1557613a15613133565b506001019056fea2646970667358221220186d5674f8e76389cd6c9215318704d422da6b51a092d5bc1fe7bac0043a71a864736f6c63430008180033", } // SolverNetInboxABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/solvernetoutbox.go b/contracts/bindings/solvernetoutbox.go index 976c05e7c..bfb54b836 100644 --- a/contracts/bindings/solvernetoutbox.go +++ b/contracts/bindings/solvernetoutbox.go @@ -62,7 +62,7 @@ var ( // SolverNetOutboxMetaData contains all meta data concerning the SolverNetOutbox contract. var SolverNetOutboxMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"cancelOwnershipHandover\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"completeOwnershipHandover\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"defaultConfLevel\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deployedAt\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"didFill\",\"inputs\":[{\"name\":\"orderId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"originData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"executor\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"fill\",\"inputs\":[{\"name\":\"orderId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"originData\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"fillFee\",\"inputs\":[{\"name\":\"srcChainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"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\":\"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\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"event\",\"name\":\"DefaultConfLevelSet\",\"inputs\":[{\"name\":\"conf\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Filled\",\"inputs\":[{\"name\":\"orderId\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"fillHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"filledBy\",\"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\":\"Open\",\"inputs\":[{\"name\":\"orderId\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"resolvedOrder\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structIERC7683.ResolvedCrossChainOrder\",\"components\":[{\"name\":\"user\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"originChainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"openDeadline\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"fillDeadline\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"orderId\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"maxSpent\",\"type\":\"tuple[]\",\"internalType\":\"structIERC7683.Output[]\",\"components\":[{\"name\":\"token\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"recipient\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"minReceived\",\"type\":\"tuple[]\",\"internalType\":\"structIERC7683.Output[]\",\"components\":[{\"name\":\"token\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"recipient\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"fillInstructions\",\"type\":\"tuple[]\",\"internalType\":\"structIERC7683.FillInstruction[]\",\"components\":[{\"name\":\"destinationChainId\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"destinationSettler\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"originData\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}]}],\"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\":\"AlreadyFilled\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"AlreadyInitialized\",\"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: "0x60a06040523480156200001157600080fd5b5063ffffffff60643b1615620000975760646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156200007f575060408051601f3d908101601f191682019092526200007c9181019062000110565b60015b6200008e57436080526200009c565b6080526200009c565b436080525b620000a6620000ac565b6200012a565b63409feecd1980546001811615620000cc5763f92ee8a96000526004601cfd5b8160c01c808260011c146200010b578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6000602082840312156200012357600080fd5b5051919050565b608051611f476200014660003960006103360152611f476000f3fe60806040526004361061012a5760003560e01c806354d1f13d116100ab578063c34c08e51161006f578063c34c08e514610306578063eae4c19f14610324578063f04e283e14610358578063f2fde38b1461036b578063f8c8765e1461037e578063fee81cf41461039e57600080fd5b806354d1f13d14610297578063715018a61461029f57806374eeb847146102a757806382e2c43f146102da5780638da5cb5b146102ed57600080fd5b806325692962116100f257806325692962146101da5780632de94807146101e257806339acf9f1146102155780634a4ee7b11461024d578063514e62fc1461026057600080fd5b8063183a4f6e1461012f5780631c10893f146101445780631cd64df41461015757806320dcd4161461018c578063248689cc146101ba575b600080fd5b61014261013d3660046110b7565b6103d1565b005b6101426101523660046110ec565b6103de565b34801561016357600080fd5b506101776101723660046110ec565b6103f4565b60405190151581526020015b60405180910390f35b34801561019857600080fd5b506101ac6101a736600461112d565b610413565b604051908152602001610183565b3480156101c657600080fd5b506101776101d5366004611197565b610464565b6101426104c6565b3480156101ee57600080fd5b506101ac6101fd3660046111e2565b638b78c6d8600c908152600091909152602090205490565b34801561022157600080fd5b50600054610235906001600160a01b031681565b6040516001600160a01b039091168152602001610183565b61014261025b3660046110ec565b610515565b34801561026c57600080fd5b5061017761027b3660046110ec565b638b78c6d8600c90815260009290925260209091205416151590565b610142610527565b610142610563565b3480156102b357600080fd5b506000546102c890600160a01b900460ff1681565b60405160ff9091168152602001610183565b6101426102e83660046111fd565b610577565b3480156102f957600080fd5b50638b78c6d81954610235565b34801561031257600080fd5b506003546001600160a01b0316610235565b34801561033057600080fd5b506101ac7f000000000000000000000000000000000000000000000000000000000000000081565b6101426103663660046111e2565b610631565b6101426103793660046111e2565b61066e565b34801561038a57600080fd5b50610142610399366004611276565b610695565b3480156103aa57600080fd5b506101ac6103b93660046111e2565b63389a75e1600c908152600091909152602090205490565b6103db338261079c565b50565b6103e66107a8565b6103f082826107c3565b5050565b638b78c6d8600c90815260008390526020902054811681145b92915050565b60405160001960248201819052604482015260009061040d90839060640160408051601f198184030181529190526020810180516001600160e01b0316637b0f383b60e01b179052620186a06107cf565b6000600460006104aa8686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061084d92505050565b815260208101919091526040016000205460ff16949350505050565b60006202a3006001600160401b03164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b61051d6107a8565b6103f0828261079c565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b61056b6107a8565b6105756000610880565b565b6001610582816108be565b3068929eee149b4bd2126854036105a15763ab143c066000526004601cfd5b3068929eee149b4bd212685560006105bb85870187611429565b60208101519091506105cc816108e4565b61061b888360000151836106168c8c8c8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061084d92505050565b610c4c565b50503868929eee149b4bd2126855505050505050565b6106396107a8565b63389a75e1600c52806000526020600c20805442111561066157636f5e88186000526004601cfd5b600090556103db81610880565b6106766107a8565b8060601b61068c57637448fbae6000526004601cfd5b6103db81610880565b63409feecd1980546003825580156106cc5760018160011c14303b106106c35763f92ee8a96000526004601cfd5b818160ff1b1b91505b506106d685610d8c565b6106e18460016107c3565b6106ea83610dc8565b600280546001600160a01b0319166001600160a01b0384161790556040513090610713906110aa565b6001600160a01b039091168152602001604051809103906000f08015801561073f573d6000803e3d6000fd5b50600380546001600160a01b0319166001600160a01b03929092169190911790558015610795576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b5050505050565b6103f082826000610e6c565b638b78c6d819543314610575576382b429006000526004601cfd5b6103f082826001610e6c565b60008054604051632376548f60e21b81526001600160a01b0390911690638dd9523c90610804908790879087906004016115b4565b602060405180830381865afa158015610821573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084591906115ea565b949350505050565b60008282604051602001610862929190611603565b60405160208183030381529060405280519060200120905092915050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b638b78c6d8600c5233600052806020600c2054166103db576382b429006000526004601cfd5b806080015160005b81518110156109e55760008282815181106109095761090961161c565b602002602001015190506000610920826000015190565b9050600061092f836020015190565b6003546040850151919250610954916001600160a01b03858116923392911690610ec5565b6001600160a01b038116156109d757600354604084810151905163e1f21c6760e01b81526001600160a01b0385811660048301528481166024830152604482019290925291169063e1f21c6790606401600060405180830381600087803b1580156109be57600080fd5b505af11580156109d2573d6000803e3d6000fd5b505050505b5050508060010190506108ec565b5081516001600160401b03164614610a105760405163fd24301760e01b815260040160405180910390fd5b6003546040808401519051635b8eb34960e11b81526001600160a01b039092169163b71d66929190610a46908690600401611632565b6000604051808303818588803b158015610a5f57600080fd5b505af1158015610a73573d6000803e3d6000fd5b505050505060005b8151811015610bce576000828281518110610a9857610a9861161c565b602002602001015190506000610aaf826000015190565b600354909150600090610ace906001600160a01b038085169116610f23565b90508015610bc057602083015115610b5357600354602084015160405163e1f21c6760e01b81526001600160a01b03858116600483015291821660248201526000604482015291169063e1f21c6790606401600060405180830381600087803b158015610b3a57600080fd5b505af1158015610b4e573d6000803e3d6000fd5b505050505b6003546040516317d5759960e31b81526001600160a01b038481166004830152336024830152604482018490529091169063beabacc890606401600060405180830381600087803b158015610ba757600080fd5b505af1158015610bbb573d6000803e3d6000fd5b505050505b505050806001019050610a7b565b506003546001600160a01b0316318015610c4757600354604051633e97486160e11b8152336004820152602481018390526001600160a01b0390911690637d2e90c290604401600060405180830381600087803b158015610c2e57600080fd5b505af1158015610c42573d6000803e3d6000fd5b505050505b505050565b60008181526004602052604090205460ff1615610c7c576040516341a26a6360e01b815260040160405180910390fd5b6000818152600460208190526040808320805460ff1916600117905560025490516024810188905260448101859052610cf592879290916001600160a01b039091169060640160408051601f198184030181529190526020810180516001600160e01b0316637b0f383b60e01b179052620186a0610f4f565b905080836040015134610d0891906116de565b1015610d265760405162976f7560e21b815260040160405180910390fd5b600081846040015134610d3991906116de565b610d4391906116de565b90508015610d5557610d55338261108e565b6040513390849088907fa7e64de5f8345186f3a39d8f0664d7d6b534e35ca818dbfb1465bb12f80562fc90600090a4505050505050565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b6001600160a01b038116610e185760405162461bcd60e51b8152602060048201526012602482015271584170703a206e6f207a65726f206f6d6e6960701b60448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f79162c8d053a07e70cdc1ccc536f0440b571f8508377d2bef51094fadab98f479060200160405180910390a150565b638b78c6d8600c52826000526020600c20805483811783610e8e575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26600080a3505050505050565b60405181606052826040528360601b602c526323b872dd60601b600c52602060006064601c6000895af18060016000511416610f1457803d873b151710610f1457637939f4246000526004601cfd5b50600060605260405250505050565b6000816014526370a0823160601b60005260208060246010865afa601f3d111660205102905092915050565b60008054604051632376548f60e21b815282916001600160a01b031690638dd9523c90610f84908a90889088906004016115b4565b602060405180830381865afa158015610fa1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc591906115ea565b9050804710156110175760405162461bcd60e51b815260206004820152601860248201527f584170703a20696e73756666696369656e742066756e647300000000000000006044820152606401610e0f565b60005460405163c21dda4f60e01b81526001600160a01b039091169063c21dda4f908390611051908b908b908b908b908b906004016116ff565b6000604051808303818588803b15801561106a57600080fd5b505af115801561107e573d6000803e3d6000fd5b50939a9950505050505050505050565b60003860003884865af16103f05763b12d13eb6000526004601cfd5b6107c38061174f83390190565b6000602082840312156110c957600080fd5b5035919050565b80356001600160a01b03811681146110e757600080fd5b919050565b600080604083850312156110ff57600080fd5b611108836110d0565b946020939093013593505050565b80356001600160401b03811681146110e757600080fd5b60006020828403121561113f57600080fd5b61114882611116565b9392505050565b60008083601f84011261116157600080fd5b5081356001600160401b0381111561117857600080fd5b60208301915083602082850101111561119057600080fd5b9250929050565b6000806000604084860312156111ac57600080fd5b8335925060208401356001600160401b038111156111c957600080fd5b6111d58682870161114f565b9497909650939450505050565b6000602082840312156111f457600080fd5b611148826110d0565b60008060008060006060868803121561121557600080fd5b8535945060208601356001600160401b038082111561123357600080fd5b61123f89838a0161114f565b9096509450604088013591508082111561125857600080fd5b506112658882890161114f565b969995985093965092949392505050565b6000806000806080858703121561128c57600080fd5b611295856110d0565b93506112a3602086016110d0565b92506112b1604086016110d0565b91506112bf606086016110d0565b905092959194509250565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715611302576113026112ca565b60405290565b604080519081016001600160401b0381118282101715611302576113026112ca565b60405160a081016001600160401b0381118282101715611302576113026112ca565b604051601f8201601f191681016001600160401b0381118282101715611374576113746112ca565b604052919050565b600082601f83011261138d57600080fd5b813560206001600160401b038211156113a8576113a86112ca565b6113b6818360051b0161134c565b828152606092830285018201928282019190878511156113d557600080fd5b8387015b8581101561141c5781818a0312156113f15760008081fd5b6113f96112e0565b8135815285820135868201526040808301359082015284529284019281016113d9565b5090979650505050505050565b6000602080838503121561143c57600080fd5b82356001600160401b038082111561145357600080fd5b908401906040828703121561146757600080fd5b61146f611308565b61147883611116565b8152838301358281111561148b57600080fd5b929092019160a083880312156114a057600080fd5b6114a861132a565b6114b184611116565b81528484013585820152604084013560408201526060840135838111156114d757600080fd5b8401601f810189136114e857600080fd5b8035848111156114fa576114fa6112ca565b61150c601f8201601f1916880161134c565b8181528a8883850101111561152057600080fd5b8188840189830137600088838301015280606085015250505060808401358381111561154b57600080fd5b6115578982870161137c565b608083015250938101939093525090949350505050565b6000815180845260005b8181101561159457602081850181015186830182015201611578565b506000602082860101526020601f19601f83011685010191505092915050565b60006001600160401b038086168352606060208401526115d7606084018661156e565b9150808416604084015250949350505050565b6000602082840312156115fc57600080fd5b5051919050565b828152604060208201526000610845604083018461156e565b634e487b7160e01b600052603260045260246000fd5b600060208083526001600160401b03845116818401528084015160408160408601526040860151915060608260608701526060870151925060a0608087015261167e60c087018461156e565b6080880151878203601f190160a0890152805180835290860194506000918601905b808310156116d1578551805183528781015188840152850151858301529486019460019290920191908301906116a0565b5098975050505050505050565b8181038181111561040d57634e487b7160e01b600052601160045260246000fd5b60006001600160401b03808816835260ff8716602084015260018060a01b038616604084015260a0606084015261173960a084018661156e565b9150808416608084015250969550505050505056fe60a060405234801561001057600080fd5b506040516107c33803806107c383398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b60805161071d6100a66000396000818160b901528181610122015281816101820152818161026601526102c3015261071d6000f3fe60806040526004361061004b5760003560e01c80637d2e90c214610054578063b71d669214610074578063beabacc814610087578063ce11e6ab146100a7578063e1f21c67146100f757005b3661005257005b005b34801561006057600080fd5b5061005261006f3660046103e2565b610117565b6100526100823660046105bd565b610177565b34801561009357600080fd5b506100526100a236600461067c565b61025b565b3480156100b357600080fd5b506100db7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b34801561010357600080fd5b5061005261011236600461067c565b6102b8565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101605760405163bda8fc9560e01b815260040160405180910390fd5b6101736001600160a01b03831682610315565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101c05760405163bda8fc9560e01b815260040160405180910390fd5b60006101cd826020015190565b90506000816001600160a01b0316836040015184606001516040516101f291906106b8565b60006040518083038185875af1925050503d806000811461022f576040519150601f19603f3d011682016040523d82523d6000602084013e610234565b606091505b505090508061025657604051633204506f60e01b815260040160405180910390fd5b505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146102a45760405163bda8fc9560e01b815260040160405180910390fd5b6102566001600160a01b0384168383610331565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103015760405163bda8fc9560e01b815260040160405180910390fd5b6102566001600160a01b0384168383610381565b60003860003884865af16101735763b12d13eb6000526004601cfd5b816014528060345263a9059cbb60601b60005260206000604460106000875af1806001600051141661037657803d853b151710610376576390b8ec186000526004601cfd5b506000603452505050565b816014528060345263095ea7b360601b60005260206000604460106000875af1806001600051141661037657803d853b15171061037657633e3f8f736000526004601cfd5b80356001600160a01b03811681146103dd57600080fd5b919050565b600080604083850312156103f557600080fd5b6103fe836103c6565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff811182821017156104455761044561040c565b60405290565b60405160a0810167ffffffffffffffff811182821017156104455761044561040c565b604051601f8201601f1916810167ffffffffffffffff811182821017156104975761049761040c565b604052919050565b600082601f8301126104b057600080fd5b813567ffffffffffffffff8111156104ca576104ca61040c565b6104dd601f8201601f191660200161046e565b8181528460208386010111156104f257600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f83011261052057600080fd5b8135602067ffffffffffffffff82111561053c5761053c61040c565b61054a818360051b0161046e565b8281526060928302850182019282820191908785111561056957600080fd5b8387015b858110156105b05781818a0312156105855760008081fd5b61058d610422565b81358152858201358682015260408083013590820152845292840192810161056d565b5090979650505050505050565b6000602082840312156105cf57600080fd5b813567ffffffffffffffff808211156105e757600080fd5b9083019060a082860312156105fb57600080fd5b61060361044b565b8235828116811461061357600080fd5b80825250602083013560208201526040830135604082015260608301358281111561063d57600080fd5b6106498782860161049f565b60608301525060808301358281111561066157600080fd5b61066d8782860161050f565b60808301525095945050505050565b60008060006060848603121561069157600080fd5b61069a846103c6565b92506106a8602085016103c6565b9150604084013590509250925092565b6000825160005b818110156106d957602081860181015185830152016106bf565b50600092019182525091905056fea264697066735822122039845f33fb91200ca5d4e2630ebbf90440a5eddc4956e363513a6ec69679c08564736f6c63430008180033a264697066735822122008668ebbdda51f215176d0893b4b5d9d079092a56142aa644ed849684d1dfe2264736f6c63430008180033", + Bin: "0x60a06040523480156200001157600080fd5b5063ffffffff60643b1615620000975760646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156200007f575060408051601f3d908101601f191682019092526200007c9181019062000110565b60015b6200008e57436080526200009c565b6080526200009c565b436080525b620000a6620000ac565b6200012a565b63409feecd1980546001811615620000cc5763f92ee8a96000526004601cfd5b8160c01c808260011c146200010b578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6000602082840312156200012357600080fd5b5051919050565b608051611f476200014660003960006103360152611f476000f3fe60806040526004361061012a5760003560e01c806354d1f13d116100ab578063c34c08e51161006f578063c34c08e514610306578063eae4c19f14610324578063f04e283e14610358578063f2fde38b1461036b578063f8c8765e1461037e578063fee81cf41461039e57600080fd5b806354d1f13d14610297578063715018a61461029f57806374eeb847146102a757806382e2c43f146102da5780638da5cb5b146102ed57600080fd5b806325692962116100f257806325692962146101da5780632de94807146101e257806339acf9f1146102155780634a4ee7b11461024d578063514e62fc1461026057600080fd5b8063183a4f6e1461012f5780631c10893f146101445780631cd64df41461015757806320dcd4161461018c578063248689cc146101ba575b600080fd5b61014261013d3660046110b7565b6103d1565b005b6101426101523660046110ec565b6103de565b34801561016357600080fd5b506101776101723660046110ec565b6103f4565b60405190151581526020015b60405180910390f35b34801561019857600080fd5b506101ac6101a736600461112d565b610413565b604051908152602001610183565b3480156101c657600080fd5b506101776101d5366004611197565b610464565b6101426104c6565b3480156101ee57600080fd5b506101ac6101fd3660046111e2565b638b78c6d8600c908152600091909152602090205490565b34801561022157600080fd5b50600054610235906001600160a01b031681565b6040516001600160a01b039091168152602001610183565b61014261025b3660046110ec565b610515565b34801561026c57600080fd5b5061017761027b3660046110ec565b638b78c6d8600c90815260009290925260209091205416151590565b610142610527565b610142610563565b3480156102b357600080fd5b506000546102c890600160a01b900460ff1681565b60405160ff9091168152602001610183565b6101426102e83660046111fd565b610577565b3480156102f957600080fd5b50638b78c6d81954610235565b34801561031257600080fd5b506003546001600160a01b0316610235565b34801561033057600080fd5b506101ac7f000000000000000000000000000000000000000000000000000000000000000081565b6101426103663660046111e2565b610631565b6101426103793660046111e2565b61066e565b34801561038a57600080fd5b50610142610399366004611276565b610695565b3480156103aa57600080fd5b506101ac6103b93660046111e2565b63389a75e1600c908152600091909152602090205490565b6103db338261079c565b50565b6103e66107a8565b6103f082826107c3565b5050565b638b78c6d8600c90815260008390526020902054811681145b92915050565b60405160001960248201819052604482015260009061040d90839060640160408051601f198184030181529190526020810180516001600160e01b0316637b0f383b60e01b179052620186a06107cf565b6000600460006104aa8686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061084d92505050565b815260208101919091526040016000205460ff16949350505050565b60006202a3006001600160401b03164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b61051d6107a8565b6103f0828261079c565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b61056b6107a8565b6105756000610880565b565b6001610582816108be565b3068929eee149b4bd2126854036105a15763ab143c066000526004601cfd5b3068929eee149b4bd212685560006105bb85870187611429565b60208101519091506105cc816108e4565b61061b888360000151836106168c8c8c8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061084d92505050565b610c4c565b50503868929eee149b4bd2126855505050505050565b6106396107a8565b63389a75e1600c52806000526020600c20805442111561066157636f5e88186000526004601cfd5b600090556103db81610880565b6106766107a8565b8060601b61068c57637448fbae6000526004601cfd5b6103db81610880565b63409feecd1980546003825580156106cc5760018160011c14303b106106c35763f92ee8a96000526004601cfd5b818160ff1b1b91505b506106d685610d8c565b6106e18460016107c3565b6106ea83610dc8565b600280546001600160a01b0319166001600160a01b0384161790556040513090610713906110aa565b6001600160a01b039091168152602001604051809103906000f08015801561073f573d6000803e3d6000fd5b50600380546001600160a01b0319166001600160a01b03929092169190911790558015610795576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b5050505050565b6103f082826000610e6c565b638b78c6d819543314610575576382b429006000526004601cfd5b6103f082826001610e6c565b60008054604051632376548f60e21b81526001600160a01b0390911690638dd9523c90610804908790879087906004016115b4565b602060405180830381865afa158015610821573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084591906115ea565b949350505050565b60008282604051602001610862929190611603565b60405160208183030381529060405280519060200120905092915050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b638b78c6d8600c5233600052806020600c2054166103db576382b429006000526004601cfd5b806080015160005b81518110156109e55760008282815181106109095761090961161c565b602002602001015190506000610920826000015190565b9050600061092f836020015190565b6003546040850151919250610954916001600160a01b03858116923392911690610ec5565b6001600160a01b038116156109d757600354604084810151905163e1f21c6760e01b81526001600160a01b0385811660048301528481166024830152604482019290925291169063e1f21c6790606401600060405180830381600087803b1580156109be57600080fd5b505af11580156109d2573d6000803e3d6000fd5b505050505b5050508060010190506108ec565b5081516001600160401b03164614610a105760405163fd24301760e01b815260040160405180910390fd5b6003546040808401519051635b8eb34960e11b81526001600160a01b039092169163b71d66929190610a46908690600401611632565b6000604051808303818588803b158015610a5f57600080fd5b505af1158015610a73573d6000803e3d6000fd5b505050505060005b8151811015610bce576000828281518110610a9857610a9861161c565b602002602001015190506000610aaf826000015190565b600354909150600090610ace906001600160a01b038085169116610f23565b90508015610bc057602083015115610b5357600354602084015160405163e1f21c6760e01b81526001600160a01b03858116600483015291821660248201526000604482015291169063e1f21c6790606401600060405180830381600087803b158015610b3a57600080fd5b505af1158015610b4e573d6000803e3d6000fd5b505050505b6003546040516317d5759960e31b81526001600160a01b038481166004830152336024830152604482018490529091169063beabacc890606401600060405180830381600087803b158015610ba757600080fd5b505af1158015610bbb573d6000803e3d6000fd5b505050505b505050806001019050610a7b565b506003546001600160a01b0316318015610c4757600354604051633e97486160e11b8152336004820152602481018390526001600160a01b0390911690637d2e90c290604401600060405180830381600087803b158015610c2e57600080fd5b505af1158015610c42573d6000803e3d6000fd5b505050505b505050565b60008181526004602052604090205460ff1615610c7c576040516341a26a6360e01b815260040160405180910390fd5b6000818152600460208190526040808320805460ff1916600117905560025490516024810188905260448101859052610cf592879290916001600160a01b039091169060640160408051601f198184030181529190526020810180516001600160e01b0316637b0f383b60e01b179052620186a0610f4f565b905080836040015134610d0891906116de565b1015610d265760405162976f7560e21b815260040160405180910390fd5b600081846040015134610d3991906116de565b610d4391906116de565b90508015610d5557610d55338261108e565b6040513390849088907fa7e64de5f8345186f3a39d8f0664d7d6b534e35ca818dbfb1465bb12f80562fc90600090a4505050505050565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b6001600160a01b038116610e185760405162461bcd60e51b8152602060048201526012602482015271584170703a206e6f207a65726f206f6d6e6960701b60448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527f79162c8d053a07e70cdc1ccc536f0440b571f8508377d2bef51094fadab98f479060200160405180910390a150565b638b78c6d8600c52826000526020600c20805483811783610e8e575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26600080a3505050505050565b60405181606052826040528360601b602c526323b872dd60601b600c52602060006064601c6000895af18060016000511416610f1457803d873b151710610f1457637939f4246000526004601cfd5b50600060605260405250505050565b6000816014526370a0823160601b60005260208060246010865afa601f3d111660205102905092915050565b60008054604051632376548f60e21b815282916001600160a01b031690638dd9523c90610f84908a90889088906004016115b4565b602060405180830381865afa158015610fa1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc591906115ea565b9050804710156110175760405162461bcd60e51b815260206004820152601860248201527f584170703a20696e73756666696369656e742066756e647300000000000000006044820152606401610e0f565b60005460405163c21dda4f60e01b81526001600160a01b039091169063c21dda4f908390611051908b908b908b908b908b906004016116ff565b6000604051808303818588803b15801561106a57600080fd5b505af115801561107e573d6000803e3d6000fd5b50939a9950505050505050505050565b60003860003884865af16103f05763b12d13eb6000526004601cfd5b6107c38061174f83390190565b6000602082840312156110c957600080fd5b5035919050565b80356001600160a01b03811681146110e757600080fd5b919050565b600080604083850312156110ff57600080fd5b611108836110d0565b946020939093013593505050565b80356001600160401b03811681146110e757600080fd5b60006020828403121561113f57600080fd5b61114882611116565b9392505050565b60008083601f84011261116157600080fd5b5081356001600160401b0381111561117857600080fd5b60208301915083602082850101111561119057600080fd5b9250929050565b6000806000604084860312156111ac57600080fd5b8335925060208401356001600160401b038111156111c957600080fd5b6111d58682870161114f565b9497909650939450505050565b6000602082840312156111f457600080fd5b611148826110d0565b60008060008060006060868803121561121557600080fd5b8535945060208601356001600160401b038082111561123357600080fd5b61123f89838a0161114f565b9096509450604088013591508082111561125857600080fd5b506112658882890161114f565b969995985093965092949392505050565b6000806000806080858703121561128c57600080fd5b611295856110d0565b93506112a3602086016110d0565b92506112b1604086016110d0565b91506112bf606086016110d0565b905092959194509250565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715611302576113026112ca565b60405290565b604080519081016001600160401b0381118282101715611302576113026112ca565b60405160a081016001600160401b0381118282101715611302576113026112ca565b604051601f8201601f191681016001600160401b0381118282101715611374576113746112ca565b604052919050565b600082601f83011261138d57600080fd5b813560206001600160401b038211156113a8576113a86112ca565b6113b6818360051b0161134c565b828152606092830285018201928282019190878511156113d557600080fd5b8387015b8581101561141c5781818a0312156113f15760008081fd5b6113f96112e0565b8135815285820135868201526040808301359082015284529284019281016113d9565b5090979650505050505050565b6000602080838503121561143c57600080fd5b82356001600160401b038082111561145357600080fd5b908401906040828703121561146757600080fd5b61146f611308565b61147883611116565b8152838301358281111561148b57600080fd5b929092019160a083880312156114a057600080fd5b6114a861132a565b6114b184611116565b81528484013585820152604084013560408201526060840135838111156114d757600080fd5b8401601f810189136114e857600080fd5b8035848111156114fa576114fa6112ca565b61150c601f8201601f1916880161134c565b8181528a8883850101111561152057600080fd5b8188840189830137600088838301015280606085015250505060808401358381111561154b57600080fd5b6115578982870161137c565b608083015250938101939093525090949350505050565b6000815180845260005b8181101561159457602081850181015186830182015201611578565b506000602082860101526020601f19601f83011685010191505092915050565b60006001600160401b038086168352606060208401526115d7606084018661156e565b9150808416604084015250949350505050565b6000602082840312156115fc57600080fd5b5051919050565b828152604060208201526000610845604083018461156e565b634e487b7160e01b600052603260045260246000fd5b600060208083526001600160401b03845116818401528084015160408160408601526040860151915060608260608701526060870151925060a0608087015261167e60c087018461156e565b6080880151878203601f190160a0890152805180835290860194506000918601905b808310156116d1578551805183528781015188840152850151858301529486019460019290920191908301906116a0565b5098975050505050505050565b8181038181111561040d57634e487b7160e01b600052601160045260246000fd5b60006001600160401b03808816835260ff8716602084015260018060a01b038616604084015260a0606084015261173960a084018661156e565b9150808416608084015250969550505050505056fe60a060405234801561001057600080fd5b506040516107c33803806107c383398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b60805161071d6100a66000396000818160b901528181610122015281816101820152818161026601526102c3015261071d6000f3fe60806040526004361061004b5760003560e01c80637d2e90c214610054578063b71d669214610074578063beabacc814610087578063ce11e6ab146100a7578063e1f21c67146100f757005b3661005257005b005b34801561006057600080fd5b5061005261006f3660046103e2565b610117565b6100526100823660046105bd565b610177565b34801561009357600080fd5b506100526100a236600461067c565b61025b565b3480156100b357600080fd5b506100db7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b34801561010357600080fd5b5061005261011236600461067c565b6102b8565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101605760405163bda8fc9560e01b815260040160405180910390fd5b6101736001600160a01b03831682610315565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101c05760405163bda8fc9560e01b815260040160405180910390fd5b60006101cd826020015190565b90506000816001600160a01b0316836040015184606001516040516101f291906106b8565b60006040518083038185875af1925050503d806000811461022f576040519150601f19603f3d011682016040523d82523d6000602084013e610234565b606091505b505090508061025657604051633204506f60e01b815260040160405180910390fd5b505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146102a45760405163bda8fc9560e01b815260040160405180910390fd5b6102566001600160a01b0384168383610331565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103015760405163bda8fc9560e01b815260040160405180910390fd5b6102566001600160a01b0384168383610381565b60003860003884865af16101735763b12d13eb6000526004601cfd5b816014528060345263a9059cbb60601b60005260206000604460106000875af1806001600051141661037657803d853b151710610376576390b8ec186000526004601cfd5b506000603452505050565b816014528060345263095ea7b360601b60005260206000604460106000875af1806001600051141661037657803d853b15171061037657633e3f8f736000526004601cfd5b80356001600160a01b03811681146103dd57600080fd5b919050565b600080604083850312156103f557600080fd5b6103fe836103c6565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff811182821017156104455761044561040c565b60405290565b60405160a0810167ffffffffffffffff811182821017156104455761044561040c565b604051601f8201601f1916810167ffffffffffffffff811182821017156104975761049761040c565b604052919050565b600082601f8301126104b057600080fd5b813567ffffffffffffffff8111156104ca576104ca61040c565b6104dd601f8201601f191660200161046e565b8181528460208386010111156104f257600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f83011261052057600080fd5b8135602067ffffffffffffffff82111561053c5761053c61040c565b61054a818360051b0161046e565b8281526060928302850182019282820191908785111561056957600080fd5b8387015b858110156105b05781818a0312156105855760008081fd5b61058d610422565b81358152858201358682015260408083013590820152845292840192810161056d565b5090979650505050505050565b6000602082840312156105cf57600080fd5b813567ffffffffffffffff808211156105e757600080fd5b9083019060a082860312156105fb57600080fd5b61060361044b565b8235828116811461061357600080fd5b80825250602083013560208201526040830135604082015260608301358281111561063d57600080fd5b6106498782860161049f565b60608301525060808301358281111561066157600080fd5b61066d8782860161050f565b60808301525095945050505050565b60008060006060848603121561069157600080fd5b61069a846103c6565b92506106a8602085016103c6565b9150604084013590509250925092565b6000825160005b818110156106d957602081860181015185830152016106bf565b50600092019182525091905056fea2646970667358221220f6144f80a2434d6588e6dfda51a6f84c6d59c0a874bb23b4ddd92b250950b50164736f6c63430008180033a26469706673582212204b20d32997cddc87ccd3868ddcdb29da3b4aa57c81963914c0c07ed243b1488964736f6c63430008180033", } // SolverNetOutboxABI is the input ABI used to generate the binding from. diff --git a/contracts/solve/.gas-snapshot b/contracts/solve/.gas-snapshot index c9faa3674..44c8d9d80 100644 --- a/contracts/solve/.gas-snapshot +++ b/contracts/solve/.gas-snapshot @@ -31,47 +31,49 @@ SolveInbox_request_Test:test_request_two() (gas: 816192) SolveOutbox_fulfill_test:test_fulfillFee() (gas: 27996) SolveOutbox_fulfill_test:test_fulfill_reverts() (gas: 673377) SolveOutbox_fulfill_test:test_fulfill_succeeds() (gas: 274856) -SolverNet_E2E_Test:test_e2e_complete_contract_order() (gas: 1656479) -SolverNet_E2E_Test:test_e2e_complete_token_transfer_order() (gas: 1414836) -SolverNet_E2E_Test:test_mixed_deposits_and_expenses() (gas: 1856966) -SolverNet_E2E_Test:test_multi_token_deposits_and_expenses() (gas: 2074968) -SolverNet_Inbox_Accept_Test:test_accept_reverts_not_solver() (gas: 996775) -SolverNet_Inbox_Accept_Test:test_accept_reverts_order_not_pending() (gas: 1049674) -SolverNet_Inbox_Accept_Test:test_accept_succeeds() (gas: 1119263) -SolverNet_Inbox_Cancel_Test:test_cancel_reverts_not_user() (gas: 1003999) -SolverNet_Inbox_Cancel_Test:test_cancel_reverts_order_not_pending_or_rejected() (gas: 1061333) -SolverNet_Inbox_Cancel_Test:test_cancel_succeeds() (gas: 1123948) -SolverNet_Inbox_Claim_Test:test_claim_native_succeeds() (gas: 1221745) -SolverNet_Inbox_Claim_Test:test_claim_reverts_not_solver() (gas: 1136209) -SolverNet_Inbox_Claim_Test:test_claim_reverts_order_not_filled() (gas: 1055937) -SolverNet_Inbox_Claim_Test:test_claim_reverts_zero_recipient() (gas: 1181903) -SolverNet_Inbox_Claim_Test:test_claim_succeeds() (gas: 1275953) -SolverNet_Inbox_MarkFulfilled_Test:test_mark_fulfilled_reverts_not_outbox() (gas: 1094759) -SolverNet_Inbox_MarkFulfilled_Test:test_mark_fulfilled_reverts_order_not_accepted() (gas: 1042562) -SolverNet_Inbox_MarkFulfilled_Test:test_mark_fulfilled_reverts_wrong_fill_hash() (gas: 1097364) -SolverNet_Inbox_MarkFulfilled_Test:test_mark_fulfilled_reverts_wrong_source_chain() (gas: 1097245) -SolverNet_Inbox_MarkFulfilled_Test:test_mark_fulfilled_succeeds() (gas: 1198580) -SolverNet_Inbox_Open_Test:test_open_reverts_insufficient_erc20_allowance() (gas: 106363) -SolverNet_Inbox_Open_Test:test_open_reverts_multiple_native_deposits() (gas: 58248) -SolverNet_Inbox_Open_Test:test_open_reverts_native_deposit_without_value() (gas: 51185) -SolverNet_Inbox_Open_Test:test_open_reverts_native_deposit_wrong_value() (gas: 57835) -SolverNet_Inbox_Open_Test:test_open_reverts_value_without_native_deposit() (gas: 162176) -SolverNet_Inbox_Open_Test:test_open_reverts_zero_amount_erc20_deposit() (gas: 52697) -SolverNet_Inbox_Open_Test:test_open_succeeds() (gas: 1072291) -SolverNet_Inbox_Reject_Test:test_reject_native_refund() (gas: 1082861) -SolverNet_Inbox_Reject_Test:test_reject_reverts_not_solver() (gas: 996978) -SolverNet_Inbox_Reject_Test:test_reject_reverts_order_not_pending() (gas: 1066699) -SolverNet_Inbox_Reject_Test:test_reject_succeeds() (gas: 1128769) -SolverNet_Inbox_Resolve_Test:test_resolveOrder_erc20_deposit_succeeds() (gas: 79326) -SolverNet_Inbox_Resolve_Test:test_resolveOrder_native_deposit_succeeds() (gas: 77237) -SolverNet_Inbox_Validate_Test:test_validate_reverts() (gas: 168204) -SolverNet_Inbox_Validate_Test:test_validate_succeeds() (gas: 31343) +SolverNet_E2E_Test:test_e2e_complete_contract_order() (gas: 1657831) +SolverNet_E2E_Test:test_e2e_complete_token_transfer_order() (gas: 1416192) +SolverNet_E2E_Test:test_mixed_deposits_and_expenses() (gas: 1858315) +SolverNet_E2E_Test:test_multi_token_deposits_and_expenses() (gas: 2076316) +SolverNet_Inbox_Accept_Test:test_accept_reverts_not_solver() (gas: 997852) +SolverNet_Inbox_Accept_Test:test_accept_reverts_order_not_pending() (gas: 1050751) +SolverNet_Inbox_Accept_Test:test_accept_succeeds() (gas: 1120440) +SolverNet_Inbox_Cancel_Test:test_cancel_empty_user_address_succeeds() (gas: 1144448) +SolverNet_Inbox_Cancel_Test:test_cancel_reverts_not_user() (gas: 1005098) +SolverNet_Inbox_Cancel_Test:test_cancel_reverts_order_not_pending_or_rejected() (gas: 1062432) +SolverNet_Inbox_Cancel_Test:test_cancel_succeeds() (gas: 1125210) +SolverNet_Inbox_Claim_Test:test_claim_native_succeeds() (gas: 1222923) +SolverNet_Inbox_Claim_Test:test_claim_reverts_not_solver() (gas: 1137282) +SolverNet_Inbox_Claim_Test:test_claim_reverts_order_not_filled() (gas: 1057014) +SolverNet_Inbox_Claim_Test:test_claim_reverts_zero_recipient() (gas: 1182976) +SolverNet_Inbox_Claim_Test:test_claim_succeeds() (gas: 1277130) +SolverNet_Inbox_MarkFulfilled_Test:test_mark_fulfilled_reverts_not_outbox() (gas: 1095832) +SolverNet_Inbox_MarkFulfilled_Test:test_mark_fulfilled_reverts_order_not_accepted() (gas: 1043635) +SolverNet_Inbox_MarkFulfilled_Test:test_mark_fulfilled_reverts_wrong_fill_hash() (gas: 1098441) +SolverNet_Inbox_MarkFulfilled_Test:test_mark_fulfilled_reverts_wrong_source_chain() (gas: 1098318) +SolverNet_Inbox_MarkFulfilled_Test:test_mark_fulfilled_succeeds() (gas: 1199757) +SolverNet_Inbox_Open_Test:test_open_empty_user_address_succeeds() (gas: 1077776) +SolverNet_Inbox_Open_Test:test_open_reverts_insufficient_erc20_allowance() (gas: 106940) +SolverNet_Inbox_Open_Test:test_open_reverts_multiple_native_deposits() (gas: 58824) +SolverNet_Inbox_Open_Test:test_open_reverts_native_deposit_without_value() (gas: 51651) +SolverNet_Inbox_Open_Test:test_open_reverts_native_deposit_wrong_value() (gas: 58411) +SolverNet_Inbox_Open_Test:test_open_reverts_value_without_native_deposit() (gas: 162752) +SolverNet_Inbox_Open_Test:test_open_reverts_zero_amount_erc20_deposit() (gas: 53251) +SolverNet_Inbox_Open_Test:test_open_succeeds() (gas: 1073519) +SolverNet_Inbox_Reject_Test:test_reject_native_refund() (gas: 1084180) +SolverNet_Inbox_Reject_Test:test_reject_reverts_not_solver() (gas: 998055) +SolverNet_Inbox_Reject_Test:test_reject_reverts_order_not_pending() (gas: 1067776) +SolverNet_Inbox_Reject_Test:test_reject_succeeds() (gas: 1129946) +SolverNet_Inbox_Resolve_Test:test_resolveOrder_erc20_deposit_succeeds() (gas: 79964) +SolverNet_Inbox_Resolve_Test:test_resolveOrder_native_deposit_succeeds() (gas: 77875) +SolverNet_Inbox_Validate_Test:test_validate_reverts() (gas: 173203) +SolverNet_Inbox_Validate_Test:test_validate_succeeds() (gas: 31833) SolverNet_Outbox_Executor_Test:test_all_reverts_not_outbox() (gas: 14265) SolverNet_Outbox_Executor_Test:test_execute_reverts_call_failed() (gas: 20331) -SolverNet_Outbox_Fill_Test:test_fill_call_refund() (gas: 266782) -SolverNet_Outbox_Fill_Test:test_fill_overpayment_refund() (gas: 342913) -SolverNet_Outbox_Fill_Test:test_fill_reverts_already_filled() (gas: 420887) -SolverNet_Outbox_Fill_Test:test_fill_reverts_insufficient_fee() (gas: 405964) +SolverNet_Outbox_Fill_Test:test_fill_call_refund() (gas: 267319) +SolverNet_Outbox_Fill_Test:test_fill_overpayment_refund() (gas: 343449) +SolverNet_Outbox_Fill_Test:test_fill_reverts_already_filled() (gas: 421423) +SolverNet_Outbox_Fill_Test:test_fill_reverts_insufficient_fee() (gas: 406501) SolverNet_Outbox_Fill_Test:test_fill_reverts_invalid_origin_data() (gas: 78579) -SolverNet_Outbox_Fill_Test:test_fill_reverts_wrong_chain() (gas: 258059) -SolverNet_Outbox_Fill_Test:test_fill_succeeds() (gas: 347718) \ No newline at end of file +SolverNet_Outbox_Fill_Test:test_fill_reverts_wrong_chain() (gas: 258595) +SolverNet_Outbox_Fill_Test:test_fill_succeeds() (gas: 348255) \ No newline at end of file diff --git a/contracts/solve/src/ERC7683/SolverNetInbox.sol b/contracts/solve/src/ERC7683/SolverNetInbox.sol index 8c4d54ca2..f9dbafc5b 100644 --- a/contracts/solve/src/ERC7683/SolverNetInbox.sol +++ b/contracts/solve/src/ERC7683/SolverNetInbox.sol @@ -157,7 +157,7 @@ contract SolverNetInbox is OwnableRoles, ReentrancyGuard, Initializable, Deploye }); return ResolvedCrossChainOrder({ - user: msg.sender, + user: orderData.user != address(0) ? orderData.user : msg.sender, originChainId: block.chainid, openDeadline: uint32(block.timestamp), fillDeadline: order.fillDeadline, diff --git a/contracts/solve/src/ERC7683/interfaces/ISolverNet.sol b/contracts/solve/src/ERC7683/interfaces/ISolverNet.sol index c72441b5f..e7a7c93dd 100644 --- a/contracts/solve/src/ERC7683/interfaces/ISolverNet.sol +++ b/contracts/solve/src/ERC7683/interfaces/ISolverNet.sol @@ -43,10 +43,12 @@ interface ISolverNet { /** * @notice SolverNet ERC-7683 order data. * Restricted to single call on a destination chain. + * @param user User who the order is for. * @param call Call to execute on. * @param deposits Deposits payed by user, locked on source chain. Awarded to solver on fill. */ struct OrderData { + address user; Call call; Deposit[] deposits; } diff --git a/contracts/solve/test/ERC7683/E2E.t.sol b/contracts/solve/test/ERC7683/E2E.t.sol index 0c60983fc..efb4558b4 100644 --- a/contracts/solve/test/ERC7683/E2E.t.sol +++ b/contracts/solve/test/ERC7683/E2E.t.sol @@ -90,7 +90,7 @@ contract SolverNet_E2E_Test is TestBase { expenses: expense }); - ISolverNet.OrderData memory orderData = ISolverNet.OrderData({ call: call, deposits: deposit }); + ISolverNet.OrderData memory orderData = ISolverNet.OrderData({ user: user, call: call, deposits: deposit }); IERC7683.OnchainCrossChainOrder memory order = IERC7683.OnchainCrossChainOrder({ fillDeadline: uint32(block.timestamp + 1 minutes), diff --git a/contracts/solve/test/ERC7683/TestBase.sol b/contracts/solve/test/ERC7683/TestBase.sol index 21ff8825b..fb83f89d8 100644 --- a/contracts/solve/test/ERC7683/TestBase.sol +++ b/contracts/solve/test/ERC7683/TestBase.sol @@ -105,9 +105,13 @@ contract TestBase is Test { bytes memory data, ISolverNet.TokenExpense[] memory expenses, ISolverNet.Deposit[] memory deposits - ) internal pure returns (bytes memory) { + ) internal view returns (bytes memory) { return abi.encode( - ISolverNet.OrderData({ call: ISolverNet.Call(chainId, target, value, data, expenses), deposits: deposits }) + ISolverNet.OrderData({ + user: user, + call: ISolverNet.Call(chainId, target, value, data, expenses), + deposits: deposits + }) ); } @@ -137,7 +141,7 @@ contract TestBase is Test { expenses: expenses }); - ISolverNet.OrderData memory orderData = ISolverNet.OrderData({ call: call, deposits: deposits }); + ISolverNet.OrderData memory orderData = ISolverNet.OrderData({ user: user, call: call, deposits: deposits }); return IERC7683.OnchainCrossChainOrder({ fillDeadline: uint32(block.timestamp + 1 minutes), @@ -172,7 +176,7 @@ contract TestBase is Test { expenses: expenses }); - ISolverNet.OrderData memory orderData = ISolverNet.OrderData({ call: call, deposits: deposits }); + ISolverNet.OrderData memory orderData = ISolverNet.OrderData({ user: user, call: call, deposits: deposits }); return IERC7683.OnchainCrossChainOrder({ fillDeadline: uint32(block.timestamp + 1 minutes), @@ -223,7 +227,7 @@ contract TestBase is Test { expenses: expenses }); - ISolverNet.OrderData memory orderData = ISolverNet.OrderData({ call: call, deposits: deposits }); + ISolverNet.OrderData memory orderData = ISolverNet.OrderData({ user: user, call: call, deposits: deposits }); return IERC7683.OnchainCrossChainOrder({ fillDeadline: uint32(block.timestamp + 1 minutes), diff --git a/contracts/solve/test/ERC7683/inbox/Cancel.t.sol b/contracts/solve/test/ERC7683/inbox/Cancel.t.sol index b665f36b0..4e884408b 100644 --- a/contracts/solve/test/ERC7683/inbox/Cancel.t.sol +++ b/contracts/solve/test/ERC7683/inbox/Cancel.t.sol @@ -67,6 +67,69 @@ contract SolverNet_Inbox_Cancel_Test is TestBase { assertEq(token1.balanceOf(address(inbox)), initialInboxBalance, "inbox balance after"); } + function test_cancel_empty_user_address_succeeds() public { + IERC7683.OnchainCrossChainOrder memory order = randOrder(); + ISolverNet.OrderData memory orderData = abi.decode(order.orderData, (ISolverNet.OrderData)); + orderData.user = address(0); + order.orderData = abi.encode(orderData); + + vm.prank(user); + IERC7683.ResolvedCrossChainOrder memory resolvedOrder = inbox.resolve(order); + fundUser(resolvedOrder.minReceived); + + // Store initial state for comparison + bytes32 expectedOrderId = inbox.getNextId(); + uint256 initialUserBalance = token1.balanceOf(user); + uint256 initialInboxBalance = token1.balanceOf(address(inbox)); + + // Expect the event with the correct namespace and data + vm.expectEmit(true, true, true, true, address(inbox)); + emit IERC7683.Open(expectedOrderId, resolvedOrder); + + vm.prank(user); + inbox.open(order); + + // Cancel the order as the user + vm.expectEmit(true, true, true, true, address(inbox)); + emit ISolverNetInbox.Reverted(expectedOrderId); + + vm.prank(user); + inbox.cancel(expectedOrderId); + + // Verify order state and history + ( + IERC7683.ResolvedCrossChainOrder memory storedOrder, + ISolverNetInbox.OrderState memory state, + ISolverNetInbox.StatusUpdate[] memory history + ) = inbox.getOrder(expectedOrderId); + + // Verify that stored resolved order aligns with the original order + assertResolved(user, resolvedOrder.orderId, order, storedOrder); + + // Verify order state is now Reverted + assertEq(uint8(state.status), uint8(ISolverNetInbox.Status.Reverted), "order state: status"); + assertEq(state.acceptedBy, address(0), "order state: accepted by should be zero"); + + // Verify order history + assertEq(history.length, 2, "order history: length"); // Should have Open and Cancel events + assertEq(uint8(history[0].status), uint8(ISolverNetInbox.Status.Pending), "order history: initial status"); + assertEq(history[0].timestamp, uint40(block.timestamp), "order history: initial timestamp"); + assertEq(uint8(history[1].status), uint8(ISolverNetInbox.Status.Reverted), "order history: reverted status"); + assertEq(history[1].timestamp, uint40(block.timestamp), "order history: reverted timestamp"); + + // Verify latest order ID by status has been updated + assertEq( + inbox.getLatestOrderIdByStatus(ISolverNetInbox.Status.Reverted), expectedOrderId, "latest reverted order id" + ); + assertEq( + inbox.getLatestOrderIdByStatus(ISolverNetInbox.Status.Pending), expectedOrderId, "latest pending order id" + ); + + // Verify token balances after cancellation (deposits should be returned) + assertEq(token1.balanceOf(user), initialUserBalance, "user balance after"); + assertEq(token1.balanceOf(address(inbox)), initialInboxBalance, "inbox balance after"); + } + function test_cancel_reverts_not_user() public { // Create and open an order IERC7683.OnchainCrossChainOrder memory order = randOrder(); diff --git a/contracts/solve/test/ERC7683/inbox/Open.t.sol b/contracts/solve/test/ERC7683/inbox/Open.t.sol index 98b2ba95b..e266c4bb6 100644 --- a/contracts/solve/test/ERC7683/inbox/Open.t.sol +++ b/contracts/solve/test/ERC7683/inbox/Open.t.sol @@ -65,6 +65,61 @@ contract SolverNet_Inbox_Open_Test is TestBase { ); } + function test_open_empty_user_address_succeeds() public { + IERC7683.OnchainCrossChainOrder memory order = randOrder(); + ISolverNet.OrderData memory orderData = abi.decode(order.orderData, (ISolverNet.OrderData)); + orderData.user = address(0); + order.orderData = abi.encode(orderData); + + vm.prank(user); + IERC7683.ResolvedCrossChainOrder memory resolvedOrder = inbox.resolve(order); + fundUser(resolvedOrder.minReceived); + + // Store initial state for comparison + bytes32 expectedOrderId = inbox.getNextId(); + uint256 initialUserBalance = token1.balanceOf(user); + uint256 initialInboxBalance = token1.balanceOf(address(inbox)); + + // Expect the event with the correct namespace and data + vm.expectEmit(true, true, true, true, address(inbox)); + emit IERC7683.Open(expectedOrderId, resolvedOrder); + + vm.prank(user); + inbox.open(order); + + // Verify order state and history + ( + IERC7683.ResolvedCrossChainOrder memory storedOrder, + ISolverNetInbox.OrderState memory state, + ISolverNetInbox.StatusUpdate[] memory history + ) = inbox.getOrder(expectedOrderId); + + // Verify that stored resolved order aligns with the original order + assertResolved(user, resolvedOrder.orderId, order, storedOrder); + + // Verify order state + assertEq(uint8(state.status), uint8(ISolverNetInbox.Status.Pending), "order state: status"); + assertEq(state.acceptedBy, address(0), "order state: accepted by"); + + // Verify order history + assertEq(history.length, 1, "order history: length"); + assertEq(uint8(history[0].status), uint8(ISolverNetInbox.Status.Pending), "order history: status"); + assertEq(history[0].timestamp, uint40(block.timestamp), "order history: timestamp"); + + // Verify latest order ID by status + assertEq( + inbox.getLatestOrderIdByStatus(ISolverNetInbox.Status.Pending), expectedOrderId, "latest pending order id" + ); + + // Verify token transfers + assertEq(token1.balanceOf(user), initialUserBalance - resolvedOrder.minReceived[0].amount, "user balance after"); + assertEq( + token1.balanceOf(address(inbox)), + initialInboxBalance + resolvedOrder.minReceived[0].amount, + "inbox balance after" + ); + } + function test_open_reverts_native_deposit_without_value() public { // Create order with native deposit but don't send value ISolverNet.TokenExpense[] memory expenses = new ISolverNet.TokenExpense[](1); @@ -88,7 +143,7 @@ contract SolverNet_Inbox_Open_Test is TestBase { IERC7683.OnchainCrossChainOrder memory order = IERC7683.OnchainCrossChainOrder({ fillDeadline: uint32(block.timestamp + 1 days), orderDataType: ORDER_DATA_TYPEHASH, - orderData: abi.encode(ISolverNet.OrderData({ call: call, deposits: deposits })) + orderData: abi.encode(ISolverNet.OrderData({ user: user, call: call, deposits: deposits })) }); vm.prank(user); @@ -119,7 +174,7 @@ contract SolverNet_Inbox_Open_Test is TestBase { IERC7683.OnchainCrossChainOrder memory order = IERC7683.OnchainCrossChainOrder({ fillDeadline: uint32(block.timestamp + 1 days), orderDataType: ORDER_DATA_TYPEHASH, - orderData: abi.encode(ISolverNet.OrderData({ call: call, deposits: deposits })) + orderData: abi.encode(ISolverNet.OrderData({ user: user, call: call, deposits: deposits })) }); vm.prank(user); @@ -151,7 +206,7 @@ contract SolverNet_Inbox_Open_Test is TestBase { IERC7683.OnchainCrossChainOrder memory order = IERC7683.OnchainCrossChainOrder({ fillDeadline: uint32(block.timestamp + 1 days), orderDataType: ORDER_DATA_TYPEHASH, - orderData: abi.encode(ISolverNet.OrderData({ call: call, deposits: deposits })) + orderData: abi.encode(ISolverNet.OrderData({ user: user, call: call, deposits: deposits })) }); vm.prank(user); @@ -182,7 +237,7 @@ contract SolverNet_Inbox_Open_Test is TestBase { IERC7683.OnchainCrossChainOrder memory order = IERC7683.OnchainCrossChainOrder({ fillDeadline: uint32(block.timestamp + 1 days), orderDataType: ORDER_DATA_TYPEHASH, - orderData: abi.encode(ISolverNet.OrderData({ call: call, deposits: deposits })) + orderData: abi.encode(ISolverNet.OrderData({ user: user, call: call, deposits: deposits })) }); // Mint and approve tokens for the ERC20 deposit @@ -218,7 +273,7 @@ contract SolverNet_Inbox_Open_Test is TestBase { IERC7683.OnchainCrossChainOrder memory order = IERC7683.OnchainCrossChainOrder({ fillDeadline: uint32(block.timestamp + 1 days), orderDataType: ORDER_DATA_TYPEHASH, - orderData: abi.encode(ISolverNet.OrderData({ call: call, deposits: deposits })) + orderData: abi.encode(ISolverNet.OrderData({ user: user, call: call, deposits: deposits })) }); vm.prank(user); @@ -249,7 +304,7 @@ contract SolverNet_Inbox_Open_Test is TestBase { IERC7683.OnchainCrossChainOrder memory order = IERC7683.OnchainCrossChainOrder({ fillDeadline: uint32(block.timestamp + 1 days), orderDataType: ORDER_DATA_TYPEHASH, - orderData: abi.encode(ISolverNet.OrderData({ call: call, deposits: deposits })) + orderData: abi.encode(ISolverNet.OrderData({ user: user, call: call, deposits: deposits })) }); // Mint tokens but don't approve