Skip to main content

sdk.constellation

Home > @openformat/sdk > Constellation

Constellation class

Represents an ERC20 contract instance with utility methods to interact with an ERC20 contract

ERC20 BaseContract

Signature:

export declare class Constellation extends BaseContract 

Extends: BaseContract

Constructors

ConstructorModifiersDescription
(constructor)(provider, appId, contractAddress, signer)Constructs a new instance of the Constellation class

Methods

MethodModifiersDescription
address()

Get the contract address.

address

allowance(params)

Returns the amount of token that the spender is allowed to withdraw from the holder's account.

allowance

approve(params)

Approves a spender to spend a certain amount of tokens on behalf of the current account.

approve

balanceOf(params)

Gets the balance of the specified account.

balanceOf

burn(params)

Burns a specified amount of tokens from the account of the sender.

burn

hasRole(role, account)
mint(params)

Mint new ERC20 tokens and sends them to a specified address.

mint

name()
setMetadataURI(params)
totalSupply(params)

Returns the total supply of tokens.

totalSupply

transfer(params)

Transfers tokens from the current account to the provided account.

transfer

transferFrom(params)

Transfers tokens from the current account to the provided account.

transfer