ReaderV2

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReaderV2ABI = ReaderV2MetaData.ABI

ReaderV2ABI is the input ABI used to generate the binding from. Deprecated: Use ReaderV2MetaData.ABI instead.

View Source
var ReaderV2MetaData = &bind.MetaData{
	ABI: "[{\"type\":\"function\",\"name\":\"BASIS_POINTS_DIVISOR\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"POSITION_PROPS_LENGTH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PRICE_PRECISION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"USDG_DECIMALS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAmountOut\",\"inputs\":[{\"name\":\"_vault\",\"type\":\"address\",\"internalType\":\"contractIVault\"},{\"name\":\"_tokenIn\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_tokenOut\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_amountIn\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getFeeBasisPoints\",\"inputs\":[{\"name\":\"_vault\",\"type\":\"address\",\"internalType\":\"contractIVault\"},{\"name\":\"_tokenIn\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_tokenOut\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_amountIn\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getFees\",\"inputs\":[{\"name\":\"_vault\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_tokens\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getFullVaultTokenInfo\",\"inputs\":[{\"name\":\"_vault\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_weth\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_usdgAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_tokens\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getFundingRates\",\"inputs\":[{\"name\":\"_vault\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_weth\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_tokens\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMaxAmountIn\",\"inputs\":[{\"name\":\"_vault\",\"type\":\"address\",\"internalType\":\"contractIVault\"},{\"name\":\"_tokenIn\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_tokenOut\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getPairInfo\",\"inputs\":[{\"name\":\"_factory\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_tokens\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getPositions\",\"inputs\":[{\"name\":\"_vault\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_collateralTokens\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_indexTokens\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"_isLong\",\"type\":\"bool[]\",\"internalType\":\"bool[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getPrices\",\"inputs\":[{\"name\":\"_priceFeed\",\"type\":\"address\",\"internalType\":\"contractIVaultPriceFeed\"},{\"name\":\"_tokens\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakingInfo\",\"inputs\":[{\"name\":\"_account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_yieldTrackers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTokenBalances\",\"inputs\":[{\"name\":\"_account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_tokens\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTokenBalancesWithSupplies\",\"inputs\":[{\"name\":\"_account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_tokens\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTokenSupply\",\"inputs\":[{\"name\":\"_token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"_excludedAccounts\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalBalance\",\"inputs\":[{\"name\":\"_token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"},{\"name\":\"_accounts\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTotalStaked\",\"inputs\":[{\"name\":\"_yieldTokens\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getVaultTokenInfo\",\"inputs\":[{\"name\":\"_vault\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_weth\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_usdgAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_tokens\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getVaultTokenInfoV2\",\"inputs\":[{\"name\":\"_vault\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_weth\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_usdgAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_tokens\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getVestingInfo\",\"inputs\":[{\"name\":\"_account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_vesters\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"gov\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"hasMaxGlobalShortSizes\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setConfig\",\"inputs\":[{\"name\":\"_hasMaxGlobalShortSizes\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setGov\",\"inputs\":[{\"name\":\"_gov\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"}]",
}

ReaderV2MetaData contains all meta data concerning the ReaderV2 contract.

Functions

This section is empty.

Types

type ReaderV2

type ReaderV2 struct {
	ReaderV2Caller     // Read-only binding to the contract
	ReaderV2Transactor // Write-only binding to the contract
	ReaderV2Filterer   // Log filterer for contract events
}

ReaderV2 is an auto generated Go binding around an Ethereum contract.

func NewReaderV2

func NewReaderV2(address common.Address, backend bind.ContractBackend) (*ReaderV2, error)

NewReaderV2 creates a new instance of ReaderV2, bound to a specific deployed contract.

type ReaderV2Caller

type ReaderV2Caller struct {
	// contains filtered or unexported fields
}

ReaderV2Caller is an auto generated read-only Go binding around an Ethereum contract.

func NewReaderV2Caller

func NewReaderV2Caller(address common.Address, caller bind.ContractCaller) (*ReaderV2Caller, error)

NewReaderV2Caller creates a new read-only instance of ReaderV2, bound to a specific deployed contract.

func (*ReaderV2Caller) BASISPOINTSDIVISOR

func (_ReaderV2 *ReaderV2Caller) BASISPOINTSDIVISOR(opts *bind.CallOpts) (*big.Int, error)

BASISPOINTSDIVISOR is a free data retrieval call binding the contract method 0x126082cf.

Solidity: function BASIS_POINTS_DIVISOR() view returns(uint256)

func (*ReaderV2Caller) GetAmountOut

func (_ReaderV2 *ReaderV2Caller) GetAmountOut(opts *bind.CallOpts, _vault common.Address, _tokenIn common.Address, _tokenOut common.Address, _amountIn *big.Int) (*big.Int, *big.Int, error)

