collectibles

package
v0.151.6 Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	RPCClient *rpc.Client
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI(rpcClient *rpc.Client, accountsManager *account.GethManager, config *params.NodeConfig, appDb *sql.DB) *API

func (*API) AddTokenOwners added in v0.145.2

func (api *API) AddTokenOwners(ctx context.Context, chainID uint64, contractAddress string, walletAddresses []string, amount int) error

func (*API) ContractOwner added in v0.141.1

func (api *API) ContractOwner(ctx context.Context, chainID uint64, contractAddress string) (string, error)

func (*API) Deploy

func (api *API) Deploy(ctx context.Context, chainID uint64, deploymentParameters DeploymentParameters, txArgs transactions.SendTxArgs, password string) (DeploymentDetails, error)

func (*API) DeployCollectiblesEstimate added in v0.142.9

func (api *API) DeployCollectiblesEstimate(ctx context.Context) (uint64, error)

Returns gas units + 10%

func (*API) MintTo added in v0.141.1

func (api *API) MintTo(ctx context.Context, chainID uint64, contractAddress string, txArgs transactions.SendTxArgs, password string, walletAddresses []string, amount int) (string, error)

type Database added in v0.141.1

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

func NewCollectiblesDatabase added in v0.141.1

func NewCollectiblesDatabase(db *sql.DB) *Database

func (*Database) AddTokenOwners added in v0.141.1

func (db *Database) AddTokenOwners(chainID uint64, contractAddress string, owners []string) error

func (*Database) GetAmount added in v0.141.1

func (db *Database) GetAmount(chainID uint64, contractAddress string, owner string) (int, error)

func (*Database) GetTokenOwners added in v0.141.1

func (db *Database) GetTokenOwners(chainID uint64, contractAddress string) ([]TokenOwner, error)

type DeploymentDetails

type DeploymentDetails struct {
	ContractAddress string `json:"contractAddress"`
	TransactionHash string `json:"transactionHash"`
}

type DeploymentParameters

type DeploymentParameters struct {
	Name               string `json:"name"`
	Symbol             string `json:"symbol"`
	Supply             int    `json:"supply"`
	InfiniteSupply     bool   `json:"infiniteSupply"`
	Transferable       bool   `json:"transferable"`
	RemoteSelfDestruct bool   `json:"remoteSelfDestruct"`
	TokenURI           string `json:"tokenUri"`
}

func (*DeploymentParameters) GetInfiniteSupply

func (d *DeploymentParameters) GetInfiniteSupply() *big.Int

infinite supply for ERC721 is 2^256-1

func (*DeploymentParameters) GetSupply

func (d *DeploymentParameters) GetSupply() *big.Int

func (*DeploymentParameters) Validate

func (d *DeploymentParameters) Validate() error

type Service

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

Collectibles service

func NewService

func NewService(rpcClient *rpc.Client, accountsManager *account.GethManager, config *params.NodeConfig, appDb *sql.DB) *Service

Returns a new Collectibles Service.

func (*Service) APIs

func (s *Service) APIs() []ethRpc.API

APIs returns a list of new APIs.

func (*Service) Protocols

func (s *Service) Protocols() []p2p.Protocol

Protocols returns a new protocols list. In this case, there are none.

func (*Service) Start

func (s *Service) Start() error

Start is run when a service is started.

func (*Service) Stop

func (s *Service) Stop() error

Stop is run when a service is stopped.

type TokenOwner added in v0.141.1

type TokenOwner struct {
	Address string
	Amount  int
}

Jump to

Keyboard shortcuts

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