presets

package
v0.0.0-...-9345ff8 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallOption

type CallOption func(*CallOptions)

CallOption -

func WithBlockID

func WithBlockID(block data.BlockID) CallOption

WithBlockID -

type CallOptions

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

CallOptions -

func NewCallOptions

func NewCallOptions(opts ...CallOption) CallOptions

NewCallOptions -

type ERC1155

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

ERC1155 -

func NewERC1155

func NewERC1155(api sequencer.API, contract data.Felt) ERC1155

NewERC1155 -

func (ERC1155) BalanceOf

func (erc1155 ERC1155) BalanceOf(ctx context.Context, account data.Felt, tokenId data.Uint256, opts ...CallOption) (decimal.Decimal, error)

BalanceOf - Returns the number of tokens in owner's account.

func (ERC1155) BalanceOfBatch

func (erc1155 ERC1155) BalanceOfBatch(ctx context.Context, accounts []data.Felt, tokenIds []data.Uint256, opts ...CallOption) ([]decimal.Decimal, error)

BalanceOfBatch - Get the balance of multiple account/token pairs.

func (ERC1155) IsApprovedForAll

func (erc1155 ERC1155) IsApprovedForAll(ctx context.Context, account, operator data.Felt, opts ...CallOption) (data.Felt, error)

IsApprovedForAll - Get whether operator is approved by account for all tokens.

func (ERC1155) Uri

func (erc1155 ERC1155) Uri(ctx context.Context, tokenId data.Uint256, opts ...CallOption) (string, error)

Uri - Returns the Uniform Resource Identifier (URI) for a token id

type ERC20

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

ERC20 -

func NewERC20

func NewERC20(api sequencer.API, contract data.Felt) ERC20

NewERC20 -

func (ERC20) BalanceOf

func (erc20 ERC20) BalanceOf(ctx context.Context, account data.Felt, opts ...CallOption) (decimal.Decimal, error)

BalanceOf - Returns the number of tokens in owner's account.

func (ERC20) Decimals

func (erc20 ERC20) Decimals(ctx context.Context, opts ...CallOption) (uint64, error)

Decimals - Returns the number of decimals the token uses - e.g. 8 means to divide the token amount by 100000000 to get its user representation.

func (ERC20) Name

func (erc20 ERC20) Name(ctx context.Context, opts ...CallOption) (string, error)

Name - Returns the name of the token.

func (ERC20) Symbol

func (erc20 ERC20) Symbol(ctx context.Context, opts ...CallOption) (string, error)

Symbol - Returns the ticker symbol of the token.

func (ERC20) TotalSupply

func (erc20 ERC20) TotalSupply(ctx context.Context, opts ...CallOption) (decimal.Decimal, error)

TotalSupply - Returns the amount of tokens in existence.

type ERC721

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

ERC721 -

func NewERC721

func NewERC721(api sequencer.API, contract data.Felt) ERC721

NewERC721 -

func (ERC721) BalanceOf

func (erc721 ERC721) BalanceOf(ctx context.Context, account data.Felt, opts ...CallOption) (decimal.Decimal, error)

BalanceOf - Returns the number of tokens in owner's account.

func (ERC721) GetApproved

func (erc721 ERC721) GetApproved(ctx context.Context, tokenId data.Uint256, opts ...CallOption) (data.Felt, error)

GetApproved - Returns the account approved for tokenId token.

func (ERC721) IsApprovedForAll

func (erc721 ERC721) IsApprovedForAll(ctx context.Context, owner, operator data.Felt, opts ...CallOption) (data.Felt, error)

IsApprovedForAll - Returns if the operator is allowed to manage all of the assets of owner.

func (ERC721) OwnerOf

func (erc721 ERC721) OwnerOf(ctx context.Context, tokenId data.Uint256, opts ...CallOption) (data.Felt, error)

OwnerOf - Returns the owner of the tokenId token.

Jump to

Keyboard shortcuts

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