GetAmountOut is a free data retrieval call binding the contract method 0xd7176ca9.

Solidity: function getAmountOut(address _vault, address _tokenIn, address _tokenOut, uint256 _amountIn) view returns(uint256, uint256)

func (*ReaderV2Caller) GetFeeBasisPoints

func (_ReaderV2 *ReaderV2Caller) GetFeeBasisPoints(opts *bind.CallOpts, _vault common.Address, _tokenIn common.Address, _tokenOut common.Address, _amountIn *big.Int) (*big.Int, *big.Int, *big.Int, error)

GetFeeBasisPoints is a free data retrieval call binding the contract method 0x440f018c.

Solidity: function getFeeBasisPoints(address _vault, address _tokenIn, address _tokenOut, uint256 _amountIn) view returns(uint256, uint256, uint256)

func (*ReaderV2Caller) GetFees

func (_ReaderV2 *ReaderV2Caller) GetFees(opts *bind.CallOpts, _vault common.Address, _tokens []common.Address) ([]*big.Int, error)

GetFees is a free data retrieval call binding the contract method 0x86d4d0f5.

Solidity: function getFees(address _vault, address[] _tokens) view returns(uint256[])

func (*ReaderV2Caller) GetFullVaultTokenInfo

func (_ReaderV2 *ReaderV2Caller) GetFullVaultTokenInfo(opts *bind.CallOpts, _vault common.Address, _weth common.Address, _usdgAmount *big.Int, _tokens []common.Address) ([]*big.Int, error)

GetFullVaultTokenInfo is a free data retrieval call binding the contract method 0x7b906e93.

Solidity: function getFullVaultTokenInfo(address _vault, address _weth, uint256 _usdgAmount, address[] _tokens) view returns(uint256[])

func (*ReaderV2Caller) GetFundingRates

func (_ReaderV2 *ReaderV2Caller) GetFundingRates(opts *bind.CallOpts, _vault common.Address, _weth common.Address, _tokens []common.Address) ([]*big.Int, error)

GetFundingRates is a free data retrieval call binding the contract method 0x95a7535a.

Solidity: function getFundingRates(address _vault, address _weth, address[] _tokens) view returns(uint256[])

func (*ReaderV2Caller) GetMaxAmountIn

func (_ReaderV2 *ReaderV2Caller) GetMaxAmountIn(opts *bind.CallOpts, _vault common.Address, _tokenIn common.Address, _tokenOut common.Address) (*big.Int, error)

GetMaxAmountIn is a free data retrieval call binding the contract method 0xf3535e6c.

Solidity: function getMaxAmountIn(address _vault, address _tokenIn, address _tokenOut) view returns(uint256)

func (*ReaderV2Caller) GetPairInfo

func (_ReaderV2 *ReaderV2Caller) GetPairInfo(opts *bind.CallOpts, _factory common.Address, _tokens []common.Address) ([]*big.Int, error)

GetPairInfo is a free data retrieval call binding the contract method 0xa4543ead.

Solidity: function getPairInfo(address _factory, address[] _tokens) view returns(uint256[])

func (*ReaderV2Caller) GetPositions

func (_ReaderV2 *ReaderV2Caller) GetPositions(opts *bind.CallOpts, _vault common.Address, _account common.Address, _collateralTokens []common.Address, _indexTokens []common.Address, _isLong []bool) ([]*big.Int, error)

GetPositions is a free data retrieval call binding the contract method 0xdc383cab.

Solidity: function getPositions(address _vault, address _account, address[] _collateralTokens, address[] _indexTokens, bool[] _isLong) view returns(uint256[])

func (*ReaderV2Caller) GetPrices

func (_ReaderV2 *ReaderV2Caller) GetPrices(opts *bind.CallOpts, _priceFeed common.Address, _tokens []common.Address) ([]*big.Int, error)

GetPrices is a free data retrieval call binding the contract method 0x3613d527.

Solidity: function getPrices(address _priceFeed, address[] _tokens) view returns(uint256[])

func (*ReaderV2Caller) GetStakingInfo

func (_ReaderV2 *ReaderV2Caller) GetStakingInfo(opts *bind.CallOpts, _account common.Address, _yieldTrackers []common.Address) ([]*big.Int, error)

GetStakingInfo is a free data retrieval call binding the contract method 0x937a0be8.

Solidity: function getStakingInfo(address _account, address[] _yieldTrackers) view returns(uint256[])

func (*ReaderV2Caller) GetTokenBalances

func (_ReaderV2 *ReaderV2Caller) GetTokenBalances(opts *bind.CallOpts, _account common.Address, _tokens []common.Address) ([]*big.Int, error)

GetTokenBalances is a free data retrieval call binding the contract method 0xd802178e.

Solidity: function getTokenBalances(address _account, address[] _tokens) view returns(uint256[])

func (*ReaderV2Caller) GetTokenBalancesWithSupplies

