tx_history

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ContractName = make(map[string]string)
	OpsName      = make(map[string]string)
)
View Source
var (
	ERC20TokenInfo = make(map[common.Address]erc20.ERC20Info)
	UserERC20Txs   = make(map[string]*ERC20TxRecordList)
)

Functions

func TestUserTxs

func TestUserTxs()

Types

type AccountTxResult

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

func GetAccountTxHistory

func GetAccountTxHistory(account string) (*AccountTxResult, error)

type ERC20TxRecord

type ERC20TxRecord struct {
	TxType    string // receive || send
	From      common.Address
	To        common.Address
	TokenAddr common.Address // TODO: Add this
	TokenName string
	Amount    string
}

type ERC20TxRecordList

type ERC20TxRecordList []*ERC20TxRecord

func (ERC20TxRecordList) Len

func (r ERC20TxRecordList) Len() int

func (ERC20TxRecordList) Less

func (r ERC20TxRecordList) Less(i, j int) bool

func (ERC20TxRecordList) Swap

func (r ERC20TxRecordList) Swap(i, j int)

type TxDetail

type TxDetail struct {
	BlockNumber       string `json:"blockNumber"`
	TimeStamp         string `json:"timeStamp"`
	Hash              string `json:"hash"`
	Nonce             string `json:"nonce"`
	BlockHash         string `json:"blockHash"`
	TransactionIndex  string `json:"transactionIndex"`
	From              string `json:"from"`
	To                string `json:"to"`
	Value             string `json:"value"`
	Gas               string `json:"gas"`
	GasPrice          string `json:"gasPrice"`
	IsError           string `json:"isError"`
	Txreceipt_status  string `json:"txreceipt_tatus"`
	Input             string `json:"input"`
	ContractAddress   string `json:"contractAddress"`
	CumulativeGasUsed string `json:"cumulativeGasUsed"`
	GasUsed           string `json:"gasUsed"`
	Confirmations     string `json:"confirmations"`
}

type UserTxOps

type UserTxOps struct {
	Platform      string
	Ops           string
	TxHash        string
	Timestamp     string
	TxWithAddress string // FromAddress && ToAddress
	BlockNumber   string
	BlockHash     string
	ContractAddr  string
	TokenFlows    []*ERC20TxRecord
}

Dada add liquidity ops

func UserTxs

func UserTxs(userAddr common.Address) ([]*UserTxOps, error)

Jump to

Keyboard shortcuts

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