collectibles

package
v0.131.5 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: MPL-2.0 Imports: 13 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) *API

func (*API) Deploy

func (api *API) Deploy(ctx context.Context, chainID uint64, deploymentParameters DeploymentParameters, txArgs transactions.SendTxArgs, password string) (DeploymentDetails, 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) *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.

Jump to

Keyboard shortcuts

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