func (_ReaderV2 *ReaderV2Caller) GetTokenBalancesWithSupplies(opts *bind.CallOpts, _account common.Address, _tokens []common.Address) ([]*big.Int, error)

GetTokenBalancesWithSupplies is a free data retrieval call binding the contract method 0x2e3e3342.

Solidity: function getTokenBalancesWithSupplies(address _account, address[] _tokens) view returns(uint256[])

func (*ReaderV2Caller) GetTokenSupply

func (_ReaderV2 *ReaderV2Caller) GetTokenSupply(opts *bind.CallOpts, _token common.Address, _excludedAccounts []common.Address) (*big.Int, error)

GetTokenSupply is a free data retrieval call binding the contract method 0x2ac0184c.

Solidity: function getTokenSupply(address _token, address[] _excludedAccounts) view returns(uint256)

func (*ReaderV2Caller) GetTotalBalance

func (_ReaderV2 *ReaderV2Caller) GetTotalBalance(opts *bind.CallOpts, _token common.Address, _accounts []common.Address) (*big.Int, error)

GetTotalBalance is a free data retrieval call binding the contract method 0xfbdb05ca.

Solidity: function getTotalBalance(address _token, address[] _accounts) view returns(uint256)

func (*ReaderV2Caller) GetTotalStaked

func (_ReaderV2 *ReaderV2Caller) GetTotalStaked(opts *bind.CallOpts, _yieldTokens []common.Address) ([]*big.Int, error)

GetTotalStaked is a free data retrieval call binding the contract method 0x2413c8c1.

Solidity: function getTotalStaked(address[] _yieldTokens) view returns(uint256[])

func (*ReaderV2Caller) GetVaultTokenInfo

func (_ReaderV2 *ReaderV2Caller) GetVaultTokenInfo(opts *bind.CallOpts, _vault common.Address, _weth common.Address, _usdgAmount *big.Int, _tokens []common.Address) ([]*big.Int, error)

GetVaultTokenInfo is a free data retrieval call binding the contract method 0x20542568.

Solidity: function getVaultTokenInfo(address _vault, address _weth, uint256 _usdgAmount, address[] _tokens) view returns(uint256[])

func (*ReaderV2Caller) GetVaultTokenInfoV2

func (_ReaderV2 *ReaderV2Caller) GetVaultTokenInfoV2(opts *bind.CallOpts, _vault common.Address, _weth common.Address, _usdgAmount *big.Int, _tokens []common.Address) ([]*big.Int, error)

GetVaultTokenInfoV2 is a free data retrieval call binding the contract method 0x8e83ca32.

Solidity: function getVaultTokenInfoV2(address _vault, address _weth, uint256 _usdgAmount, address[] _tokens) view returns(uint256[])

func (*ReaderV2Caller) GetVestingInfo

func (_ReaderV2 *ReaderV2Caller) GetVestingInfo(opts *bind.CallOpts, _account common.Address, _vesters []common.Address) ([]*big.Int, error)

GetVestingInfo is a free data retrieval call binding the contract method 0x48211934.

Solidity: function getVestingInfo(address _account, address[] _vesters) view returns(uint256[])

func (*ReaderV2Caller) Gov

func (_ReaderV2 *ReaderV2Caller) Gov(opts *bind.CallOpts) (common.Address, error)

Gov is a free data retrieval call binding the contract method 0x12d43a51.

Solidity: function gov() view returns(address)

func (*ReaderV2Caller) HasMaxGlobalShortSizes

func (_ReaderV2 *ReaderV2Caller) HasMaxGlobalShortSizes(opts *bind.CallOpts) (bool, error)

HasMaxGlobalShortSizes is a free data retrieval call binding the contract method 0xc6f1d676.

Solidity: function hasMaxGlobalShortSizes() view returns(bool)

func (*ReaderV2Caller) POSITIONPROPSLENGTH

func (_ReaderV2 *ReaderV2Caller) POSITIONPROPSLENGTH(opts *bind.CallOpts) (*big.Int, error)

POSITIONPROPSLENGTH is a free data retrieval call binding the contract method 0xad7e5497.

Solidity: function POSITION_PROPS_LENGTH() view returns(uint256)

func (*ReaderV2Caller) PRICEPRECISION

func (_ReaderV2 *ReaderV2Caller) PRICEPRECISION(opts *bind.CallOpts) (*big.Int, error)

PRICEPRECISION is a free data retrieval call binding the contract method 0x95082d25.

Solidity: function PRICE_PRECISION() view returns(uint256)

func (*ReaderV2Caller) USDGDECIMALS

func (_ReaderV2 *ReaderV2Caller) USDGDECIMALS(opts *bind.CallOpts) (*big.Int, error)

USDGDECIMALS is a free data retrieval call binding the contract method 0x870d917c.

