Documentation
¶
Index ¶
- Constants
- Variables
- func GetLastestBlockFromChainUrl(url string) (uint64, error)
- func InitChainClient(chain models.Chain) (*ethclient.Client, error)
- func InitNewRPCClient(url string) (*rpc.Client, error)
- type AddressSet
- type Erc20TransferEvent
- type Erc721TransferEvent
- type Erc1155TransferBatchEvent
- type Erc1155TransferSingleEvent
- type TokenIdContractAddressSet
- type TokenIdSet
Constants ¶
const ( TransferEventSig = "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" TransferSingleSig = "0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62" TransferBatchSig = "0x4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb" )
Variables ¶
var (
ERC20ABI, ERC721ABI, ERC1155ABI abi.ABI
ERC20ABIStr = `` /* 2177-byte string literal not displayed */
ERC721ABIStr = `` /* 3892-byte string literal not displayed */
ERC1155ABIStr = `` /* 3584-byte string literal not displayed */
)
Functions ¶
Types ¶
type AddressSet ¶
type AddressSet struct {
// contains filtered or unexported fields
}
AddressSet holds unique Ethereum addresses using a map
func (*AddressSet) AddAddress ¶
func (a *AddressSet) AddAddress(addr common.Address)
AddAddress adds a new address to the set if it doesn't already exist
func (*AddressSet) GetAddresses ¶
func (a *AddressSet) GetAddresses() []common.Address
GetAddresses returns the list of unique addresses
func (*AddressSet) Reset ¶
func (a *AddressSet) Reset()
Reset clears all addresses in the AddressSet
type Erc20TransferEvent ¶
Erc20TransferEvent represents the structure of the Transfer event in the contract
type Erc721TransferEvent ¶
Erc721TransferEvent represents the structure of the ERC721 Transfer event
type Erc1155TransferBatchEvent ¶
type Erc1155TransferBatchEvent struct {
Operator common.Address
From common.Address
To common.Address
Ids []*big.Int
Values []*big.Int
}
Erc1155TransferBatchEvent represents the structure of the ERC1155 TransferBatch event
type Erc1155TransferSingleEvent ¶
type Erc1155TransferSingleEvent struct {
Operator common.Address
From common.Address
To common.Address
Id *big.Int
Value *big.Int
}
Erc1155TransferSingleEvent represents the structure of the ERC1155 TransferSingle event
type TokenIdContractAddressSet ¶
type TokenIdContractAddressSet struct {
// contains filtered or unexported fields
}
TokenIdContractAddressSet holds unique token ID and contract address pairs using a map of values
func NewTokenIdContractAddressSet ¶
func NewTokenIdContractAddressSet() *TokenIdContractAddressSet
NewTokenIdContractAddressSet initializes a new TokenIdContractAddressSet
func (*TokenIdContractAddressSet) AddTokenIdContractAddress ¶
func (t *TokenIdContractAddressSet) AddTokenIdContractAddress(tokenId *big.Int, contractAddress string)
AddTokenId adds a new token ID and contract address pair to the set if it doesn't already exist
func (*TokenIdContractAddressSet) GetTokenIdContractAddressses ¶
func (t *TokenIdContractAddressSet) GetTokenIdContractAddressses() []struct { TokenId *big.Int ContractAddress string }
GetTokenIds returns the list of unique token ID and contract address pairs
func (*TokenIdContractAddressSet) Reset ¶
func (t *TokenIdContractAddressSet) Reset()
Reset clears all token ID and contract address pairs in the TokenIdContractAddressSet
type TokenIdSet ¶
type TokenIdSet struct {
// contains filtered or unexported fields
}
TokenIdSet holds unique token IDs using a map of values
func (*TokenIdSet) AddTokenId ¶
func (t *TokenIdSet) AddTokenId(tokenId *big.Int)
AddTokenId adds a new token ID to the set if it doesn't already exist
func (*TokenIdSet) GetTokenIds ¶
func (t *TokenIdSet) GetTokenIds() []*big.Int
GetTokenIds returns the list of unique token IDs
func (*TokenIdSet) Reset ¶
func (t *TokenIdSet) Reset()
Reset clears all token IDs in the TokenIdSet