Documentation ¶
Index ¶
- func GetInfiniteSupply() *big.Int
- type API
- func (api *API) Burn(ctx context.Context, chainID uint64, contractAddress string, ...) (string, error)
- func (api *API) ContractOwner(ctx context.Context, chainID uint64, contractAddress string) (string, error)
- func (api *API) DeployAssets(ctx context.Context, chainID uint64, deploymentParameters DeploymentParameters, ...) (DeploymentDetails, error)
- func (api *API) DeployAssetsEstimate(ctx context.Context) (uint64, error)
- func (api *API) DeployCollectibles(ctx context.Context, chainID uint64, deploymentParameters DeploymentParameters, ...) (DeploymentDetails, error)
- func (api *API) DeployCollectiblesEstimate(ctx context.Context) (uint64, error)
- func (api *API) EstimateBurn(ctx context.Context, chainID uint64, contractAddress string, ...) (uint64, error)
- func (api *API) EstimateMintAssets(ctx context.Context, chainID uint64, contractAddress string, ...) (uint64, error)
- func (api *API) EstimateMintCollectibles(ctx context.Context, chainID uint64, contractAddress string, ...) (uint64, error)
- func (api *API) EstimateMintTokens(ctx context.Context, chainID uint64, contractAddress string, ...) (uint64, error)
- func (api *API) EstimateRemoteBurn(ctx context.Context, chainID uint64, contractAddress string, ...) (uint64, error)
- func (api *API) GetAssetContractInstance(chainID uint64, contractAddress string) (*assets.Assets, error)
- func (api *API) GetContractInstance(chainID uint64, contractAddress string) (*collectibles.Collectibles, error)
- func (api *API) MintAssets(ctx context.Context, chainID uint64, contractAddress string, ...) (string, error)
- func (api *API) MintCollectibles(ctx context.Context, chainID uint64, contractAddress string, ...) (string, error)
- func (api *API) MintTokens(ctx context.Context, chainID uint64, contractAddress string, ...) (string, error)
- func (api *API) RemainingSupply(ctx context.Context, chainID uint64, contractAddress string) (*bigint.BigInt, error)
- func (api *API) RemoteBurn(ctx context.Context, chainID uint64, contractAddress string, ...) (string, error)
- func (api *API) RemoteDestructedAmount(ctx context.Context, chainID uint64, contractAddress string) (*bigint.BigInt, error)
- type Database
- type DeploymentDetails
- type DeploymentParameters
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetInfiniteSupply ¶ added in v0.163.4
Types ¶
type API ¶
func NewAPI ¶
func NewAPI(rpcClient *rpc.Client, accountsManager *account.GethManager, rpcFiltersSrvc *rpcfilters.Service, config *params.NodeConfig, appDb *sql.DB) *API
func (*API) ContractOwner ¶ added in v0.141.1
func (*API) DeployAssets ¶ added in v0.160.1
func (api *API) DeployAssets(ctx context.Context, chainID uint64, deploymentParameters DeploymentParameters, txArgs transactions.SendTxArgs, password string) (DeploymentDetails, error)
func (*API) DeployAssetsEstimate ¶ added in v0.160.1
Returns gas units + 10%
func (*API) DeployCollectibles ¶ added in v0.160.1
func (api *API) DeployCollectibles(ctx context.Context, chainID uint64, deploymentParameters DeploymentParameters, txArgs transactions.SendTxArgs, password string) (DeploymentDetails, error)
func (*API) DeployCollectiblesEstimate ¶ added in v0.142.9
Returns gas units + 10%
func (*API) EstimateBurn ¶ added in v0.158.0
func (*API) EstimateMintAssets ¶ added in v0.162.1
func (api *API) EstimateMintAssets(ctx context.Context, chainID uint64, contractAddress string, walletAddresses []string, amount *bigint.BigInt) (uint64, error)
Estimate MintAssets cost.
func (*API) EstimateMintCollectibles ¶ added in v0.162.1
func (*API) EstimateMintTokens ¶ added in v0.162.1
func (*API) EstimateRemoteBurn ¶ added in v0.152.2
func (api *API) EstimateRemoteBurn(ctx context.Context, chainID uint64, contractAddress string, tokenIds []*bigint.BigInt) (uint64, error)
This is only ERC721 function
func (*API) GetAssetContractInstance ¶ added in v0.163.4
func (*API) GetContractInstance ¶ added in v0.163.4
func (api *API) GetContractInstance(chainID uint64, contractAddress string) (*collectibles.Collectibles, error)
func (*API) MintAssets ¶ added in v0.162.1
func (api *API) MintAssets(ctx context.Context, chainID uint64, contractAddress string, txArgs transactions.SendTxArgs, password string, walletAddresses []string, amount *bigint.BigInt) (string, error)
Create the amount of assets tokens and distribute them to all walletAddresses. The amount should be in smallest denomination of the asset (like wei) with decimal = 18, eg. if we want to mint 2.34 of the token, then amount should be 234{16 zeros}.
func (*API) MintCollectibles ¶ added in v0.162.1
func (api *API) MintCollectibles(ctx context.Context, chainID uint64, contractAddress string, txArgs transactions.SendTxArgs, password string, walletAddresses []string, amount *bigint.BigInt) (string, error)
Create the amounty of collectible tokens and distribute them to all walletAddresses.
func (*API) MintTokens ¶ added in v0.162.1
func (api *API) MintTokens(ctx context.Context, chainID uint64, contractAddress string, txArgs transactions.SendTxArgs, password string, walletAddresses []string, amount *bigint.BigInt) (string, error)
Universal minting function for both assets and collectibles. Checks contract type and runs MintCollectibles or MintAssets function.
func (*API) RemainingSupply ¶ added in v0.158.0
func (*API) RemoteBurn ¶ added in v0.152.2
func (api *API) RemoteBurn(ctx context.Context, chainID uint64, contractAddress string, txArgs transactions.SendTxArgs, password string, tokenIds []*bigint.BigInt) (string, error)
This is only ERC721 function
type Database ¶ added in v0.141.1
type Database struct {
// contains filtered or unexported fields
}
func NewCommunityTokensDatabase ¶ added in v0.160.1
func (*Database) GetTokenType ¶ added in v0.160.1
type DeploymentDetails ¶
type DeploymentParameters ¶
type DeploymentParameters struct { Name string `json:"name"` Symbol string `json:"symbol"` Supply *bigint.BigInt `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(isAsset bool) error
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Collectibles service
func NewService ¶
func NewService(rpcClient *rpc.Client, accountsManager *account.GethManager, rpcFiltersSrvc *rpcfilters.Service, config *params.NodeConfig, appDb *sql.DB) *Service
Returns a new Collectibles Service.