Solidity: function USDG_DECIMALS() view returns(uint256)

type ReaderV2CallerRaw

type ReaderV2CallerRaw struct {
	Contract *ReaderV2Caller // Generic read-only contract binding to access the raw methods on
}

ReaderV2CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*ReaderV2CallerRaw) Call

func (_ReaderV2 *ReaderV2CallerRaw) 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 ReaderV2CallerSession

type ReaderV2CallerSession struct {
	Contract *ReaderV2Caller // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts   // Call options to use throughout this session
}

ReaderV2CallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

func (*ReaderV2CallerSession) BASISPOINTSDIVISOR

func (_ReaderV2 *ReaderV2CallerSession) BASISPOINTSDIVISOR() (*big.Int, error)

BASISPOINTSDIVISOR is a free data retrieval call binding the contract method 0x126082cf.

Solidity: function BASIS_POINTS_DIVISOR() view returns(uint256)

func (*ReaderV2CallerSession) GetAmountOut

func (_ReaderV2 *ReaderV2CallerSession) GetAmountOut(_vault common.Address, _tokenIn common.Address, _tokenOut common.Address, _amountIn *big.Int) (*big.Int, *big.Int, error)

GetAmountOut is a free data retrieval call binding the contract method 0xd7176ca9.

Solidity: function getAmountOut(address _vault, address _tokenIn, address _tokenOut, uint256 _amountIn) view returns(uint256, uint256)

func (*ReaderV2CallerSession) GetFeeBasisPoints

func (_ReaderV2 *ReaderV2CallerSession) GetFeeBasisPoints(_vault common.Address, _tokenIn common.Address, _tokenOut common.Address, _amountIn *big.Int) (*big.Int, *big.Int, *big.Int, error)

GetFeeBasisPoints is a free data retrieval call binding the contract method 0x440f018c.

Solidity: function getFeeBasisPoints(address _vault, address _tokenIn, address _tokenOut, uint256 _amountIn) view returns(uint256, uint256, uint256)

func (*ReaderV2CallerSession) GetFees

func (_ReaderV2 *ReaderV2CallerSession) GetFees(_vault common.Address, _tokens []common.Address) ([]*big.Int, error)

GetFees is a free data retrieval call binding the contract method 0x86d4d0f5.

Solidity: function getFees(address _vault, address[] _tokens) view returns(uint256[])

func (*ReaderV2CallerSession) GetFullVaultTokenInfo

func (_ReaderV2 *ReaderV2CallerSession) GetFullVaultTokenInfo(_vault common.Address, _weth common.Address, _usdgAmount *big.Int, _tokens []common.Address) ([]*big.Int, error)

GetFullVaultTokenInfo is a free data retrieval call binding the contract method 0x7b906e93.

Solidity: function getFullVaultTokenInfo(address _vault, address _weth, uint256 _usdgAmount, address[] _tokens) view returns(uint256[])

func (*ReaderV2CallerSession) GetFundingRates

func (_ReaderV2 *ReaderV2CallerSession) GetFundingRates(_vault common.Address, _weth common.Address, _tokens []common.Address) ([]*big.Int, error)

GetFundingRates is a free data retrieval call binding the contract method 0x95a7535a.

Solidity: function getFundingRates(address _vault, address _weth, address[] _tokens) view returns(uint256[])

func (*ReaderV2CallerSession) GetMaxAmountIn

func (_ReaderV2 *ReaderV2CallerSession) GetMaxAmountIn(_vault common.Address, _tokenIn common.Address, _tokenOut common.Address) (*big.Int, error)

GetMaxAmountIn is a free data retrieval call binding the contract method 0xf3535e6c.

Solidity: function getMaxAmountIn(address _vault, address _tokenIn, address _tokenOut) view returns(uint256)

func (*ReaderV2CallerSession) GetPairInfo

func (_ReaderV2 *ReaderV2CallerSession) GetPairInfo(_factory common.Address, _tokens []common.Address) ([]*big.Int, error)

GetPairInfo is a free data retrieval call binding the contract method 0xa4543ead.

Solidity: function getPairInfo(address _factory, address[] _tokens) view returns(uint256[])

func (*ReaderV2CallerSession) GetPositions

func (_ReaderV2 *ReaderV2CallerSession) GetPositions(_vault common.Address, _account common.Address, _collateralTokens []common.Address, _indexTokens []common.Address, _isLong []bool) ([]*big.Int, error)

GetPositions is a free data retrieval call binding the contract method 0xdc383cab.

Solidity: function getPositions(address _vault, address _account, address[] _collateralTokens, address[] _indexTokens, bool[] _isLong) view returns(uint256[])

func (*ReaderV2CallerSession) GetPrices

func (_ReaderV2 *ReaderV2CallerSession) GetPrices(_priceFeed common.Address, _tokens []common.Address) ([]*big.Int, error)

