Documentation ¶
Index ¶
- type TokenTransaction
- func (ttx *TokenTransaction) FormattedIs() []string
- func (ttx *TokenTransaction) GetEtherscanTxURL() string
- func (ttx *TokenTransaction) GetNFTReceiverAddresses() mapset.Set[common.Address]
- func (ttx *TokenTransaction) GetNFTReceivers() map[common.Address][]*TokenTransfer
- func (ttx *TokenTransaction) GetNFTSenderAddresses() mapset.Set[common.Address]
- func (ttx *TokenTransaction) GetNFTSenderAndReceiverAddresses() mapset.Set[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) GetPurchaseOrBidIndicator() string
- func (ttx *TokenTransaction) GetTransfersByContract() map[common.Address][]*TokenTransfer
- func (ttx *TokenTransaction) Is() map[string]bool
- func (ttx *TokenTransaction) IsAcceptedOffer() bool
- func (ttx *TokenTransaction) IsAirdrop() bool
- func (ttx *TokenTransaction) IsBurn() bool
- func (ttx *TokenTransaction) IsCollectionOffer() bool
- func (ttx *TokenTransaction) IsItemBid() 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenTransaction ¶
type TokenTransaction struct { // the original tx Tx *types.Transaction `json:"tx"` // the tx Hash TxHash common.Hash `json:"hash"` // the receipt containing the logs TxReceipt *types.Receipt `json:"tx_receipt"` // action performed by the tx Action degendb.EventType `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"` Highlight bool `json:"highlight"` // contains filtered or unexported fields }
func NewTokenTransaction ¶
func NewTokenTransaction(tx *types.Transaction, receipt *types.Receipt, providerPool *provider.Pool) *TokenTransaction
func (*TokenTransaction) FormattedIs ¶ added in v0.11.2
func (ttx *TokenTransaction) FormattedIs() []string
func (*TokenTransaction) GetEtherscanTxURL ¶ added in v0.10.0
func (ttx *TokenTransaction) GetEtherscanTxURL() string
func (*TokenTransaction) GetNFTReceiverAddresses ¶
func (ttx *TokenTransaction) GetNFTReceiverAddresses() mapset.Set[common.Address]
func (*TokenTransaction) GetNFTReceivers ¶
func (ttx *TokenTransaction) GetNFTReceivers() map[common.Address][]*TokenTransfer
func (*TokenTransaction) GetNFTSenderAddresses ¶
func (ttx *TokenTransaction) GetNFTSenderAddresses() mapset.Set[common.Address]
func (*TokenTransaction) GetNFTSenderAndReceiverAddresses ¶
func (ttx *TokenTransaction) GetNFTSenderAndReceiverAddresses() mapset.Set[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) GetPurchaseOrBidIndicator ¶ added in v0.11.2
func (ttx *TokenTransaction) GetPurchaseOrBidIndicator() string
GetPurchaseOrBidIndicator returns a string indicating if the tx is a purchase or if someone dumped into bids.
func (*TokenTransaction) GetTransfersByContract ¶
func (ttx *TokenTransaction) GetTransfersByContract() map[common.Address][]*TokenTransfer
func (*TokenTransaction) Is ¶ added in v0.11.2
func (ttx *TokenTransaction) Is() map[string]bool
func (*TokenTransaction) IsAcceptedOffer ¶ added in v0.11.4
func (ttx *TokenTransaction) IsAcceptedOffer() bool
func (*TokenTransaction) IsAirdrop ¶
func (ttx *TokenTransaction) IsAirdrop() bool
func (*TokenTransaction) IsBurn ¶
func (ttx *TokenTransaction) IsBurn() bool
func (*TokenTransaction) IsCollectionOffer ¶ added in v0.7.5
func (ttx *TokenTransaction) IsCollectionOffer() bool
func (*TokenTransaction) IsItemBid ¶ added in v0.7.5
func (ttx *TokenTransaction) IsItemBid() 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 { // the transferred token Token *token.Token `json:"token"` // 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"` }
Click to show internal directories.
Click to hide internal directories.