diff --git a/wrappers/futures.go b/wrappers/futures.go index e47e5110..68acbd68 100644 --- a/wrappers/futures.go +++ b/wrappers/futures.go @@ -26,21 +26,61 @@ var ( _ = event.NewSubscription ) +// MixinOrdersCloseResults is an auto generated low-level Go binding around an user-defined struct. +type MixinOrdersCloseResults struct { + Payout *big.Int + QuantityClosed *big.Int +} + +// MixinOrdersFillResults is an auto generated low-level Go binding around an user-defined struct. +type MixinOrdersFillResults struct { + MakerPositionID *big.Int + TakerPositionID *big.Int + MakerMarginUsed *big.Int + TakerMarginUsed *big.Int + QuantityFilled *big.Int + MakerFeePaid *big.Int + TakerFeePaid *big.Int +} + +// MixinOrdersMatchResults is an auto generated low-level Go binding around an user-defined struct. +type MixinOrdersMatchResults struct { + LeftPositionID *big.Int + RightPositionID *big.Int + LeftMarginUsed *big.Int + RightMarginUsed *big.Int + QuantityFilled *big.Int + LeftFeePaid *big.Int + RightFeePaid *big.Int +} + +// MixinOrdersPositionResults is an auto generated low-level Go binding around an user-defined struct. +type MixinOrdersPositionResults struct { + PositionID *big.Int + MarginUsed *big.Int + Quantity *big.Int + Fee *big.Int +} + +// PermyriadMathPermyriad is an auto generated low-level Go binding around an user-defined struct. +type PermyriadMathPermyriad struct { + Value *big.Int +} + // TypesPosition is an auto generated low-level Go binding around an user-defined struct. type TypesPosition struct { - AccountID [32]byte + SubAccountID [32]byte MarketID [32]byte Direction uint8 Quantity *big.Int ContractPrice *big.Int - NPV *big.Int - MinMargin *big.Int Margin *big.Int CumulativeFundingEntry *big.Int + OrderHash [32]byte } // FuturesABI is the input ABI used to generate the binding from. -const FuturesABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_baseCurrency\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minimumMarginRatio\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"verifyingContractAddressIfExists\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"accountID\",\"type\":\"bytes32\"}],\"name\":\"AccountCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"orderHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"contractPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quantityFilled\",\"type\":\"uint256\"}],\"name\":\"FuturesCancel\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"positionID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"accountID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"contractPNL\",\"type\":\"int256\"}],\"name\":\"FuturesClose\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"orderHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"contractPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quantityFilled\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"name\":\"FuturesFill\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"leftOrderHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rightOrderHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"name\":\"FuturesMatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"orderHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"contractPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quantityFilled\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isLong\",\"type\":\"bool\"}],\"name\":\"FuturesPosition\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"ticker\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"}],\"name\":\"MarketCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"signerAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"validatorAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isApproved\",\"type\":\"bool\"}],\"name\":\"SignatureValidatorApproval\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"EIP1271_MAGIC_VALUE\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"EIP712_EXCHANGE_DOMAIN_HASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"accountIdToAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"accountNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"accounts\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"NAV\",\"type\":\"int256\"},{\"internalType\":\"int256\",\"name\":\"NPV\",\"type\":\"int256\"},{\"internalType\":\"bytes32\",\"name\":\"accountID\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"addressToAccountIDs\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowedValidators\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"internalType\":\"int256\",\"name\":\"cumulativeFundingEntry\",\"type\":\"int256\"}],\"name\":\"calcCumulativeFunding\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_marketID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_quantity\",\"type\":\"uint256\"}],\"name\":\"calcLiquidationFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"name\":\"calcMinMargin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order\",\"name\":\"order\",\"type\":\"tuple\"}],\"name\":\"cancelOrder\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"cancelled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"positionID\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order\",\"name\":\"order\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"closePosition\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"positionID\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order[]\",\"name\":\"orders\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"signatures\",\"type\":\"bytes[]\"}],\"name\":\"closePositionWithOrders\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"createAccount\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"accountID\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"createAccountAndDeposit\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"string\",\"name\":\"ticker\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialMarginRatio\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidationPenalty\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fundingInterval\",\"type\":\"uint256\"}],\"name\":\"createMarket\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"accountID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"depositAccount\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"accountID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"depositNewAccount\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order\",\"name\":\"order\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"margin\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"fillOrder\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"filled\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"freeDeposits\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"}],\"name\":\"fundPooledDeposits\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"tokenAddresses\",\"type\":\"address[]\"}],\"name\":\"getBatchBalancesAndAssetProxyAllowances\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order[]\",\"name\":\"orders\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes[]\",\"name\":\"signatures\",\"type\":\"bytes[]\"},{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"}],\"name\":\"getMakerOrderRelevantStates\",\"outputs\":[{\"components\":[{\"internalType\":\"enumLibOrder.OrderStatus\",\"name\":\"orderStatus\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"orderHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"orderTakerAssetFilledAmount\",\"type\":\"uint256\"}],\"internalType\":\"structLibOrder.OrderInfo[]\",\"name\":\"ordersInfo\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256[]\",\"name\":\"fillableTakerAssetAmounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bool[]\",\"name\":\"isValidSignature\",\"type\":\"bool[]\"},{\"internalType\":\"uint256\",\"name\":\"availableMargin\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order[]\",\"name\":\"orders\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes[]\",\"name\":\"signatures\",\"type\":\"bytes[]\"}],\"name\":\"getOrderRelevantStates\",\"outputs\":[{\"components\":[{\"internalType\":\"enumLibOrder.OrderStatus\",\"name\":\"orderStatus\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"orderHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"orderTakerAssetFilledAmount\",\"type\":\"uint256\"}],\"internalType\":\"structLibOrder.OrderInfo[]\",\"name\":\"ordersInfo\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256[]\",\"name\":\"fillableTakerAssetAmounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bool[]\",\"name\":\"isValidSignature\",\"type\":\"bool[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"trader\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"}],\"name\":\"getPositionIDsForTrader\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"positionIDs\",\"type\":\"uint256[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"trader\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"}],\"name\":\"getPositionsForTrader\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"accountID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"internalType\":\"enumTypes.Direction\",\"name\":\"direction\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"contractPrice\",\"type\":\"uint256\"},{\"internalType\":\"int256\",\"name\":\"NPV\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"minMargin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"margin\",\"type\":\"uint256\"},{\"internalType\":\"int256\",\"name\":\"cumulativeFundingEntry\",\"type\":\"int256\"}],\"internalType\":\"structTypes.Position[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"}],\"name\":\"getTransferableAssetAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"transferableAssetAmount\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order\",\"name\":\"order\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"isValidOrderSignature\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isValid\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"marketCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order[]\",\"name\":\"orders\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"margin\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"signatures\",\"type\":\"bytes[]\"}],\"name\":\"marketOrders\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"marketSerialToID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"marketToAccountToPositionID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"markets\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"ticker\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialMarginRatio\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidationPenalty\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"indexPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"currFundingTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fundingInterval\",\"type\":\"uint256\"},{\"internalType\":\"int256\",\"name\":\"cumulativeFunding\",\"type\":\"int256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order\",\"name\":\"leftOrder\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order\",\"name\":\"rightOrder\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"leftSignature\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"rightSignature\",\"type\":\"bytes\"}],\"name\":\"matchOrders\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order[]\",\"name\":\"leftOrders\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order\",\"name\":\"rightOrder\",\"type\":\"tuple\"},{\"internalType\":\"bytes[]\",\"name\":\"leftSignatures\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"rightSignature\",\"type\":\"bytes\"}],\"name\":\"multiMatchOrders\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"orderPosition\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"pooledDeposits\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"positionCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"positions\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"accountID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"internalType\":\"enumTypes.Direction\",\"name\":\"direction\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"contractPrice\",\"type\":\"uint256\"},{\"internalType\":\"int256\",\"name\":\"NPV\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"minMargin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"margin\",\"type\":\"uint256\"},{\"internalType\":\"int256\",\"name\":\"cumulativeFundingEntry\",\"type\":\"int256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"preSigned\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"restrictedDeposits\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"unrestrictedDeposits\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"positionID\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order\",\"name\":\"order\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"verifyClose\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"accountID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"internalType\":\"enumTypes.Direction\",\"name\":\"direction\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"contractPrice\",\"type\":\"uint256\"},{\"internalType\":\"int256\",\"name\":\"NPV\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"minMargin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"margin\",\"type\":\"uint256\"},{\"internalType\":\"int256\",\"name\":\"cumulativeFundingEntry\",\"type\":\"int256\"}],\"internalType\":\"structTypes.Position\",\"name\":\"newPosition\",\"type\":\"tuple\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"accountID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawAccount\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" +const FuturesABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_baseCurrency\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"structPermyriadMath.Permyriad\",\"name\":\"_minimumMarginRatio\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"verifyingContractAddressIfExists\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"subAccountID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"subAccountNonce\",\"type\":\"uint256\"}],\"name\":\"AccountCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"subAccountID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"DecrementSubaccountDeposits\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"orderHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"contractPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quantityFilled\",\"type\":\"uint256\"}],\"name\":\"FuturesCancel\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"positionID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"subAccountID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"contractPNL\",\"type\":\"int256\"}],\"name\":\"FuturesClose\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"positionID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"subAccountID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"contractPNL\",\"type\":\"int256\"}],\"name\":\"FuturesLiquidation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"leftOrderHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rightOrderHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"name\":\"FuturesMatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"accountId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"orderHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"contractPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quantityFilled\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalQuantity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialMargin\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"cumulativeFundingEntry\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"positionID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isLong\",\"type\":\"bool\"}],\"name\":\"FuturesPosition\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"subAccountID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"IncrementSubaccountDeposits\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"positionID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"addedMargin\",\"type\":\"uint256\"}],\"name\":\"MarginAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"ticker\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maintenanceMarginRatio\",\"type\":\"uint256\"}],\"name\":\"MarketCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"signerAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"validatorAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isApproved\",\"type\":\"bool\"}],\"name\":\"SignatureValidatorApproval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"EIP712_EXCHANGE_DOMAIN_HASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINIMUM_MARGIN_RATIO\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"accounts\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"subAccountID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"subAccountNonce\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"subAccountID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"positionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"addedMargin\",\"type\":\"uint256\"}],\"name\":\"addMarginIntoPosition\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"addressToSubAccountIDs\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowedValidators\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseCurrency\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order[]\",\"name\":\"orders\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256[]\",\"name\":\"quantities\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"margins\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"subAccountIDs\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes[]\",\"name\":\"signatures\",\"type\":\"bytes[]\"}],\"name\":\"batchFillOrKillOrders\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"makerPositionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerPositionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerMarginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerMarginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantityFilled\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFeePaid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFeePaid\",\"type\":\"uint256\"}],\"internalType\":\"structMixinOrders.FillResults[]\",\"name\":\"results\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order[]\",\"name\":\"orders\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256[]\",\"name\":\"quantities\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"margins\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"subAccountID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes[]\",\"name\":\"signatures\",\"type\":\"bytes[]\"}],\"name\":\"batchFillOrKillOrdersSinglePosition\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"makerPositionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerPositionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerMarginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerMarginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantityFilled\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFeePaid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFeePaid\",\"type\":\"uint256\"}],\"internalType\":\"structMixinOrders.FillResults[]\",\"name\":\"results\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order[]\",\"name\":\"orders\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256[]\",\"name\":\"quantities\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"margins\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"subAccountIDs\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes[]\",\"name\":\"signatures\",\"type\":\"bytes[]\"}],\"name\":\"batchFillOrders\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"makerPositionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerPositionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerMarginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerMarginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantityFilled\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFeePaid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFeePaid\",\"type\":\"uint256\"}],\"internalType\":\"structMixinOrders.FillResults[]\",\"name\":\"results\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order[]\",\"name\":\"orders\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256[]\",\"name\":\"quantities\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"margins\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"subAccountID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes[]\",\"name\":\"signatures\",\"type\":\"bytes[]\"}],\"name\":\"batchFillOrdersSinglePosition\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"makerPositionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerPositionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerMarginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerMarginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantityFilled\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFeePaid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFeePaid\",\"type\":\"uint256\"}],\"internalType\":\"structMixinOrders.FillResults[]\",\"name\":\"results\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order[]\",\"name\":\"leftOrders\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order[]\",\"name\":\"rightOrders\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes[]\",\"name\":\"leftSignatures\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes[]\",\"name\":\"rightSignatures\",\"type\":\"bytes[]\"}],\"name\":\"batchMatchOrders\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"leftPositionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rightPositionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"leftMarginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rightMarginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantityFilled\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"leftFeePaid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rightFeePaid\",\"type\":\"uint256\"}],\"internalType\":\"structMixinOrders.MatchResults[]\",\"name\":\"results\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"internalType\":\"int256\",\"name\":\"cumulativeFundingEntry\",\"type\":\"int256\"}],\"name\":\"calcCumulativeFunding\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"}],\"name\":\"calcLiquidationFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"name\":\"calcMinMargin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order\",\"name\":\"order\",\"type\":\"tuple\"}],\"name\":\"cancelOrder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"cancelled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"positionID\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order[]\",\"name\":\"orders\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"signatures\",\"type\":\"bytes[]\"}],\"name\":\"closePosition\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"positionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"marginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"internalType\":\"structMixinOrders.PositionResults[]\",\"name\":\"pResults\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"int256\",\"name\":\"payout\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"quantityClosed\",\"type\":\"uint256\"}],\"internalType\":\"structMixinOrders.CloseResults\",\"name\":\"cResults\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"positionID\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order[]\",\"name\":\"orders\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"signatures\",\"type\":\"bytes[]\"}],\"name\":\"closePositionOrKill\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"positionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"marginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"internalType\":\"structMixinOrders.PositionResults[]\",\"name\":\"pResults\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"int256\",\"name\":\"payout\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"quantityClosed\",\"type\":\"uint256\"}],\"internalType\":\"structMixinOrders.CloseResults\",\"name\":\"cResults\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"trader\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subAccountNonce\",\"type\":\"uint256\"}],\"name\":\"computeSubAccountIdFromNonce\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"createDefaultSubAccountAndDeposit\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"ticker\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"structPermyriadMath.Permyriad\",\"name\":\"initialMarginRatioFactor\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"structPermyriadMath.Permyriad\",\"name\":\"maintenanceMarginRatio\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"fundingInterval\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"structPermyriadMath.Permyriad\",\"name\":\"makerTxFee\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"structPermyriadMath.Permyriad\",\"name\":\"takerTxFee\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"structPermyriadMath.Permyriad\",\"name\":\"relayerFeePercentage\",\"type\":\"tuple\"}],\"name\":\"createMarket\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"ticker\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"structPermyriadMath.Permyriad\",\"name\":\"initialMarginRatioFactor\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"structPermyriadMath.Permyriad\",\"name\":\"maintenanceMarginRatio\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"fundingInterval\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"structPermyriadMath.Permyriad\",\"name\":\"makerTxFee\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"structPermyriadMath.Permyriad\",\"name\":\"takerTxFee\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"structPermyriadMath.Permyriad\",\"name\":\"relayerFeePercentage\",\"type\":\"tuple\"},{\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"}],\"name\":\"createMarketWithFixedMarketId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subAccountNonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"createSubAccountAndDeposit\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"trader\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subAccountNonce\",\"type\":\"uint256\"}],\"name\":\"createSubAccountForTraderWithNonce\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"trader\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"depositFor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"subAccountID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"depositIntoSubAccount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emergencyStopFutures\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order\",\"name\":\"order\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"margin\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"subAccountID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"fillOrKillOrder\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"makerPositionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerPositionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerMarginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerMarginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantityFilled\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFeePaid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFeePaid\",\"type\":\"uint256\"}],\"internalType\":\"structMixinOrders.FillResults\",\"name\":\"results\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order\",\"name\":\"order\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"margin\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"subAccountID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"fillOrder\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"makerPositionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerPositionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerMarginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerMarginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantityFilled\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFeePaid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFeePaid\",\"type\":\"uint256\"}],\"internalType\":\"structMixinOrders.FillResults\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"filled\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"}],\"name\":\"fundPooledDeposits\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"trader\",\"type\":\"address\"}],\"name\":\"getDefaultSubAccountDeposits\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"trader\",\"type\":\"address\"}],\"name\":\"getDefaultSubAccountIdForTrader\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order[]\",\"name\":\"orders\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes[]\",\"name\":\"signatures\",\"type\":\"bytes[]\"},{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"}],\"name\":\"getMakerOrderRelevantStates\",\"outputs\":[{\"components\":[{\"internalType\":\"enumLibOrder.OrderType\",\"name\":\"orderType\",\"type\":\"uint8\"},{\"internalType\":\"enumLibOrder.OrderStatus\",\"name\":\"orderStatus\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"orderHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"orderTakerAssetFilledAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"subAccountID\",\"type\":\"bytes32\"},{\"internalType\":\"enumTypes.Direction\",\"name\":\"direction\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"contractPrice\",\"type\":\"uint256\"}],\"internalType\":\"structLibOrder.OrderInfo[]\",\"name\":\"ordersInfo\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256[]\",\"name\":\"fillableTakerAssetAmounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bool[]\",\"name\":\"isValidSignature\",\"type\":\"bool[]\"},{\"internalType\":\"uint256\",\"name\":\"availableMargin\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order\",\"name\":\"order\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"indexPrice\",\"type\":\"uint256\"}],\"name\":\"getOrderRelevantState\",\"outputs\":[{\"components\":[{\"internalType\":\"enumLibOrder.OrderType\",\"name\":\"orderType\",\"type\":\"uint8\"},{\"internalType\":\"enumLibOrder.OrderStatus\",\"name\":\"orderStatus\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"orderHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"orderTakerAssetFilledAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"subAccountID\",\"type\":\"bytes32\"},{\"internalType\":\"enumTypes.Direction\",\"name\":\"direction\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"contractPrice\",\"type\":\"uint256\"}],\"internalType\":\"structLibOrder.OrderInfo\",\"name\":\"orderInfo\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"fillableTakerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isValidSignature\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order[]\",\"name\":\"orders\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes[]\",\"name\":\"signatures\",\"type\":\"bytes[]\"}],\"name\":\"getOrderRelevantStates\",\"outputs\":[{\"components\":[{\"internalType\":\"enumLibOrder.OrderType\",\"name\":\"orderType\",\"type\":\"uint8\"},{\"internalType\":\"enumLibOrder.OrderStatus\",\"name\":\"orderStatus\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"orderHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"orderTakerAssetFilledAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"subAccountID\",\"type\":\"bytes32\"},{\"internalType\":\"enumTypes.Direction\",\"name\":\"direction\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"contractPrice\",\"type\":\"uint256\"}],\"internalType\":\"structLibOrder.OrderInfo[]\",\"name\":\"ordersInfo\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256[]\",\"name\":\"fillableTakerAssetAmounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bool[]\",\"name\":\"isValidSignature\",\"type\":\"bool[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"trader\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"}],\"name\":\"getPositionIDsForTrader\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"positionIDs\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"trader\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"}],\"name\":\"getPositionsForTrader\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"subAccountID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"internalType\":\"enumTypes.Direction\",\"name\":\"direction\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"contractPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"margin\",\"type\":\"uint256\"},{\"internalType\":\"int256\",\"name\":\"cumulativeFundingEntry\",\"type\":\"int256\"},{\"internalType\":\"bytes32\",\"name\":\"orderHash\",\"type\":\"bytes32\"}],\"internalType\":\"structTypes.Position[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"trader\",\"type\":\"address\"}],\"name\":\"getTraderSubAccountsCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"positionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"indexPrice\",\"type\":\"uint256\"}],\"name\":\"getUnitPositionValue\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"unitPositionValue\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"insurancePools\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order\",\"name\":\"order\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"isValidOrderSignature\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isValid\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"positionID\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order[]\",\"name\":\"orders\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"signatures\",\"type\":\"bytes[]\"}],\"name\":\"liquidatePosition\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"positionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"marginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"internalType\":\"structMixinOrders.PositionResults[]\",\"name\":\"pResults\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"int256\",\"name\":\"payout\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"quantityClosed\",\"type\":\"uint256\"}],\"internalType\":\"structMixinOrders.CloseResults\",\"name\":\"cResults\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"marketCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order[]\",\"name\":\"orders\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"margin\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"subAccountID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes[]\",\"name\":\"signatures\",\"type\":\"bytes[]\"}],\"name\":\"marketOrders\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"makerPositionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerPositionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerMarginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerMarginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantityFilled\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFeePaid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFeePaid\",\"type\":\"uint256\"}],\"internalType\":\"structMixinOrders.FillResults[]\",\"name\":\"results\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order[]\",\"name\":\"orders\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"margin\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"subAccountID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes[]\",\"name\":\"signatures\",\"type\":\"bytes[]\"}],\"name\":\"marketOrdersOrKill\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"makerPositionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerPositionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerMarginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerMarginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantityFilled\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFeePaid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFeePaid\",\"type\":\"uint256\"}],\"internalType\":\"structMixinOrders.FillResults[]\",\"name\":\"results\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"marketSerialToID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"markets\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"ticker\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"structPermyriadMath.Permyriad\",\"name\":\"initialMarginRatioFactor\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"structPermyriadMath.Permyriad\",\"name\":\"maintenanceMarginRatio\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"indexPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nextFundingTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fundingInterval\",\"type\":\"uint256\"},{\"internalType\":\"int256\",\"name\":\"cumulativeFunding\",\"type\":\"int256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"structPermyriadMath.Permyriad\",\"name\":\"makerTxFee\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"structPermyriadMath.Permyriad\",\"name\":\"takerTxFee\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"structPermyriadMath.Permyriad\",\"name\":\"relayerFeePercentage\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order\",\"name\":\"leftOrder\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order\",\"name\":\"rightOrder\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"leftSignature\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"rightSignature\",\"type\":\"bytes\"}],\"name\":\"matchOrders\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"leftPositionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rightPositionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"leftMarginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rightMarginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantityFilled\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"leftFeePaid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rightFeePaid\",\"type\":\"uint256\"}],\"internalType\":\"structMixinOrders.MatchResults\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order[]\",\"name\":\"leftOrders\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order\",\"name\":\"rightOrder\",\"type\":\"tuple\"},{\"internalType\":\"bytes[]\",\"name\":\"leftSignatures\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"rightSignature\",\"type\":\"bytes\"}],\"name\":\"multiMatchOrders\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"leftPositionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rightPositionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"leftMarginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rightMarginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantityFilled\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"leftFeePaid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rightFeePaid\",\"type\":\"uint256\"}],\"internalType\":\"structMixinOrders.MatchResults[]\",\"name\":\"results\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"orderHashToPositionID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"payIntoInsurancePool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"pooledDeposits\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"positionCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"positions\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"subAccountID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"marketID\",\"type\":\"bytes32\"},{\"internalType\":\"enumTypes.Direction\",\"name\":\"direction\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"contractPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"margin\",\"type\":\"uint256\"},{\"internalType\":\"int256\",\"name\":\"cumulativeFundingEntry\",\"type\":\"int256\"},{\"internalType\":\"bytes32\",\"name\":\"orderHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"preSigned\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"restrictedDeposits\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resumeFutures\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"subAccountDeposits\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"subAccountIdToAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"subAccountToMarketToPositionID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"positionID\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"makerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"takerAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"makerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"makerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"takerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expirationTimeSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"makerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"makerFeeAssetData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"takerFeeAssetData\",\"type\":\"bytes\"}],\"internalType\":\"structLibOrder.Order[]\",\"name\":\"orders\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"signatures\",\"type\":\"bytes[]\"}],\"name\":\"vaporizePosition\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"positionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"marginUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"internalType\":\"structMixinOrders.PositionResults[]\",\"name\":\"pResults\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"int256\",\"name\":\"payout\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"quantityClosed\",\"type\":\"uint256\"}],\"internalType\":\"structMixinOrders.CloseResults\",\"name\":\"cResults\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawFromDefaultSubAcount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"subAccountID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawFromSubAccount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" // Futures is an auto generated Go binding around an Ethereum contract. type Futures struct { @@ -184,32 +224,6 @@ func (f *FuturesTransactorRaw) Transact(opts *bind.TransactOpts, method string, return f.Contract.contract.Transact(opts, method, params...) } -// EIP1271MAGICVALUE is a free data retrieval call binding the contract method 0xdd885e2d. -// -// Solidity: function EIP1271_MAGIC_VALUE() view returns(bytes4) -func (f *FuturesCaller) EIP1271MAGICVALUE(opts *bind.CallOpts) ([4]byte, error) { - var ( - ret0 = new([4]byte) - ) - out := ret0 - err := f.contract.Call(opts, out, "EIP1271_MAGIC_VALUE") - return *ret0, err -} - -// EIP1271MAGICVALUE is a free data retrieval call binding the contract method 0xdd885e2d. -// -// Solidity: function EIP1271_MAGIC_VALUE() view returns(bytes4) -func (f *FuturesSession) EIP1271MAGICVALUE() ([4]byte, error) { - return f.Contract.EIP1271MAGICVALUE(&f.CallOpts) -} - -// EIP1271MAGICVALUE is a free data retrieval call binding the contract method 0xdd885e2d. -// -// Solidity: function EIP1271_MAGIC_VALUE() view returns(bytes4) -func (f *FuturesCallerSession) EIP1271MAGICVALUE() ([4]byte, error) { - return f.Contract.EIP1271MAGICVALUE(&f.CallOpts) -} - // EIP712EXCHANGEDOMAINHASH is a free data retrieval call binding the contract method 0xc26cfecd. // // Solidity: function EIP712_EXCHANGE_DOMAIN_HASH() view returns(bytes32) @@ -236,70 +250,42 @@ func (f *FuturesCallerSession) EIP712EXCHANGEDOMAINHASH() ([32]byte, error) { return f.Contract.EIP712EXCHANGEDOMAINHASH(&f.CallOpts) } -// AccountIdToAddress is a free data retrieval call binding the contract method 0x899706c0. -// -// Solidity: function accountIdToAddress(bytes32 ) view returns(address) -func (f *FuturesCaller) AccountIdToAddress(opts *bind.CallOpts, arg0 [32]byte) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := f.contract.Call(opts, out, "accountIdToAddress", arg0) - return *ret0, err -} - -// AccountIdToAddress is a free data retrieval call binding the contract method 0x899706c0. -// -// Solidity: function accountIdToAddress(bytes32 ) view returns(address) -func (f *FuturesSession) AccountIdToAddress(arg0 [32]byte) (common.Address, error) { - return f.Contract.AccountIdToAddress(&f.CallOpts, arg0) -} - -// AccountIdToAddress is a free data retrieval call binding the contract method 0x899706c0. -// -// Solidity: function accountIdToAddress(bytes32 ) view returns(address) -func (f *FuturesCallerSession) AccountIdToAddress(arg0 [32]byte) (common.Address, error) { - return f.Contract.AccountIdToAddress(&f.CallOpts, arg0) -} - -// AccountNonce is a free data retrieval call binding the contract method 0x106cffe2. +// MINIMUMMARGINRATIO is a free data retrieval call binding the contract method 0xe63f9a7d. // -// Solidity: function accountNonce(address ) view returns(uint256) -func (f *FuturesCaller) AccountNonce(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { +// Solidity: function MINIMUM_MARGIN_RATIO() view returns(uint256 value) +func (f *FuturesCaller) MINIMUMMARGINRATIO(opts *bind.CallOpts) (*big.Int, error) { var ( ret0 = new(*big.Int) ) out := ret0 - err := f.contract.Call(opts, out, "accountNonce", arg0) + err := f.contract.Call(opts, out, "MINIMUM_MARGIN_RATIO") return *ret0, err } -// AccountNonce is a free data retrieval call binding the contract method 0x106cffe2. +// MINIMUMMARGINRATIO is a free data retrieval call binding the contract method 0xe63f9a7d. // -// Solidity: function accountNonce(address ) view returns(uint256) -func (f *FuturesSession) AccountNonce(arg0 common.Address) (*big.Int, error) { - return f.Contract.AccountNonce(&f.CallOpts, arg0) +// Solidity: function MINIMUM_MARGIN_RATIO() view returns(uint256 value) +func (f *FuturesSession) MINIMUMMARGINRATIO() (*big.Int, error) { + return f.Contract.MINIMUMMARGINRATIO(&f.CallOpts) } -// AccountNonce is a free data retrieval call binding the contract method 0x106cffe2. +// MINIMUMMARGINRATIO is a free data retrieval call binding the contract method 0xe63f9a7d. // -// Solidity: function accountNonce(address ) view returns(uint256) -func (f *FuturesCallerSession) AccountNonce(arg0 common.Address) (*big.Int, error) { - return f.Contract.AccountNonce(&f.CallOpts, arg0) +// Solidity: function MINIMUM_MARGIN_RATIO() view returns(uint256 value) +func (f *FuturesCallerSession) MINIMUMMARGINRATIO() (*big.Int, error) { + return f.Contract.MINIMUMMARGINRATIO(&f.CallOpts) } // Accounts is a free data retrieval call binding the contract method 0xbc529c43. // -// Solidity: function accounts(bytes32 ) view returns(int256 NAV, int256 NPV, bytes32 accountID) +// Solidity: function accounts(bytes32 ) view returns(bytes32 subAccountID, uint256 subAccountNonce) func (f *FuturesCaller) Accounts(opts *bind.CallOpts, arg0 [32]byte) (struct { - NAV *big.Int - NPV *big.Int - AccountID [32]byte + SubAccountID [32]byte + SubAccountNonce *big.Int }, error) { ret := new(struct { - NAV *big.Int - NPV *big.Int - AccountID [32]byte + SubAccountID [32]byte + SubAccountNonce *big.Int }) out := ret err := f.contract.Call(opts, out, "accounts", arg0) @@ -308,50 +294,48 @@ func (f *FuturesCaller) Accounts(opts *bind.CallOpts, arg0 [32]byte) (struct { // Accounts is a free data retrieval call binding the contract method 0xbc529c43. // -// Solidity: function accounts(bytes32 ) view returns(int256 NAV, int256 NPV, bytes32 accountID) +// Solidity: function accounts(bytes32 ) view returns(bytes32 subAccountID, uint256 subAccountNonce) func (f *FuturesSession) Accounts(arg0 [32]byte) (struct { - NAV *big.Int - NPV *big.Int - AccountID [32]byte + SubAccountID [32]byte + SubAccountNonce *big.Int }, error) { return f.Contract.Accounts(&f.CallOpts, arg0) } // Accounts is a free data retrieval call binding the contract method 0xbc529c43. // -// Solidity: function accounts(bytes32 ) view returns(int256 NAV, int256 NPV, bytes32 accountID) +// Solidity: function accounts(bytes32 ) view returns(bytes32 subAccountID, uint256 subAccountNonce) func (f *FuturesCallerSession) Accounts(arg0 [32]byte) (struct { - NAV *big.Int - NPV *big.Int - AccountID [32]byte + SubAccountID [32]byte + SubAccountNonce *big.Int }, error) { return f.Contract.Accounts(&f.CallOpts, arg0) } -// AddressToAccountIDs is a free data retrieval call binding the contract method 0xfbd6d494. +// AddressToSubAccountIDs is a free data retrieval call binding the contract method 0x07294a8e. // -// Solidity: function addressToAccountIDs(address , uint256 ) view returns(bytes32) -func (f *FuturesCaller) AddressToAccountIDs(opts *bind.CallOpts, arg0 common.Address, arg1 *big.Int) ([32]byte, error) { +// Solidity: function addressToSubAccountIDs(address , uint256 ) view returns(bytes32) +func (f *FuturesCaller) AddressToSubAccountIDs(opts *bind.CallOpts, arg0 common.Address, arg1 *big.Int) ([32]byte, error) { var ( ret0 = new([32]byte) ) out := ret0 - err := f.contract.Call(opts, out, "addressToAccountIDs", arg0, arg1) + err := f.contract.Call(opts, out, "addressToSubAccountIDs", arg0, arg1) return *ret0, err } -// AddressToAccountIDs is a free data retrieval call binding the contract method 0xfbd6d494. +// AddressToSubAccountIDs is a free data retrieval call binding the contract method 0x07294a8e. // -// Solidity: function addressToAccountIDs(address , uint256 ) view returns(bytes32) -func (f *FuturesSession) AddressToAccountIDs(arg0 common.Address, arg1 *big.Int) ([32]byte, error) { - return f.Contract.AddressToAccountIDs(&f.CallOpts, arg0, arg1) +// Solidity: function addressToSubAccountIDs(address , uint256 ) view returns(bytes32) +func (f *FuturesSession) AddressToSubAccountIDs(arg0 common.Address, arg1 *big.Int) ([32]byte, error) { + return f.Contract.AddressToSubAccountIDs(&f.CallOpts, arg0, arg1) } -// AddressToAccountIDs is a free data retrieval call binding the contract method 0xfbd6d494. +// AddressToSubAccountIDs is a free data retrieval call binding the contract method 0x07294a8e. // -// Solidity: function addressToAccountIDs(address , uint256 ) view returns(bytes32) -func (f *FuturesCallerSession) AddressToAccountIDs(arg0 common.Address, arg1 *big.Int) ([32]byte, error) { - return f.Contract.AddressToAccountIDs(&f.CallOpts, arg0, arg1) +// Solidity: function addressToSubAccountIDs(address , uint256 ) view returns(bytes32) +func (f *FuturesCallerSession) AddressToSubAccountIDs(arg0 common.Address, arg1 *big.Int) ([32]byte, error) { + return f.Contract.AddressToSubAccountIDs(&f.CallOpts, arg0, arg1) } // AllowedValidators is a free data retrieval call binding the contract method 0x7b8e3514. @@ -380,6 +364,32 @@ func (f *FuturesCallerSession) AllowedValidators(arg0 common.Address, arg1 commo return f.Contract.AllowedValidators(&f.CallOpts, arg0, arg1) } +// BaseCurrency is a free data retrieval call binding the contract method 0x92a85fde. +// +// Solidity: function baseCurrency() view returns(address) +func (f *FuturesCaller) BaseCurrency(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := f.contract.Call(opts, out, "baseCurrency") + return *ret0, err +} + +// BaseCurrency is a free data retrieval call binding the contract method 0x92a85fde. +// +// Solidity: function baseCurrency() view returns(address) +func (f *FuturesSession) BaseCurrency() (common.Address, error) { + return f.Contract.BaseCurrency(&f.CallOpts) +} + +// BaseCurrency is a free data retrieval call binding the contract method 0x92a85fde. +// +// Solidity: function baseCurrency() view returns(address) +func (f *FuturesCallerSession) BaseCurrency() (common.Address, error) { + return f.Contract.BaseCurrency(&f.CallOpts) +} + // CalcCumulativeFunding is a free data retrieval call binding the contract method 0xc5d135da. // // Solidity: function calcCumulativeFunding(bytes32 marketID, int256 cumulativeFundingEntry) view returns(int256) @@ -408,28 +418,28 @@ func (f *FuturesCallerSession) CalcCumulativeFunding(marketID [32]byte, cumulati // CalcLiquidationFee is a free data retrieval call binding the contract method 0xbbcac0d3. // -// Solidity: function calcLiquidationFee(bytes32 _marketID, uint256 _quantity) view returns(uint256) -func (f *FuturesCaller) CalcLiquidationFee(opts *bind.CallOpts, _marketID [32]byte, _quantity *big.Int) (*big.Int, error) { +// Solidity: function calcLiquidationFee(bytes32 marketID, uint256 quantity) view returns(uint256) +func (f *FuturesCaller) CalcLiquidationFee(opts *bind.CallOpts, marketID [32]byte, quantity *big.Int) (*big.Int, error) { var ( ret0 = new(*big.Int) ) out := ret0 - err := f.contract.Call(opts, out, "calcLiquidationFee", _marketID, _quantity) + err := f.contract.Call(opts, out, "calcLiquidationFee", marketID, quantity) return *ret0, err } // CalcLiquidationFee is a free data retrieval call binding the contract method 0xbbcac0d3. // -// Solidity: function calcLiquidationFee(bytes32 _marketID, uint256 _quantity) view returns(uint256) -func (f *FuturesSession) CalcLiquidationFee(_marketID [32]byte, _quantity *big.Int) (*big.Int, error) { - return f.Contract.CalcLiquidationFee(&f.CallOpts, _marketID, _quantity) +// Solidity: function calcLiquidationFee(bytes32 marketID, uint256 quantity) view returns(uint256) +func (f *FuturesSession) CalcLiquidationFee(marketID [32]byte, quantity *big.Int) (*big.Int, error) { + return f.Contract.CalcLiquidationFee(&f.CallOpts, marketID, quantity) } // CalcLiquidationFee is a free data retrieval call binding the contract method 0xbbcac0d3. // -// Solidity: function calcLiquidationFee(bytes32 _marketID, uint256 _quantity) view returns(uint256) -func (f *FuturesCallerSession) CalcLiquidationFee(_marketID [32]byte, _quantity *big.Int) (*big.Int, error) { - return f.Contract.CalcLiquidationFee(&f.CallOpts, _marketID, _quantity) +// Solidity: function calcLiquidationFee(bytes32 marketID, uint256 quantity) view returns(uint256) +func (f *FuturesCallerSession) CalcLiquidationFee(marketID [32]byte, quantity *big.Int) (*big.Int, error) { + return f.Contract.CalcLiquidationFee(&f.CallOpts, marketID, quantity) } // CalcMinMargin is a free data retrieval call binding the contract method 0x35c43c4e. @@ -484,6 +494,32 @@ func (f *FuturesCallerSession) Cancelled(arg0 [32]byte) (bool, error) { return f.Contract.Cancelled(&f.CallOpts, arg0) } +// ComputeSubAccountIdFromNonce is a free data retrieval call binding the contract method 0x1103b304. +// +// Solidity: function computeSubAccountIdFromNonce(address trader, uint256 subAccountNonce) pure returns(bytes32) +func (f *FuturesCaller) ComputeSubAccountIdFromNonce(opts *bind.CallOpts, trader common.Address, subAccountNonce *big.Int) ([32]byte, error) { + var ( + ret0 = new([32]byte) + ) + out := ret0 + err := f.contract.Call(opts, out, "computeSubAccountIdFromNonce", trader, subAccountNonce) + return *ret0, err +} + +// ComputeSubAccountIdFromNonce is a free data retrieval call binding the contract method 0x1103b304. +// +// Solidity: function computeSubAccountIdFromNonce(address trader, uint256 subAccountNonce) pure returns(bytes32) +func (f *FuturesSession) ComputeSubAccountIdFromNonce(trader common.Address, subAccountNonce *big.Int) ([32]byte, error) { + return f.Contract.ComputeSubAccountIdFromNonce(&f.CallOpts, trader, subAccountNonce) +} + +// ComputeSubAccountIdFromNonce is a free data retrieval call binding the contract method 0x1103b304. +// +// Solidity: function computeSubAccountIdFromNonce(address trader, uint256 subAccountNonce) pure returns(bytes32) +func (f *FuturesCallerSession) ComputeSubAccountIdFromNonce(trader common.Address, subAccountNonce *big.Int) ([32]byte, error) { + return f.Contract.ComputeSubAccountIdFromNonce(&f.CallOpts, trader, subAccountNonce) +} + // Filled is a free data retrieval call binding the contract method 0x288cdc91. // // Solidity: function filled(bytes32 ) view returns(uint256) @@ -510,65 +546,61 @@ func (f *FuturesCallerSession) Filled(arg0 [32]byte) (*big.Int, error) { return f.Contract.Filled(&f.CallOpts, arg0) } -// FreeDeposits is a free data retrieval call binding the contract method 0x9a78538f. +// GetDefaultSubAccountDeposits is a free data retrieval call binding the contract method 0x235e0c82. // -// Solidity: function freeDeposits(address ) view returns(uint256) -func (f *FuturesCaller) FreeDeposits(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { +// Solidity: function getDefaultSubAccountDeposits(address trader) view returns(uint256) +func (f *FuturesCaller) GetDefaultSubAccountDeposits(opts *bind.CallOpts, trader common.Address) (*big.Int, error) { var ( ret0 = new(*big.Int) ) out := ret0 - err := f.contract.Call(opts, out, "freeDeposits", arg0) + err := f.contract.Call(opts, out, "getDefaultSubAccountDeposits", trader) return *ret0, err } -// FreeDeposits is a free data retrieval call binding the contract method 0x9a78538f. +// GetDefaultSubAccountDeposits is a free data retrieval call binding the contract method 0x235e0c82. // -// Solidity: function freeDeposits(address ) view returns(uint256) -func (f *FuturesSession) FreeDeposits(arg0 common.Address) (*big.Int, error) { - return f.Contract.FreeDeposits(&f.CallOpts, arg0) +// Solidity: function getDefaultSubAccountDeposits(address trader) view returns(uint256) +func (f *FuturesSession) GetDefaultSubAccountDeposits(trader common.Address) (*big.Int, error) { + return f.Contract.GetDefaultSubAccountDeposits(&f.CallOpts, trader) } -// FreeDeposits is a free data retrieval call binding the contract method 0x9a78538f. +// GetDefaultSubAccountDeposits is a free data retrieval call binding the contract method 0x235e0c82. // -// Solidity: function freeDeposits(address ) view returns(uint256) -func (f *FuturesCallerSession) FreeDeposits(arg0 common.Address) (*big.Int, error) { - return f.Contract.FreeDeposits(&f.CallOpts, arg0) +// Solidity: function getDefaultSubAccountDeposits(address trader) view returns(uint256) +func (f *FuturesCallerSession) GetDefaultSubAccountDeposits(trader common.Address) (*big.Int, error) { + return f.Contract.GetDefaultSubAccountDeposits(&f.CallOpts, trader) } -// GetBatchBalancesAndAssetProxyAllowances is a free data retrieval call binding the contract method 0x5bf34fc7. +// GetDefaultSubAccountIdForTrader is a free data retrieval call binding the contract method 0x80755948. // -// Solidity: function getBatchBalancesAndAssetProxyAllowances(address ownerAddress, address[] tokenAddresses) view returns(uint256[], uint256[]) -func (f *FuturesCaller) GetBatchBalancesAndAssetProxyAllowances(opts *bind.CallOpts, ownerAddress common.Address, tokenAddresses []common.Address) ([]*big.Int, []*big.Int, error) { +// Solidity: function getDefaultSubAccountIdForTrader(address trader) pure returns(bytes32) +func (f *FuturesCaller) GetDefaultSubAccountIdForTrader(opts *bind.CallOpts, trader common.Address) ([32]byte, error) { var ( - ret0 = new([]*big.Int) - ret1 = new([]*big.Int) + ret0 = new([32]byte) ) - out := &[]interface{}{ - ret0, - ret1, - } - err := f.contract.Call(opts, out, "getBatchBalancesAndAssetProxyAllowances", ownerAddress, tokenAddresses) - return *ret0, *ret1, err + out := ret0 + err := f.contract.Call(opts, out, "getDefaultSubAccountIdForTrader", trader) + return *ret0, err } -// GetBatchBalancesAndAssetProxyAllowances is a free data retrieval call binding the contract method 0x5bf34fc7. +// GetDefaultSubAccountIdForTrader is a free data retrieval call binding the contract method 0x80755948. // -// Solidity: function getBatchBalancesAndAssetProxyAllowances(address ownerAddress, address[] tokenAddresses) view returns(uint256[], uint256[]) -func (f *FuturesSession) GetBatchBalancesAndAssetProxyAllowances(ownerAddress common.Address, tokenAddresses []common.Address) ([]*big.Int, []*big.Int, error) { - return f.Contract.GetBatchBalancesAndAssetProxyAllowances(&f.CallOpts, ownerAddress, tokenAddresses) +// Solidity: function getDefaultSubAccountIdForTrader(address trader) pure returns(bytes32) +func (f *FuturesSession) GetDefaultSubAccountIdForTrader(trader common.Address) ([32]byte, error) { + return f.Contract.GetDefaultSubAccountIdForTrader(&f.CallOpts, trader) } -// GetBatchBalancesAndAssetProxyAllowances is a free data retrieval call binding the contract method 0x5bf34fc7. +// GetDefaultSubAccountIdForTrader is a free data retrieval call binding the contract method 0x80755948. // -// Solidity: function getBatchBalancesAndAssetProxyAllowances(address ownerAddress, address[] tokenAddresses) view returns(uint256[], uint256[]) -func (f *FuturesCallerSession) GetBatchBalancesAndAssetProxyAllowances(ownerAddress common.Address, tokenAddresses []common.Address) ([]*big.Int, []*big.Int, error) { - return f.Contract.GetBatchBalancesAndAssetProxyAllowances(&f.CallOpts, ownerAddress, tokenAddresses) +// Solidity: function getDefaultSubAccountIdForTrader(address trader) pure returns(bytes32) +func (f *FuturesCallerSession) GetDefaultSubAccountIdForTrader(trader common.Address) ([32]byte, error) { + return f.Contract.GetDefaultSubAccountIdForTrader(&f.CallOpts, trader) } // GetMakerOrderRelevantStates is a free data retrieval call binding the contract method 0xfd2eb20b. // -// Solidity: function getMakerOrderRelevantStates((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, bytes[] signatures, address makerAddress) view returns((uint8,bytes32,uint256)[] ordersInfo, uint256[] fillableTakerAssetAmounts, bool[] isValidSignature, uint256 availableMargin) +// Solidity: function getMakerOrderRelevantStates((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, bytes[] signatures, address makerAddress) view returns((uint8,uint8,bytes32,uint256,bytes32,uint8,bytes32,uint256)[] ordersInfo, uint256[] fillableTakerAssetAmounts, bool[] isValidSignature, uint256 availableMargin) func (f *FuturesCaller) GetMakerOrderRelevantStates(opts *bind.CallOpts, orders []Order, signatures [][]byte, makerAddress common.Address) (struct { OrdersInfo []OrderInfo FillableTakerAssetAmounts []*big.Int @@ -588,7 +620,7 @@ func (f *FuturesCaller) GetMakerOrderRelevantStates(opts *bind.CallOpts, orders // GetMakerOrderRelevantStates is a free data retrieval call binding the contract method 0xfd2eb20b. // -// Solidity: function getMakerOrderRelevantStates((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, bytes[] signatures, address makerAddress) view returns((uint8,bytes32,uint256)[] ordersInfo, uint256[] fillableTakerAssetAmounts, bool[] isValidSignature, uint256 availableMargin) +// Solidity: function getMakerOrderRelevantStates((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, bytes[] signatures, address makerAddress) view returns((uint8,uint8,bytes32,uint256,bytes32,uint8,bytes32,uint256)[] ordersInfo, uint256[] fillableTakerAssetAmounts, bool[] isValidSignature, uint256 availableMargin) func (f *FuturesSession) GetMakerOrderRelevantStates(orders []Order, signatures [][]byte, makerAddress common.Address) (struct { OrdersInfo []OrderInfo FillableTakerAssetAmounts []*big.Int @@ -600,7 +632,7 @@ func (f *FuturesSession) GetMakerOrderRelevantStates(orders []Order, signatures // GetMakerOrderRelevantStates is a free data retrieval call binding the contract method 0xfd2eb20b. // -// Solidity: function getMakerOrderRelevantStates((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, bytes[] signatures, address makerAddress) view returns((uint8,bytes32,uint256)[] ordersInfo, uint256[] fillableTakerAssetAmounts, bool[] isValidSignature, uint256 availableMargin) +// Solidity: function getMakerOrderRelevantStates((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, bytes[] signatures, address makerAddress) view returns((uint8,uint8,bytes32,uint256,bytes32,uint8,bytes32,uint256)[] ordersInfo, uint256[] fillableTakerAssetAmounts, bool[] isValidSignature, uint256 availableMargin) func (f *FuturesCallerSession) GetMakerOrderRelevantStates(orders []Order, signatures [][]byte, makerAddress common.Address) (struct { OrdersInfo []OrderInfo FillableTakerAssetAmounts []*big.Int @@ -610,9 +642,49 @@ func (f *FuturesCallerSession) GetMakerOrderRelevantStates(orders []Order, signa return f.Contract.GetMakerOrderRelevantStates(&f.CallOpts, orders, signatures, makerAddress) } +// GetOrderRelevantState is a free data retrieval call binding the contract method 0xef3a29b3. +// +// Solidity: function getOrderRelevantState((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) order, bytes signature, uint256 indexPrice) view returns((uint8,uint8,bytes32,uint256,bytes32,uint8,bytes32,uint256) orderInfo, uint256 fillableTakerAssetAmount, bool isValidSignature) +func (f *FuturesCaller) GetOrderRelevantState(opts *bind.CallOpts, order Order, signature []byte, indexPrice *big.Int) (struct { + OrderInfo OrderInfo + FillableTakerAssetAmount *big.Int + IsValidSignature bool +}, error) { + ret := new(struct { + OrderInfo OrderInfo + FillableTakerAssetAmount *big.Int + IsValidSignature bool + }) + out := ret + err := f.contract.Call(opts, out, "getOrderRelevantState", order, signature, indexPrice) + return *ret, err +} + +// GetOrderRelevantState is a free data retrieval call binding the contract method 0xef3a29b3. +// +// Solidity: function getOrderRelevantState((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) order, bytes signature, uint256 indexPrice) view returns((uint8,uint8,bytes32,uint256,bytes32,uint8,bytes32,uint256) orderInfo, uint256 fillableTakerAssetAmount, bool isValidSignature) +func (f *FuturesSession) GetOrderRelevantState(order Order, signature []byte, indexPrice *big.Int) (struct { + OrderInfo OrderInfo + FillableTakerAssetAmount *big.Int + IsValidSignature bool +}, error) { + return f.Contract.GetOrderRelevantState(&f.CallOpts, order, signature, indexPrice) +} + +// GetOrderRelevantState is a free data retrieval call binding the contract method 0xef3a29b3. +// +// Solidity: function getOrderRelevantState((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) order, bytes signature, uint256 indexPrice) view returns((uint8,uint8,bytes32,uint256,bytes32,uint8,bytes32,uint256) orderInfo, uint256 fillableTakerAssetAmount, bool isValidSignature) +func (f *FuturesCallerSession) GetOrderRelevantState(order Order, signature []byte, indexPrice *big.Int) (struct { + OrderInfo OrderInfo + FillableTakerAssetAmount *big.Int + IsValidSignature bool +}, error) { + return f.Contract.GetOrderRelevantState(&f.CallOpts, order, signature, indexPrice) +} + // GetOrderRelevantStates is a free data retrieval call binding the contract method 0xe25cabf7. // -// Solidity: function getOrderRelevantStates((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, bytes[] signatures) view returns((uint8,bytes32,uint256)[] ordersInfo, uint256[] fillableTakerAssetAmounts, bool[] isValidSignature) +// Solidity: function getOrderRelevantStates((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, bytes[] signatures) view returns((uint8,uint8,bytes32,uint256,bytes32,uint8,bytes32,uint256)[] ordersInfo, uint256[] fillableTakerAssetAmounts, bool[] isValidSignature) func (f *FuturesCaller) GetOrderRelevantStates(opts *bind.CallOpts, orders []Order, signatures [][]byte) (struct { OrdersInfo []OrderInfo FillableTakerAssetAmounts []*big.Int @@ -630,7 +702,7 @@ func (f *FuturesCaller) GetOrderRelevantStates(opts *bind.CallOpts, orders []Ord // GetOrderRelevantStates is a free data retrieval call binding the contract method 0xe25cabf7. // -// Solidity: function getOrderRelevantStates((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, bytes[] signatures) view returns((uint8,bytes32,uint256)[] ordersInfo, uint256[] fillableTakerAssetAmounts, bool[] isValidSignature) +// Solidity: function getOrderRelevantStates((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, bytes[] signatures) view returns((uint8,uint8,bytes32,uint256,bytes32,uint8,bytes32,uint256)[] ordersInfo, uint256[] fillableTakerAssetAmounts, bool[] isValidSignature) func (f *FuturesSession) GetOrderRelevantStates(orders []Order, signatures [][]byte) (struct { OrdersInfo []OrderInfo FillableTakerAssetAmounts []*big.Int @@ -641,7 +713,7 @@ func (f *FuturesSession) GetOrderRelevantStates(orders []Order, signatures [][]b // GetOrderRelevantStates is a free data retrieval call binding the contract method 0xe25cabf7. // -// Solidity: function getOrderRelevantStates((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, bytes[] signatures) view returns((uint8,bytes32,uint256)[] ordersInfo, uint256[] fillableTakerAssetAmounts, bool[] isValidSignature) +// Solidity: function getOrderRelevantStates((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, bytes[] signatures) view returns((uint8,uint8,bytes32,uint256,bytes32,uint8,bytes32,uint256)[] ordersInfo, uint256[] fillableTakerAssetAmounts, bool[] isValidSignature) func (f *FuturesCallerSession) GetOrderRelevantStates(orders []Order, signatures [][]byte) (struct { OrdersInfo []OrderInfo FillableTakerAssetAmounts []*big.Int @@ -678,7 +750,7 @@ func (f *FuturesCallerSession) GetPositionIDsForTrader(trader common.Address, ma // GetPositionsForTrader is a free data retrieval call binding the contract method 0x0088e8cc. // -// Solidity: function getPositionsForTrader(address trader, bytes32 marketID) view returns((bytes32,bytes32,uint8,uint256,uint256,int256,uint256,uint256,int256)[]) +// Solidity: function getPositionsForTrader(address trader, bytes32 marketID) view returns((bytes32,bytes32,uint8,uint256,uint256,uint256,int256,bytes32)[]) func (f *FuturesCaller) GetPositionsForTrader(opts *bind.CallOpts, trader common.Address, marketID [32]byte) ([]TypesPosition, error) { var ( ret0 = new([]TypesPosition) @@ -690,68 +762,94 @@ func (f *FuturesCaller) GetPositionsForTrader(opts *bind.CallOpts, trader common // GetPositionsForTrader is a free data retrieval call binding the contract method 0x0088e8cc. // -// Solidity: function getPositionsForTrader(address trader, bytes32 marketID) view returns((bytes32,bytes32,uint8,uint256,uint256,int256,uint256,uint256,int256)[]) +// Solidity: function getPositionsForTrader(address trader, bytes32 marketID) view returns((bytes32,bytes32,uint8,uint256,uint256,uint256,int256,bytes32)[]) func (f *FuturesSession) GetPositionsForTrader(trader common.Address, marketID [32]byte) ([]TypesPosition, error) { return f.Contract.GetPositionsForTrader(&f.CallOpts, trader, marketID) } // GetPositionsForTrader is a free data retrieval call binding the contract method 0x0088e8cc. // -// Solidity: function getPositionsForTrader(address trader, bytes32 marketID) view returns((bytes32,bytes32,uint8,uint256,uint256,int256,uint256,uint256,int256)[]) +// Solidity: function getPositionsForTrader(address trader, bytes32 marketID) view returns((bytes32,bytes32,uint8,uint256,uint256,uint256,int256,bytes32)[]) func (f *FuturesCallerSession) GetPositionsForTrader(trader common.Address, marketID [32]byte) ([]TypesPosition, error) { return f.Contract.GetPositionsForTrader(&f.CallOpts, trader, marketID) } -// GetTransferableAssetAmount is a free data retrieval call binding the contract method 0x478482d8. +// GetTraderSubAccountsCount is a free data retrieval call binding the contract method 0x603ca5dc. // -// Solidity: function getTransferableAssetAmount(address ownerAddress) view returns(uint256 transferableAssetAmount) -func (f *FuturesCaller) GetTransferableAssetAmount(opts *bind.CallOpts, ownerAddress common.Address) (*big.Int, error) { +// Solidity: function getTraderSubAccountsCount(address trader) view returns(uint256) +func (f *FuturesCaller) GetTraderSubAccountsCount(opts *bind.CallOpts, trader common.Address) (*big.Int, error) { var ( ret0 = new(*big.Int) ) out := ret0 - err := f.contract.Call(opts, out, "getTransferableAssetAmount", ownerAddress) + err := f.contract.Call(opts, out, "getTraderSubAccountsCount", trader) return *ret0, err } -// GetTransferableAssetAmount is a free data retrieval call binding the contract method 0x478482d8. +// GetTraderSubAccountsCount is a free data retrieval call binding the contract method 0x603ca5dc. // -// Solidity: function getTransferableAssetAmount(address ownerAddress) view returns(uint256 transferableAssetAmount) -func (f *FuturesSession) GetTransferableAssetAmount(ownerAddress common.Address) (*big.Int, error) { - return f.Contract.GetTransferableAssetAmount(&f.CallOpts, ownerAddress) +// Solidity: function getTraderSubAccountsCount(address trader) view returns(uint256) +func (f *FuturesSession) GetTraderSubAccountsCount(trader common.Address) (*big.Int, error) { + return f.Contract.GetTraderSubAccountsCount(&f.CallOpts, trader) } -// GetTransferableAssetAmount is a free data retrieval call binding the contract method 0x478482d8. +// GetTraderSubAccountsCount is a free data retrieval call binding the contract method 0x603ca5dc. // -// Solidity: function getTransferableAssetAmount(address ownerAddress) view returns(uint256 transferableAssetAmount) -func (f *FuturesCallerSession) GetTransferableAssetAmount(ownerAddress common.Address) (*big.Int, error) { - return f.Contract.GetTransferableAssetAmount(&f.CallOpts, ownerAddress) +// Solidity: function getTraderSubAccountsCount(address trader) view returns(uint256) +func (f *FuturesCallerSession) GetTraderSubAccountsCount(trader common.Address) (*big.Int, error) { + return f.Contract.GetTraderSubAccountsCount(&f.CallOpts, trader) } -// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// GetUnitPositionValue is a free data retrieval call binding the contract method 0x574e2080. // -// Solidity: function isOwner() view returns(bool) -func (f *FuturesCaller) IsOwner(opts *bind.CallOpts) (bool, error) { +// Solidity: function getUnitPositionValue(uint256 positionID, uint256 indexPrice) view returns(int256 unitPositionValue) +func (f *FuturesCaller) GetUnitPositionValue(opts *bind.CallOpts, positionID *big.Int, indexPrice *big.Int) (*big.Int, error) { var ( - ret0 = new(bool) + ret0 = new(*big.Int) + ) + out := ret0 + err := f.contract.Call(opts, out, "getUnitPositionValue", positionID, indexPrice) + return *ret0, err +} + +// GetUnitPositionValue is a free data retrieval call binding the contract method 0x574e2080. +// +// Solidity: function getUnitPositionValue(uint256 positionID, uint256 indexPrice) view returns(int256 unitPositionValue) +func (f *FuturesSession) GetUnitPositionValue(positionID *big.Int, indexPrice *big.Int) (*big.Int, error) { + return f.Contract.GetUnitPositionValue(&f.CallOpts, positionID, indexPrice) +} + +// GetUnitPositionValue is a free data retrieval call binding the contract method 0x574e2080. +// +// Solidity: function getUnitPositionValue(uint256 positionID, uint256 indexPrice) view returns(int256 unitPositionValue) +func (f *FuturesCallerSession) GetUnitPositionValue(positionID *big.Int, indexPrice *big.Int) (*big.Int, error) { + return f.Contract.GetUnitPositionValue(&f.CallOpts, positionID, indexPrice) +} + +// InsurancePools is a free data retrieval call binding the contract method 0x2514c1f1. +// +// Solidity: function insurancePools(bytes32 ) view returns(uint256) +func (f *FuturesCaller) InsurancePools(opts *bind.CallOpts, arg0 [32]byte) (*big.Int, error) { + var ( + ret0 = new(*big.Int) ) out := ret0 - err := f.contract.Call(opts, out, "isOwner") + err := f.contract.Call(opts, out, "insurancePools", arg0) return *ret0, err } -// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// InsurancePools is a free data retrieval call binding the contract method 0x2514c1f1. // -// Solidity: function isOwner() view returns(bool) -func (f *FuturesSession) IsOwner() (bool, error) { - return f.Contract.IsOwner(&f.CallOpts) +// Solidity: function insurancePools(bytes32 ) view returns(uint256) +func (f *FuturesSession) InsurancePools(arg0 [32]byte) (*big.Int, error) { + return f.Contract.InsurancePools(&f.CallOpts, arg0) } -// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// InsurancePools is a free data retrieval call binding the contract method 0x2514c1f1. // -// Solidity: function isOwner() view returns(bool) -func (f *FuturesCallerSession) IsOwner() (bool, error) { - return f.Contract.IsOwner(&f.CallOpts) +// Solidity: function insurancePools(bytes32 ) view returns(uint256) +func (f *FuturesCallerSession) InsurancePools(arg0 [32]byte) (*big.Int, error) { + return f.Contract.InsurancePools(&f.CallOpts, arg0) } // IsValidOrderSignature is a free data retrieval call binding the contract method 0xa12dcc6f. @@ -832,56 +930,36 @@ func (f *FuturesCallerSession) MarketSerialToID(arg0 *big.Int) ([32]byte, error) return f.Contract.MarketSerialToID(&f.CallOpts, arg0) } -// MarketToAccountToPositionID is a free data retrieval call binding the contract method 0x54971478. -// -// Solidity: function marketToAccountToPositionID(bytes32 , bytes32 ) view returns(uint256) -func (f *FuturesCaller) MarketToAccountToPositionID(opts *bind.CallOpts, arg0 [32]byte, arg1 [32]byte) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := f.contract.Call(opts, out, "marketToAccountToPositionID", arg0, arg1) - return *ret0, err -} - -// MarketToAccountToPositionID is a free data retrieval call binding the contract method 0x54971478. -// -// Solidity: function marketToAccountToPositionID(bytes32 , bytes32 ) view returns(uint256) -func (f *FuturesSession) MarketToAccountToPositionID(arg0 [32]byte, arg1 [32]byte) (*big.Int, error) { - return f.Contract.MarketToAccountToPositionID(&f.CallOpts, arg0, arg1) -} - -// MarketToAccountToPositionID is a free data retrieval call binding the contract method 0x54971478. -// -// Solidity: function marketToAccountToPositionID(bytes32 , bytes32 ) view returns(uint256) -func (f *FuturesCallerSession) MarketToAccountToPositionID(arg0 [32]byte, arg1 [32]byte) (*big.Int, error) { - return f.Contract.MarketToAccountToPositionID(&f.CallOpts, arg0, arg1) -} - // Markets is a free data retrieval call binding the contract method 0x7564912b. // -// Solidity: function markets(bytes32 ) view returns(bytes32 marketID, string ticker, address oracle, uint256 initialMarginRatio, uint256 liquidationPenalty, uint256 indexPrice, uint256 currFundingTimestamp, uint256 fundingInterval, int256 cumulativeFunding) +// Solidity: function markets(bytes32 ) view returns(bytes32 marketID, string ticker, address oracle, (uint256) initialMarginRatioFactor, (uint256) maintenanceMarginRatio, uint256 indexPrice, uint256 nextFundingTimestamp, uint256 fundingInterval, int256 cumulativeFunding, (uint256) makerTxFee, (uint256) takerTxFee, (uint256) relayerFeePercentage) func (f *FuturesCaller) Markets(opts *bind.CallOpts, arg0 [32]byte) (struct { - MarketID [32]byte - Ticker string - Oracle common.Address - InitialMarginRatio *big.Int - LiquidationPenalty *big.Int - IndexPrice *big.Int - CurrFundingTimestamp *big.Int - FundingInterval *big.Int - CumulativeFunding *big.Int + MarketID [32]byte + Ticker string + Oracle common.Address + InitialMarginRatioFactor PermyriadMathPermyriad + MaintenanceMarginRatio PermyriadMathPermyriad + IndexPrice *big.Int + NextFundingTimestamp *big.Int + FundingInterval *big.Int + CumulativeFunding *big.Int + MakerTxFee PermyriadMathPermyriad + TakerTxFee PermyriadMathPermyriad + RelayerFeePercentage PermyriadMathPermyriad }, error) { ret := new(struct { - MarketID [32]byte - Ticker string - Oracle common.Address - InitialMarginRatio *big.Int - LiquidationPenalty *big.Int - IndexPrice *big.Int - CurrFundingTimestamp *big.Int - FundingInterval *big.Int - CumulativeFunding *big.Int + MarketID [32]byte + Ticker string + Oracle common.Address + InitialMarginRatioFactor PermyriadMathPermyriad + MaintenanceMarginRatio PermyriadMathPermyriad + IndexPrice *big.Int + NextFundingTimestamp *big.Int + FundingInterval *big.Int + CumulativeFunding *big.Int + MakerTxFee PermyriadMathPermyriad + TakerTxFee PermyriadMathPermyriad + RelayerFeePercentage PermyriadMathPermyriad }) out := ret err := f.contract.Call(opts, out, "markets", arg0) @@ -890,62 +968,68 @@ func (f *FuturesCaller) Markets(opts *bind.CallOpts, arg0 [32]byte) (struct { // Markets is a free data retrieval call binding the contract method 0x7564912b. // -// Solidity: function markets(bytes32 ) view returns(bytes32 marketID, string ticker, address oracle, uint256 initialMarginRatio, uint256 liquidationPenalty, uint256 indexPrice, uint256 currFundingTimestamp, uint256 fundingInterval, int256 cumulativeFunding) +// Solidity: function markets(bytes32 ) view returns(bytes32 marketID, string ticker, address oracle, (uint256) initialMarginRatioFactor, (uint256) maintenanceMarginRatio, uint256 indexPrice, uint256 nextFundingTimestamp, uint256 fundingInterval, int256 cumulativeFunding, (uint256) makerTxFee, (uint256) takerTxFee, (uint256) relayerFeePercentage) func (f *FuturesSession) Markets(arg0 [32]byte) (struct { - MarketID [32]byte - Ticker string - Oracle common.Address - InitialMarginRatio *big.Int - LiquidationPenalty *big.Int - IndexPrice *big.Int - CurrFundingTimestamp *big.Int - FundingInterval *big.Int - CumulativeFunding *big.Int + MarketID [32]byte + Ticker string + Oracle common.Address + InitialMarginRatioFactor PermyriadMathPermyriad + MaintenanceMarginRatio PermyriadMathPermyriad + IndexPrice *big.Int + NextFundingTimestamp *big.Int + FundingInterval *big.Int + CumulativeFunding *big.Int + MakerTxFee PermyriadMathPermyriad + TakerTxFee PermyriadMathPermyriad + RelayerFeePercentage PermyriadMathPermyriad }, error) { return f.Contract.Markets(&f.CallOpts, arg0) } // Markets is a free data retrieval call binding the contract method 0x7564912b. // -// Solidity: function markets(bytes32 ) view returns(bytes32 marketID, string ticker, address oracle, uint256 initialMarginRatio, uint256 liquidationPenalty, uint256 indexPrice, uint256 currFundingTimestamp, uint256 fundingInterval, int256 cumulativeFunding) +// Solidity: function markets(bytes32 ) view returns(bytes32 marketID, string ticker, address oracle, (uint256) initialMarginRatioFactor, (uint256) maintenanceMarginRatio, uint256 indexPrice, uint256 nextFundingTimestamp, uint256 fundingInterval, int256 cumulativeFunding, (uint256) makerTxFee, (uint256) takerTxFee, (uint256) relayerFeePercentage) func (f *FuturesCallerSession) Markets(arg0 [32]byte) (struct { - MarketID [32]byte - Ticker string - Oracle common.Address - InitialMarginRatio *big.Int - LiquidationPenalty *big.Int - IndexPrice *big.Int - CurrFundingTimestamp *big.Int - FundingInterval *big.Int - CumulativeFunding *big.Int + MarketID [32]byte + Ticker string + Oracle common.Address + InitialMarginRatioFactor PermyriadMathPermyriad + MaintenanceMarginRatio PermyriadMathPermyriad + IndexPrice *big.Int + NextFundingTimestamp *big.Int + FundingInterval *big.Int + CumulativeFunding *big.Int + MakerTxFee PermyriadMathPermyriad + TakerTxFee PermyriadMathPermyriad + RelayerFeePercentage PermyriadMathPermyriad }, error) { return f.Contract.Markets(&f.CallOpts, arg0) } -// OrderPosition is a free data retrieval call binding the contract method 0x9a9137ce. +// OrderHashToPositionID is a free data retrieval call binding the contract method 0x7c261203. // -// Solidity: function orderPosition(bytes32 ) view returns(uint256) -func (f *FuturesCaller) OrderPosition(opts *bind.CallOpts, arg0 [32]byte) (*big.Int, error) { +// Solidity: function orderHashToPositionID(bytes32 ) view returns(uint256) +func (f *FuturesCaller) OrderHashToPositionID(opts *bind.CallOpts, arg0 [32]byte) (*big.Int, error) { var ( ret0 = new(*big.Int) ) out := ret0 - err := f.contract.Call(opts, out, "orderPosition", arg0) + err := f.contract.Call(opts, out, "orderHashToPositionID", arg0) return *ret0, err } -// OrderPosition is a free data retrieval call binding the contract method 0x9a9137ce. +// OrderHashToPositionID is a free data retrieval call binding the contract method 0x7c261203. // -// Solidity: function orderPosition(bytes32 ) view returns(uint256) -func (f *FuturesSession) OrderPosition(arg0 [32]byte) (*big.Int, error) { - return f.Contract.OrderPosition(&f.CallOpts, arg0) +// Solidity: function orderHashToPositionID(bytes32 ) view returns(uint256) +func (f *FuturesSession) OrderHashToPositionID(arg0 [32]byte) (*big.Int, error) { + return f.Contract.OrderHashToPositionID(&f.CallOpts, arg0) } -// OrderPosition is a free data retrieval call binding the contract method 0x9a9137ce. +// OrderHashToPositionID is a free data retrieval call binding the contract method 0x7c261203. // -// Solidity: function orderPosition(bytes32 ) view returns(uint256) -func (f *FuturesCallerSession) OrderPosition(arg0 [32]byte) (*big.Int, error) { - return f.Contract.OrderPosition(&f.CallOpts, arg0) +// Solidity: function orderHashToPositionID(bytes32 ) view returns(uint256) +func (f *FuturesCallerSession) OrderHashToPositionID(arg0 [32]byte) (*big.Int, error) { + return f.Contract.OrderHashToPositionID(&f.CallOpts, arg0) } // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. @@ -974,6 +1058,32 @@ func (f *FuturesCallerSession) Owner() (common.Address, error) { return f.Contract.Owner(&f.CallOpts) } +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (f *FuturesCaller) Paused(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := f.contract.Call(opts, out, "paused") + return *ret0, err +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (f *FuturesSession) Paused() (bool, error) { + return f.Contract.Paused(&f.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (f *FuturesCallerSession) Paused() (bool, error) { + return f.Contract.Paused(&f.CallOpts) +} + // PooledDeposits is a free data retrieval call binding the contract method 0xef2bcc0f. // // Solidity: function pooledDeposits(bytes32 ) view returns(int256) @@ -1028,28 +1138,26 @@ func (f *FuturesCallerSession) PositionCount() (*big.Int, error) { // Positions is a free data retrieval call binding the contract method 0x99fbab88. // -// Solidity: function positions(uint256 ) view returns(bytes32 accountID, bytes32 marketID, uint8 direction, uint256 quantity, uint256 contractPrice, int256 NPV, uint256 minMargin, uint256 margin, int256 cumulativeFundingEntry) +// Solidity: function positions(uint256 ) view returns(bytes32 subAccountID, bytes32 marketID, uint8 direction, uint256 quantity, uint256 contractPrice, uint256 margin, int256 cumulativeFundingEntry, bytes32 orderHash) func (f *FuturesCaller) Positions(opts *bind.CallOpts, arg0 *big.Int) (struct { - AccountID [32]byte + SubAccountID [32]byte MarketID [32]byte Direction uint8 Quantity *big.Int ContractPrice *big.Int - NPV *big.Int - MinMargin *big.Int Margin *big.Int CumulativeFundingEntry *big.Int + OrderHash [32]byte }, error) { ret := new(struct { - AccountID [32]byte + SubAccountID [32]byte MarketID [32]byte Direction uint8 Quantity *big.Int ContractPrice *big.Int - NPV *big.Int - MinMargin *big.Int Margin *big.Int CumulativeFundingEntry *big.Int + OrderHash [32]byte }) out := ret err := f.contract.Call(opts, out, "positions", arg0) @@ -1058,34 +1166,32 @@ func (f *FuturesCaller) Positions(opts *bind.CallOpts, arg0 *big.Int) (struct { // Positions is a free data retrieval call binding the contract method 0x99fbab88. // -// Solidity: function positions(uint256 ) view returns(bytes32 accountID, bytes32 marketID, uint8 direction, uint256 quantity, uint256 contractPrice, int256 NPV, uint256 minMargin, uint256 margin, int256 cumulativeFundingEntry) +// Solidity: function positions(uint256 ) view returns(bytes32 subAccountID, bytes32 marketID, uint8 direction, uint256 quantity, uint256 contractPrice, uint256 margin, int256 cumulativeFundingEntry, bytes32 orderHash) func (f *FuturesSession) Positions(arg0 *big.Int) (struct { - AccountID [32]byte + SubAccountID [32]byte MarketID [32]byte Direction uint8 Quantity *big.Int ContractPrice *big.Int - NPV *big.Int - MinMargin *big.Int Margin *big.Int CumulativeFundingEntry *big.Int + OrderHash [32]byte }, error) { return f.Contract.Positions(&f.CallOpts, arg0) } // Positions is a free data retrieval call binding the contract method 0x99fbab88. // -// Solidity: function positions(uint256 ) view returns(bytes32 accountID, bytes32 marketID, uint8 direction, uint256 quantity, uint256 contractPrice, int256 NPV, uint256 minMargin, uint256 margin, int256 cumulativeFundingEntry) +// Solidity: function positions(uint256 ) view returns(bytes32 subAccountID, bytes32 marketID, uint8 direction, uint256 quantity, uint256 contractPrice, uint256 margin, int256 cumulativeFundingEntry, bytes32 orderHash) func (f *FuturesCallerSession) Positions(arg0 *big.Int) (struct { - AccountID [32]byte + SubAccountID [32]byte MarketID [32]byte Direction uint8 Quantity *big.Int ContractPrice *big.Int - NPV *big.Int - MinMargin *big.Int Margin *big.Int CumulativeFundingEntry *big.Int + OrderHash [32]byte }, error) { return f.Contract.Positions(&f.CallOpts, arg0) } @@ -1142,442 +1248,788 @@ func (f *FuturesCallerSession) RestrictedDeposits(arg0 [32]byte) (*big.Int, erro return f.Contract.RestrictedDeposits(&f.CallOpts, arg0) } -// UnrestrictedDeposits is a free data retrieval call binding the contract method 0xa890bb84. +// SubAccountDeposits is a free data retrieval call binding the contract method 0xb6e7aee0. // -// Solidity: function unrestrictedDeposits(bytes32 ) view returns(uint256) -func (f *FuturesCaller) UnrestrictedDeposits(opts *bind.CallOpts, arg0 [32]byte) (*big.Int, error) { +// Solidity: function subAccountDeposits(bytes32 ) view returns(uint256) +func (f *FuturesCaller) SubAccountDeposits(opts *bind.CallOpts, arg0 [32]byte) (*big.Int, error) { var ( ret0 = new(*big.Int) ) out := ret0 - err := f.contract.Call(opts, out, "unrestrictedDeposits", arg0) + err := f.contract.Call(opts, out, "subAccountDeposits", arg0) return *ret0, err } -// UnrestrictedDeposits is a free data retrieval call binding the contract method 0xa890bb84. +// SubAccountDeposits is a free data retrieval call binding the contract method 0xb6e7aee0. // -// Solidity: function unrestrictedDeposits(bytes32 ) view returns(uint256) -func (f *FuturesSession) UnrestrictedDeposits(arg0 [32]byte) (*big.Int, error) { - return f.Contract.UnrestrictedDeposits(&f.CallOpts, arg0) +// Solidity: function subAccountDeposits(bytes32 ) view returns(uint256) +func (f *FuturesSession) SubAccountDeposits(arg0 [32]byte) (*big.Int, error) { + return f.Contract.SubAccountDeposits(&f.CallOpts, arg0) } -// UnrestrictedDeposits is a free data retrieval call binding the contract method 0xa890bb84. +// SubAccountDeposits is a free data retrieval call binding the contract method 0xb6e7aee0. // -// Solidity: function unrestrictedDeposits(bytes32 ) view returns(uint256) -func (f *FuturesCallerSession) UnrestrictedDeposits(arg0 [32]byte) (*big.Int, error) { - return f.Contract.UnrestrictedDeposits(&f.CallOpts, arg0) +// Solidity: function subAccountDeposits(bytes32 ) view returns(uint256) +func (f *FuturesCallerSession) SubAccountDeposits(arg0 [32]byte) (*big.Int, error) { + return f.Contract.SubAccountDeposits(&f.CallOpts, arg0) } -// CancelOrder is a paid mutator transaction binding the contract method 0x2da62987. +// SubAccountIdToAddress is a free data retrieval call binding the contract method 0x234842eb. // -// Solidity: function cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) order) returns() -func (f *FuturesTransactor) CancelOrder(opts *bind.TransactOpts, order Order) (*types.Transaction, error) { - return f.contract.Transact(opts, "cancelOrder", order) +// Solidity: function subAccountIdToAddress(bytes32 ) view returns(address) +func (f *FuturesCaller) SubAccountIdToAddress(opts *bind.CallOpts, arg0 [32]byte) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := f.contract.Call(opts, out, "subAccountIdToAddress", arg0) + return *ret0, err } -// CancelOrder is a paid mutator transaction binding the contract method 0x2da62987. +// SubAccountIdToAddress is a free data retrieval call binding the contract method 0x234842eb. // -// Solidity: function cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) order) returns() -func (f *FuturesSession) CancelOrder(order Order) (*types.Transaction, error) { - return f.Contract.CancelOrder(&f.TransactOpts, order) +// Solidity: function subAccountIdToAddress(bytes32 ) view returns(address) +func (f *FuturesSession) SubAccountIdToAddress(arg0 [32]byte) (common.Address, error) { + return f.Contract.SubAccountIdToAddress(&f.CallOpts, arg0) } -// CancelOrder is a paid mutator transaction binding the contract method 0x2da62987. +// SubAccountIdToAddress is a free data retrieval call binding the contract method 0x234842eb. // -// Solidity: function cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) order) returns() -func (f *FuturesTransactorSession) CancelOrder(order Order) (*types.Transaction, error) { - return f.Contract.CancelOrder(&f.TransactOpts, order) +// Solidity: function subAccountIdToAddress(bytes32 ) view returns(address) +func (f *FuturesCallerSession) SubAccountIdToAddress(arg0 [32]byte) (common.Address, error) { + return f.Contract.SubAccountIdToAddress(&f.CallOpts, arg0) } -// ClosePosition is a paid mutator transaction binding the contract method 0xb012d424. +// SubAccountToMarketToPositionID is a free data retrieval call binding the contract method 0x1ebcc120. // -// Solidity: function closePosition(uint256 positionID, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) order, uint256 quantity, bytes signature) returns(bytes32) -func (f *FuturesTransactor) ClosePosition(opts *bind.TransactOpts, positionID *big.Int, order Order, quantity *big.Int, signature []byte) (*types.Transaction, error) { - return f.contract.Transact(opts, "closePosition", positionID, order, quantity, signature) +// Solidity: function subAccountToMarketToPositionID(bytes32 , bytes32 ) view returns(uint256) +func (f *FuturesCaller) SubAccountToMarketToPositionID(opts *bind.CallOpts, arg0 [32]byte, arg1 [32]byte) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := f.contract.Call(opts, out, "subAccountToMarketToPositionID", arg0, arg1) + return *ret0, err } -// ClosePosition is a paid mutator transaction binding the contract method 0xb012d424. +// SubAccountToMarketToPositionID is a free data retrieval call binding the contract method 0x1ebcc120. // -// Solidity: function closePosition(uint256 positionID, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) order, uint256 quantity, bytes signature) returns(bytes32) -func (f *FuturesSession) ClosePosition(positionID *big.Int, order Order, quantity *big.Int, signature []byte) (*types.Transaction, error) { - return f.Contract.ClosePosition(&f.TransactOpts, positionID, order, quantity, signature) +// Solidity: function subAccountToMarketToPositionID(bytes32 , bytes32 ) view returns(uint256) +func (f *FuturesSession) SubAccountToMarketToPositionID(arg0 [32]byte, arg1 [32]byte) (*big.Int, error) { + return f.Contract.SubAccountToMarketToPositionID(&f.CallOpts, arg0, arg1) } -// ClosePosition is a paid mutator transaction binding the contract method 0xb012d424. +// SubAccountToMarketToPositionID is a free data retrieval call binding the contract method 0x1ebcc120. // -// Solidity: function closePosition(uint256 positionID, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) order, uint256 quantity, bytes signature) returns(bytes32) -func (f *FuturesTransactorSession) ClosePosition(positionID *big.Int, order Order, quantity *big.Int, signature []byte) (*types.Transaction, error) { - return f.Contract.ClosePosition(&f.TransactOpts, positionID, order, quantity, signature) +// Solidity: function subAccountToMarketToPositionID(bytes32 , bytes32 ) view returns(uint256) +func (f *FuturesCallerSession) SubAccountToMarketToPositionID(arg0 [32]byte, arg1 [32]byte) (*big.Int, error) { + return f.Contract.SubAccountToMarketToPositionID(&f.CallOpts, arg0, arg1) } -// ClosePositionWithOrders is a paid mutator transaction binding the contract method 0x864b25d9. +// AddMarginIntoPosition is a paid mutator transaction binding the contract method 0x62c6985e. // -// Solidity: function closePositionWithOrders(uint256 positionID, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256 quantity, bytes[] signatures) returns() -func (f *FuturesTransactor) ClosePositionWithOrders(opts *bind.TransactOpts, positionID *big.Int, orders []Order, quantity *big.Int, signatures [][]byte) (*types.Transaction, error) { - return f.contract.Transact(opts, "closePositionWithOrders", positionID, orders, quantity, signatures) +// Solidity: function addMarginIntoPosition(bytes32 subAccountID, uint256 positionID, uint256 addedMargin) returns() +func (f *FuturesTransactor) AddMarginIntoPosition(opts *bind.TransactOpts, subAccountID [32]byte, positionID *big.Int, addedMargin *big.Int) (*types.Transaction, error) { + return f.contract.Transact(opts, "addMarginIntoPosition", subAccountID, positionID, addedMargin) } -// ClosePositionWithOrders is a paid mutator transaction binding the contract method 0x864b25d9. +// AddMarginIntoPosition is a paid mutator transaction binding the contract method 0x62c6985e. // -// Solidity: function closePositionWithOrders(uint256 positionID, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256 quantity, bytes[] signatures) returns() -func (f *FuturesSession) ClosePositionWithOrders(positionID *big.Int, orders []Order, quantity *big.Int, signatures [][]byte) (*types.Transaction, error) { - return f.Contract.ClosePositionWithOrders(&f.TransactOpts, positionID, orders, quantity, signatures) +// Solidity: function addMarginIntoPosition(bytes32 subAccountID, uint256 positionID, uint256 addedMargin) returns() +func (f *FuturesSession) AddMarginIntoPosition(subAccountID [32]byte, positionID *big.Int, addedMargin *big.Int) (*types.Transaction, error) { + return f.Contract.AddMarginIntoPosition(&f.TransactOpts, subAccountID, positionID, addedMargin) } -// ClosePositionWithOrders is a paid mutator transaction binding the contract method 0x864b25d9. +// AddMarginIntoPosition is a paid mutator transaction binding the contract method 0x62c6985e. // -// Solidity: function closePositionWithOrders(uint256 positionID, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256 quantity, bytes[] signatures) returns() -func (f *FuturesTransactorSession) ClosePositionWithOrders(positionID *big.Int, orders []Order, quantity *big.Int, signatures [][]byte) (*types.Transaction, error) { - return f.Contract.ClosePositionWithOrders(&f.TransactOpts, positionID, orders, quantity, signatures) +// Solidity: function addMarginIntoPosition(bytes32 subAccountID, uint256 positionID, uint256 addedMargin) returns() +func (f *FuturesTransactorSession) AddMarginIntoPosition(subAccountID [32]byte, positionID *big.Int, addedMargin *big.Int) (*types.Transaction, error) { + return f.Contract.AddMarginIntoPosition(&f.TransactOpts, subAccountID, positionID, addedMargin) } -// CreateAccount is a paid mutator transaction binding the contract method 0x9dca362f. +// BatchFillOrKillOrders is a paid mutator transaction binding the contract method 0xc8be86b5. // -// Solidity: function createAccount() returns(bytes32 accountID) -func (f *FuturesTransactor) CreateAccount(opts *bind.TransactOpts) (*types.Transaction, error) { - return f.contract.Transact(opts, "createAccount") +// Solidity: function batchFillOrKillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256[] quantities, uint256[] margins, bytes32[] subAccountIDs, bytes[] signatures) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[] results) +func (f *FuturesTransactor) BatchFillOrKillOrders(opts *bind.TransactOpts, orders []Order, quantities []*big.Int, margins []*big.Int, subAccountIDs [][32]byte, signatures [][]byte) (*types.Transaction, error) { + return f.contract.Transact(opts, "batchFillOrKillOrders", orders, quantities, margins, subAccountIDs, signatures) } -// CreateAccount is a paid mutator transaction binding the contract method 0x9dca362f. +// BatchFillOrKillOrders is a paid mutator transaction binding the contract method 0xc8be86b5. // -// Solidity: function createAccount() returns(bytes32 accountID) -func (f *FuturesSession) CreateAccount() (*types.Transaction, error) { - return f.Contract.CreateAccount(&f.TransactOpts) +// Solidity: function batchFillOrKillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256[] quantities, uint256[] margins, bytes32[] subAccountIDs, bytes[] signatures) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[] results) +func (f *FuturesSession) BatchFillOrKillOrders(orders []Order, quantities []*big.Int, margins []*big.Int, subAccountIDs [][32]byte, signatures [][]byte) (*types.Transaction, error) { + return f.Contract.BatchFillOrKillOrders(&f.TransactOpts, orders, quantities, margins, subAccountIDs, signatures) } -// CreateAccount is a paid mutator transaction binding the contract method 0x9dca362f. +// BatchFillOrKillOrders is a paid mutator transaction binding the contract method 0xc8be86b5. // -// Solidity: function createAccount() returns(bytes32 accountID) -func (f *FuturesTransactorSession) CreateAccount() (*types.Transaction, error) { - return f.Contract.CreateAccount(&f.TransactOpts) +// Solidity: function batchFillOrKillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256[] quantities, uint256[] margins, bytes32[] subAccountIDs, bytes[] signatures) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[] results) +func (f *FuturesTransactorSession) BatchFillOrKillOrders(orders []Order, quantities []*big.Int, margins []*big.Int, subAccountIDs [][32]byte, signatures [][]byte) (*types.Transaction, error) { + return f.Contract.BatchFillOrKillOrders(&f.TransactOpts, orders, quantities, margins, subAccountIDs, signatures) } -// CreateAccountAndDeposit is a paid mutator transaction binding the contract method 0xa68a4c3d. +// BatchFillOrKillOrdersSinglePosition is a paid mutator transaction binding the contract method 0xfdcb3d4f. // -// Solidity: function createAccountAndDeposit(uint256 amount) returns(bytes32) -func (f *FuturesTransactor) CreateAccountAndDeposit(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { - return f.contract.Transact(opts, "createAccountAndDeposit", amount) +// Solidity: function batchFillOrKillOrdersSinglePosition((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256[] quantities, uint256[] margins, bytes32 subAccountID, bytes[] signatures) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[] results) +func (f *FuturesTransactor) BatchFillOrKillOrdersSinglePosition(opts *bind.TransactOpts, orders []Order, quantities []*big.Int, margins []*big.Int, subAccountID [32]byte, signatures [][]byte) (*types.Transaction, error) { + return f.contract.Transact(opts, "batchFillOrKillOrdersSinglePosition", orders, quantities, margins, subAccountID, signatures) } -// CreateAccountAndDeposit is a paid mutator transaction binding the contract method 0xa68a4c3d. +// BatchFillOrKillOrdersSinglePosition is a paid mutator transaction binding the contract method 0xfdcb3d4f. // -// Solidity: function createAccountAndDeposit(uint256 amount) returns(bytes32) -func (f *FuturesSession) CreateAccountAndDeposit(amount *big.Int) (*types.Transaction, error) { - return f.Contract.CreateAccountAndDeposit(&f.TransactOpts, amount) +// Solidity: function batchFillOrKillOrdersSinglePosition((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256[] quantities, uint256[] margins, bytes32 subAccountID, bytes[] signatures) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[] results) +func (f *FuturesSession) BatchFillOrKillOrdersSinglePosition(orders []Order, quantities []*big.Int, margins []*big.Int, subAccountID [32]byte, signatures [][]byte) (*types.Transaction, error) { + return f.Contract.BatchFillOrKillOrdersSinglePosition(&f.TransactOpts, orders, quantities, margins, subAccountID, signatures) } -// CreateAccountAndDeposit is a paid mutator transaction binding the contract method 0xa68a4c3d. +// BatchFillOrKillOrdersSinglePosition is a paid mutator transaction binding the contract method 0xfdcb3d4f. // -// Solidity: function createAccountAndDeposit(uint256 amount) returns(bytes32) -func (f *FuturesTransactorSession) CreateAccountAndDeposit(amount *big.Int) (*types.Transaction, error) { - return f.Contract.CreateAccountAndDeposit(&f.TransactOpts, amount) +// Solidity: function batchFillOrKillOrdersSinglePosition((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256[] quantities, uint256[] margins, bytes32 subAccountID, bytes[] signatures) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[] results) +func (f *FuturesTransactorSession) BatchFillOrKillOrdersSinglePosition(orders []Order, quantities []*big.Int, margins []*big.Int, subAccountID [32]byte, signatures [][]byte) (*types.Transaction, error) { + return f.Contract.BatchFillOrKillOrdersSinglePosition(&f.TransactOpts, orders, quantities, margins, subAccountID, signatures) } -// CreateMarket is a paid mutator transaction binding the contract method 0x1af69e5f. +// BatchFillOrders is a paid mutator transaction binding the contract method 0x2e401b78. // -// Solidity: function createMarket(string ticker, address oracle, uint256 initialMarginRatio, uint256 liquidationPenalty, uint256 fundingInterval) returns() -func (f *FuturesTransactor) CreateMarket(opts *bind.TransactOpts, ticker string, oracle common.Address, initialMarginRatio *big.Int, liquidationPenalty *big.Int, fundingInterval *big.Int) (*types.Transaction, error) { - return f.contract.Transact(opts, "createMarket", ticker, oracle, initialMarginRatio, liquidationPenalty, fundingInterval) +// Solidity: function batchFillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256[] quantities, uint256[] margins, bytes32[] subAccountIDs, bytes[] signatures) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[] results) +func (f *FuturesTransactor) BatchFillOrders(opts *bind.TransactOpts, orders []Order, quantities []*big.Int, margins []*big.Int, subAccountIDs [][32]byte, signatures [][]byte) (*types.Transaction, error) { + return f.contract.Transact(opts, "batchFillOrders", orders, quantities, margins, subAccountIDs, signatures) } -// CreateMarket is a paid mutator transaction binding the contract method 0x1af69e5f. +// BatchFillOrders is a paid mutator transaction binding the contract method 0x2e401b78. // -// Solidity: function createMarket(string ticker, address oracle, uint256 initialMarginRatio, uint256 liquidationPenalty, uint256 fundingInterval) returns() -func (f *FuturesSession) CreateMarket(ticker string, oracle common.Address, initialMarginRatio *big.Int, liquidationPenalty *big.Int, fundingInterval *big.Int) (*types.Transaction, error) { - return f.Contract.CreateMarket(&f.TransactOpts, ticker, oracle, initialMarginRatio, liquidationPenalty, fundingInterval) +// Solidity: function batchFillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256[] quantities, uint256[] margins, bytes32[] subAccountIDs, bytes[] signatures) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[] results) +func (f *FuturesSession) BatchFillOrders(orders []Order, quantities []*big.Int, margins []*big.Int, subAccountIDs [][32]byte, signatures [][]byte) (*types.Transaction, error) { + return f.Contract.BatchFillOrders(&f.TransactOpts, orders, quantities, margins, subAccountIDs, signatures) } -// CreateMarket is a paid mutator transaction binding the contract method 0x1af69e5f. +// BatchFillOrders is a paid mutator transaction binding the contract method 0x2e401b78. // -// Solidity: function createMarket(string ticker, address oracle, uint256 initialMarginRatio, uint256 liquidationPenalty, uint256 fundingInterval) returns() -func (f *FuturesTransactorSession) CreateMarket(ticker string, oracle common.Address, initialMarginRatio *big.Int, liquidationPenalty *big.Int, fundingInterval *big.Int) (*types.Transaction, error) { - return f.Contract.CreateMarket(&f.TransactOpts, ticker, oracle, initialMarginRatio, liquidationPenalty, fundingInterval) +// Solidity: function batchFillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256[] quantities, uint256[] margins, bytes32[] subAccountIDs, bytes[] signatures) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[] results) +func (f *FuturesTransactorSession) BatchFillOrders(orders []Order, quantities []*big.Int, margins []*big.Int, subAccountIDs [][32]byte, signatures [][]byte) (*types.Transaction, error) { + return f.Contract.BatchFillOrders(&f.TransactOpts, orders, quantities, margins, subAccountIDs, signatures) } -// Deposit is a paid mutator transaction binding the contract method 0xb6b55f25. +// BatchFillOrdersSinglePosition is a paid mutator transaction binding the contract method 0x0dc32e0d. // -// Solidity: function deposit(uint256 amount) returns() -func (f *FuturesTransactor) Deposit(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { - return f.contract.Transact(opts, "deposit", amount) +// Solidity: function batchFillOrdersSinglePosition((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256[] quantities, uint256[] margins, bytes32 subAccountID, bytes[] signatures) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[] results) +func (f *FuturesTransactor) BatchFillOrdersSinglePosition(opts *bind.TransactOpts, orders []Order, quantities []*big.Int, margins []*big.Int, subAccountID [32]byte, signatures [][]byte) (*types.Transaction, error) { + return f.contract.Transact(opts, "batchFillOrdersSinglePosition", orders, quantities, margins, subAccountID, signatures) } -// Deposit is a paid mutator transaction binding the contract method 0xb6b55f25. +// BatchFillOrdersSinglePosition is a paid mutator transaction binding the contract method 0x0dc32e0d. // -// Solidity: function deposit(uint256 amount) returns() -func (f *FuturesSession) Deposit(amount *big.Int) (*types.Transaction, error) { - return f.Contract.Deposit(&f.TransactOpts, amount) +// Solidity: function batchFillOrdersSinglePosition((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256[] quantities, uint256[] margins, bytes32 subAccountID, bytes[] signatures) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[] results) +func (f *FuturesSession) BatchFillOrdersSinglePosition(orders []Order, quantities []*big.Int, margins []*big.Int, subAccountID [32]byte, signatures [][]byte) (*types.Transaction, error) { + return f.Contract.BatchFillOrdersSinglePosition(&f.TransactOpts, orders, quantities, margins, subAccountID, signatures) } -// Deposit is a paid mutator transaction binding the contract method 0xb6b55f25. +// BatchFillOrdersSinglePosition is a paid mutator transaction binding the contract method 0x0dc32e0d. // -// Solidity: function deposit(uint256 amount) returns() -func (f *FuturesTransactorSession) Deposit(amount *big.Int) (*types.Transaction, error) { - return f.Contract.Deposit(&f.TransactOpts, amount) +// Solidity: function batchFillOrdersSinglePosition((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256[] quantities, uint256[] margins, bytes32 subAccountID, bytes[] signatures) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[] results) +func (f *FuturesTransactorSession) BatchFillOrdersSinglePosition(orders []Order, quantities []*big.Int, margins []*big.Int, subAccountID [32]byte, signatures [][]byte) (*types.Transaction, error) { + return f.Contract.BatchFillOrdersSinglePosition(&f.TransactOpts, orders, quantities, margins, subAccountID, signatures) } -// DepositAccount is a paid mutator transaction binding the contract method 0x04c19cf0. +// BatchMatchOrders is a paid mutator transaction binding the contract method 0x6fcf3e9e. // -// Solidity: function depositAccount(bytes32 accountID, uint256 amount) returns() -func (f *FuturesTransactor) DepositAccount(opts *bind.TransactOpts, accountID [32]byte, amount *big.Int) (*types.Transaction, error) { - return f.contract.Transact(opts, "depositAccount", accountID, amount) +// Solidity: function batchMatchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] leftOrders, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] rightOrders, bytes[] leftSignatures, bytes[] rightSignatures) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[] results) +func (f *FuturesTransactor) BatchMatchOrders(opts *bind.TransactOpts, leftOrders []Order, rightOrders []Order, leftSignatures [][]byte, rightSignatures [][]byte) (*types.Transaction, error) { + return f.contract.Transact(opts, "batchMatchOrders", leftOrders, rightOrders, leftSignatures, rightSignatures) } -// DepositAccount is a paid mutator transaction binding the contract method 0x04c19cf0. +// BatchMatchOrders is a paid mutator transaction binding the contract method 0x6fcf3e9e. // -// Solidity: function depositAccount(bytes32 accountID, uint256 amount) returns() -func (f *FuturesSession) DepositAccount(accountID [32]byte, amount *big.Int) (*types.Transaction, error) { - return f.Contract.DepositAccount(&f.TransactOpts, accountID, amount) +// Solidity: function batchMatchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] leftOrders, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] rightOrders, bytes[] leftSignatures, bytes[] rightSignatures) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[] results) +func (f *FuturesSession) BatchMatchOrders(leftOrders []Order, rightOrders []Order, leftSignatures [][]byte, rightSignatures [][]byte) (*types.Transaction, error) { + return f.Contract.BatchMatchOrders(&f.TransactOpts, leftOrders, rightOrders, leftSignatures, rightSignatures) } -// DepositAccount is a paid mutator transaction binding the contract method 0x04c19cf0. +// BatchMatchOrders is a paid mutator transaction binding the contract method 0x6fcf3e9e. // -// Solidity: function depositAccount(bytes32 accountID, uint256 amount) returns() -func (f *FuturesTransactorSession) DepositAccount(accountID [32]byte, amount *big.Int) (*types.Transaction, error) { - return f.Contract.DepositAccount(&f.TransactOpts, accountID, amount) +// Solidity: function batchMatchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] leftOrders, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] rightOrders, bytes[] leftSignatures, bytes[] rightSignatures) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[] results) +func (f *FuturesTransactorSession) BatchMatchOrders(leftOrders []Order, rightOrders []Order, leftSignatures [][]byte, rightSignatures [][]byte) (*types.Transaction, error) { + return f.Contract.BatchMatchOrders(&f.TransactOpts, leftOrders, rightOrders, leftSignatures, rightSignatures) } -// DepositNewAccount is a paid mutator transaction binding the contract method 0x4a692978. +// CancelOrder is a paid mutator transaction binding the contract method 0x2da62987. // -// Solidity: function depositNewAccount(bytes32 accountID, uint256 amount) returns() -func (f *FuturesTransactor) DepositNewAccount(opts *bind.TransactOpts, accountID [32]byte, amount *big.Int) (*types.Transaction, error) { - return f.contract.Transact(opts, "depositNewAccount", accountID, amount) +// Solidity: function cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) order) returns() +func (f *FuturesTransactor) CancelOrder(opts *bind.TransactOpts, order Order) (*types.Transaction, error) { + return f.contract.Transact(opts, "cancelOrder", order) } -// DepositNewAccount is a paid mutator transaction binding the contract method 0x4a692978. +// CancelOrder is a paid mutator transaction binding the contract method 0x2da62987. // -// Solidity: function depositNewAccount(bytes32 accountID, uint256 amount) returns() -func (f *FuturesSession) DepositNewAccount(accountID [32]byte, amount *big.Int) (*types.Transaction, error) { - return f.Contract.DepositNewAccount(&f.TransactOpts, accountID, amount) +// Solidity: function cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) order) returns() +func (f *FuturesSession) CancelOrder(order Order) (*types.Transaction, error) { + return f.Contract.CancelOrder(&f.TransactOpts, order) } -// DepositNewAccount is a paid mutator transaction binding the contract method 0x4a692978. +// CancelOrder is a paid mutator transaction binding the contract method 0x2da62987. // -// Solidity: function depositNewAccount(bytes32 accountID, uint256 amount) returns() -func (f *FuturesTransactorSession) DepositNewAccount(accountID [32]byte, amount *big.Int) (*types.Transaction, error) { - return f.Contract.DepositNewAccount(&f.TransactOpts, accountID, amount) +// Solidity: function cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) order) returns() +func (f *FuturesTransactorSession) CancelOrder(order Order) (*types.Transaction, error) { + return f.Contract.CancelOrder(&f.TransactOpts, order) } -// FillOrder is a paid mutator transaction binding the contract method 0x833b2ea5. +// ClosePosition is a paid mutator transaction binding the contract method 0x89667e07. // -// Solidity: function fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) order, uint256 quantity, uint256 margin, bytes signature) returns(bytes32) -func (f *FuturesTransactor) FillOrder(opts *bind.TransactOpts, order Order, quantity *big.Int, margin *big.Int, signature []byte) (*types.Transaction, error) { - return f.contract.Transact(opts, "fillOrder", order, quantity, margin, signature) +// Solidity: function closePosition(uint256 positionID, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256 quantity, bytes[] signatures) returns((uint256,uint256,uint256,uint256)[] pResults, (int256,uint256) cResults) +func (f *FuturesTransactor) ClosePosition(opts *bind.TransactOpts, positionID *big.Int, orders []Order, quantity *big.Int, signatures [][]byte) (*types.Transaction, error) { + return f.contract.Transact(opts, "closePosition", positionID, orders, quantity, signatures) } -// FillOrder is a paid mutator transaction binding the contract method 0x833b2ea5. +// ClosePosition is a paid mutator transaction binding the contract method 0x89667e07. // -// Solidity: function fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) order, uint256 quantity, uint256 margin, bytes signature) returns(bytes32) -func (f *FuturesSession) FillOrder(order Order, quantity *big.Int, margin *big.Int, signature []byte) (*types.Transaction, error) { - return f.Contract.FillOrder(&f.TransactOpts, order, quantity, margin, signature) +// Solidity: function closePosition(uint256 positionID, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256 quantity, bytes[] signatures) returns((uint256,uint256,uint256,uint256)[] pResults, (int256,uint256) cResults) +func (f *FuturesSession) ClosePosition(positionID *big.Int, orders []Order, quantity *big.Int, signatures [][]byte) (*types.Transaction, error) { + return f.Contract.ClosePosition(&f.TransactOpts, positionID, orders, quantity, signatures) } -// FillOrder is a paid mutator transaction binding the contract method 0x833b2ea5. +// ClosePosition is a paid mutator transaction binding the contract method 0x89667e07. // -// Solidity: function fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) order, uint256 quantity, uint256 margin, bytes signature) returns(bytes32) -func (f *FuturesTransactorSession) FillOrder(order Order, quantity *big.Int, margin *big.Int, signature []byte) (*types.Transaction, error) { - return f.Contract.FillOrder(&f.TransactOpts, order, quantity, margin, signature) +// Solidity: function closePosition(uint256 positionID, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256 quantity, bytes[] signatures) returns((uint256,uint256,uint256,uint256)[] pResults, (int256,uint256) cResults) +func (f *FuturesTransactorSession) ClosePosition(positionID *big.Int, orders []Order, quantity *big.Int, signatures [][]byte) (*types.Transaction, error) { + return f.Contract.ClosePosition(&f.TransactOpts, positionID, orders, quantity, signatures) } -// FundPooledDeposits is a paid mutator transaction binding the contract method 0x8f7e9459. +// ClosePositionOrKill is a paid mutator transaction binding the contract method 0x1b5841de. // -// Solidity: function fundPooledDeposits(uint256 amount, bytes32 marketID) returns() -func (f *FuturesTransactor) FundPooledDeposits(opts *bind.TransactOpts, amount *big.Int, marketID [32]byte) (*types.Transaction, error) { - return f.contract.Transact(opts, "fundPooledDeposits", amount, marketID) +// Solidity: function closePositionOrKill(uint256 positionID, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256 quantity, bytes[] signatures) returns((uint256,uint256,uint256,uint256)[] pResults, (int256,uint256) cResults) +func (f *FuturesTransactor) ClosePositionOrKill(opts *bind.TransactOpts, positionID *big.Int, orders []Order, quantity *big.Int, signatures [][]byte) (*types.Transaction, error) { + return f.contract.Transact(opts, "closePositionOrKill", positionID, orders, quantity, signatures) } -// FundPooledDeposits is a paid mutator transaction binding the contract method 0x8f7e9459. +// ClosePositionOrKill is a paid mutator transaction binding the contract method 0x1b5841de. // -// Solidity: function fundPooledDeposits(uint256 amount, bytes32 marketID) returns() -func (f *FuturesSession) FundPooledDeposits(amount *big.Int, marketID [32]byte) (*types.Transaction, error) { - return f.Contract.FundPooledDeposits(&f.TransactOpts, amount, marketID) +// Solidity: function closePositionOrKill(uint256 positionID, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256 quantity, bytes[] signatures) returns((uint256,uint256,uint256,uint256)[] pResults, (int256,uint256) cResults) +func (f *FuturesSession) ClosePositionOrKill(positionID *big.Int, orders []Order, quantity *big.Int, signatures [][]byte) (*types.Transaction, error) { + return f.Contract.ClosePositionOrKill(&f.TransactOpts, positionID, orders, quantity, signatures) } -// FundPooledDeposits is a paid mutator transaction binding the contract method 0x8f7e9459. +// ClosePositionOrKill is a paid mutator transaction binding the contract method 0x1b5841de. // -// Solidity: function fundPooledDeposits(uint256 amount, bytes32 marketID) returns() -func (f *FuturesTransactorSession) FundPooledDeposits(amount *big.Int, marketID [32]byte) (*types.Transaction, error) { - return f.Contract.FundPooledDeposits(&f.TransactOpts, amount, marketID) +// Solidity: function closePositionOrKill(uint256 positionID, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256 quantity, bytes[] signatures) returns((uint256,uint256,uint256,uint256)[] pResults, (int256,uint256) cResults) +func (f *FuturesTransactorSession) ClosePositionOrKill(positionID *big.Int, orders []Order, quantity *big.Int, signatures [][]byte) (*types.Transaction, error) { + return f.Contract.ClosePositionOrKill(&f.TransactOpts, positionID, orders, quantity, signatures) } -// MarketOrders is a paid mutator transaction binding the contract method 0xd440e9b6. +// CreateDefaultSubAccountAndDeposit is a paid mutator transaction binding the contract method 0x71eae660. // -// Solidity: function marketOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256 quantity, uint256 margin, bytes[] signatures) returns(bytes32) -func (f *FuturesTransactor) MarketOrders(opts *bind.TransactOpts, orders []Order, quantity *big.Int, margin *big.Int, signatures [][]byte) (*types.Transaction, error) { - return f.contract.Transact(opts, "marketOrders", orders, quantity, margin, signatures) +// Solidity: function createDefaultSubAccountAndDeposit(uint256 amount) returns(bytes32) +func (f *FuturesTransactor) CreateDefaultSubAccountAndDeposit(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { + return f.contract.Transact(opts, "createDefaultSubAccountAndDeposit", amount) } -// MarketOrders is a paid mutator transaction binding the contract method 0xd440e9b6. +// CreateDefaultSubAccountAndDeposit is a paid mutator transaction binding the contract method 0x71eae660. // -// Solidity: function marketOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256 quantity, uint256 margin, bytes[] signatures) returns(bytes32) -func (f *FuturesSession) MarketOrders(orders []Order, quantity *big.Int, margin *big.Int, signatures [][]byte) (*types.Transaction, error) { - return f.Contract.MarketOrders(&f.TransactOpts, orders, quantity, margin, signatures) +// Solidity: function createDefaultSubAccountAndDeposit(uint256 amount) returns(bytes32) +func (f *FuturesSession) CreateDefaultSubAccountAndDeposit(amount *big.Int) (*types.Transaction, error) { + return f.Contract.CreateDefaultSubAccountAndDeposit(&f.TransactOpts, amount) } -// MarketOrders is a paid mutator transaction binding the contract method 0xd440e9b6. +// CreateDefaultSubAccountAndDeposit is a paid mutator transaction binding the contract method 0x71eae660. // -// Solidity: function marketOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256 quantity, uint256 margin, bytes[] signatures) returns(bytes32) -func (f *FuturesTransactorSession) MarketOrders(orders []Order, quantity *big.Int, margin *big.Int, signatures [][]byte) (*types.Transaction, error) { - return f.Contract.MarketOrders(&f.TransactOpts, orders, quantity, margin, signatures) +// Solidity: function createDefaultSubAccountAndDeposit(uint256 amount) returns(bytes32) +func (f *FuturesTransactorSession) CreateDefaultSubAccountAndDeposit(amount *big.Int) (*types.Transaction, error) { + return f.Contract.CreateDefaultSubAccountAndDeposit(&f.TransactOpts, amount) } -// MatchOrders is a paid mutator transaction binding the contract method 0x88ec79fb. +// CreateMarket is a paid mutator transaction binding the contract method 0xbb5d156a. // -// Solidity: function matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) leftOrder, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) rightOrder, bytes leftSignature, bytes rightSignature) returns() -func (f *FuturesTransactor) MatchOrders(opts *bind.TransactOpts, leftOrder Order, rightOrder Order, leftSignature []byte, rightSignature []byte) (*types.Transaction, error) { - return f.contract.Transact(opts, "matchOrders", leftOrder, rightOrder, leftSignature, rightSignature) +// Solidity: function createMarket(string ticker, address oracle, (uint256) initialMarginRatioFactor, (uint256) maintenanceMarginRatio, uint256 fundingInterval, (uint256) makerTxFee, (uint256) takerTxFee, (uint256) relayerFeePercentage) returns() +func (f *FuturesTransactor) CreateMarket(opts *bind.TransactOpts, ticker string, oracle common.Address, initialMarginRatioFactor PermyriadMathPermyriad, maintenanceMarginRatio PermyriadMathPermyriad, fundingInterval *big.Int, makerTxFee PermyriadMathPermyriad, takerTxFee PermyriadMathPermyriad, relayerFeePercentage PermyriadMathPermyriad) (*types.Transaction, error) { + return f.contract.Transact(opts, "createMarket", ticker, oracle, initialMarginRatioFactor, maintenanceMarginRatio, fundingInterval, makerTxFee, takerTxFee, relayerFeePercentage) } -// MatchOrders is a paid mutator transaction binding the contract method 0x88ec79fb. +// CreateMarket is a paid mutator transaction binding the contract method 0xbb5d156a. // -// Solidity: function matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) leftOrder, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) rightOrder, bytes leftSignature, bytes rightSignature) returns() -func (f *FuturesSession) MatchOrders(leftOrder Order, rightOrder Order, leftSignature []byte, rightSignature []byte) (*types.Transaction, error) { - return f.Contract.MatchOrders(&f.TransactOpts, leftOrder, rightOrder, leftSignature, rightSignature) +// Solidity: function createMarket(string ticker, address oracle, (uint256) initialMarginRatioFactor, (uint256) maintenanceMarginRatio, uint256 fundingInterval, (uint256) makerTxFee, (uint256) takerTxFee, (uint256) relayerFeePercentage) returns() +func (f *FuturesSession) CreateMarket(ticker string, oracle common.Address, initialMarginRatioFactor PermyriadMathPermyriad, maintenanceMarginRatio PermyriadMathPermyriad, fundingInterval *big.Int, makerTxFee PermyriadMathPermyriad, takerTxFee PermyriadMathPermyriad, relayerFeePercentage PermyriadMathPermyriad) (*types.Transaction, error) { + return f.Contract.CreateMarket(&f.TransactOpts, ticker, oracle, initialMarginRatioFactor, maintenanceMarginRatio, fundingInterval, makerTxFee, takerTxFee, relayerFeePercentage) } -// MatchOrders is a paid mutator transaction binding the contract method 0x88ec79fb. +// CreateMarket is a paid mutator transaction binding the contract method 0xbb5d156a. // -// Solidity: function matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) leftOrder, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) rightOrder, bytes leftSignature, bytes rightSignature) returns() -func (f *FuturesTransactorSession) MatchOrders(leftOrder Order, rightOrder Order, leftSignature []byte, rightSignature []byte) (*types.Transaction, error) { - return f.Contract.MatchOrders(&f.TransactOpts, leftOrder, rightOrder, leftSignature, rightSignature) +// Solidity: function createMarket(string ticker, address oracle, (uint256) initialMarginRatioFactor, (uint256) maintenanceMarginRatio, uint256 fundingInterval, (uint256) makerTxFee, (uint256) takerTxFee, (uint256) relayerFeePercentage) returns() +func (f *FuturesTransactorSession) CreateMarket(ticker string, oracle common.Address, initialMarginRatioFactor PermyriadMathPermyriad, maintenanceMarginRatio PermyriadMathPermyriad, fundingInterval *big.Int, makerTxFee PermyriadMathPermyriad, takerTxFee PermyriadMathPermyriad, relayerFeePercentage PermyriadMathPermyriad) (*types.Transaction, error) { + return f.Contract.CreateMarket(&f.TransactOpts, ticker, oracle, initialMarginRatioFactor, maintenanceMarginRatio, fundingInterval, makerTxFee, takerTxFee, relayerFeePercentage) } -// MultiMatchOrders is a paid mutator transaction binding the contract method 0x86d7729c. +// CreateMarketWithFixedMarketId is a paid mutator transaction binding the contract method 0x0aa6c353. // -// Solidity: function multiMatchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] leftOrders, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) rightOrder, bytes[] leftSignatures, bytes rightSignature) returns() -func (f *FuturesTransactor) MultiMatchOrders(opts *bind.TransactOpts, leftOrders []Order, rightOrder Order, leftSignatures [][]byte, rightSignature []byte) (*types.Transaction, error) { - return f.contract.Transact(opts, "multiMatchOrders", leftOrders, rightOrder, leftSignatures, rightSignature) +// Solidity: function createMarketWithFixedMarketId(string ticker, address oracle, (uint256) initialMarginRatioFactor, (uint256) maintenanceMarginRatio, uint256 fundingInterval, (uint256) makerTxFee, (uint256) takerTxFee, (uint256) relayerFeePercentage, bytes32 marketID) returns() +func (f *FuturesTransactor) CreateMarketWithFixedMarketId(opts *bind.TransactOpts, ticker string, oracle common.Address, initialMarginRatioFactor PermyriadMathPermyriad, maintenanceMarginRatio PermyriadMathPermyriad, fundingInterval *big.Int, makerTxFee PermyriadMathPermyriad, takerTxFee PermyriadMathPermyriad, relayerFeePercentage PermyriadMathPermyriad, marketID [32]byte) (*types.Transaction, error) { + return f.contract.Transact(opts, "createMarketWithFixedMarketId", ticker, oracle, initialMarginRatioFactor, maintenanceMarginRatio, fundingInterval, makerTxFee, takerTxFee, relayerFeePercentage, marketID) } -// MultiMatchOrders is a paid mutator transaction binding the contract method 0x86d7729c. +// CreateMarketWithFixedMarketId is a paid mutator transaction binding the contract method 0x0aa6c353. // -// Solidity: function multiMatchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] leftOrders, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) rightOrder, bytes[] leftSignatures, bytes rightSignature) returns() -func (f *FuturesSession) MultiMatchOrders(leftOrders []Order, rightOrder Order, leftSignatures [][]byte, rightSignature []byte) (*types.Transaction, error) { - return f.Contract.MultiMatchOrders(&f.TransactOpts, leftOrders, rightOrder, leftSignatures, rightSignature) +// Solidity: function createMarketWithFixedMarketId(string ticker, address oracle, (uint256) initialMarginRatioFactor, (uint256) maintenanceMarginRatio, uint256 fundingInterval, (uint256) makerTxFee, (uint256) takerTxFee, (uint256) relayerFeePercentage, bytes32 marketID) returns() +func (f *FuturesSession) CreateMarketWithFixedMarketId(ticker string, oracle common.Address, initialMarginRatioFactor PermyriadMathPermyriad, maintenanceMarginRatio PermyriadMathPermyriad, fundingInterval *big.Int, makerTxFee PermyriadMathPermyriad, takerTxFee PermyriadMathPermyriad, relayerFeePercentage PermyriadMathPermyriad, marketID [32]byte) (*types.Transaction, error) { + return f.Contract.CreateMarketWithFixedMarketId(&f.TransactOpts, ticker, oracle, initialMarginRatioFactor, maintenanceMarginRatio, fundingInterval, makerTxFee, takerTxFee, relayerFeePercentage, marketID) } -// MultiMatchOrders is a paid mutator transaction binding the contract method 0x86d7729c. +// CreateMarketWithFixedMarketId is a paid mutator transaction binding the contract method 0x0aa6c353. // -// Solidity: function multiMatchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] leftOrders, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) rightOrder, bytes[] leftSignatures, bytes rightSignature) returns() -func (f *FuturesTransactorSession) MultiMatchOrders(leftOrders []Order, rightOrder Order, leftSignatures [][]byte, rightSignature []byte) (*types.Transaction, error) { - return f.Contract.MultiMatchOrders(&f.TransactOpts, leftOrders, rightOrder, leftSignatures, rightSignature) +// Solidity: function createMarketWithFixedMarketId(string ticker, address oracle, (uint256) initialMarginRatioFactor, (uint256) maintenanceMarginRatio, uint256 fundingInterval, (uint256) makerTxFee, (uint256) takerTxFee, (uint256) relayerFeePercentage, bytes32 marketID) returns() +func (f *FuturesTransactorSession) CreateMarketWithFixedMarketId(ticker string, oracle common.Address, initialMarginRatioFactor PermyriadMathPermyriad, maintenanceMarginRatio PermyriadMathPermyriad, fundingInterval *big.Int, makerTxFee PermyriadMathPermyriad, takerTxFee PermyriadMathPermyriad, relayerFeePercentage PermyriadMathPermyriad, marketID [32]byte) (*types.Transaction, error) { + return f.Contract.CreateMarketWithFixedMarketId(&f.TransactOpts, ticker, oracle, initialMarginRatioFactor, maintenanceMarginRatio, fundingInterval, makerTxFee, takerTxFee, relayerFeePercentage, marketID) } -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// CreateSubAccountAndDeposit is a paid mutator transaction binding the contract method 0x92c5d8f8. // -// Solidity: function renounceOwnership() returns() -func (f *FuturesTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return f.contract.Transact(opts, "renounceOwnership") +// Solidity: function createSubAccountAndDeposit(uint256 subAccountNonce, uint256 amount) returns(bytes32) +func (f *FuturesTransactor) CreateSubAccountAndDeposit(opts *bind.TransactOpts, subAccountNonce *big.Int, amount *big.Int) (*types.Transaction, error) { + return f.contract.Transact(opts, "createSubAccountAndDeposit", subAccountNonce, amount) } -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// CreateSubAccountAndDeposit is a paid mutator transaction binding the contract method 0x92c5d8f8. // -// Solidity: function renounceOwnership() returns() -func (f *FuturesSession) RenounceOwnership() (*types.Transaction, error) { - return f.Contract.RenounceOwnership(&f.TransactOpts) +// Solidity: function createSubAccountAndDeposit(uint256 subAccountNonce, uint256 amount) returns(bytes32) +func (f *FuturesSession) CreateSubAccountAndDeposit(subAccountNonce *big.Int, amount *big.Int) (*types.Transaction, error) { + return f.Contract.CreateSubAccountAndDeposit(&f.TransactOpts, subAccountNonce, amount) } -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// CreateSubAccountAndDeposit is a paid mutator transaction binding the contract method 0x92c5d8f8. // -// Solidity: function renounceOwnership() returns() -func (f *FuturesTransactorSession) RenounceOwnership() (*types.Transaction, error) { - return f.Contract.RenounceOwnership(&f.TransactOpts) +// Solidity: function createSubAccountAndDeposit(uint256 subAccountNonce, uint256 amount) returns(bytes32) +func (f *FuturesTransactorSession) CreateSubAccountAndDeposit(subAccountNonce *big.Int, amount *big.Int) (*types.Transaction, error) { + return f.Contract.CreateSubAccountAndDeposit(&f.TransactOpts, subAccountNonce, amount) } -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// CreateSubAccountForTraderWithNonce is a paid mutator transaction binding the contract method 0x2d1fb098. // -// Solidity: function transferOwnership(address newOwner) returns() -func (f *FuturesTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { - return f.contract.Transact(opts, "transferOwnership", newOwner) +// Solidity: function createSubAccountForTraderWithNonce(address trader, uint256 subAccountNonce) returns(bytes32) +func (f *FuturesTransactor) CreateSubAccountForTraderWithNonce(opts *bind.TransactOpts, trader common.Address, subAccountNonce *big.Int) (*types.Transaction, error) { + return f.contract.Transact(opts, "createSubAccountForTraderWithNonce", trader, subAccountNonce) } -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// CreateSubAccountForTraderWithNonce is a paid mutator transaction binding the contract method 0x2d1fb098. // -// Solidity: function transferOwnership(address newOwner) returns() -func (f *FuturesSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return f.Contract.TransferOwnership(&f.TransactOpts, newOwner) +// Solidity: function createSubAccountForTraderWithNonce(address trader, uint256 subAccountNonce) returns(bytes32) +func (f *FuturesSession) CreateSubAccountForTraderWithNonce(trader common.Address, subAccountNonce *big.Int) (*types.Transaction, error) { + return f.Contract.CreateSubAccountForTraderWithNonce(&f.TransactOpts, trader, subAccountNonce) } -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// CreateSubAccountForTraderWithNonce is a paid mutator transaction binding the contract method 0x2d1fb098. // -// Solidity: function transferOwnership(address newOwner) returns() -func (f *FuturesTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return f.Contract.TransferOwnership(&f.TransactOpts, newOwner) +// Solidity: function createSubAccountForTraderWithNonce(address trader, uint256 subAccountNonce) returns(bytes32) +func (f *FuturesTransactorSession) CreateSubAccountForTraderWithNonce(trader common.Address, subAccountNonce *big.Int) (*types.Transaction, error) { + return f.Contract.CreateSubAccountForTraderWithNonce(&f.TransactOpts, trader, subAccountNonce) } -// VerifyClose is a paid mutator transaction binding the contract method 0xe8e73d08. +// Deposit is a paid mutator transaction binding the contract method 0xb6b55f25. // -// Solidity: function verifyClose(uint256 positionID, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) order, uint256 quantity, bytes signature) returns((bytes32,bytes32,uint8,uint256,uint256,int256,uint256,uint256,int256) newPosition, bytes32 hash) -func (f *FuturesTransactor) VerifyClose(opts *bind.TransactOpts, positionID *big.Int, order Order, quantity *big.Int, signature []byte) (*types.Transaction, error) { - return f.contract.Transact(opts, "verifyClose", positionID, order, quantity, signature) +// Solidity: function deposit(uint256 amount) returns() +func (f *FuturesTransactor) Deposit(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { + return f.contract.Transact(opts, "deposit", amount) } -// VerifyClose is a paid mutator transaction binding the contract method 0xe8e73d08. +// Deposit is a paid mutator transaction binding the contract method 0xb6b55f25. // -// Solidity: function verifyClose(uint256 positionID, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) order, uint256 quantity, bytes signature) returns((bytes32,bytes32,uint8,uint256,uint256,int256,uint256,uint256,int256) newPosition, bytes32 hash) -func (f *FuturesSession) VerifyClose(positionID *big.Int, order Order, quantity *big.Int, signature []byte) (*types.Transaction, error) { - return f.Contract.VerifyClose(&f.TransactOpts, positionID, order, quantity, signature) +// Solidity: function deposit(uint256 amount) returns() +func (f *FuturesSession) Deposit(amount *big.Int) (*types.Transaction, error) { + return f.Contract.Deposit(&f.TransactOpts, amount) } -// VerifyClose is a paid mutator transaction binding the contract method 0xe8e73d08. +// Deposit is a paid mutator transaction binding the contract method 0xb6b55f25. // -// Solidity: function verifyClose(uint256 positionID, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) order, uint256 quantity, bytes signature) returns((bytes32,bytes32,uint8,uint256,uint256,int256,uint256,uint256,int256) newPosition, bytes32 hash) -func (f *FuturesTransactorSession) VerifyClose(positionID *big.Int, order Order, quantity *big.Int, signature []byte) (*types.Transaction, error) { - return f.Contract.VerifyClose(&f.TransactOpts, positionID, order, quantity, signature) +// Solidity: function deposit(uint256 amount) returns() +func (f *FuturesTransactorSession) Deposit(amount *big.Int) (*types.Transaction, error) { + return f.Contract.Deposit(&f.TransactOpts, amount) } -// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// DepositFor is a paid mutator transaction binding the contract method 0x2f4f21e2. // -// Solidity: function withdraw(uint256 amount) returns() -func (f *FuturesTransactor) Withdraw(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { - return f.contract.Transact(opts, "withdraw", amount) +// Solidity: function depositFor(address trader, uint256 amount) returns() +func (f *FuturesTransactor) DepositFor(opts *bind.TransactOpts, trader common.Address, amount *big.Int) (*types.Transaction, error) { + return f.contract.Transact(opts, "depositFor", trader, amount) } -// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// DepositFor is a paid mutator transaction binding the contract method 0x2f4f21e2. // -// Solidity: function withdraw(uint256 amount) returns() -func (f *FuturesSession) Withdraw(amount *big.Int) (*types.Transaction, error) { - return f.Contract.Withdraw(&f.TransactOpts, amount) +// Solidity: function depositFor(address trader, uint256 amount) returns() +func (f *FuturesSession) DepositFor(trader common.Address, amount *big.Int) (*types.Transaction, error) { + return f.Contract.DepositFor(&f.TransactOpts, trader, amount) } -// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. +// DepositFor is a paid mutator transaction binding the contract method 0x2f4f21e2. // -// Solidity: function withdraw(uint256 amount) returns() -func (f *FuturesTransactorSession) Withdraw(amount *big.Int) (*types.Transaction, error) { - return f.Contract.Withdraw(&f.TransactOpts, amount) +// Solidity: function depositFor(address trader, uint256 amount) returns() +func (f *FuturesTransactorSession) DepositFor(trader common.Address, amount *big.Int) (*types.Transaction, error) { + return f.Contract.DepositFor(&f.TransactOpts, trader, amount) } -// WithdrawAccount is a paid mutator transaction binding the contract method 0x4d6a5cbc. +// DepositIntoSubAccount is a paid mutator transaction binding the contract method 0x1cc3cf30. // -// Solidity: function withdrawAccount(bytes32 accountID, uint256 amount) returns() -func (f *FuturesTransactor) WithdrawAccount(opts *bind.TransactOpts, accountID [32]byte, amount *big.Int) (*types.Transaction, error) { - return f.contract.Transact(opts, "withdrawAccount", accountID, amount) +// Solidity: function depositIntoSubAccount(bytes32 subAccountID, uint256 amount) returns() +func (f *FuturesTransactor) DepositIntoSubAccount(opts *bind.TransactOpts, subAccountID [32]byte, amount *big.Int) (*types.Transaction, error) { + return f.contract.Transact(opts, "depositIntoSubAccount", subAccountID, amount) } -// WithdrawAccount is a paid mutator transaction binding the contract method 0x4d6a5cbc. +// DepositIntoSubAccount is a paid mutator transaction binding the contract method 0x1cc3cf30. // -// Solidity: function withdrawAccount(bytes32 accountID, uint256 amount) returns() -func (f *FuturesSession) WithdrawAccount(accountID [32]byte, amount *big.Int) (*types.Transaction, error) { - return f.Contract.WithdrawAccount(&f.TransactOpts, accountID, amount) +// Solidity: function depositIntoSubAccount(bytes32 subAccountID, uint256 amount) returns() +func (f *FuturesSession) DepositIntoSubAccount(subAccountID [32]byte, amount *big.Int) (*types.Transaction, error) { + return f.Contract.DepositIntoSubAccount(&f.TransactOpts, subAccountID, amount) } -// WithdrawAccount is a paid mutator transaction binding the contract method 0x4d6a5cbc. +// DepositIntoSubAccount is a paid mutator transaction binding the contract method 0x1cc3cf30. // -// Solidity: function withdrawAccount(bytes32 accountID, uint256 amount) returns() -func (f *FuturesTransactorSession) WithdrawAccount(accountID [32]byte, amount *big.Int) (*types.Transaction, error) { - return f.Contract.WithdrawAccount(&f.TransactOpts, accountID, amount) +// Solidity: function depositIntoSubAccount(bytes32 subAccountID, uint256 amount) returns() +func (f *FuturesTransactorSession) DepositIntoSubAccount(subAccountID [32]byte, amount *big.Int) (*types.Transaction, error) { + return f.Contract.DepositIntoSubAccount(&f.TransactOpts, subAccountID, amount) } -// FuturesAccountCreationIterator is returned from FilterAccountCreation and is used to iterate over the raw logs and unpacked data for AccountCreation events raised by the Futures contract. -type FuturesAccountCreationIterator struct { - Event *FuturesAccountCreation // Event containing the contract specifics and raw log +// EmergencyStopFutures is a paid mutator transaction binding the contract method 0x0d64dc42. +// +// Solidity: function emergencyStopFutures() returns() +func (f *FuturesTransactor) EmergencyStopFutures(opts *bind.TransactOpts) (*types.Transaction, error) { + return f.contract.Transact(opts, "emergencyStopFutures") +} - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data +// EmergencyStopFutures is a paid mutator transaction binding the contract method 0x0d64dc42. +// +// Solidity: function emergencyStopFutures() returns() +func (f *FuturesSession) EmergencyStopFutures() (*types.Transaction, error) { + return f.Contract.EmergencyStopFutures(&f.TransactOpts) +} - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration +// EmergencyStopFutures is a paid mutator transaction binding the contract method 0x0d64dc42. +// +// Solidity: function emergencyStopFutures() returns() +func (f *FuturesTransactorSession) EmergencyStopFutures() (*types.Transaction, error) { + return f.Contract.EmergencyStopFutures(&f.TransactOpts) +} + +// FillOrKillOrder is a paid mutator transaction binding the contract method 0x4024fd0e. +// +// Solidity: function fillOrKillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) order, uint256 quantity, uint256 margin, bytes32 subAccountID, bytes signature) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256) results) +func (f *FuturesTransactor) FillOrKillOrder(opts *bind.TransactOpts, order Order, quantity *big.Int, margin *big.Int, subAccountID [32]byte, signature []byte) (*types.Transaction, error) { + return f.contract.Transact(opts, "fillOrKillOrder", order, quantity, margin, subAccountID, signature) +} + +// FillOrKillOrder is a paid mutator transaction binding the contract method 0x4024fd0e. +// +// Solidity: function fillOrKillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) order, uint256 quantity, uint256 margin, bytes32 subAccountID, bytes signature) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256) results) +func (f *FuturesSession) FillOrKillOrder(order Order, quantity *big.Int, margin *big.Int, subAccountID [32]byte, signature []byte) (*types.Transaction, error) { + return f.Contract.FillOrKillOrder(&f.TransactOpts, order, quantity, margin, subAccountID, signature) +} + +// FillOrKillOrder is a paid mutator transaction binding the contract method 0x4024fd0e. +// +// Solidity: function fillOrKillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) order, uint256 quantity, uint256 margin, bytes32 subAccountID, bytes signature) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256) results) +func (f *FuturesTransactorSession) FillOrKillOrder(order Order, quantity *big.Int, margin *big.Int, subAccountID [32]byte, signature []byte) (*types.Transaction, error) { + return f.Contract.FillOrKillOrder(&f.TransactOpts, order, quantity, margin, subAccountID, signature) +} + +// FillOrder is a paid mutator transaction binding the contract method 0x57b6abf8. +// +// Solidity: function fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) order, uint256 quantity, uint256 margin, bytes32 subAccountID, bytes signature) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) +func (f *FuturesTransactor) FillOrder(opts *bind.TransactOpts, order Order, quantity *big.Int, margin *big.Int, subAccountID [32]byte, signature []byte) (*types.Transaction, error) { + return f.contract.Transact(opts, "fillOrder", order, quantity, margin, subAccountID, signature) +} + +// FillOrder is a paid mutator transaction binding the contract method 0x57b6abf8. +// +// Solidity: function fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) order, uint256 quantity, uint256 margin, bytes32 subAccountID, bytes signature) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) +func (f *FuturesSession) FillOrder(order Order, quantity *big.Int, margin *big.Int, subAccountID [32]byte, signature []byte) (*types.Transaction, error) { + return f.Contract.FillOrder(&f.TransactOpts, order, quantity, margin, subAccountID, signature) +} + +// FillOrder is a paid mutator transaction binding the contract method 0x57b6abf8. +// +// Solidity: function fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) order, uint256 quantity, uint256 margin, bytes32 subAccountID, bytes signature) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) +func (f *FuturesTransactorSession) FillOrder(order Order, quantity *big.Int, margin *big.Int, subAccountID [32]byte, signature []byte) (*types.Transaction, error) { + return f.Contract.FillOrder(&f.TransactOpts, order, quantity, margin, subAccountID, signature) +} + +// FundPooledDeposits is a paid mutator transaction binding the contract method 0x8f7e9459. +// +// Solidity: function fundPooledDeposits(uint256 amount, bytes32 marketID) returns() +func (f *FuturesTransactor) FundPooledDeposits(opts *bind.TransactOpts, amount *big.Int, marketID [32]byte) (*types.Transaction, error) { + return f.contract.Transact(opts, "fundPooledDeposits", amount, marketID) +} + +// FundPooledDeposits is a paid mutator transaction binding the contract method 0x8f7e9459. +// +// Solidity: function fundPooledDeposits(uint256 amount, bytes32 marketID) returns() +func (f *FuturesSession) FundPooledDeposits(amount *big.Int, marketID [32]byte) (*types.Transaction, error) { + return f.Contract.FundPooledDeposits(&f.TransactOpts, amount, marketID) +} + +// FundPooledDeposits is a paid mutator transaction binding the contract method 0x8f7e9459. +// +// Solidity: function fundPooledDeposits(uint256 amount, bytes32 marketID) returns() +func (f *FuturesTransactorSession) FundPooledDeposits(amount *big.Int, marketID [32]byte) (*types.Transaction, error) { + return f.Contract.FundPooledDeposits(&f.TransactOpts, amount, marketID) +} + +// LiquidatePosition is a paid mutator transaction binding the contract method 0x472275aa. +// +// Solidity: function liquidatePosition(uint256 positionID, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256 quantity, bytes[] signatures) returns((uint256,uint256,uint256,uint256)[] pResults, (int256,uint256) cResults) +func (f *FuturesTransactor) LiquidatePosition(opts *bind.TransactOpts, positionID *big.Int, orders []Order, quantity *big.Int, signatures [][]byte) (*types.Transaction, error) { + return f.contract.Transact(opts, "liquidatePosition", positionID, orders, quantity, signatures) +} + +// LiquidatePosition is a paid mutator transaction binding the contract method 0x472275aa. +// +// Solidity: function liquidatePosition(uint256 positionID, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256 quantity, bytes[] signatures) returns((uint256,uint256,uint256,uint256)[] pResults, (int256,uint256) cResults) +func (f *FuturesSession) LiquidatePosition(positionID *big.Int, orders []Order, quantity *big.Int, signatures [][]byte) (*types.Transaction, error) { + return f.Contract.LiquidatePosition(&f.TransactOpts, positionID, orders, quantity, signatures) +} + +// LiquidatePosition is a paid mutator transaction binding the contract method 0x472275aa. +// +// Solidity: function liquidatePosition(uint256 positionID, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256 quantity, bytes[] signatures) returns((uint256,uint256,uint256,uint256)[] pResults, (int256,uint256) cResults) +func (f *FuturesTransactorSession) LiquidatePosition(positionID *big.Int, orders []Order, quantity *big.Int, signatures [][]byte) (*types.Transaction, error) { + return f.Contract.LiquidatePosition(&f.TransactOpts, positionID, orders, quantity, signatures) +} + +// MarketOrders is a paid mutator transaction binding the contract method 0x5209a8e7. +// +// Solidity: function marketOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256 quantity, uint256 margin, bytes32 subAccountID, bytes[] signatures) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[] results) +func (f *FuturesTransactor) MarketOrders(opts *bind.TransactOpts, orders []Order, quantity *big.Int, margin *big.Int, subAccountID [32]byte, signatures [][]byte) (*types.Transaction, error) { + return f.contract.Transact(opts, "marketOrders", orders, quantity, margin, subAccountID, signatures) +} + +// MarketOrders is a paid mutator transaction binding the contract method 0x5209a8e7. +// +// Solidity: function marketOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256 quantity, uint256 margin, bytes32 subAccountID, bytes[] signatures) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[] results) +func (f *FuturesSession) MarketOrders(orders []Order, quantity *big.Int, margin *big.Int, subAccountID [32]byte, signatures [][]byte) (*types.Transaction, error) { + return f.Contract.MarketOrders(&f.TransactOpts, orders, quantity, margin, subAccountID, signatures) +} + +// MarketOrders is a paid mutator transaction binding the contract method 0x5209a8e7. +// +// Solidity: function marketOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256 quantity, uint256 margin, bytes32 subAccountID, bytes[] signatures) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[] results) +func (f *FuturesTransactorSession) MarketOrders(orders []Order, quantity *big.Int, margin *big.Int, subAccountID [32]byte, signatures [][]byte) (*types.Transaction, error) { + return f.Contract.MarketOrders(&f.TransactOpts, orders, quantity, margin, subAccountID, signatures) +} + +// MarketOrdersOrKill is a paid mutator transaction binding the contract method 0x52863e4f. +// +// Solidity: function marketOrdersOrKill((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256 quantity, uint256 margin, bytes32 subAccountID, bytes[] signatures) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[] results) +func (f *FuturesTransactor) MarketOrdersOrKill(opts *bind.TransactOpts, orders []Order, quantity *big.Int, margin *big.Int, subAccountID [32]byte, signatures [][]byte) (*types.Transaction, error) { + return f.contract.Transact(opts, "marketOrdersOrKill", orders, quantity, margin, subAccountID, signatures) +} + +// MarketOrdersOrKill is a paid mutator transaction binding the contract method 0x52863e4f. +// +// Solidity: function marketOrdersOrKill((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256 quantity, uint256 margin, bytes32 subAccountID, bytes[] signatures) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[] results) +func (f *FuturesSession) MarketOrdersOrKill(orders []Order, quantity *big.Int, margin *big.Int, subAccountID [32]byte, signatures [][]byte) (*types.Transaction, error) { + return f.Contract.MarketOrdersOrKill(&f.TransactOpts, orders, quantity, margin, subAccountID, signatures) +} + +// MarketOrdersOrKill is a paid mutator transaction binding the contract method 0x52863e4f. +// +// Solidity: function marketOrdersOrKill((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256 quantity, uint256 margin, bytes32 subAccountID, bytes[] signatures) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[] results) +func (f *FuturesTransactorSession) MarketOrdersOrKill(orders []Order, quantity *big.Int, margin *big.Int, subAccountID [32]byte, signatures [][]byte) (*types.Transaction, error) { + return f.Contract.MarketOrdersOrKill(&f.TransactOpts, orders, quantity, margin, subAccountID, signatures) +} + +// MatchOrders is a paid mutator transaction binding the contract method 0x88ec79fb. +// +// Solidity: function matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) leftOrder, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) rightOrder, bytes leftSignature, bytes rightSignature) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) +func (f *FuturesTransactor) MatchOrders(opts *bind.TransactOpts, leftOrder Order, rightOrder Order, leftSignature []byte, rightSignature []byte) (*types.Transaction, error) { + return f.contract.Transact(opts, "matchOrders", leftOrder, rightOrder, leftSignature, rightSignature) +} + +// MatchOrders is a paid mutator transaction binding the contract method 0x88ec79fb. +// +// Solidity: function matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) leftOrder, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) rightOrder, bytes leftSignature, bytes rightSignature) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) +func (f *FuturesSession) MatchOrders(leftOrder Order, rightOrder Order, leftSignature []byte, rightSignature []byte) (*types.Transaction, error) { + return f.Contract.MatchOrders(&f.TransactOpts, leftOrder, rightOrder, leftSignature, rightSignature) +} + +// MatchOrders is a paid mutator transaction binding the contract method 0x88ec79fb. +// +// Solidity: function matchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) leftOrder, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) rightOrder, bytes leftSignature, bytes rightSignature) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)) +func (f *FuturesTransactorSession) MatchOrders(leftOrder Order, rightOrder Order, leftSignature []byte, rightSignature []byte) (*types.Transaction, error) { + return f.Contract.MatchOrders(&f.TransactOpts, leftOrder, rightOrder, leftSignature, rightSignature) +} + +// MultiMatchOrders is a paid mutator transaction binding the contract method 0x86d7729c. +// +// Solidity: function multiMatchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] leftOrders, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) rightOrder, bytes[] leftSignatures, bytes rightSignature) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[] results) +func (f *FuturesTransactor) MultiMatchOrders(opts *bind.TransactOpts, leftOrders []Order, rightOrder Order, leftSignatures [][]byte, rightSignature []byte) (*types.Transaction, error) { + return f.contract.Transact(opts, "multiMatchOrders", leftOrders, rightOrder, leftSignatures, rightSignature) +} + +// MultiMatchOrders is a paid mutator transaction binding the contract method 0x86d7729c. +// +// Solidity: function multiMatchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] leftOrders, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) rightOrder, bytes[] leftSignatures, bytes rightSignature) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[] results) +func (f *FuturesSession) MultiMatchOrders(leftOrders []Order, rightOrder Order, leftSignatures [][]byte, rightSignature []byte) (*types.Transaction, error) { + return f.Contract.MultiMatchOrders(&f.TransactOpts, leftOrders, rightOrder, leftSignatures, rightSignature) +} + +// MultiMatchOrders is a paid mutator transaction binding the contract method 0x86d7729c. +// +// Solidity: function multiMatchOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] leftOrders, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes) rightOrder, bytes[] leftSignatures, bytes rightSignature) returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[] results) +func (f *FuturesTransactorSession) MultiMatchOrders(leftOrders []Order, rightOrder Order, leftSignatures [][]byte, rightSignature []byte) (*types.Transaction, error) { + return f.Contract.MultiMatchOrders(&f.TransactOpts, leftOrders, rightOrder, leftSignatures, rightSignature) +} + +// PayIntoInsurancePool is a paid mutator transaction binding the contract method 0x95563906. +// +// Solidity: function payIntoInsurancePool(bytes32 marketID, uint256 amount) returns() +func (f *FuturesTransactor) PayIntoInsurancePool(opts *bind.TransactOpts, marketID [32]byte, amount *big.Int) (*types.Transaction, error) { + return f.contract.Transact(opts, "payIntoInsurancePool", marketID, amount) +} + +// PayIntoInsurancePool is a paid mutator transaction binding the contract method 0x95563906. +// +// Solidity: function payIntoInsurancePool(bytes32 marketID, uint256 amount) returns() +func (f *FuturesSession) PayIntoInsurancePool(marketID [32]byte, amount *big.Int) (*types.Transaction, error) { + return f.Contract.PayIntoInsurancePool(&f.TransactOpts, marketID, amount) +} + +// PayIntoInsurancePool is a paid mutator transaction binding the contract method 0x95563906. +// +// Solidity: function payIntoInsurancePool(bytes32 marketID, uint256 amount) returns() +func (f *FuturesTransactorSession) PayIntoInsurancePool(marketID [32]byte, amount *big.Int) (*types.Transaction, error) { + return f.Contract.PayIntoInsurancePool(&f.TransactOpts, marketID, amount) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (f *FuturesTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return f.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (f *FuturesSession) RenounceOwnership() (*types.Transaction, error) { + return f.Contract.RenounceOwnership(&f.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (f *FuturesTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return f.Contract.RenounceOwnership(&f.TransactOpts) +} + +// ResumeFutures is a paid mutator transaction binding the contract method 0x55585bce. +// +// Solidity: function resumeFutures() returns() +func (f *FuturesTransactor) ResumeFutures(opts *bind.TransactOpts) (*types.Transaction, error) { + return f.contract.Transact(opts, "resumeFutures") +} + +// ResumeFutures is a paid mutator transaction binding the contract method 0x55585bce. +// +// Solidity: function resumeFutures() returns() +func (f *FuturesSession) ResumeFutures() (*types.Transaction, error) { + return f.Contract.ResumeFutures(&f.TransactOpts) +} + +// ResumeFutures is a paid mutator transaction binding the contract method 0x55585bce. +// +// Solidity: function resumeFutures() returns() +func (f *FuturesTransactorSession) ResumeFutures() (*types.Transaction, error) { + return f.Contract.ResumeFutures(&f.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (f *FuturesTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return f.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (f *FuturesSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return f.Contract.TransferOwnership(&f.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (f *FuturesTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return f.Contract.TransferOwnership(&f.TransactOpts, newOwner) +} + +// VaporizePosition is a paid mutator transaction binding the contract method 0x20f3c024. +// +// Solidity: function vaporizePosition(uint256 positionID, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256 quantity, bytes[] signatures) returns((uint256,uint256,uint256,uint256)[] pResults, (int256,uint256) cResults) +func (f *FuturesTransactor) VaporizePosition(opts *bind.TransactOpts, positionID *big.Int, orders []Order, quantity *big.Int, signatures [][]byte) (*types.Transaction, error) { + return f.contract.Transact(opts, "vaporizePosition", positionID, orders, quantity, signatures) +} + +// VaporizePosition is a paid mutator transaction binding the contract method 0x20f3c024. +// +// Solidity: function vaporizePosition(uint256 positionID, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256 quantity, bytes[] signatures) returns((uint256,uint256,uint256,uint256)[] pResults, (int256,uint256) cResults) +func (f *FuturesSession) VaporizePosition(positionID *big.Int, orders []Order, quantity *big.Int, signatures [][]byte) (*types.Transaction, error) { + return f.Contract.VaporizePosition(&f.TransactOpts, positionID, orders, quantity, signatures) +} + +// VaporizePosition is a paid mutator transaction binding the contract method 0x20f3c024. +// +// Solidity: function vaporizePosition(uint256 positionID, (address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes,bytes,bytes)[] orders, uint256 quantity, bytes[] signatures) returns((uint256,uint256,uint256,uint256)[] pResults, (int256,uint256) cResults) +func (f *FuturesTransactorSession) VaporizePosition(positionID *big.Int, orders []Order, quantity *big.Int, signatures [][]byte) (*types.Transaction, error) { + return f.Contract.VaporizePosition(&f.TransactOpts, positionID, orders, quantity, signatures) +} + +// WithdrawFromDefaultSubAcount is a paid mutator transaction binding the contract method 0xc4a1f3fd. +// +// Solidity: function withdrawFromDefaultSubAcount(uint256 amount) returns() +func (f *FuturesTransactor) WithdrawFromDefaultSubAcount(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { + return f.contract.Transact(opts, "withdrawFromDefaultSubAcount", amount) +} + +// WithdrawFromDefaultSubAcount is a paid mutator transaction binding the contract method 0xc4a1f3fd. +// +// Solidity: function withdrawFromDefaultSubAcount(uint256 amount) returns() +func (f *FuturesSession) WithdrawFromDefaultSubAcount(amount *big.Int) (*types.Transaction, error) { + return f.Contract.WithdrawFromDefaultSubAcount(&f.TransactOpts, amount) +} + +// WithdrawFromDefaultSubAcount is a paid mutator transaction binding the contract method 0xc4a1f3fd. +// +// Solidity: function withdrawFromDefaultSubAcount(uint256 amount) returns() +func (f *FuturesTransactorSession) WithdrawFromDefaultSubAcount(amount *big.Int) (*types.Transaction, error) { + return f.Contract.WithdrawFromDefaultSubAcount(&f.TransactOpts, amount) +} + +// WithdrawFromSubAccount is a paid mutator transaction binding the contract method 0xe2f75a3a. +// +// Solidity: function withdrawFromSubAccount(bytes32 subAccountID, uint256 amount) returns() +func (f *FuturesTransactor) WithdrawFromSubAccount(opts *bind.TransactOpts, subAccountID [32]byte, amount *big.Int) (*types.Transaction, error) { + return f.contract.Transact(opts, "withdrawFromSubAccount", subAccountID, amount) +} + +// WithdrawFromSubAccount is a paid mutator transaction binding the contract method 0xe2f75a3a. +// +// Solidity: function withdrawFromSubAccount(bytes32 subAccountID, uint256 amount) returns() +func (f *FuturesSession) WithdrawFromSubAccount(subAccountID [32]byte, amount *big.Int) (*types.Transaction, error) { + return f.Contract.WithdrawFromSubAccount(&f.TransactOpts, subAccountID, amount) +} + +// WithdrawFromSubAccount is a paid mutator transaction binding the contract method 0xe2f75a3a. +// +// Solidity: function withdrawFromSubAccount(bytes32 subAccountID, uint256 amount) returns() +func (f *FuturesTransactorSession) WithdrawFromSubAccount(subAccountID [32]byte, amount *big.Int) (*types.Transaction, error) { + return f.Contract.WithdrawFromSubAccount(&f.TransactOpts, subAccountID, amount) +} + +// FuturesAccountCreationIterator is returned from FilterAccountCreation and is used to iterate over the raw logs and unpacked data for AccountCreation events raised by the Futures contract. +type FuturesAccountCreationIterator struct { + Event *FuturesAccountCreation // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration } // Next advances the iterator to the subsequent event, returning whether there @@ -1636,14 +2088,15 @@ func (it *FuturesAccountCreationIterator) Close() error { // FuturesAccountCreation represents a AccountCreation event raised by the Futures contract. type FuturesAccountCreation struct { - Creator common.Address - AccountID [32]byte - Raw types.Log // Blockchain specific contextual infos + Creator common.Address + SubAccountID [32]byte + SubAccountNonce *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterAccountCreation is a free log retrieval operation binding the contract event 0x6b6c555e8ae1c4f0ac0f0faf20e8f1406c3b872759d31fdf15e849b1c02ce871. +// FilterAccountCreation is a free log retrieval operation binding the contract event 0x4a6d2d5a911a10d00446d1413ca969c249074711c144e93aeddfa4d77de64784. // -// Solidity: event AccountCreation(address indexed creator, bytes32 accountID) +// Solidity: event AccountCreation(address indexed creator, bytes32 subAccountID, uint256 subAccountNonce) func (f *FuturesFilterer) FilterAccountCreation(opts *bind.FilterOpts, creator []common.Address) (*FuturesAccountCreationIterator, error) { var creatorRule []interface{} @@ -1655,20 +2108,490 @@ func (f *FuturesFilterer) FilterAccountCreation(opts *bind.FilterOpts, creator [ if err != nil { return nil, err } - return &FuturesAccountCreationIterator{contract: f.contract, event: "AccountCreation", logs: logs, sub: sub}, nil -} - -// WatchAccountCreation is a free log subscription operation binding the contract event 0x6b6c555e8ae1c4f0ac0f0faf20e8f1406c3b872759d31fdf15e849b1c02ce871. -// -// Solidity: event AccountCreation(address indexed creator, bytes32 accountID) -func (f *FuturesFilterer) WatchAccountCreation(opts *bind.WatchOpts, sink chan<- *FuturesAccountCreation, creator []common.Address) (event.Subscription, error) { - - var creatorRule []interface{} - for _, creatorItem := range creator { - creatorRule = append(creatorRule, creatorItem) + return &FuturesAccountCreationIterator{contract: f.contract, event: "AccountCreation", logs: logs, sub: sub}, nil +} + +// WatchAccountCreation is a free log subscription operation binding the contract event 0x4a6d2d5a911a10d00446d1413ca969c249074711c144e93aeddfa4d77de64784. +// +// Solidity: event AccountCreation(address indexed creator, bytes32 subAccountID, uint256 subAccountNonce) +func (f *FuturesFilterer) WatchAccountCreation(opts *bind.WatchOpts, sink chan<- *FuturesAccountCreation, creator []common.Address) (event.Subscription, error) { + + var creatorRule []interface{} + for _, creatorItem := range creator { + creatorRule = append(creatorRule, creatorItem) + } + + logs, sub, err := f.contract.WatchLogs(opts, "AccountCreation", creatorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(FuturesAccountCreation) + if err := f.contract.UnpackLog(event, "AccountCreation", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseAccountCreation is a log parse operation binding the contract event 0x4a6d2d5a911a10d00446d1413ca969c249074711c144e93aeddfa4d77de64784. +// +// Solidity: event AccountCreation(address indexed creator, bytes32 subAccountID, uint256 subAccountNonce) +func (f *FuturesFilterer) ParseAccountCreation(log types.Log) (*FuturesAccountCreation, error) { + event := new(FuturesAccountCreation) + if err := f.contract.UnpackLog(event, "AccountCreation", log); err != nil { + return nil, err + } + return event, nil +} + +// FuturesDecrementSubaccountDepositsIterator is returned from FilterDecrementSubaccountDeposits and is used to iterate over the raw logs and unpacked data for DecrementSubaccountDeposits events raised by the Futures contract. +type FuturesDecrementSubaccountDepositsIterator struct { + Event *FuturesDecrementSubaccountDeposits // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *FuturesDecrementSubaccountDepositsIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(FuturesDecrementSubaccountDeposits) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(FuturesDecrementSubaccountDeposits) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *FuturesDecrementSubaccountDepositsIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FuturesDecrementSubaccountDepositsIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FuturesDecrementSubaccountDeposits represents a DecrementSubaccountDeposits event raised by the Futures contract. +type FuturesDecrementSubaccountDeposits struct { + SubAccountID [32]byte + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDecrementSubaccountDeposits is a free log retrieval operation binding the contract event 0x07cbd2a0bd322d5c23e10d71ecca0a9f41b9c9597b2f8736607b9435324e4357. +// +// Solidity: event DecrementSubaccountDeposits(bytes32 indexed subAccountID, uint256 amount) +func (f *FuturesFilterer) FilterDecrementSubaccountDeposits(opts *bind.FilterOpts, subAccountID [][32]byte) (*FuturesDecrementSubaccountDepositsIterator, error) { + + var subAccountIDRule []interface{} + for _, subAccountIDItem := range subAccountID { + subAccountIDRule = append(subAccountIDRule, subAccountIDItem) + } + + logs, sub, err := f.contract.FilterLogs(opts, "DecrementSubaccountDeposits", subAccountIDRule) + if err != nil { + return nil, err + } + return &FuturesDecrementSubaccountDepositsIterator{contract: f.contract, event: "DecrementSubaccountDeposits", logs: logs, sub: sub}, nil +} + +// WatchDecrementSubaccountDeposits is a free log subscription operation binding the contract event 0x07cbd2a0bd322d5c23e10d71ecca0a9f41b9c9597b2f8736607b9435324e4357. +// +// Solidity: event DecrementSubaccountDeposits(bytes32 indexed subAccountID, uint256 amount) +func (f *FuturesFilterer) WatchDecrementSubaccountDeposits(opts *bind.WatchOpts, sink chan<- *FuturesDecrementSubaccountDeposits, subAccountID [][32]byte) (event.Subscription, error) { + + var subAccountIDRule []interface{} + for _, subAccountIDItem := range subAccountID { + subAccountIDRule = append(subAccountIDRule, subAccountIDItem) + } + + logs, sub, err := f.contract.WatchLogs(opts, "DecrementSubaccountDeposits", subAccountIDRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(FuturesDecrementSubaccountDeposits) + if err := f.contract.UnpackLog(event, "DecrementSubaccountDeposits", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseDecrementSubaccountDeposits is a log parse operation binding the contract event 0x07cbd2a0bd322d5c23e10d71ecca0a9f41b9c9597b2f8736607b9435324e4357. +// +// Solidity: event DecrementSubaccountDeposits(bytes32 indexed subAccountID, uint256 amount) +func (f *FuturesFilterer) ParseDecrementSubaccountDeposits(log types.Log) (*FuturesDecrementSubaccountDeposits, error) { + event := new(FuturesDecrementSubaccountDeposits) + if err := f.contract.UnpackLog(event, "DecrementSubaccountDeposits", log); err != nil { + return nil, err + } + return event, nil +} + +// FuturesCancelIterator is returned from FilterFuturesCancel and is used to iterate over the raw logs and unpacked data for FuturesCancel events raised by the Futures contract. +type FuturesCancelIterator struct { + Event *FuturesCancel // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *FuturesCancelIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(FuturesCancel) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(FuturesCancel) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *FuturesCancelIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FuturesCancelIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FuturesCancel represents a FuturesCancel event raised by the Futures contract. +type FuturesCancel struct { + MakerAddress common.Address + OrderHash [32]byte + MarketID [32]byte + ContractPrice *big.Int + QuantityFilled *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFuturesCancel is a free log retrieval operation binding the contract event 0x414118d90fd71dbfe3eebc508a8edaebe20d4e43ac23c65ba56fe87edb7c61ca. +// +// Solidity: event FuturesCancel(address indexed makerAddress, bytes32 indexed orderHash, bytes32 indexed marketID, uint256 contractPrice, uint256 quantityFilled) +func (f *FuturesFilterer) FilterFuturesCancel(opts *bind.FilterOpts, makerAddress []common.Address, orderHash [][32]byte, marketID [][32]byte) (*FuturesCancelIterator, error) { + + var makerAddressRule []interface{} + for _, makerAddressItem := range makerAddress { + makerAddressRule = append(makerAddressRule, makerAddressItem) + } + var orderHashRule []interface{} + for _, orderHashItem := range orderHash { + orderHashRule = append(orderHashRule, orderHashItem) + } + var marketIDRule []interface{} + for _, marketIDItem := range marketID { + marketIDRule = append(marketIDRule, marketIDItem) + } + + logs, sub, err := f.contract.FilterLogs(opts, "FuturesCancel", makerAddressRule, orderHashRule, marketIDRule) + if err != nil { + return nil, err + } + return &FuturesCancelIterator{contract: f.contract, event: "FuturesCancel", logs: logs, sub: sub}, nil +} + +// WatchFuturesCancel is a free log subscription operation binding the contract event 0x414118d90fd71dbfe3eebc508a8edaebe20d4e43ac23c65ba56fe87edb7c61ca. +// +// Solidity: event FuturesCancel(address indexed makerAddress, bytes32 indexed orderHash, bytes32 indexed marketID, uint256 contractPrice, uint256 quantityFilled) +func (f *FuturesFilterer) WatchFuturesCancel(opts *bind.WatchOpts, sink chan<- *FuturesCancel, makerAddress []common.Address, orderHash [][32]byte, marketID [][32]byte) (event.Subscription, error) { + + var makerAddressRule []interface{} + for _, makerAddressItem := range makerAddress { + makerAddressRule = append(makerAddressRule, makerAddressItem) + } + var orderHashRule []interface{} + for _, orderHashItem := range orderHash { + orderHashRule = append(orderHashRule, orderHashItem) + } + var marketIDRule []interface{} + for _, marketIDItem := range marketID { + marketIDRule = append(marketIDRule, marketIDItem) + } + + logs, sub, err := f.contract.WatchLogs(opts, "FuturesCancel", makerAddressRule, orderHashRule, marketIDRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(FuturesCancel) + if err := f.contract.UnpackLog(event, "FuturesCancel", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseFuturesCancel is a log parse operation binding the contract event 0x414118d90fd71dbfe3eebc508a8edaebe20d4e43ac23c65ba56fe87edb7c61ca. +// +// Solidity: event FuturesCancel(address indexed makerAddress, bytes32 indexed orderHash, bytes32 indexed marketID, uint256 contractPrice, uint256 quantityFilled) +func (f *FuturesFilterer) ParseFuturesCancel(log types.Log) (*FuturesCancel, error) { + event := new(FuturesCancel) + if err := f.contract.UnpackLog(event, "FuturesCancel", log); err != nil { + return nil, err + } + return event, nil +} + +// FuturesCloseIterator is returned from FilterFuturesClose and is used to iterate over the raw logs and unpacked data for FuturesClose events raised by the Futures contract. +type FuturesCloseIterator struct { + Event *FuturesClose // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *FuturesCloseIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(FuturesClose) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(FuturesClose) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *FuturesCloseIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FuturesCloseIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FuturesClose represents a FuturesClose event raised by the Futures contract. +type FuturesClose struct { + PositionID *big.Int + MarketID [32]byte + SubAccountID [32]byte + Quantity *big.Int + ContractPNL *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFuturesClose is a free log retrieval operation binding the contract event 0x552b29e4ee304f6809a963a25ef66f4922981189771e56a21c4639b51b3ebff2. +// +// Solidity: event FuturesClose(uint256 indexed positionID, bytes32 indexed marketID, bytes32 indexed subAccountID, uint256 quantity, int256 contractPNL) +func (f *FuturesFilterer) FilterFuturesClose(opts *bind.FilterOpts, positionID []*big.Int, marketID [][32]byte, subAccountID [][32]byte) (*FuturesCloseIterator, error) { + + var positionIDRule []interface{} + for _, positionIDItem := range positionID { + positionIDRule = append(positionIDRule, positionIDItem) + } + var marketIDRule []interface{} + for _, marketIDItem := range marketID { + marketIDRule = append(marketIDRule, marketIDItem) + } + var subAccountIDRule []interface{} + for _, subAccountIDItem := range subAccountID { + subAccountIDRule = append(subAccountIDRule, subAccountIDItem) + } + + logs, sub, err := f.contract.FilterLogs(opts, "FuturesClose", positionIDRule, marketIDRule, subAccountIDRule) + if err != nil { + return nil, err + } + return &FuturesCloseIterator{contract: f.contract, event: "FuturesClose", logs: logs, sub: sub}, nil +} + +// WatchFuturesClose is a free log subscription operation binding the contract event 0x552b29e4ee304f6809a963a25ef66f4922981189771e56a21c4639b51b3ebff2. +// +// Solidity: event FuturesClose(uint256 indexed positionID, bytes32 indexed marketID, bytes32 indexed subAccountID, uint256 quantity, int256 contractPNL) +func (f *FuturesFilterer) WatchFuturesClose(opts *bind.WatchOpts, sink chan<- *FuturesClose, positionID []*big.Int, marketID [][32]byte, subAccountID [][32]byte) (event.Subscription, error) { + + var positionIDRule []interface{} + for _, positionIDItem := range positionID { + positionIDRule = append(positionIDRule, positionIDItem) + } + var marketIDRule []interface{} + for _, marketIDItem := range marketID { + marketIDRule = append(marketIDRule, marketIDItem) + } + var subAccountIDRule []interface{} + for _, subAccountIDItem := range subAccountID { + subAccountIDRule = append(subAccountIDRule, subAccountIDItem) } - logs, sub, err := f.contract.WatchLogs(opts, "AccountCreation", creatorRule) + logs, sub, err := f.contract.WatchLogs(opts, "FuturesClose", positionIDRule, marketIDRule, subAccountIDRule) if err != nil { return nil, err } @@ -1678,8 +2601,8 @@ func (f *FuturesFilterer) WatchAccountCreation(opts *bind.WatchOpts, sink chan<- select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(FuturesAccountCreation) - if err := f.contract.UnpackLog(event, "AccountCreation", log); err != nil { + event := new(FuturesClose) + if err := f.contract.UnpackLog(event, "FuturesClose", log); err != nil { return err } event.Raw = log @@ -1700,20 +2623,20 @@ func (f *FuturesFilterer) WatchAccountCreation(opts *bind.WatchOpts, sink chan<- }), nil } -// ParseAccountCreation is a log parse operation binding the contract event 0x6b6c555e8ae1c4f0ac0f0faf20e8f1406c3b872759d31fdf15e849b1c02ce871. +// ParseFuturesClose is a log parse operation binding the contract event 0x552b29e4ee304f6809a963a25ef66f4922981189771e56a21c4639b51b3ebff2. // -// Solidity: event AccountCreation(address indexed creator, bytes32 accountID) -func (f *FuturesFilterer) ParseAccountCreation(log types.Log) (*FuturesAccountCreation, error) { - event := new(FuturesAccountCreation) - if err := f.contract.UnpackLog(event, "AccountCreation", log); err != nil { +// Solidity: event FuturesClose(uint256 indexed positionID, bytes32 indexed marketID, bytes32 indexed subAccountID, uint256 quantity, int256 contractPNL) +func (f *FuturesFilterer) ParseFuturesClose(log types.Log) (*FuturesClose, error) { + event := new(FuturesClose) + if err := f.contract.UnpackLog(event, "FuturesClose", log); err != nil { return nil, err } return event, nil } -// FuturesCancelIterator is returned from FilterFuturesCancel and is used to iterate over the raw logs and unpacked data for FuturesCancel events raised by the Futures contract. -type FuturesCancelIterator struct { - Event *FuturesCancel // Event containing the contract specifics and raw log +// FuturesLiquidationIterator is returned from FilterFuturesLiquidation and is used to iterate over the raw logs and unpacked data for FuturesLiquidation events raised by the Futures contract. +type FuturesLiquidationIterator struct { + Event *FuturesLiquidation // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1727,7 +2650,7 @@ type FuturesCancelIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *FuturesCancelIterator) Next() bool { +func (it *FuturesLiquidationIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1736,7 +2659,7 @@ func (it *FuturesCancelIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(FuturesCancel) + it.Event = new(FuturesLiquidation) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1751,7 +2674,7 @@ func (it *FuturesCancelIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(FuturesCancel) + it.Event = new(FuturesLiquidation) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1767,71 +2690,71 @@ func (it *FuturesCancelIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *FuturesCancelIterator) Error() error { +func (it *FuturesLiquidationIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *FuturesCancelIterator) Close() error { +func (it *FuturesLiquidationIterator) Close() error { it.sub.Unsubscribe() return nil } -// FuturesCancel represents a FuturesCancel event raised by the Futures contract. -type FuturesCancel struct { - MakerAddress common.Address - OrderHash [32]byte - MarketID [32]byte - ContractPrice *big.Int - QuantityFilled *big.Int - Raw types.Log // Blockchain specific contextual infos +// FuturesLiquidation represents a FuturesLiquidation event raised by the Futures contract. +type FuturesLiquidation struct { + PositionID *big.Int + MarketID [32]byte + SubAccountID [32]byte + Quantity *big.Int + ContractPNL *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterFuturesCancel is a free log retrieval operation binding the contract event 0x414118d90fd71dbfe3eebc508a8edaebe20d4e43ac23c65ba56fe87edb7c61ca. +// FilterFuturesLiquidation is a free log retrieval operation binding the contract event 0xf7def0e827224d4fdf4354d5d330812ba6798aa95fc60d5ed8864290cb04d451. // -// Solidity: event FuturesCancel(address indexed makerAddress, bytes32 indexed orderHash, bytes32 indexed marketID, uint256 contractPrice, uint256 quantityFilled) -func (f *FuturesFilterer) FilterFuturesCancel(opts *bind.FilterOpts, makerAddress []common.Address, orderHash [][32]byte, marketID [][32]byte) (*FuturesCancelIterator, error) { +// Solidity: event FuturesLiquidation(uint256 indexed positionID, bytes32 indexed marketID, bytes32 indexed subAccountID, uint256 quantity, int256 contractPNL) +func (f *FuturesFilterer) FilterFuturesLiquidation(opts *bind.FilterOpts, positionID []*big.Int, marketID [][32]byte, subAccountID [][32]byte) (*FuturesLiquidationIterator, error) { - var makerAddressRule []interface{} - for _, makerAddressItem := range makerAddress { - makerAddressRule = append(makerAddressRule, makerAddressItem) - } - var orderHashRule []interface{} - for _, orderHashItem := range orderHash { - orderHashRule = append(orderHashRule, orderHashItem) + var positionIDRule []interface{} + for _, positionIDItem := range positionID { + positionIDRule = append(positionIDRule, positionIDItem) } var marketIDRule []interface{} for _, marketIDItem := range marketID { marketIDRule = append(marketIDRule, marketIDItem) } + var subAccountIDRule []interface{} + for _, subAccountIDItem := range subAccountID { + subAccountIDRule = append(subAccountIDRule, subAccountIDItem) + } - logs, sub, err := f.contract.FilterLogs(opts, "FuturesCancel", makerAddressRule, orderHashRule, marketIDRule) + logs, sub, err := f.contract.FilterLogs(opts, "FuturesLiquidation", positionIDRule, marketIDRule, subAccountIDRule) if err != nil { return nil, err } - return &FuturesCancelIterator{contract: f.contract, event: "FuturesCancel", logs: logs, sub: sub}, nil + return &FuturesLiquidationIterator{contract: f.contract, event: "FuturesLiquidation", logs: logs, sub: sub}, nil } -// WatchFuturesCancel is a free log subscription operation binding the contract event 0x414118d90fd71dbfe3eebc508a8edaebe20d4e43ac23c65ba56fe87edb7c61ca. +// WatchFuturesLiquidation is a free log subscription operation binding the contract event 0xf7def0e827224d4fdf4354d5d330812ba6798aa95fc60d5ed8864290cb04d451. // -// Solidity: event FuturesCancel(address indexed makerAddress, bytes32 indexed orderHash, bytes32 indexed marketID, uint256 contractPrice, uint256 quantityFilled) -func (f *FuturesFilterer) WatchFuturesCancel(opts *bind.WatchOpts, sink chan<- *FuturesCancel, makerAddress []common.Address, orderHash [][32]byte, marketID [][32]byte) (event.Subscription, error) { +// Solidity: event FuturesLiquidation(uint256 indexed positionID, bytes32 indexed marketID, bytes32 indexed subAccountID, uint256 quantity, int256 contractPNL) +func (f *FuturesFilterer) WatchFuturesLiquidation(opts *bind.WatchOpts, sink chan<- *FuturesLiquidation, positionID []*big.Int, marketID [][32]byte, subAccountID [][32]byte) (event.Subscription, error) { - var makerAddressRule []interface{} - for _, makerAddressItem := range makerAddress { - makerAddressRule = append(makerAddressRule, makerAddressItem) - } - var orderHashRule []interface{} - for _, orderHashItem := range orderHash { - orderHashRule = append(orderHashRule, orderHashItem) + var positionIDRule []interface{} + for _, positionIDItem := range positionID { + positionIDRule = append(positionIDRule, positionIDItem) } var marketIDRule []interface{} for _, marketIDItem := range marketID { marketIDRule = append(marketIDRule, marketIDItem) } + var subAccountIDRule []interface{} + for _, subAccountIDItem := range subAccountID { + subAccountIDRule = append(subAccountIDRule, subAccountIDItem) + } - logs, sub, err := f.contract.WatchLogs(opts, "FuturesCancel", makerAddressRule, orderHashRule, marketIDRule) + logs, sub, err := f.contract.WatchLogs(opts, "FuturesLiquidation", positionIDRule, marketIDRule, subAccountIDRule) if err != nil { return nil, err } @@ -1841,8 +2764,8 @@ func (f *FuturesFilterer) WatchFuturesCancel(opts *bind.WatchOpts, sink chan<- * select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(FuturesCancel) - if err := f.contract.UnpackLog(event, "FuturesCancel", log); err != nil { + event := new(FuturesLiquidation) + if err := f.contract.UnpackLog(event, "FuturesLiquidation", log); err != nil { return err } event.Raw = log @@ -1863,20 +2786,20 @@ func (f *FuturesFilterer) WatchFuturesCancel(opts *bind.WatchOpts, sink chan<- * }), nil } -// ParseFuturesCancel is a log parse operation binding the contract event 0x414118d90fd71dbfe3eebc508a8edaebe20d4e43ac23c65ba56fe87edb7c61ca. +// ParseFuturesLiquidation is a log parse operation binding the contract event 0xf7def0e827224d4fdf4354d5d330812ba6798aa95fc60d5ed8864290cb04d451. // -// Solidity: event FuturesCancel(address indexed makerAddress, bytes32 indexed orderHash, bytes32 indexed marketID, uint256 contractPrice, uint256 quantityFilled) -func (f *FuturesFilterer) ParseFuturesCancel(log types.Log) (*FuturesCancel, error) { - event := new(FuturesCancel) - if err := f.contract.UnpackLog(event, "FuturesCancel", log); err != nil { +// Solidity: event FuturesLiquidation(uint256 indexed positionID, bytes32 indexed marketID, bytes32 indexed subAccountID, uint256 quantity, int256 contractPNL) +func (f *FuturesFilterer) ParseFuturesLiquidation(log types.Log) (*FuturesLiquidation, error) { + event := new(FuturesLiquidation) + if err := f.contract.UnpackLog(event, "FuturesLiquidation", log); err != nil { return nil, err } return event, nil } -// FuturesCloseIterator is returned from FilterFuturesClose and is used to iterate over the raw logs and unpacked data for FuturesClose events raised by the Futures contract. -type FuturesCloseIterator struct { - Event *FuturesClose // Event containing the contract specifics and raw log +// FuturesMatchIterator is returned from FilterFuturesMatch and is used to iterate over the raw logs and unpacked data for FuturesMatch events raised by the Futures contract. +type FuturesMatchIterator struct { + Event *FuturesMatch // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1890,7 +2813,7 @@ type FuturesCloseIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *FuturesCloseIterator) Next() bool { +func (it *FuturesMatchIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1899,7 +2822,7 @@ func (it *FuturesCloseIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(FuturesClose) + it.Event = new(FuturesMatch) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1914,7 +2837,7 @@ func (it *FuturesCloseIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(FuturesClose) + it.Event = new(FuturesMatch) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1930,71 +2853,70 @@ func (it *FuturesCloseIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *FuturesCloseIterator) Error() error { +func (it *FuturesMatchIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *FuturesCloseIterator) Close() error { +func (it *FuturesMatchIterator) Close() error { it.sub.Unsubscribe() return nil } -// FuturesClose represents a FuturesClose event raised by the Futures contract. -type FuturesClose struct { - PositionID *big.Int - MarketID [32]byte - AccountID [32]byte - Quantity *big.Int - ContractPNL *big.Int - Raw types.Log // Blockchain specific contextual infos +// FuturesMatch represents a FuturesMatch event raised by the Futures contract. +type FuturesMatch struct { + LeftOrderHash [32]byte + RightOrderHash [32]byte + MarketID [32]byte + Quantity *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterFuturesClose is a free log retrieval operation binding the contract event 0x552b29e4ee304f6809a963a25ef66f4922981189771e56a21c4639b51b3ebff2. +// FilterFuturesMatch is a free log retrieval operation binding the contract event 0xf6dc3b6914c1ade29b4a0c34e7d47e49d51690d622548649e7f67ced15b09a06. // -// Solidity: event FuturesClose(uint256 indexed positionID, bytes32 indexed marketID, bytes32 indexed accountID, uint256 quantity, int256 contractPNL) -func (f *FuturesFilterer) FilterFuturesClose(opts *bind.FilterOpts, positionID []*big.Int, marketID [][32]byte, accountID [][32]byte) (*FuturesCloseIterator, error) { +// Solidity: event FuturesMatch(bytes32 indexed leftOrderHash, bytes32 indexed rightOrderHash, bytes32 indexed marketID, uint256 quantity) +func (f *FuturesFilterer) FilterFuturesMatch(opts *bind.FilterOpts, leftOrderHash [][32]byte, rightOrderHash [][32]byte, marketID [][32]byte) (*FuturesMatchIterator, error) { - var positionIDRule []interface{} - for _, positionIDItem := range positionID { - positionIDRule = append(positionIDRule, positionIDItem) + var leftOrderHashRule []interface{} + for _, leftOrderHashItem := range leftOrderHash { + leftOrderHashRule = append(leftOrderHashRule, leftOrderHashItem) + } + var rightOrderHashRule []interface{} + for _, rightOrderHashItem := range rightOrderHash { + rightOrderHashRule = append(rightOrderHashRule, rightOrderHashItem) } var marketIDRule []interface{} for _, marketIDItem := range marketID { marketIDRule = append(marketIDRule, marketIDItem) } - var accountIDRule []interface{} - for _, accountIDItem := range accountID { - accountIDRule = append(accountIDRule, accountIDItem) - } - logs, sub, err := f.contract.FilterLogs(opts, "FuturesClose", positionIDRule, marketIDRule, accountIDRule) + logs, sub, err := f.contract.FilterLogs(opts, "FuturesMatch", leftOrderHashRule, rightOrderHashRule, marketIDRule) if err != nil { return nil, err } - return &FuturesCloseIterator{contract: f.contract, event: "FuturesClose", logs: logs, sub: sub}, nil + return &FuturesMatchIterator{contract: f.contract, event: "FuturesMatch", logs: logs, sub: sub}, nil } -// WatchFuturesClose is a free log subscription operation binding the contract event 0x552b29e4ee304f6809a963a25ef66f4922981189771e56a21c4639b51b3ebff2. +// WatchFuturesMatch is a free log subscription operation binding the contract event 0xf6dc3b6914c1ade29b4a0c34e7d47e49d51690d622548649e7f67ced15b09a06. // -// Solidity: event FuturesClose(uint256 indexed positionID, bytes32 indexed marketID, bytes32 indexed accountID, uint256 quantity, int256 contractPNL) -func (f *FuturesFilterer) WatchFuturesClose(opts *bind.WatchOpts, sink chan<- *FuturesClose, positionID []*big.Int, marketID [][32]byte, accountID [][32]byte) (event.Subscription, error) { +// Solidity: event FuturesMatch(bytes32 indexed leftOrderHash, bytes32 indexed rightOrderHash, bytes32 indexed marketID, uint256 quantity) +func (f *FuturesFilterer) WatchFuturesMatch(opts *bind.WatchOpts, sink chan<- *FuturesMatch, leftOrderHash [][32]byte, rightOrderHash [][32]byte, marketID [][32]byte) (event.Subscription, error) { - var positionIDRule []interface{} - for _, positionIDItem := range positionID { - positionIDRule = append(positionIDRule, positionIDItem) + var leftOrderHashRule []interface{} + for _, leftOrderHashItem := range leftOrderHash { + leftOrderHashRule = append(leftOrderHashRule, leftOrderHashItem) + } + var rightOrderHashRule []interface{} + for _, rightOrderHashItem := range rightOrderHash { + rightOrderHashRule = append(rightOrderHashRule, rightOrderHashItem) } var marketIDRule []interface{} for _, marketIDItem := range marketID { marketIDRule = append(marketIDRule, marketIDItem) } - var accountIDRule []interface{} - for _, accountIDItem := range accountID { - accountIDRule = append(accountIDRule, accountIDItem) - } - logs, sub, err := f.contract.WatchLogs(opts, "FuturesClose", positionIDRule, marketIDRule, accountIDRule) + logs, sub, err := f.contract.WatchLogs(opts, "FuturesMatch", leftOrderHashRule, rightOrderHashRule, marketIDRule) if err != nil { return nil, err } @@ -2004,8 +2926,8 @@ func (f *FuturesFilterer) WatchFuturesClose(opts *bind.WatchOpts, sink chan<- *F select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(FuturesClose) - if err := f.contract.UnpackLog(event, "FuturesClose", log); err != nil { + event := new(FuturesMatch) + if err := f.contract.UnpackLog(event, "FuturesMatch", log); err != nil { return err } event.Raw = log @@ -2026,20 +2948,20 @@ func (f *FuturesFilterer) WatchFuturesClose(opts *bind.WatchOpts, sink chan<- *F }), nil } -// ParseFuturesClose is a log parse operation binding the contract event 0x552b29e4ee304f6809a963a25ef66f4922981189771e56a21c4639b51b3ebff2. +// ParseFuturesMatch is a log parse operation binding the contract event 0xf6dc3b6914c1ade29b4a0c34e7d47e49d51690d622548649e7f67ced15b09a06. // -// Solidity: event FuturesClose(uint256 indexed positionID, bytes32 indexed marketID, bytes32 indexed accountID, uint256 quantity, int256 contractPNL) -func (f *FuturesFilterer) ParseFuturesClose(log types.Log) (*FuturesClose, error) { - event := new(FuturesClose) - if err := f.contract.UnpackLog(event, "FuturesClose", log); err != nil { +// Solidity: event FuturesMatch(bytes32 indexed leftOrderHash, bytes32 indexed rightOrderHash, bytes32 indexed marketID, uint256 quantity) +func (f *FuturesFilterer) ParseFuturesMatch(log types.Log) (*FuturesMatch, error) { + event := new(FuturesMatch) + if err := f.contract.UnpackLog(event, "FuturesMatch", log); err != nil { return nil, err } return event, nil } -// FuturesFillIterator is returned from FilterFuturesFill and is used to iterate over the raw logs and unpacked data for FuturesFill events raised by the Futures contract. -type FuturesFillIterator struct { - Event *FuturesFill // Event containing the contract specifics and raw log +// FuturesPositionIterator is returned from FilterFuturesPosition and is used to iterate over the raw logs and unpacked data for FuturesPosition events raised by the Futures contract. +type FuturesPositionIterator struct { + Event *FuturesPosition // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -2053,7 +2975,7 @@ type FuturesFillIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *FuturesFillIterator) Next() bool { +func (it *FuturesPositionIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -2062,7 +2984,7 @@ func (it *FuturesFillIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(FuturesFill) + it.Event = new(FuturesPosition) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2077,7 +2999,7 @@ func (it *FuturesFillIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(FuturesFill) + it.Event = new(FuturesPosition) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2093,37 +3015,43 @@ func (it *FuturesFillIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *FuturesFillIterator) Error() error { +func (it *FuturesPositionIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *FuturesFillIterator) Close() error { +func (it *FuturesPositionIterator) Close() error { it.sub.Unsubscribe() return nil } -// FuturesFill represents a FuturesFill event raised by the Futures contract. -type FuturesFill struct { - MakerAddress common.Address - OrderHash [32]byte - MarketID [32]byte - ContractPrice *big.Int - QuantityFilled *big.Int - Quantity *big.Int - Raw types.Log // Blockchain specific contextual infos +// FuturesPosition represents a FuturesPosition event raised by the Futures contract. +type FuturesPosition struct { + MakerAddress common.Address + AccountId [32]byte + OrderHash [32]byte + MarketID [32]byte + ContractPrice *big.Int + QuantityFilled *big.Int + TotalQuantity *big.Int + InitialMargin *big.Int + CumulativeFundingEntry *big.Int + PositionID *big.Int + IsLong bool + Raw types.Log // Blockchain specific contextual infos } -// FilterFuturesFill is a free log retrieval operation binding the contract event 0x6c3c91984205906d99b5675f1c6cec9054481daa142b00699944b6072a44b7e6. +// FilterFuturesPosition is a free log retrieval operation binding the contract event 0x3f15c65539a543c3d4f963f69449601ff9cb5921e1cf2872cef61f57127ded65. // -// Solidity: event FuturesFill(address indexed makerAddress, bytes32 indexed orderHash, bytes32 indexed marketID, uint256 contractPrice, uint256 quantityFilled, uint256 quantity) -func (f *FuturesFilterer) FilterFuturesFill(opts *bind.FilterOpts, makerAddress []common.Address, orderHash [][32]byte, marketID [][32]byte) (*FuturesFillIterator, error) { +// Solidity: event FuturesPosition(address indexed makerAddress, bytes32 accountId, bytes32 indexed orderHash, bytes32 indexed marketID, uint256 contractPrice, uint256 quantityFilled, uint256 totalQuantity, uint256 initialMargin, int256 cumulativeFundingEntry, uint256 positionID, bool isLong) +func (f *FuturesFilterer) FilterFuturesPosition(opts *bind.FilterOpts, makerAddress []common.Address, orderHash [][32]byte, marketID [][32]byte) (*FuturesPositionIterator, error) { var makerAddressRule []interface{} for _, makerAddressItem := range makerAddress { makerAddressRule = append(makerAddressRule, makerAddressItem) } + var orderHashRule []interface{} for _, orderHashItem := range orderHash { orderHashRule = append(orderHashRule, orderHashItem) @@ -2133,22 +3061,23 @@ func (f *FuturesFilterer) FilterFuturesFill(opts *bind.FilterOpts, makerAddress marketIDRule = append(marketIDRule, marketIDItem) } - logs, sub, err := f.contract.FilterLogs(opts, "FuturesFill", makerAddressRule, orderHashRule, marketIDRule) + logs, sub, err := f.contract.FilterLogs(opts, "FuturesPosition", makerAddressRule, orderHashRule, marketIDRule) if err != nil { return nil, err } - return &FuturesFillIterator{contract: f.contract, event: "FuturesFill", logs: logs, sub: sub}, nil + return &FuturesPositionIterator{contract: f.contract, event: "FuturesPosition", logs: logs, sub: sub}, nil } -// WatchFuturesFill is a free log subscription operation binding the contract event 0x6c3c91984205906d99b5675f1c6cec9054481daa142b00699944b6072a44b7e6. +// WatchFuturesPosition is a free log subscription operation binding the contract event 0x3f15c65539a543c3d4f963f69449601ff9cb5921e1cf2872cef61f57127ded65. // -// Solidity: event FuturesFill(address indexed makerAddress, bytes32 indexed orderHash, bytes32 indexed marketID, uint256 contractPrice, uint256 quantityFilled, uint256 quantity) -func (f *FuturesFilterer) WatchFuturesFill(opts *bind.WatchOpts, sink chan<- *FuturesFill, makerAddress []common.Address, orderHash [][32]byte, marketID [][32]byte) (event.Subscription, error) { +// Solidity: event FuturesPosition(address indexed makerAddress, bytes32 accountId, bytes32 indexed orderHash, bytes32 indexed marketID, uint256 contractPrice, uint256 quantityFilled, uint256 totalQuantity, uint256 initialMargin, int256 cumulativeFundingEntry, uint256 positionID, bool isLong) +func (f *FuturesFilterer) WatchFuturesPosition(opts *bind.WatchOpts, sink chan<- *FuturesPosition, makerAddress []common.Address, orderHash [][32]byte, marketID [][32]byte) (event.Subscription, error) { var makerAddressRule []interface{} for _, makerAddressItem := range makerAddress { makerAddressRule = append(makerAddressRule, makerAddressItem) } + var orderHashRule []interface{} for _, orderHashItem := range orderHash { orderHashRule = append(orderHashRule, orderHashItem) @@ -2158,7 +3087,7 @@ func (f *FuturesFilterer) WatchFuturesFill(opts *bind.WatchOpts, sink chan<- *Fu marketIDRule = append(marketIDRule, marketIDItem) } - logs, sub, err := f.contract.WatchLogs(opts, "FuturesFill", makerAddressRule, orderHashRule, marketIDRule) + logs, sub, err := f.contract.WatchLogs(opts, "FuturesPosition", makerAddressRule, orderHashRule, marketIDRule) if err != nil { return nil, err } @@ -2168,8 +3097,8 @@ func (f *FuturesFilterer) WatchFuturesFill(opts *bind.WatchOpts, sink chan<- *Fu select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(FuturesFill) - if err := f.contract.UnpackLog(event, "FuturesFill", log); err != nil { + event := new(FuturesPosition) + if err := f.contract.UnpackLog(event, "FuturesPosition", log); err != nil { return err } event.Raw = log @@ -2190,20 +3119,20 @@ func (f *FuturesFilterer) WatchFuturesFill(opts *bind.WatchOpts, sink chan<- *Fu }), nil } -// ParseFuturesFill is a log parse operation binding the contract event 0x6c3c91984205906d99b5675f1c6cec9054481daa142b00699944b6072a44b7e6. +// ParseFuturesPosition is a log parse operation binding the contract event 0x3f15c65539a543c3d4f963f69449601ff9cb5921e1cf2872cef61f57127ded65. // -// Solidity: event FuturesFill(address indexed makerAddress, bytes32 indexed orderHash, bytes32 indexed marketID, uint256 contractPrice, uint256 quantityFilled, uint256 quantity) -func (f *FuturesFilterer) ParseFuturesFill(log types.Log) (*FuturesFill, error) { - event := new(FuturesFill) - if err := f.contract.UnpackLog(event, "FuturesFill", log); err != nil { +// Solidity: event FuturesPosition(address indexed makerAddress, bytes32 accountId, bytes32 indexed orderHash, bytes32 indexed marketID, uint256 contractPrice, uint256 quantityFilled, uint256 totalQuantity, uint256 initialMargin, int256 cumulativeFundingEntry, uint256 positionID, bool isLong) +func (f *FuturesFilterer) ParseFuturesPosition(log types.Log) (*FuturesPosition, error) { + event := new(FuturesPosition) + if err := f.contract.UnpackLog(event, "FuturesPosition", log); err != nil { return nil, err } return event, nil } -// FuturesMatchIterator is returned from FilterFuturesMatch and is used to iterate over the raw logs and unpacked data for FuturesMatch events raised by the Futures contract. -type FuturesMatchIterator struct { - Event *FuturesMatch // Event containing the contract specifics and raw log +// FuturesIncrementSubaccountDepositsIterator is returned from FilterIncrementSubaccountDeposits and is used to iterate over the raw logs and unpacked data for IncrementSubaccountDeposits events raised by the Futures contract. +type FuturesIncrementSubaccountDepositsIterator struct { + Event *FuturesIncrementSubaccountDeposits // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -2217,7 +3146,7 @@ type FuturesMatchIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *FuturesMatchIterator) Next() bool { +func (it *FuturesIncrementSubaccountDepositsIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -2226,7 +3155,7 @@ func (it *FuturesMatchIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(FuturesMatch) + it.Event = new(FuturesIncrementSubaccountDeposits) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2241,7 +3170,7 @@ func (it *FuturesMatchIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(FuturesMatch) + it.Event = new(FuturesIncrementSubaccountDeposits) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2257,70 +3186,52 @@ func (it *FuturesMatchIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *FuturesMatchIterator) Error() error { +func (it *FuturesIncrementSubaccountDepositsIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *FuturesMatchIterator) Close() error { +func (it *FuturesIncrementSubaccountDepositsIterator) Close() error { it.sub.Unsubscribe() return nil } -// FuturesMatch represents a FuturesMatch event raised by the Futures contract. -type FuturesMatch struct { - LeftOrderHash [32]byte - RightOrderHash [32]byte - MarketID [32]byte - Quantity *big.Int - Raw types.Log // Blockchain specific contextual infos +// FuturesIncrementSubaccountDeposits represents a IncrementSubaccountDeposits event raised by the Futures contract. +type FuturesIncrementSubaccountDeposits struct { + SubAccountID [32]byte + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterFuturesMatch is a free log retrieval operation binding the contract event 0xf6dc3b6914c1ade29b4a0c34e7d47e49d51690d622548649e7f67ced15b09a06. +// FilterIncrementSubaccountDeposits is a free log retrieval operation binding the contract event 0xa645c0b79353c4e5184d0db3b4af9170887ad392f0b06f835cfdab50e329b37f. // -// Solidity: event FuturesMatch(bytes32 indexed leftOrderHash, bytes32 indexed rightOrderHash, bytes32 indexed marketID, uint256 quantity) -func (f *FuturesFilterer) FilterFuturesMatch(opts *bind.FilterOpts, leftOrderHash [][32]byte, rightOrderHash [][32]byte, marketID [][32]byte) (*FuturesMatchIterator, error) { +// Solidity: event IncrementSubaccountDeposits(bytes32 indexed subAccountID, uint256 amount) +func (f *FuturesFilterer) FilterIncrementSubaccountDeposits(opts *bind.FilterOpts, subAccountID [][32]byte) (*FuturesIncrementSubaccountDepositsIterator, error) { - var leftOrderHashRule []interface{} - for _, leftOrderHashItem := range leftOrderHash { - leftOrderHashRule = append(leftOrderHashRule, leftOrderHashItem) - } - var rightOrderHashRule []interface{} - for _, rightOrderHashItem := range rightOrderHash { - rightOrderHashRule = append(rightOrderHashRule, rightOrderHashItem) - } - var marketIDRule []interface{} - for _, marketIDItem := range marketID { - marketIDRule = append(marketIDRule, marketIDItem) + var subAccountIDRule []interface{} + for _, subAccountIDItem := range subAccountID { + subAccountIDRule = append(subAccountIDRule, subAccountIDItem) } - logs, sub, err := f.contract.FilterLogs(opts, "FuturesMatch", leftOrderHashRule, rightOrderHashRule, marketIDRule) + logs, sub, err := f.contract.FilterLogs(opts, "IncrementSubaccountDeposits", subAccountIDRule) if err != nil { return nil, err } - return &FuturesMatchIterator{contract: f.contract, event: "FuturesMatch", logs: logs, sub: sub}, nil + return &FuturesIncrementSubaccountDepositsIterator{contract: f.contract, event: "IncrementSubaccountDeposits", logs: logs, sub: sub}, nil } -// WatchFuturesMatch is a free log subscription operation binding the contract event 0xf6dc3b6914c1ade29b4a0c34e7d47e49d51690d622548649e7f67ced15b09a06. +// WatchIncrementSubaccountDeposits is a free log subscription operation binding the contract event 0xa645c0b79353c4e5184d0db3b4af9170887ad392f0b06f835cfdab50e329b37f. // -// Solidity: event FuturesMatch(bytes32 indexed leftOrderHash, bytes32 indexed rightOrderHash, bytes32 indexed marketID, uint256 quantity) -func (f *FuturesFilterer) WatchFuturesMatch(opts *bind.WatchOpts, sink chan<- *FuturesMatch, leftOrderHash [][32]byte, rightOrderHash [][32]byte, marketID [][32]byte) (event.Subscription, error) { +// Solidity: event IncrementSubaccountDeposits(bytes32 indexed subAccountID, uint256 amount) +func (f *FuturesFilterer) WatchIncrementSubaccountDeposits(opts *bind.WatchOpts, sink chan<- *FuturesIncrementSubaccountDeposits, subAccountID [][32]byte) (event.Subscription, error) { - var leftOrderHashRule []interface{} - for _, leftOrderHashItem := range leftOrderHash { - leftOrderHashRule = append(leftOrderHashRule, leftOrderHashItem) - } - var rightOrderHashRule []interface{} - for _, rightOrderHashItem := range rightOrderHash { - rightOrderHashRule = append(rightOrderHashRule, rightOrderHashItem) - } - var marketIDRule []interface{} - for _, marketIDItem := range marketID { - marketIDRule = append(marketIDRule, marketIDItem) + var subAccountIDRule []interface{} + for _, subAccountIDItem := range subAccountID { + subAccountIDRule = append(subAccountIDRule, subAccountIDItem) } - logs, sub, err := f.contract.WatchLogs(opts, "FuturesMatch", leftOrderHashRule, rightOrderHashRule, marketIDRule) + logs, sub, err := f.contract.WatchLogs(opts, "IncrementSubaccountDeposits", subAccountIDRule) if err != nil { return nil, err } @@ -2330,8 +3241,8 @@ func (f *FuturesFilterer) WatchFuturesMatch(opts *bind.WatchOpts, sink chan<- *F select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(FuturesMatch) - if err := f.contract.UnpackLog(event, "FuturesMatch", log); err != nil { + event := new(FuturesIncrementSubaccountDeposits) + if err := f.contract.UnpackLog(event, "IncrementSubaccountDeposits", log); err != nil { return err } event.Raw = log @@ -2352,20 +3263,20 @@ func (f *FuturesFilterer) WatchFuturesMatch(opts *bind.WatchOpts, sink chan<- *F }), nil } -// ParseFuturesMatch is a log parse operation binding the contract event 0xf6dc3b6914c1ade29b4a0c34e7d47e49d51690d622548649e7f67ced15b09a06. +// ParseIncrementSubaccountDeposits is a log parse operation binding the contract event 0xa645c0b79353c4e5184d0db3b4af9170887ad392f0b06f835cfdab50e329b37f. // -// Solidity: event FuturesMatch(bytes32 indexed leftOrderHash, bytes32 indexed rightOrderHash, bytes32 indexed marketID, uint256 quantity) -func (f *FuturesFilterer) ParseFuturesMatch(log types.Log) (*FuturesMatch, error) { - event := new(FuturesMatch) - if err := f.contract.UnpackLog(event, "FuturesMatch", log); err != nil { +// Solidity: event IncrementSubaccountDeposits(bytes32 indexed subAccountID, uint256 amount) +func (f *FuturesFilterer) ParseIncrementSubaccountDeposits(log types.Log) (*FuturesIncrementSubaccountDeposits, error) { + event := new(FuturesIncrementSubaccountDeposits) + if err := f.contract.UnpackLog(event, "IncrementSubaccountDeposits", log); err != nil { return nil, err } return event, nil } -// FuturesPositionIterator is returned from FilterFuturesPosition and is used to iterate over the raw logs and unpacked data for FuturesPosition events raised by the Futures contract. -type FuturesPositionIterator struct { - Event *FuturesPosition // Event containing the contract specifics and raw log +// FuturesMarginAddedIterator is returned from FilterMarginAdded and is used to iterate over the raw logs and unpacked data for MarginAdded events raised by the Futures contract. +type FuturesMarginAddedIterator struct { + Event *FuturesMarginAdded // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -2379,7 +3290,7 @@ type FuturesPositionIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *FuturesPositionIterator) Next() bool { +func (it *FuturesMarginAddedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -2388,7 +3299,7 @@ func (it *FuturesPositionIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(FuturesPosition) + it.Event = new(FuturesMarginAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2403,7 +3314,7 @@ func (it *FuturesPositionIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(FuturesPosition) + it.Event = new(FuturesMarginAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2419,73 +3330,52 @@ func (it *FuturesPositionIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *FuturesPositionIterator) Error() error { +func (it *FuturesMarginAddedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *FuturesPositionIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// FuturesPosition represents a FuturesPosition event raised by the Futures contract. -type FuturesPosition struct { - MakerAddress common.Address - OrderHash [32]byte - MarketID [32]byte - ContractPrice *big.Int - QuantityFilled *big.Int - PositionID *big.Int - IsLong bool - Raw types.Log // Blockchain specific contextual infos +// resources. +func (it *FuturesMarginAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FuturesMarginAdded represents a MarginAdded event raised by the Futures contract. +type FuturesMarginAdded struct { + PositionID *big.Int + AddedMargin *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterFuturesPosition is a free log retrieval operation binding the contract event 0x6de5e2d8e6c1c3ba6aa61e6d535edd1e007f834dc09c7e288c12a5abecb5cb8f. +// FilterMarginAdded is a free log retrieval operation binding the contract event 0xe1f22f90ef2dc8cc8b52420487417e2d986cc8001133dff107fda9b9d8a7395b. // -// Solidity: event FuturesPosition(address indexed makerAddress, bytes32 indexed orderHash, bytes32 indexed marketID, uint256 contractPrice, uint256 quantityFilled, uint256 positionID, bool isLong) -func (f *FuturesFilterer) FilterFuturesPosition(opts *bind.FilterOpts, makerAddress []common.Address, orderHash [][32]byte, marketID [][32]byte) (*FuturesPositionIterator, error) { +// Solidity: event MarginAdded(uint256 indexed positionID, uint256 addedMargin) +func (f *FuturesFilterer) FilterMarginAdded(opts *bind.FilterOpts, positionID []*big.Int) (*FuturesMarginAddedIterator, error) { - var makerAddressRule []interface{} - for _, makerAddressItem := range makerAddress { - makerAddressRule = append(makerAddressRule, makerAddressItem) - } - var orderHashRule []interface{} - for _, orderHashItem := range orderHash { - orderHashRule = append(orderHashRule, orderHashItem) - } - var marketIDRule []interface{} - for _, marketIDItem := range marketID { - marketIDRule = append(marketIDRule, marketIDItem) + var positionIDRule []interface{} + for _, positionIDItem := range positionID { + positionIDRule = append(positionIDRule, positionIDItem) } - logs, sub, err := f.contract.FilterLogs(opts, "FuturesPosition", makerAddressRule, orderHashRule, marketIDRule) + logs, sub, err := f.contract.FilterLogs(opts, "MarginAdded", positionIDRule) if err != nil { return nil, err } - return &FuturesPositionIterator{contract: f.contract, event: "FuturesPosition", logs: logs, sub: sub}, nil + return &FuturesMarginAddedIterator{contract: f.contract, event: "MarginAdded", logs: logs, sub: sub}, nil } -// WatchFuturesPosition is a free log subscription operation binding the contract event 0x6de5e2d8e6c1c3ba6aa61e6d535edd1e007f834dc09c7e288c12a5abecb5cb8f. +// WatchMarginAdded is a free log subscription operation binding the contract event 0xe1f22f90ef2dc8cc8b52420487417e2d986cc8001133dff107fda9b9d8a7395b. // -// Solidity: event FuturesPosition(address indexed makerAddress, bytes32 indexed orderHash, bytes32 indexed marketID, uint256 contractPrice, uint256 quantityFilled, uint256 positionID, bool isLong) -func (f *FuturesFilterer) WatchFuturesPosition(opts *bind.WatchOpts, sink chan<- *FuturesPosition, makerAddress []common.Address, orderHash [][32]byte, marketID [][32]byte) (event.Subscription, error) { +// Solidity: event MarginAdded(uint256 indexed positionID, uint256 addedMargin) +func (f *FuturesFilterer) WatchMarginAdded(opts *bind.WatchOpts, sink chan<- *FuturesMarginAdded, positionID []*big.Int) (event.Subscription, error) { - var makerAddressRule []interface{} - for _, makerAddressItem := range makerAddress { - makerAddressRule = append(makerAddressRule, makerAddressItem) - } - var orderHashRule []interface{} - for _, orderHashItem := range orderHash { - orderHashRule = append(orderHashRule, orderHashItem) - } - var marketIDRule []interface{} - for _, marketIDItem := range marketID { - marketIDRule = append(marketIDRule, marketIDItem) + var positionIDRule []interface{} + for _, positionIDItem := range positionID { + positionIDRule = append(positionIDRule, positionIDItem) } - logs, sub, err := f.contract.WatchLogs(opts, "FuturesPosition", makerAddressRule, orderHashRule, marketIDRule) + logs, sub, err := f.contract.WatchLogs(opts, "MarginAdded", positionIDRule) if err != nil { return nil, err } @@ -2495,8 +3385,8 @@ func (f *FuturesFilterer) WatchFuturesPosition(opts *bind.WatchOpts, sink chan<- select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(FuturesPosition) - if err := f.contract.UnpackLog(event, "FuturesPosition", log); err != nil { + event := new(FuturesMarginAdded) + if err := f.contract.UnpackLog(event, "MarginAdded", log); err != nil { return err } event.Raw = log @@ -2517,12 +3407,12 @@ func (f *FuturesFilterer) WatchFuturesPosition(opts *bind.WatchOpts, sink chan<- }), nil } -// ParseFuturesPosition is a log parse operation binding the contract event 0x6de5e2d8e6c1c3ba6aa61e6d535edd1e007f834dc09c7e288c12a5abecb5cb8f. +// ParseMarginAdded is a log parse operation binding the contract event 0xe1f22f90ef2dc8cc8b52420487417e2d986cc8001133dff107fda9b9d8a7395b. // -// Solidity: event FuturesPosition(address indexed makerAddress, bytes32 indexed orderHash, bytes32 indexed marketID, uint256 contractPrice, uint256 quantityFilled, uint256 positionID, bool isLong) -func (f *FuturesFilterer) ParseFuturesPosition(log types.Log) (*FuturesPosition, error) { - event := new(FuturesPosition) - if err := f.contract.UnpackLog(event, "FuturesPosition", log); err != nil { +// Solidity: event MarginAdded(uint256 indexed positionID, uint256 addedMargin) +func (f *FuturesFilterer) ParseMarginAdded(log types.Log) (*FuturesMarginAdded, error) { + event := new(FuturesMarginAdded) + if err := f.contract.UnpackLog(event, "MarginAdded", log); err != nil { return nil, err } return event, nil @@ -2597,15 +3487,16 @@ func (it *FuturesMarketCreationIterator) Close() error { // FuturesMarketCreation represents a MarketCreation event raised by the Futures contract. type FuturesMarketCreation struct { - MarketID [32]byte - Ticker common.Hash - Oracle common.Address - Raw types.Log // Blockchain specific contextual infos + MarketID [32]byte + Ticker common.Hash + Oracle common.Address + MaintenanceMarginRatio *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterMarketCreation is a free log retrieval operation binding the contract event 0xa89968288be926b3b7a2a5a0d70c9e55178a465c62e84ad1c3f0401d8c2f7fc1. +// FilterMarketCreation is a free log retrieval operation binding the contract event 0x04cdf3d5287ea18d308c3d57ba0a554310054a27f0623991a304e64bef9e2eb0. // -// Solidity: event MarketCreation(bytes32 indexed marketID, string indexed ticker, address indexed oracle) +// Solidity: event MarketCreation(bytes32 indexed marketID, string indexed ticker, address indexed oracle, uint256 maintenanceMarginRatio) func (f *FuturesFilterer) FilterMarketCreation(opts *bind.FilterOpts, marketID [][32]byte, ticker []string, oracle []common.Address) (*FuturesMarketCreationIterator, error) { var marketIDRule []interface{} @@ -2628,9 +3519,9 @@ func (f *FuturesFilterer) FilterMarketCreation(opts *bind.FilterOpts, marketID [ return &FuturesMarketCreationIterator{contract: f.contract, event: "MarketCreation", logs: logs, sub: sub}, nil } -// WatchMarketCreation is a free log subscription operation binding the contract event 0xa89968288be926b3b7a2a5a0d70c9e55178a465c62e84ad1c3f0401d8c2f7fc1. +// WatchMarketCreation is a free log subscription operation binding the contract event 0x04cdf3d5287ea18d308c3d57ba0a554310054a27f0623991a304e64bef9e2eb0. // -// Solidity: event MarketCreation(bytes32 indexed marketID, string indexed ticker, address indexed oracle) +// Solidity: event MarketCreation(bytes32 indexed marketID, string indexed ticker, address indexed oracle, uint256 maintenanceMarginRatio) func (f *FuturesFilterer) WatchMarketCreation(opts *bind.WatchOpts, sink chan<- *FuturesMarketCreation, marketID [][32]byte, ticker []string, oracle []common.Address) (event.Subscription, error) { var marketIDRule []interface{} @@ -2678,9 +3569,9 @@ func (f *FuturesFilterer) WatchMarketCreation(opts *bind.WatchOpts, sink chan<- }), nil } -// ParseMarketCreation is a log parse operation binding the contract event 0xa89968288be926b3b7a2a5a0d70c9e55178a465c62e84ad1c3f0401d8c2f7fc1. +// ParseMarketCreation is a log parse operation binding the contract event 0x04cdf3d5287ea18d308c3d57ba0a554310054a27f0623991a304e64bef9e2eb0. // -// Solidity: event MarketCreation(bytes32 indexed marketID, string indexed ticker, address indexed oracle) +// Solidity: event MarketCreation(bytes32 indexed marketID, string indexed ticker, address indexed oracle, uint256 maintenanceMarginRatio) func (f *FuturesFilterer) ParseMarketCreation(log types.Log) (*FuturesMarketCreation, error) { event := new(FuturesMarketCreation) if err := f.contract.UnpackLog(event, "MarketCreation", log); err != nil { @@ -2841,6 +3732,139 @@ func (f *FuturesFilterer) ParseOwnershipTransferred(log types.Log) (*FuturesOwne return event, nil } +// FuturesPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the Futures contract. +type FuturesPausedIterator struct { + Event *FuturesPaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *FuturesPausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(FuturesPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(FuturesPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *FuturesPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FuturesPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FuturesPaused represents a Paused event raised by the Futures contract. +type FuturesPaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (f *FuturesFilterer) FilterPaused(opts *bind.FilterOpts) (*FuturesPausedIterator, error) { + + logs, sub, err := f.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &FuturesPausedIterator{contract: f.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (f *FuturesFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *FuturesPaused) (event.Subscription, error) { + + logs, sub, err := f.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(FuturesPaused) + if err := f.contract.UnpackLog(event, "Paused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (f *FuturesFilterer) ParsePaused(log types.Log) (*FuturesPaused, error) { + event := new(FuturesPaused) + if err := f.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + return event, nil +} + // FuturesSignatureValidatorApprovalIterator is returned from FilterSignatureValidatorApproval and is used to iterate over the raw logs and unpacked data for SignatureValidatorApproval events raised by the Futures contract. type FuturesSignatureValidatorApprovalIterator struct { Event *FuturesSignatureValidatorApproval // Event containing the contract specifics and raw log @@ -2993,3 +4017,136 @@ func (f *FuturesFilterer) ParseSignatureValidatorApproval(log types.Log) (*Futur } return event, nil } + +// FuturesUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the Futures contract. +type FuturesUnpausedIterator struct { + Event *FuturesUnpaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *FuturesUnpausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(FuturesUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(FuturesUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *FuturesUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *FuturesUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// FuturesUnpaused represents a Unpaused event raised by the Futures contract. +type FuturesUnpaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (f *FuturesFilterer) FilterUnpaused(opts *bind.FilterOpts) (*FuturesUnpausedIterator, error) { + + logs, sub, err := f.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &FuturesUnpausedIterator{contract: f.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (f *FuturesFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *FuturesUnpaused) (event.Subscription, error) { + + logs, sub, err := f.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(FuturesUnpaused) + if err := f.contract.UnpackLog(event, "Unpaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (f *FuturesFilterer) ParseUnpaused(log types.Log) (*FuturesUnpaused, error) { + event := new(FuturesUnpaused) + if err := f.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + return event, nil +}