GetPrices is a free data retrieval call binding the contract method 0x3613d527.

Solidity: function getPrices(address _priceFeed, address[] _tokens) view returns(uint256[])

func (*ReaderV2CallerSession) GetStakingInfo

func (_ReaderV2 *ReaderV2CallerSession) GetStakingInfo(_account common.Address, _yieldTrackers []common.Address) ([]*big.Int, error)

GetStakingInfo is a free data retrieval call binding the contract method 0x937a0be8.

Solidity: function getStakingInfo(address _account, address[] _yieldTrackers) view returns(uint256[])

func (*ReaderV2CallerSession) GetTokenBalances

func (_ReaderV2 *ReaderV2CallerSession) GetTokenBalances(_account common.Address, _tokens []common.Address) ([]*big.Int, error)

GetTokenBalances is a free data retrieval call binding the contract method 0xd802178e.

Solidity: function getTokenBalances(address _account, address[] _tokens) view returns(uint256[])

func (*ReaderV2CallerSession) GetTokenBalancesWithSupplies

func (_ReaderV2 *ReaderV2CallerSession) GetTokenBalancesWithSupplies(_account common.Address, _tokens []common.Address) ([]*big.Int, error)

GetTokenBalancesWithSupplies is a free data retrieval call binding the contract method 0x2e3e3342.

Solidity: function getTokenBalancesWithSupplies(address _account, address[] _tokens) view returns(uint256[])

func (*ReaderV2CallerSession) GetTokenSupply

func (_ReaderV2 *ReaderV2CallerSession) GetTokenSupply(_token common.Address, _excludedAccounts []common.Address) (*big.Int, error)

GetTokenSupply is a free data retrieval call binding the contract method 0x2ac0184c.

Solidity: function getTokenSupply(address _token, address[] _excludedAccounts) view returns(uint256)

func (*ReaderV2CallerSession) GetTotalBalance

func (_ReaderV2 *ReaderV2CallerSession) GetTotalBalance(_token common.Address, _accounts []common.Address) (*big.Int, error)

GetTotalBalance is a free data retrieval call binding the contract method 0xfbdb05ca.

Solidity: function getTotalBalance(address _token, address[] _accounts) view returns(uint256)

func (*ReaderV2CallerSession) GetTotalStaked

func (_ReaderV2 *ReaderV2CallerSession) GetTotalStaked(_yieldTokens []common.Address) ([]*big.Int, error)

GetTotalStaked is a free data retrieval call binding the contract method 0x2413c8c1.

Solidity: function getTotalStaked(address[] _yieldTokens) view returns(uint256[])

func (*ReaderV2CallerSession) GetVaultTokenInfo

func (_ReaderV2 *ReaderV2CallerSession) GetVaultTokenInfo(_vault common.Address, _weth common.Address, _usdgAmount *big.Int, _tokens []common.Address) ([]*big.Int, error)

GetVaultTokenInfo is a free data retrieval call binding the contract method 0x20542568.

Solidity: function getVaultTokenInfo(address _vault, address _weth, uint256 _usdgAmount, address[] _tokens) view returns(uint256[])

func (*ReaderV2CallerSession) GetVaultTokenInfoV2

func (_ReaderV2 *ReaderV2CallerSession) GetVaultTokenInfoV2(_vault common.Address, _weth common.Address, _usdgAmount *big.Int, _tokens []common.Address) ([]*big.Int, error)

GetVaultTokenInfoV2 is a free data retrieval call binding the contract method 0x8e83ca32.

Solidity: function getVaultTokenInfoV2(address _vault, address _weth, uint256 _usdgAmount, address[] _tokens) view returns(uint256[])

func (*ReaderV2CallerSession) GetVestingInfo

func (_ReaderV2 *ReaderV2CallerSession) GetVestingInfo(_account common.Address, _vesters []common.Address) ([]*big.Int, error)

GetVestingInfo is a free data retrieval call binding the contract method 0x48211934.

Solidity: function getVestingInfo(address _account, address[] _vesters) view returns(uint256[])

func (*ReaderV2CallerSession) Gov

func (_ReaderV2 *ReaderV2CallerSession) Gov() (common.Address, error)

Gov is a free data retrieval call binding the contract method 0x12d43a51.

Solidity: function gov() view returns(address)

func (*ReaderV2CallerSession) HasMaxGlobalShortSizes

func (_ReaderV2 *ReaderV2CallerSession) HasMaxGlobalShortSizes() (bool, error)

HasMaxGlobalShortSizes is a free data retrieval call binding the contract method 0xc6f1d676.

Solidity: function hasMaxGlobalShortSizes() view returns(bool)

func (*ReaderV2CallerSession) POSITIONPROPSLENGTH

func (_ReaderV2 *ReaderV2CallerSession) POSITIONPROPSLENGTH() (*big.Int, error)

