types

package
v0.0.0-...-8b20efb Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ATransResult

type ATransResult struct {
	BlockNumber       string `json:"blockNumber"`
	TimeStamp         string `json:"timeStamp"`
	Hash              string `json:"hash"`
	Nonce             string `json:"nonce"`
	BlockHash         string `json:"blockHash"`
	From              string `json:"from"`
	ContractAddress   string `json:"contractAddress"`
	To                string `json:"to"`
	Value             string `json:"value"`
	TokenName         string `json:"tokenName"`
	TokenSymbol       string `json:"tokenSymbol"`
	TokenDecimal      string `json:"tokenDecimal"`
	TransactionIndex  string `json:"transactionIndex"`
	Gas               string `json:"gas"`
	GasPrice          string `json:"gasPrice"`
	GasUsed           string `json:"gasUsed"`
	CumulativeGasUsed string `json:"cumulativeGasUsed"`
	Input             string `json:"input"`
	Confirmations     string `json:"confirmations"`
}

type EchoContext

type EchoContext struct {
	echo.Context
}

type EtherScan

type EtherScan struct {
	Status  string         `json:"status"`
	Message string         `json:"message"`
	Result  []ATransResult `json:"result"`
}

type Exchange

type Exchange struct {
	Name       string `json:"name"`
	APIAddress string `json:"api_address"`
	Decimals   int    `json:"decimals"`
}

type ExchangePair

type ExchangePair struct {
	ContractName  string   `json:"contract_name"`
	AmountIn      *big.Int `json:"amount_in"`
	AmountOut     *big.Int `json:"amount_out"`
	ExchangeRatio *big.Int `json:"exchange_ratio"`
	TxFee         *big.Int `json:"tx_fee"`
	SupportSwap   bool     `json:"support_swap"`
}

func (*ExchangePair) MarshalJSON

func (e *ExchangePair) MarshalJSON() ([]byte, error)

type ExchangePairList

type ExchangePairList []ExchangePair

func (ExchangePairList) Len

func (p ExchangePairList) Len() int

func (ExchangePairList) Less

func (p ExchangePairList) Less(i, j int) bool

func (ExchangePairList) Swap

func (p ExchangePairList) Swap(i, j int)

type ExchangeResult

type ExchangeResult struct {
	FromName      string           `json:"from_name"`
	ToName        string           `json:"to_name"`
	FromAddr      string           `json:"from_addr"`
	ToAddr        string           `json:"to_addr"`
	ExchangePairs ExchangePairList `json:"exchange_pairs"`
}

type OneInchExchanges

type OneInchExchanges struct {
	Name string `json:"name"`
	Part int    `json:"part"`
}

type OneInchToken

type OneInchToken struct {
	Symbol   string `json:"symbol"`
	Name     string `json:"name"`
	Decimals int    `json:"decimals"`
	Address  string `json:"address"`
}

type OneinchResult

type OneinchResult struct {
	FromToken       OneInchToken       `json:"fromToken"`
	ToToken         OneInchToken       `json:"toToken"`
	ToTokenAmount   string             `json:"toTokenAmount"`
	FromTokenAmount string             `json:"fromTokenAmount"`
	Exchanges       []OneInchExchanges `json:"exchanges"`
}

1inch

type PoolInfo

type PoolInfo struct {
	Address     string      `json:"address,omitempty"`
	Platform    string      `json:"platform,omitempty"`
	Liquidity   string      `json:"liquidity,omitempty"`
	Reserves    []string    `json:"reserves,omitempty"`
	TokenPrices []string    `json:"tokenprices,omitempty"`
	Volumes     []string    `json:"volumes,omitempty"`
	ReserveUSD  string      `json:"reserveUSD,omitempty"`
	ReserveETH  string      `json:"reserveETH,omitempty"`
	TotalSupply string      `json:"totalSupply,omitempty"`
	VolumeUSD   string      `json:"volumeUSD,omitempty"`
	Tokens      []PoolToken `json:"tokens,omitempty"`
	SwapFee     string      `json:"swapFee,omitempty"`
	TotalWeight string      `json:"totalWeight,omitempty"`
}

type PoolToken

type PoolToken struct {
	Address      string `json:"address"`
	Name         string `json:"name"`
	Symbol       string `json:"symbol"`
	Decimals     int    `json:"decimals,omitempty"`
	DenormWeight string `json:"denormWeight,omitempty"`
	Balance      string `json:"balance,omitempty"`
}

type SwapTx

type SwapTx struct {
	Data               string `json:"data"`
	TxFee              string `json:"tx_fee"`
	ContractAddr       string `json:"contract_addr"`
	FromTokenAmount    string `json:"from_token_amount"`
	ToTokenAmount      string `json:"to_token_amount"`
	ExchangeRatio      string `json:"exchange_ratio"`
	FromTokenAddr      string `json:"from_token_addr"`
	Allowance          string `json:"allowance"`
	AllowanceSatisfied bool   `json:"allowance_satisfied"`
	AllowanceData      string `json:"allowance_data"`
}

type Token

type Token struct {
	Name     string `json:"name"`
	Address  string `json:"address"`
	Symbol   string `json:"symbol"`
	Decimals int    `json:"decimals"`
	LogoURI  string `json:"logoURI"`
}

type Tokens

type Tokens []Token

func (Tokens) Len

func (t Tokens) Len() int

func (Tokens) Less

func (t Tokens) Less(i, j int) bool

func (Tokens) Swap

func (t Tokens) Swap(i, j int)

Jump to

Keyboard shortcuts

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