Documentation ¶
Index ¶
- Constants
- type Reader
- type ReaderAccountReaderResult
- type ReaderAccountsResult
- type ReaderCaller
- func (_Reader *ReaderCaller) GetAccountStorage(opts *bind.CallOpts, liquidityPool common.Address, perpetualIndex *big.Int, ...) (struct{ ... }, error)
- func (_Reader *ReaderCaller) GetImplementation(opts *bind.CallOpts, proxy common.Address) (common.Address, error)
- func (_Reader *ReaderCaller) GetLiquidityPoolStorage(opts *bind.CallOpts, liquidityPool common.Address) (struct{ ... }, error)
- func (_Reader *ReaderCaller) GetPoolMargin(opts *bind.CallOpts, liquidityPool common.Address) (struct{ ... }, error)
- func (_Reader *ReaderCaller) PoolCreator(opts *bind.CallOpts) (common.Address, error)
- func (_Reader *ReaderCaller) QueryAddLiquidity(opts *bind.CallOpts, liquidityPool common.Address, cashToAdd *big.Int, ...) (struct{ ... }, error)
- func (_Reader *ReaderCaller) QueryRemoveLiquidity(opts *bind.CallOpts, liquidityPool common.Address, shareToRemove *big.Int, ...) (struct{ ... }, error)
- func (_Reader *ReaderCaller) QueryTradeWithAMM(opts *bind.CallOpts, liquidityPool common.Address, perpetualIndex *big.Int, ...) (struct{ ... }, error)
- type ReaderCallerRaw
- type ReaderCallerSession
- func (_Reader *ReaderCallerSession) GetAccountStorage(liquidityPool common.Address, perpetualIndex *big.Int, account common.Address) (struct{ ... }, error)
- func (_Reader *ReaderCallerSession) GetImplementation(proxy common.Address) (common.Address, error)
- func (_Reader *ReaderCallerSession) GetLiquidityPoolStorage(liquidityPool common.Address) (struct{ ... }, error)
- func (_Reader *ReaderCallerSession) GetPoolMargin(liquidityPool common.Address) (struct{ ... }, error)
- func (_Reader *ReaderCallerSession) PoolCreator() (common.Address, error)
- func (_Reader *ReaderCallerSession) QueryAddLiquidity(liquidityPool common.Address, cashToAdd *big.Int, shareToMint *big.Int) (struct{ ... }, error)
- func (_Reader *ReaderCallerSession) QueryRemoveLiquidity(liquidityPool common.Address, shareToRemove *big.Int, cashToReturn *big.Int) (struct{ ... }, error)
- func (_Reader *ReaderCallerSession) QueryTradeWithAMM(liquidityPool common.Address, perpetualIndex *big.Int, amount *big.Int) (struct{ ... }, error)
- type ReaderFilterer
- type ReaderLiquidityPoolReaderResult
- type ReaderPerpetualReaderResult
- type ReaderRaw
- func (_Reader *ReaderRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, ...) error
- func (_Reader *ReaderRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
- func (_Reader *ReaderRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
- type ReaderSession
- func (_Reader *ReaderSession) GetAccountStorage(liquidityPool common.Address, perpetualIndex *big.Int, account common.Address) (struct{ ... }, error)
- func (_Reader *ReaderSession) GetAccountsInfo(liquidityPool common.Address, perpetualIndex *big.Int, begin *big.Int, ...) (*types.Transaction, error)
- func (_Reader *ReaderSession) GetImplementation(proxy common.Address) (common.Address, error)
- func (_Reader *ReaderSession) GetLiquidityPoolStorage(liquidityPool common.Address) (struct{ ... }, error)
- func (_Reader *ReaderSession) GetPoolMargin(liquidityPool common.Address) (struct{ ... }, error)
- func (_Reader *ReaderSession) PoolCreator() (common.Address, error)
- func (_Reader *ReaderSession) QueryAddLiquidity(liquidityPool common.Address, cashToAdd *big.Int, shareToMint *big.Int) (struct{ ... }, error)
- func (_Reader *ReaderSession) QueryRemoveLiquidity(liquidityPool common.Address, shareToRemove *big.Int, cashToReturn *big.Int) (struct{ ... }, error)
- func (_Reader *ReaderSession) QueryTradeWithAMM(liquidityPool common.Address, perpetualIndex *big.Int, amount *big.Int) (struct{ ... }, error)
- type ReaderTransactor
- type ReaderTransactorRaw
- type ReaderTransactorSession
Constants ¶
const ReaderABI = "" /* 6259-byte string literal not displayed */
ReaderABI is the input ABI used to generate the binding from.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct { ReaderCaller // Read-only binding to the contract ReaderTransactor // Write-only binding to the contract ReaderFilterer // Log filterer for contract events }
Reader is an auto generated Go binding around an Ethereum contract.
type ReaderAccountReaderResult ¶
type ReaderAccountReaderResult struct { Cash *big.Int Position *big.Int AvailableMargin *big.Int Margin *big.Int SettleableMargin *big.Int IsInitialMarginSafe bool IsMaintenanceMarginSafe bool IsMarginSafe bool TargetLeverage *big.Int }
ReaderAccountReaderResult is an auto generated low-level Go binding around an user-defined struct.
type ReaderAccountsResult ¶
type ReaderAccountsResult struct { Account common.Address Position *big.Int Margin *big.Int IsSafe bool }
ReaderAccountsResult is an auto generated low-level Go binding around an user-defined struct.
type ReaderCaller ¶
type ReaderCaller struct {
// contains filtered or unexported fields
}
ReaderCaller is an auto generated read-only Go binding around an Ethereum contract.
func NewReaderCaller ¶
func NewReaderCaller(address common.Address, caller bind.ContractCaller) (*ReaderCaller, error)
NewReaderCaller creates a new read-only instance of Reader, bound to a specific deployed contract.
func (*ReaderCaller) GetAccountStorage ¶
func (_Reader *ReaderCaller) GetAccountStorage(opts *bind.CallOpts, liquidityPool common.Address, perpetualIndex *big.Int, account common.Address) (struct { IsSynced bool AccountStorage ReaderAccountReaderResult }, error)
GetAccountStorage is a free data retrieval call binding the contract method 0xeb16510d.
Solidity: function getAccountStorage(address liquidityPool, uint256 perpetualIndex, address account) view returns(bool isSynced, (int256,int256,int256,int256,int256,bool,bool,bool,int256) accountStorage)
func (*ReaderCaller) GetImplementation ¶
func (_Reader *ReaderCaller) GetImplementation(opts *bind.CallOpts, proxy common.Address) (common.Address, error)
GetImplementation is a free data retrieval call binding the contract method 0x15ac72ca.
Solidity: function getImplementation(address proxy) view returns(address)
func (*ReaderCaller) GetLiquidityPoolStorage ¶
func (_Reader *ReaderCaller) GetLiquidityPoolStorage(opts *bind.CallOpts, liquidityPool common.Address) (struct { IsSynced bool Pool ReaderLiquidityPoolReaderResult }, error)
GetLiquidityPoolStorage is a free data retrieval call binding the contract method 0x574408c1.
Solidity: function getLiquidityPoolStorage(address liquidityPool) view returns(bool isSynced, (bool,bool,address[7],int256[5],uint256[4],(uint8,address,int256[39],uint256,string,bool,int256,int256)[]) pool)
func (*ReaderCaller) GetPoolMargin ¶
func (_Reader *ReaderCaller) GetPoolMargin(opts *bind.CallOpts, liquidityPool common.Address) (struct { IsSynced bool PoolMargin *big.Int IsSafe bool }, error)
GetPoolMargin is a free data retrieval call binding the contract method 0x41de031a.
Solidity: function getPoolMargin(address liquidityPool) view returns(bool isSynced, int256 poolMargin, bool isSafe)
func (*ReaderCaller) PoolCreator ¶
PoolCreator is a free data retrieval call binding the contract method 0xc6c1decd.
Solidity: function poolCreator() view returns(address)
func (*ReaderCaller) QueryAddLiquidity ¶
func (_Reader *ReaderCaller) QueryAddLiquidity(opts *bind.CallOpts, liquidityPool common.Address, cashToAdd *big.Int, shareToMint *big.Int) (struct { IsSynced bool CashToAddResult *big.Int ShareToMintResult *big.Int }, error)
QueryAddLiquidity is a free data retrieval call binding the contract method 0x7e4b4e45.
Solidity: function queryAddLiquidity(address liquidityPool, int256 cashToAdd, int256 shareToMint) view returns(bool isSynced, int256 cashToAddResult, int256 shareToMintResult)
func (*ReaderCaller) QueryRemoveLiquidity ¶
func (_Reader *ReaderCaller) QueryRemoveLiquidity(opts *bind.CallOpts, liquidityPool common.Address, shareToRemove *big.Int, cashToReturn *big.Int) (struct { IsSynced bool ShareToRemoveResult *big.Int CashToReturnResult *big.Int }, error)
QueryRemoveLiquidity is a free data retrieval call binding the contract method 0x3c070544.
Solidity: function queryRemoveLiquidity(address liquidityPool, int256 shareToRemove, int256 cashToReturn) view returns(bool isSynced, int256 shareToRemoveResult, int256 cashToReturnResult)
func (*ReaderCaller) QueryTradeWithAMM ¶
func (_Reader *ReaderCaller) QueryTradeWithAMM(opts *bind.CallOpts, liquidityPool common.Address, perpetualIndex *big.Int, amount *big.Int) (struct { IsSynced bool DeltaCash *big.Int DeltaPosition *big.Int }, error)
QueryTradeWithAMM is a free data retrieval call binding the contract method 0x74501436.
Solidity: function queryTradeWithAMM(address liquidityPool, uint256 perpetualIndex, int256 amount) view returns(bool isSynced, int256 deltaCash, int256 deltaPosition)
type ReaderCallerRaw ¶
type ReaderCallerRaw struct {
Contract *ReaderCaller // Generic read-only contract binding to access the raw methods on
}
ReaderCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
func (*ReaderCallerRaw) Call ¶
func (_Reader *ReaderCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error
Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.
type ReaderCallerSession ¶
type ReaderCallerSession struct { Contract *ReaderCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session }
ReaderCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.
func (*ReaderCallerSession) GetAccountStorage ¶
func (_Reader *ReaderCallerSession) GetAccountStorage(liquidityPool common.Address, perpetualIndex *big.Int, account common.Address) (struct { IsSynced bool AccountStorage ReaderAccountReaderResult }, error)
GetAccountStorage is a free data retrieval call binding the contract method 0xeb16510d.
Solidity: function getAccountStorage(address liquidityPool, uint256 perpetualIndex, address account) view returns(bool isSynced, (int256,int256,int256,int256,int256,bool,bool,bool,int256) accountStorage)
func (*ReaderCallerSession) GetImplementation ¶
GetImplementation is a free data retrieval call binding the contract method 0x15ac72ca.
Solidity: function getImplementation(address proxy) view returns(address)
func (*ReaderCallerSession) GetLiquidityPoolStorage ¶
func (_Reader *ReaderCallerSession) GetLiquidityPoolStorage(liquidityPool common.Address) (struct { IsSynced bool Pool ReaderLiquidityPoolReaderResult }, error)
GetLiquidityPoolStorage is a free data retrieval call binding the contract method 0x574408c1.
Solidity: function getLiquidityPoolStorage(address liquidityPool) view returns(bool isSynced, (bool,bool,address[7],int256[5],uint256[4],(uint8,address,int256[39],uint256,string,bool,int256,int256)[]) pool)
func (*ReaderCallerSession) GetPoolMargin ¶
func (_Reader *ReaderCallerSession) GetPoolMargin(liquidityPool common.Address) (struct { IsSynced bool PoolMargin *big.Int IsSafe bool }, error)
GetPoolMargin is a free data retrieval call binding the contract method 0x41de031a.
Solidity: function getPoolMargin(address liquidityPool) view returns(bool isSynced, int256 poolMargin, bool isSafe)
func (*ReaderCallerSession) PoolCreator ¶
func (_Reader *ReaderCallerSession) PoolCreator() (common.Address, error)
PoolCreator is a free data retrieval call binding the contract method 0xc6c1decd.
Solidity: function poolCreator() view returns(address)
func (*ReaderCallerSession) QueryAddLiquidity ¶
func (_Reader *ReaderCallerSession) QueryAddLiquidity(liquidityPool common.Address, cashToAdd *big.Int, shareToMint *big.Int) (struct { IsSynced bool CashToAddResult *big.Int ShareToMintResult *big.Int }, error)
QueryAddLiquidity is a free data retrieval call binding the contract method 0x7e4b4e45.
Solidity: function queryAddLiquidity(address liquidityPool, int256 cashToAdd, int256 shareToMint) view returns(bool isSynced, int256 cashToAddResult, int256 shareToMintResult)
func (*ReaderCallerSession) QueryRemoveLiquidity ¶
func (_Reader *ReaderCallerSession) QueryRemoveLiquidity(liquidityPool common.Address, shareToRemove *big.Int, cashToReturn *big.Int) (struct { IsSynced bool ShareToRemoveResult *big.Int CashToReturnResult *big.Int }, error)
QueryRemoveLiquidity is a free data retrieval call binding the contract method 0x3c070544.
Solidity: function queryRemoveLiquidity(address liquidityPool, int256 shareToRemove, int256 cashToReturn) view returns(bool isSynced, int256 shareToRemoveResult, int256 cashToReturnResult)
func (*ReaderCallerSession) QueryTradeWithAMM ¶
func (_Reader *ReaderCallerSession) QueryTradeWithAMM(liquidityPool common.Address, perpetualIndex *big.Int, amount *big.Int) (struct { IsSynced bool DeltaCash *big.Int DeltaPosition *big.Int }, error)
QueryTradeWithAMM is a free data retrieval call binding the contract method 0x74501436.
Solidity: function queryTradeWithAMM(address liquidityPool, uint256 perpetualIndex, int256 amount) view returns(bool isSynced, int256 deltaCash, int256 deltaPosition)
type ReaderFilterer ¶
type ReaderFilterer struct {
// contains filtered or unexported fields
}
ReaderFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
func NewReaderFilterer ¶
func NewReaderFilterer(address common.Address, filterer bind.ContractFilterer) (*ReaderFilterer, error)
NewReaderFilterer creates a new log filterer instance of Reader, bound to a specific deployed contract.
type ReaderLiquidityPoolReaderResult ¶
type ReaderLiquidityPoolReaderResult struct { IsRunning bool IsFastCreationEnabled bool Addresses [7]common.Address IntNums [5]*big.Int UintNums [4]*big.Int Perpetuals []ReaderPerpetualReaderResult }
ReaderLiquidityPoolReaderResult is an auto generated low-level Go binding around an user-defined struct.
type ReaderPerpetualReaderResult ¶
type ReaderPerpetualReaderResult struct { State uint8 Oracle common.Address Nums [39]*big.Int Symbol *big.Int UnderlyingAsset string IsMarketClosed bool AmmCashBalance *big.Int AmmPositionAmount *big.Int }
ReaderPerpetualReaderResult is an auto generated low-level Go binding around an user-defined struct.
type ReaderRaw ¶
type ReaderRaw struct {
Contract *Reader // Generic contract binding to access the raw methods on
}
ReaderRaw is an auto generated low-level Go binding around an Ethereum contract.
func (*ReaderRaw) Call ¶
func (_Reader *ReaderRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error
Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.
func (*ReaderRaw) Transact ¶
func (_Reader *ReaderRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*ReaderRaw) Transfer ¶
func (_Reader *ReaderRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type ReaderSession ¶
type ReaderSession struct { Contract *Reader // Generic contract binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
ReaderSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.
func (*ReaderSession) GetAccountStorage ¶
func (_Reader *ReaderSession) GetAccountStorage(liquidityPool common.Address, perpetualIndex *big.Int, account common.Address) (struct { IsSynced bool AccountStorage ReaderAccountReaderResult }, error)
GetAccountStorage is a free data retrieval call binding the contract method 0xeb16510d.
Solidity: function getAccountStorage(address liquidityPool, uint256 perpetualIndex, address account) view returns(bool isSynced, (int256,int256,int256,int256,int256,bool,bool,bool,int256) accountStorage)
func (*ReaderSession) GetAccountsInfo ¶
func (_Reader *ReaderSession) GetAccountsInfo(liquidityPool common.Address, perpetualIndex *big.Int, begin *big.Int, end *big.Int) (*types.Transaction, error)
GetAccountsInfo is a paid mutator transaction binding the contract method 0x77ee51ee.
Solidity: function getAccountsInfo(address liquidityPool, uint256 perpetualIndex, uint256 begin, uint256 end) returns(bool isSynced, (address,int256,int256,bool)[] result)
func (*ReaderSession) GetImplementation ¶
GetImplementation is a free data retrieval call binding the contract method 0x15ac72ca.
Solidity: function getImplementation(address proxy) view returns(address)
func (*ReaderSession) GetLiquidityPoolStorage ¶
func (_Reader *ReaderSession) GetLiquidityPoolStorage(liquidityPool common.Address) (struct { IsSynced bool Pool ReaderLiquidityPoolReaderResult }, error)
GetLiquidityPoolStorage is a free data retrieval call binding the contract method 0x574408c1.
Solidity: function getLiquidityPoolStorage(address liquidityPool) view returns(bool isSynced, (bool,bool,address[7],int256[5],uint256[4],(uint8,address,int256[39],uint256,string,bool,int256,int256)[]) pool)
func (*ReaderSession) GetPoolMargin ¶
func (_Reader *ReaderSession) GetPoolMargin(liquidityPool common.Address) (struct { IsSynced bool PoolMargin *big.Int IsSafe bool }, error)
GetPoolMargin is a free data retrieval call binding the contract method 0x41de031a.
Solidity: function getPoolMargin(address liquidityPool) view returns(bool isSynced, int256 poolMargin, bool isSafe)
func (*ReaderSession) PoolCreator ¶
func (_Reader *ReaderSession) PoolCreator() (common.Address, error)
PoolCreator is a free data retrieval call binding the contract method 0xc6c1decd.
Solidity: function poolCreator() view returns(address)
func (*ReaderSession) QueryAddLiquidity ¶
func (_Reader *ReaderSession) QueryAddLiquidity(liquidityPool common.Address, cashToAdd *big.Int, shareToMint *big.Int) (struct { IsSynced bool CashToAddResult *big.Int ShareToMintResult *big.Int }, error)
QueryAddLiquidity is a free data retrieval call binding the contract method 0x7e4b4e45.
Solidity: function queryAddLiquidity(address liquidityPool, int256 cashToAdd, int256 shareToMint) view returns(bool isSynced, int256 cashToAddResult, int256 shareToMintResult)
func (*ReaderSession) QueryRemoveLiquidity ¶
func (_Reader *ReaderSession) QueryRemoveLiquidity(liquidityPool common.Address, shareToRemove *big.Int, cashToReturn *big.Int) (struct { IsSynced bool ShareToRemoveResult *big.Int CashToReturnResult *big.Int }, error)
QueryRemoveLiquidity is a free data retrieval call binding the contract method 0x3c070544.
Solidity: function queryRemoveLiquidity(address liquidityPool, int256 shareToRemove, int256 cashToReturn) view returns(bool isSynced, int256 shareToRemoveResult, int256 cashToReturnResult)
func (*ReaderSession) QueryTradeWithAMM ¶
func (_Reader *ReaderSession) QueryTradeWithAMM(liquidityPool common.Address, perpetualIndex *big.Int, amount *big.Int) (struct { IsSynced bool DeltaCash *big.Int DeltaPosition *big.Int }, error)
QueryTradeWithAMM is a free data retrieval call binding the contract method 0x74501436.
Solidity: function queryTradeWithAMM(address liquidityPool, uint256 perpetualIndex, int256 amount) view returns(bool isSynced, int256 deltaCash, int256 deltaPosition)
type ReaderTransactor ¶
type ReaderTransactor struct {
// contains filtered or unexported fields
}
ReaderTransactor is an auto generated write-only Go binding around an Ethereum contract.
func NewReaderTransactor ¶
func NewReaderTransactor(address common.Address, transactor bind.ContractTransactor) (*ReaderTransactor, error)
NewReaderTransactor creates a new write-only instance of Reader, bound to a specific deployed contract.
func (*ReaderTransactor) GetAccountsInfo ¶
func (_Reader *ReaderTransactor) GetAccountsInfo(opts *bind.TransactOpts, liquidityPool common.Address, perpetualIndex *big.Int, begin *big.Int, end *big.Int) (*types.Transaction, error)
GetAccountsInfo is a paid mutator transaction binding the contract method 0x77ee51ee.
Solidity: function getAccountsInfo(address liquidityPool, uint256 perpetualIndex, uint256 begin, uint256 end) returns(bool isSynced, (address,int256,int256,bool)[] result)
type ReaderTransactorRaw ¶
type ReaderTransactorRaw struct {
Contract *ReaderTransactor // Generic write-only contract binding to access the raw methods on
}
ReaderTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
func (*ReaderTransactorRaw) Transact ¶
func (_Reader *ReaderTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*ReaderTransactorRaw) Transfer ¶
func (_Reader *ReaderTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type ReaderTransactorSession ¶
type ReaderTransactorSession struct { Contract *ReaderTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
ReaderTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.
func (*ReaderTransactorSession) GetAccountsInfo ¶
func (_Reader *ReaderTransactorSession) GetAccountsInfo(liquidityPool common.Address, perpetualIndex *big.Int, begin *big.Int, end *big.Int) (*types.Transaction, error)
GetAccountsInfo is a paid mutator transaction binding the contract method 0x77ee51ee.
Solidity: function getAccountsInfo(address liquidityPool, uint256 perpetualIndex, uint256 begin, uint256 end) returns(bool isSynced, (address,int256,int256,bool)[] result)