POSITIONPROPSLENGTH is a free data retrieval call binding the contract method 0xad7e5497.

Solidity: function POSITION_PROPS_LENGTH() view returns(uint256)

func (*ReaderV2CallerSession) PRICEPRECISION

func (_ReaderV2 *ReaderV2CallerSession) PRICEPRECISION() (*big.Int, error)

PRICEPRECISION is a free data retrieval call binding the contract method 0x95082d25.

Solidity: function PRICE_PRECISION() view returns(uint256)

func (*ReaderV2CallerSession) USDGDECIMALS

func (_ReaderV2 *ReaderV2CallerSession) USDGDECIMALS() (*big.Int, error)

USDGDECIMALS is a free data retrieval call binding the contract method 0x870d917c.

Solidity: function USDG_DECIMALS() view returns(uint256)

type ReaderV2Filterer

type ReaderV2Filterer struct {
	// contains filtered or unexported fields
}

ReaderV2Filterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewReaderV2Filterer

func NewReaderV2Filterer(address common.Address, filterer bind.ContractFilterer) (*ReaderV2Filterer, error)

NewReaderV2Filterer creates a new log filterer instance of ReaderV2, bound to a specific deployed contract.

type ReaderV2Raw

type ReaderV2Raw struct {
	Contract *ReaderV2 // Generic contract binding to access the raw methods on
}

ReaderV2Raw is an auto generated low-level Go binding around an Ethereum contract.

func (*ReaderV2Raw) Call

func (_ReaderV2 *ReaderV2Raw) 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 (*ReaderV2Raw) Transact

func (_ReaderV2 *ReaderV2Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*ReaderV2Raw) Transfer

func (_ReaderV2 *ReaderV2Raw) 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 ReaderV2Session

type ReaderV2Session struct {
	Contract     *ReaderV2         // 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
}

ReaderV2Session is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*ReaderV2Session) BASISPOINTSDIVISOR

func (_ReaderV2 *ReaderV2Session) BASISPOINTSDIVISOR() (*big.Int, error)

BASISPOINTSDIVISOR is a free data retrieval call binding the contract method 0x126082cf.

Solidity: function BASIS_POINTS_DIVISOR() view returns(uint256)

func (*ReaderV2Session) GetAmountOut

func (_ReaderV2 *ReaderV2Session) GetAmountOut(_vault common.Address, _tokenIn common.Address, _tokenOut common.Address, _amountIn *big.Int) (*big.Int, *big.Int, error)

GetAmountOut is a free data retrieval call binding the contract method 0xd7176ca9.

Solidity: function getAmountOut(address _vault, address _tokenIn, address _tokenOut, uint256 _amountIn) view returns(uint256, uint256)

func (*ReaderV2Session) GetFeeBasisPoints

func (_ReaderV2 *ReaderV2Session) GetFeeBasisPoints(_vault common.Address, _tokenIn common.Address, _tokenOut common.Address, _amountIn *big.Int) (*big.Int, *big.Int, *big.Int, error)

GetFeeBasisPoints is a free data retrieval call binding the contract method 0x440f018c.

Solidity: function getFeeBasisPoints(address _vault, address _tokenIn, address _tokenOut, uint256 _amountIn) view returns(uint256, uint256, uint256)

func (*ReaderV2Session) GetFees

func (_ReaderV2 *ReaderV2Session) GetFees(_vault common.Address, _tokens []common.Address) ([]*big.Int, error)

GetFees is a free data retrieval call binding the contract method 0x86d4d0f5.

Solidity: function getFees(address _vault, address[] _tokens) view returns(uint256[])

func (*ReaderV2Session) GetFullVaultTokenInfo

func (_ReaderV2 *ReaderV2Session) GetFullVaultTokenInfo(_vault common.Address, _weth common.Address, _usdgAmount *big.Int, _tokens []common.Address) ([]*big.Int, error)

GetFullVaultTokenInfo is a free data retrieval call binding the contract method 0x7b906e93.

Solidity: function getFullVaultTokenInfo(address _vault, address _weth, uint256 _usdgAmount, address[] _tokens) view returns(uint256[])

func (*ReaderV2Session) GetFundingRates

func (_ReaderV2 *ReaderV2Session) GetFundingRates(_vault common.Address, _weth common.Address, _tokens []common.Address) ([]*big.Int, error)

GetFundingRates is a free data retrieval call binding the contract method 0x95a7535a.

Solidity: function getFundingRates(address _vault, address _weth, address[] _tokens) view returns(uint256[])

func (*ReaderV2Session) GetMaxAmountIn

func (_ReaderV2 *ReaderV2Session) GetMaxAmountIn(_vault common.Address, _tokenIn common.Address, _tokenOut common.Address) (*big.Int, error)

GetMaxAmountIn is a free data retrieval call binding the contract method 0xf3535e6c.

