Documentation ¶
Index ¶
- type HistoryTokenTransaction
- type TokenTransaction
- func (ttx *TokenTransaction) AsHistoryTokenTransaction(collection *collections.Collection, fmtTokensTransferred []string) *HistoryTokenTransaction
- func (ttx *TokenTransaction) GetNFTReceiverAddresses() []common.Address
- func (ttx *TokenTransaction) GetNFTReceivers() map[common.Address][]*TokenTransfer
- func (ttx *TokenTransaction) GetNFTSenderAddresses() []common.Address
- func (ttx *TokenTransaction) GetNFTSenderAndReceiverAddresses() []common.Address
- func (ttx *TokenTransaction) GetNFTSenders() map[common.Address][]*TokenTransfer
- func (ttx *TokenTransaction) GetNonZeroNFTSenders() map[common.Address][]*TokenTransfer
- func (ttx *TokenTransaction) GetPrice() *price.Price
- func (ttx *TokenTransaction) GetTransfersByContract() map[common.Address][]*TokenTransfer
- func (ttx *TokenTransaction) IsAirdrop() bool
- func (ttx *TokenTransaction) IsBurn() bool
- func (ttx *TokenTransaction) IsListing() bool
- func (ttx *TokenTransaction) IsLoan() bool
- func (ttx *TokenTransaction) IsMint() bool
- func (ttx *TokenTransaction) IsMovingNFTs() bool
- func (ttx *TokenTransaction) IsReBurn() bool
- func (ttx *TokenTransaction) IsTransfer() bool
- type TokenTransfer
- type TxType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HistoryTokenTransaction ¶
type HistoryTokenTransaction struct { ReceivedAt time.Time `json:"time"` AmountPaid *big.Int `json:"amount_paid"` FmtTokensTransferred []string `json:"fmt_tokens_transferred"` Collection *collections.Collection `json:"collection"` TokenTransaction *TokenTransaction `json:"-"` }
HistoryTokenTransaction is the representation of a token transaction in the history.
type TokenTransaction ¶
type TokenTransaction struct { // the original tx Tx *types.Transaction `json:"tx"` // the receipt containing the logs TxReceipt *types.Receipt `json:"tx_receipt"` // action performed by the tx Action TxType `json:"action"` // the sender of the tx From common.Address `json:"from"` // the amount of eth/weth transferred in the tx AmountPaid *big.Int `json:"amount_paid"` Marketplace *marketplace.MarketPlace `json:"marketplace"` // token transfers parsed from the tx logs Transfers []*TokenTransfer `json:"transfers"` TotalTokens int64 `json:"total_tokens"` ReceivedAt time.Time `json:"received_at"` DoNotPrint bool `json:"do_not_print"` // contains filtered or unexported fields }
func NewTokenTransaction ¶
func NewTokenTransaction(tx *types.Transaction, receipt *types.Receipt, providerPool *provider.Pool) *TokenTransaction
func (*TokenTransaction) AsHistoryTokenTransaction ¶
func (ttx *TokenTransaction) AsHistoryTokenTransaction(collection *collections.Collection, fmtTokensTransferred []string) *HistoryTokenTransaction
func (*TokenTransaction) GetNFTReceiverAddresses ¶
func (ttx *TokenTransaction) GetNFTReceiverAddresses() []common.Address
func (*TokenTransaction) GetNFTReceivers ¶
func (ttx *TokenTransaction) GetNFTReceivers() map[common.Address][]*TokenTransfer
func (*TokenTransaction) GetNFTSenderAddresses ¶
func (ttx *TokenTransaction) GetNFTSenderAddresses() []common.Address
func (*TokenTransaction) GetNFTSenderAndReceiverAddresses ¶
func (ttx *TokenTransaction) GetNFTSenderAndReceiverAddresses() []common.Address
func (*TokenTransaction) GetNFTSenders ¶
func (ttx *TokenTransaction) GetNFTSenders() map[common.Address][]*TokenTransfer
func (*TokenTransaction) GetNonZeroNFTSenders ¶ added in v0.5.1
func (ttx *TokenTransaction) GetNonZeroNFTSenders() map[common.Address][]*TokenTransfer
func (*TokenTransaction) GetPrice ¶
func (ttx *TokenTransaction) GetPrice() *price.Price
func (*TokenTransaction) GetTransfersByContract ¶
func (ttx *TokenTransaction) GetTransfersByContract() map[common.Address][]*TokenTransfer
func (*TokenTransaction) IsAirdrop ¶
func (ttx *TokenTransaction) IsAirdrop() bool
func (*TokenTransaction) IsBurn ¶
func (ttx *TokenTransaction) IsBurn() bool
func (*TokenTransaction) IsListing ¶
func (ttx *TokenTransaction) IsListing() bool
func (*TokenTransaction) IsLoan ¶
func (ttx *TokenTransaction) IsLoan() bool
func (*TokenTransaction) IsMint ¶
func (ttx *TokenTransaction) IsMint() bool
func (*TokenTransaction) IsMovingNFTs ¶
func (ttx *TokenTransaction) IsMovingNFTs() bool
func (*TokenTransaction) IsReBurn ¶
func (ttx *TokenTransaction) IsReBurn() bool
func (*TokenTransaction) IsTransfer ¶
func (ttx *TokenTransaction) IsTransfer() bool
type TokenTransfer ¶
type TokenTransfer struct { // sender of a token || erc721: topic[1] | erc1155: topic[2] From common.Address `json:"from"` // recipient of a token || erc721: topic[2] | erc1155: topic[3] To common.Address `json:"to"` // type of the token || erc721: topic[0] == Transfer | erc1155: topic[0] == TransferSingle Standard standard.Standard `json:"type"` // number of tokens transferred || erc721: 1 | erc1155: data[value] AmountTokens *big.Int `json:"amount"` // the amount of eth/weth transferred in the same tx to the sender of the nft AmountEtherReturned *big.Int `json:"amount_ether_returned"` Token *token.Token `json:"token"` }
Click to show internal directories.
Click to hide internal directories.