Documentation ¶
Index ¶
- Variables
- type AaveV2RPC
- type AaveV3RPC
- type AuraRPC
- type AuraTokenRPC
- type BancorRPC
- type CallParam
- type GMXRPC
- type NetworkSupport
- type NodeClient
- func (n *NodeClient) AaveV2AbptStakedReward(ctx context.Context, network constant.Network, account common.Address, ...) (*decimal.Decimal, error)
- func (n *NodeClient) AaveV2AbptStakedTokenBalance(ctx context.Context, network constant.Network, account common.Address, ...) (*decimal.Decimal, error)
- func (n *NodeClient) AaveV2AccountATokenBalance(ctx context.Context, network constant.Network, account common.Address, ...) (*decimal.Decimal, error)
- func (n *NodeClient) AaveV2AccountActiveAssets(ctx context.Context, network constant.Network, account common.Address, ...) (deposits, borrows []common.Address, err error)
- func (n *NodeClient) AaveV2AccountData(ctx context.Context, network constant.Network, account common.Address, ...) (*model.AaveV2AccountData, error)
- func (n *NodeClient) AaveV2AccountDebt(ctx context.Context, network constant.Network, account common.Address, ...) (*decimal.Decimal, error)
- func (n *NodeClient) AaveV2AccountHealthRate(ctx context.Context, network constant.Network, account common.Address, ...) (*decimal.Decimal, error)
- func (n *NodeClient) AaveV2RewardToken(ctx context.Context, network constant.Network, blockNumber *big.Int) (*common.Address, error)
- func (n *NodeClient) AaveV2StakedReward(ctx context.Context, network constant.Network, account common.Address, ...) (*decimal.Decimal, error)
- func (n *NodeClient) AaveV2StakedTokenBalance(ctx context.Context, network constant.Network, account common.Address, ...) (*decimal.Decimal, error)
- func (n *NodeClient) AaveV2UnClaimedRewards(ctx context.Context, network constant.Network, account common.Address, ...) (*decimal.Decimal, error)
- func (n *NodeClient) AggregatedCalls(ctx context.Context, calls []multicall.Multicall3Call3, blockNumber *big.Int) ([]multicall.Multicall3Result, error)
- func (n *NodeClient) AggregatedERC20Token(ctx context.Context, address common.Address, blockNumber *big.Int) (*model.ERC20Token, error)
- func (n *NodeClient) Call(ctx context.Context, callParam CallParam) ([]byte, error)
- func (n *NodeClient) ERC20Balance(ctx context.Context, tokenAddress, accountAddress common.Address) (*big.Int, error)
- func (n *NodeClient) ERC20Decimals(ctx context.Context, address common.Address) (uint8, error)
- func (n *NodeClient) ERC20Meta(ctx context.Context, address common.Address) (*model.ERC20Token, error)
- func (n *NodeClient) ERC20Symbol(ctx context.Context, address common.Address) (string, error)
- func (n *NodeClient) ERC20TotalSupply(ctx context.Context, address common.Address) (*big.Int, error)
- func (n *NodeClient) ETHClient() *ethclient.Client
- func (n *NodeClient) GlpVesterYield(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, *decimal.Decimal, error)
- func (n *NodeClient) GmxVesterYield(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, *decimal.Decimal, error)
- func (n *NodeClient) IsContract(ctx context.Context, address common.Address) (bool, error)
- func (n *NodeClient) IsERC1155(ctx context.Context, address common.Address) (bool, error)
- func (n *NodeClient) IsERC20(ctx context.Context, address common.Address) (bool, error)
- func (n *NodeClient) IsERC721(ctx context.Context, address common.Address) (bool, error)
- func (n *NodeClient) LatestClient() *ethclient.Client
- func (n *NodeClient) StakeEsGmx(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error)
- func (n *NodeClient) StakeEsGmxReward(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error)
- func (n *NodeClient) StakeEthReward(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error)
- func (n *NodeClient) StakeGlp(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error)
- func (n *NodeClient) StakeGlpRewardEth(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error)
- func (n *NodeClient) StakeGmx(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error)
- func (n *NodeClient) SynthetixGetCollateral(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error)
- func (n *NodeClient) SynthetixGetSethDebtBalance(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error)
- func (n *NodeClient) SynthetixGetSusdDebtBalance(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error)
- func (n *NodeClient) SynthetixGetVestingDetails(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, uint64, *decimal.Decimal, error)
- func (n *NodeClient) SynthetixLiquidatorRewards(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error)
- func (n *NodeClient) SynthetixRewards(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, *decimal.Decimal, error)
- func (n *NodeClient) TokenPrice(ctx context.Context, network constant.Network, tokenAddress common.Address, ...) (*decimal.Decimal, error)
- type OneInchRPC
- type SynthetixRPC
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNetworkNotSupport error = errors.New("network not supported")
Functions ¶
This section is empty.
Types ¶
type AaveV2RPC ¶
type AaveV2RPC interface { AaveV2UnClaimedRewards(ctx context.Context, network constant.Network, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error) AaveV2StakedReward(ctx context.Context, network constant.Network, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error) AaveV2StakedTokenBalance(ctx context.Context, network constant.Network, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error) AaveV2AbptStakedReward(ctx context.Context, network constant.Network, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error) AaveV2AbptStakedTokenBalance(ctx context.Context, network constant.Network, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error) AaveV2AccountData(ctx context.Context, network constant.Network, account common.Address, blockNumber *big.Int) (*model.AaveV2AccountData, error) AaveV2AccountHealthRate(ctx context.Context, network constant.Network, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error) AaveV2AccountActiveAssets(ctx context.Context, network constant.Network, account common.Address, blockNumber *big.Int) (deposits, borrows []common.Address, err error) AaveV2AccountATokenBalance(ctx context.Context, network constant.Network, account, assetAddress common.Address, blockNumber *big.Int) (*decimal.Decimal, error) AaveV2AccountDebt(ctx context.Context, network constant.Network, account common.Address, asset common.Address, blockNumber *big.Int) (*decimal.Decimal, error) AaveV2RewardToken(ctx context.Context, network constant.Network, blockNumber *big.Int) (*common.Address, error) }
type AaveV3RPC ¶
type AaveV3RPC interface { AaveV3AllReservesTokens(ctx context.Context, blockNumber *big.Int) ([]model.ERC20Token, error) AaveV3AssetBalance(ctx context.Context, account common.Address, asset common.Address, blockNumber *big.Int) (*decimal.Decimal, error) AaveV3LiquidationThreshold(ctx context.Context, asset common.Address, blockNumber *big.Int) (*decimal.Decimal, error) AaveV3UserRewards(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error) }
type AuraRPC ¶
type AuraRPC interface { AaveV3AuraLockedPosition(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error) AaveV3AuraLockedReward(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error) AaveV3AuraFarmingPool(ctx context.Context, contractAddress common.Address, blockNumber *big.Int) (common.Address, error) AaveV3AuraFarmingPoolID(ctx context.Context, contractAddress common.Address, blockNumber *big.Int) (*big.Int, error) AaveV3AuraFarmingBalanceEarned(ctx context.Context, account common.Address, contractAddress common.Address, blockNumber *big.Int) (farm, earned *decimal.Decimal, err error) }
type AuraTokenRPC ¶
type AuraTokenRPC interface { ReductionPerCliff(ctx context.Context, blockNumber *big.Int) (*big.Int, error) TotalSupply(ctx context.Context, blockNumber *big.Int) (*big.Int, error) EmissionsMaxSupply(ctx context.Context, blockNumber *big.Int) (*big.Int, error) TotalCliffs(ctx context.Context, blockNumber *big.Int) (*big.Int, error) }
type GMXRPC ¶
type GMXRPC interface { StakeEthReward(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error) StakeEsGmxReward(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error) StakeGlp(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error) StakeGlpRewardEth(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error) StakeGmx(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error) StakeEsGmx(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error) GmxVesterYield(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, *decimal.Decimal, error) GlpVesterYield(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, *decimal.Decimal, error) }
type NetworkSupport ¶
type NodeClient ¶
type NodeClient struct {
// contains filtered or unexported fields
}
func NewNodeClientsWithEndpoints ¶
func NewNodeClientsWithEndpoints(endpoints []string) (*NodeClient, error)
func (*NodeClient) AaveV2AbptStakedReward ¶
func (*NodeClient) AaveV2AbptStakedTokenBalance ¶
func (*NodeClient) AaveV2AccountATokenBalance ¶
func (*NodeClient) AaveV2AccountActiveAssets ¶
func (*NodeClient) AaveV2AccountData ¶
func (*NodeClient) AaveV2AccountDebt ¶
func (*NodeClient) AaveV2AccountHealthRate ¶
func (*NodeClient) AaveV2RewardToken ¶
func (*NodeClient) AaveV2StakedReward ¶
func (*NodeClient) AaveV2StakedTokenBalance ¶
func (*NodeClient) AaveV2UnClaimedRewards ¶
func (*NodeClient) AggregatedCalls ¶
func (n *NodeClient) AggregatedCalls(ctx context.Context, calls []multicall.Multicall3Call3, blockNumber *big.Int) ([]multicall.Multicall3Result, error)
func (*NodeClient) AggregatedERC20Token ¶
func (n *NodeClient) AggregatedERC20Token(ctx context.Context, address common.Address, blockNumber *big.Int) (*model.ERC20Token, error)
func (*NodeClient) ERC20Balance ¶
func (*NodeClient) ERC20Decimals ¶
func (*NodeClient) ERC20Meta ¶
func (n *NodeClient) ERC20Meta(ctx context.Context, address common.Address) (*model.ERC20Token, error)
func (*NodeClient) ERC20Symbol ¶
func (*NodeClient) ERC20TotalSupply ¶
func (*NodeClient) ETHClient ¶
func (n *NodeClient) ETHClient() *ethclient.Client
func (*NodeClient) GlpVesterYield ¶
func (*NodeClient) GmxVesterYield ¶
func (*NodeClient) IsContract ¶
func (*NodeClient) LatestClient ¶
func (n *NodeClient) LatestClient() *ethclient.Client
Latest Client returns the client with the latest block number. It only works on specific node, like 'http://192.xxx.xxx.xx:8045'. It will NOT work when connected to a gateway like 'https://ankr.com/eth', because the request itself will be sent to one of the nodes randomly.
func (*NodeClient) StakeEsGmx ¶
func (*NodeClient) StakeEsGmxReward ¶
func (*NodeClient) StakeEthReward ¶
func (*NodeClient) StakeGlpRewardEth ¶
func (*NodeClient) SynthetixGetCollateral ¶
func (*NodeClient) SynthetixGetSethDebtBalance ¶
func (*NodeClient) SynthetixGetSusdDebtBalance ¶
func (*NodeClient) SynthetixGetVestingDetails ¶
func (*NodeClient) SynthetixLiquidatorRewards ¶
func (*NodeClient) SynthetixRewards ¶
type OneInchRPC ¶
type SynthetixRPC ¶
type SynthetixRPC interface { SynthetixGetSusdDebtBalance(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error) SynthetixGetSethDebtBalance(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error) SynthetixGetCollateral(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error) SynthetixRewards(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, *decimal.Decimal, error) SynthetixGetVestingDetails(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, uint64, *decimal.Decimal, error) SynthetixLiquidatorRewards(ctx context.Context, account common.Address, blockNumber *big.Int) (*decimal.Decimal, error) }
Click to show internal directories.
Click to hide internal directories.