Solidity: function getMaxAmountIn(address _vault, address _tokenIn, address _tokenOut) view returns(uint256)

func (*ReaderV2Session) GetPairInfo

func (_ReaderV2 *ReaderV2Session) GetPairInfo(_factory common.Address, _tokens []common.Address) ([]*big.Int, error)

GetPairInfo is a free data retrieval call binding the contract method 0xa4543ead.

Solidity: function getPairInfo(address _factory, address[] _tokens) view returns(uint256[])

func (*ReaderV2Session) GetPositions

func (_ReaderV2 *ReaderV2Session) GetPositions(_vault common.Address, _account common.Address, _collateralTokens []common.Address, _indexTokens []common.Address, _isLong []bool) ([]*big.Int, error)

GetPositions is a free data retrieval call binding the contract method 0xdc383cab.

Solidity: function getPositions(address _vault, address _account, address[] _collateralTokens, address[] _indexTokens, bool[] _isLong) view returns(uint256[])

func (*ReaderV2Session) GetPrices

func (_ReaderV2 *ReaderV2Session) GetPrices(_priceFeed common.Address, _tokens []common.Address) ([]*big.Int, error)

GetPrices is a free data retrieval call binding the contract method 0x3613d527.

Solidity: function getPrices(address _priceFeed, address[] _tokens) view returns(uint256[])

func (*ReaderV2Session) GetStakingInfo

func (_ReaderV2 *ReaderV2Session) GetStakingInfo(_account common.Address, _yieldTrackers []common.Address) ([]*big.Int, error)

GetStakingInfo is a free data retrieval call binding the contract method 0x937a0be8.

Solidity: function getStakingInfo(address _account, address[] _yieldTrackers) view returns(uint256[])

func (*ReaderV2Session) GetTokenBalances

func (_ReaderV2 *ReaderV2Session) GetTokenBalances(_account common.Address, _tokens []common.Address) ([]*big.Int, error)

GetTokenBalances is a free data retrieval call binding the contract method 0xd802178e.

Solidity: function getTokenBalances(address _account, address[] _tokens) view returns(uint256[])

func (*ReaderV2Session) GetTokenBalancesWithSupplies

func (_ReaderV2 *ReaderV2Session) GetTokenBalancesWithSupplies(_account common.Address, _tokens []common.Address) ([]*big.Int, error)

GetTokenBalancesWithSupplies is a free data retrieval call binding the contract method 0x2e3e3342.

Solidity: function getTokenBalancesWithSupplies(address _account, address[] _tokens) view returns(uint256[])

func (*ReaderV2Session) GetTokenSupply

func (_ReaderV2 *ReaderV2Session) GetTokenSupply(_token common.Address, _excludedAccounts []common.Address) (*big.Int, error)

GetTokenSupply is a free data retrieval call binding the contract method 0x2ac0184c.

Solidity: function getTokenSupply(address _token, address[] _excludedAccounts) view returns(uint256)

func (*ReaderV2Session) GetTotalBalance

func (_ReaderV2 *ReaderV2Session) GetTotalBalance(_token common.Address, _accounts []common.Address) (*big.Int, error)

GetTotalBalance is a free data retrieval call binding the contract method 0xfbdb05ca.

Solidity: function getTotalBalance(address _token, address[] _accounts) view returns(uint256)

func (*ReaderV2Session) GetTotalStaked

func (_ReaderV2 *ReaderV2Session) GetTotalStaked(_yieldTokens []common.Address) ([]*big.Int, error)

GetTotalStaked is a free data retrieval call binding the contract method 0x2413c8c1.

Solidity: function getTotalStaked(address[] _yieldTokens) view returns(uint256[])

func (*ReaderV2Session) GetVaultTokenInfo

func (_ReaderV2 *ReaderV2Session) GetVaultTokenInfo(_vault common.Address, _weth common.Address, _usdgAmount *big.Int, _tokens []common.Address) ([]*big.Int, error)

GetVaultTokenInfo is a free data retrieval call binding the contract method 0x20542568.

Solidity: function getVaultTokenInfo(address _vault, address _weth, uint256 _usdgAmount, address[] _tokens) view returns(uint256[])

func (*ReaderV2Session) GetVaultTokenInfoV2

func (_ReaderV2 *ReaderV2Session) GetVaultTokenInfoV2(_vault common.Address, _weth common.Address, _usdgAmount *big.Int, _tokens []common.Address) ([]*big.Int, error)

GetVaultTokenInfoV2 is a free data retrieval call binding the contract method 0x8e83ca32.

Solidity: function getVaultTokenInfoV2(address _vault, address _weth, uint256 _usdgAmount, address[] _tokens) view returns(uint256[])

func (*ReaderV2Session) GetVestingInfo

func (_ReaderV2 *ReaderV2Session) GetVestingInfo(_account common.Address, _vesters []common.Address) ([]*big.Int, error)

