totra

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

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"`

	// signature of the called contract function
	MethodID [4]byte `json:"function_signature"`

	// 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) GetPAOI added in v0.12.0

func (ttx *TokenTransaction) GetPAOI() string

GetPAOI returns a string indicating if the tx is a purchase or someone dumped into bids.

func (*TokenTransaction) GetPrice

func (ttx *TokenTransaction) GetPrice() *price.Price

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) IsLoanPayback added in v0.12.0

func (ttx *TokenTransaction) IsLoanPayback() 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"`
}

Jump to

Keyboard shortcuts

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