contract

package
v0.0.0-...-9f09256 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TransferBatchEventTopic  = common.HexToHash("0x4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb")
	TransferSingleEventTopic = common.HexToHash("0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62")
	TransferEventTopic       = common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef")

	ErrinvalidTopic   = errors.New("invalid topic")
	ErrNotNftContract = errors.New("non NFT contract")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(client rpcclient.RpcClient) *Client

func (*Client) Erc1155TransferBatch

func (e *Client) Erc1155TransferBatch(contract string, log types.Log) (*eip.Ieip1155TransferBatch, error)

func (*Client) Erc1155TransferSingle

func (e *Client) Erc1155TransferSingle(contract string, log types.Log) (*eip.Ieip1155TransferSingle, error)

func (*Client) Erc20Transfer

func (e *Client) Erc20Transfer(contract string, log types.Log) (*eip.Erc20Transfer, error)

func (*Client) Erc721Transfer

func (e *Client) Erc721Transfer(contract string, log types.Log) (*eip.Ieip721Transfer, error)

func (*Client) GetContractDecimals

func (e *Client) GetContractDecimals(contract string) (*big.Int, error)

func (*Client) GetContractName

func (e *Client) GetContractName(contract string) (string, error)

func (*Client) GetContractSymbol

func (e *Client) GetContractSymbol(contract string) (string, error)

func (*Client) GetContractTotalSupply

func (e *Client) GetContractTotalSupply(contract string) (*big.Int, error)

func (*Client) GetEIP1155Meta

func (e *Client) GetEIP1155Meta(contract string, tokenID string) (string, error)

func (*Client) GetEIP721Meta

func (e *Client) GetEIP721Meta(contract string, tokenID string) (string, error)

func (*Client) GetNumWith1155ByContactOwnerTokenID

func (e *Client) GetNumWith1155ByContactOwnerTokenID(owner, contract common.Address, tokenID *big.Int, block *big.Int) (*big.Int, error)

func (*Client) GetNumWith721ByContactOwnerTokenID

func (e *Client) GetNumWith721ByContactOwnerTokenID(owner, contract common.Address, tokenID *big.Int, block *big.Int) (*big.Int, error)

func (*Client) IsEIP1155

func (e *Client) IsEIP1155(contract string) bool

func (*Client) IsEIP721

func (e *Client) IsEIP721(contract string) bool

type Contractor

type Contractor interface {
	GetEIP721Meta(contract string, tokenID string) (uri string, err error)
	GetEIP1155Meta(contract string, tokenID string) (uri string, err error)
	IsEIP721(contract string) bool
	IsEIP1155(contract string) bool
	Erc20Transfer(contract string, log types.Log) (*eip.Erc20Transfer, error)
	Erc721Transfer(contract string, log types.Log) (*eip.Ieip721Transfer, error)
	Erc1155TransferSingle(contract string, log types.Log) (*eip.Ieip1155TransferSingle, error)
	Erc1155TransferBatch(contract string, log types.Log) (*eip.Ieip1155TransferBatch, error)
	GetContractName(contract string) (string, error)
	GetContractSymbol(contract string) (string, error)
	GetContractDecimals(contract string) (*big.Int, error)
	GetContractTotalSupply(contract string) (*big.Int, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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