GetVestingInfo is a free data retrieval call binding the contract method 0x48211934.

Solidity: function getVestingInfo(address _account, address[] _vesters) view returns(uint256[])

func (*ReaderV2Session) Gov

func (_ReaderV2 *ReaderV2Session) Gov() (common.Address, error)

Gov is a free data retrieval call binding the contract method 0x12d43a51.

Solidity: function gov() view returns(address)

func (*ReaderV2Session) HasMaxGlobalShortSizes

func (_ReaderV2 *ReaderV2Session) HasMaxGlobalShortSizes() (bool, error)

HasMaxGlobalShortSizes is a free data retrieval call binding the contract method 0xc6f1d676.

Solidity: function hasMaxGlobalShortSizes() view returns(bool)

func (*ReaderV2Session) POSITIONPROPSLENGTH

func (_ReaderV2 *ReaderV2Session) POSITIONPROPSLENGTH() (*big.Int, error)

POSITIONPROPSLENGTH is a free data retrieval call binding the contract method 0xad7e5497.

Solidity: function POSITION_PROPS_LENGTH() view returns(uint256)

func (*ReaderV2Session) PRICEPRECISION

func (_ReaderV2 *ReaderV2Session) PRICEPRECISION() (*big.Int, error)

PRICEPRECISION is a free data retrieval call binding the contract method 0x95082d25.

Solidity: function PRICE_PRECISION() view returns(uint256)

func (*ReaderV2Session) SetConfig

func (_ReaderV2 *ReaderV2Session) SetConfig(_hasMaxGlobalShortSizes bool) (*types.Transaction, error)

SetConfig is a paid mutator transaction binding the contract method 0x9b0183c3.

Solidity: function setConfig(bool _hasMaxGlobalShortSizes) returns()

func (*ReaderV2Session) SetGov

func (_ReaderV2 *ReaderV2Session) SetGov(_gov common.Address) (*types.Transaction, error)

SetGov is a paid mutator transaction binding the contract method 0xcfad57a2.

Solidity: function setGov(address _gov) returns()

func (*ReaderV2Session) USDGDECIMALS

func (_ReaderV2 *ReaderV2Session) USDGDECIMALS() (*big.Int, error)

USDGDECIMALS is a free data retrieval call binding the contract method 0x870d917c.

Solidity: function USDG_DECIMALS() view returns(uint256)

type ReaderV2Transactor

type ReaderV2Transactor struct {
	// contains filtered or unexported fields
}

ReaderV2Transactor is an auto generated write-only Go binding around an Ethereum contract.

func NewReaderV2Transactor

func NewReaderV2Transactor(address common.Address, transactor bind.ContractTransactor) (*ReaderV2Transactor, error)

NewReaderV2Transactor creates a new write-only instance of ReaderV2, bound to a specific deployed contract.

func (*ReaderV2Transactor) SetConfig

func (_ReaderV2 *ReaderV2Transactor) SetConfig(opts *bind.TransactOpts, _hasMaxGlobalShortSizes bool) (*types.Transaction, error)

SetConfig is a paid mutator transaction binding the contract method 0x9b0183c3.

Solidity: function setConfig(bool _hasMaxGlobalShortSizes) returns()

func (*ReaderV2Transactor) SetGov

func (_ReaderV2 *ReaderV2Transactor) SetGov(opts *bind.TransactOpts, _gov common.Address) (*types.Transaction, error)

SetGov is a paid mutator transaction binding the contract method 0xcfad57a2.

Solidity: function setGov(address _gov) returns()

type ReaderV2TransactorRaw

type ReaderV2TransactorRaw struct {
	Contract *ReaderV2Transactor // Generic write-only contract binding to access the raw methods on
}

ReaderV2TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*ReaderV2TransactorRaw) Transact

func (_ReaderV2 *ReaderV2TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*ReaderV2TransactorRaw) Transfer

func (_ReaderV2 *ReaderV2TransactorRaw) 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 ReaderV2TransactorSession

type ReaderV2TransactorSession struct {
	Contract     *ReaderV2Transactor // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts   // Transaction auth options to use throughout this session
}

ReaderV2TransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

func (*ReaderV2TransactorSession) SetConfig

func (_ReaderV2 *ReaderV2TransactorSession) SetConfig(_hasMaxGlobalShortSizes bool) (*types.Transaction, error)

SetConfig is a paid mutator transaction binding the contract method 0x9b0183c3.

Solidity: function setConfig(bool _hasMaxGlobalShortSizes) returns()

func (*ReaderV2TransactorSession) SetGov

func (_ReaderV2 *ReaderV2TransactorSession) SetGov(_gov common.Address) (*types.Transaction, error)

SetGov is a paid mutator transaction binding the contract method 0xcfad57a2.

Solidity: function setGov(address _gov) returns()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL