Search
K

Add Tokens (ERC1155)

New tokens can be added to a contract as needed by entering supply, price and max per transaction.
If you want to add tokens to an ERC721 contract you can use the Update Contract (ERC721) endpoint and update the total supply
put
https://api.hypermint.com/v1
/nft-contract/:contractId/tokens
Adds tokends to contract
Parameters
Header
HM_ACCESS_KEY*
HyperMint Access Key
HM_ACCESS_KEY_SECRET*
HyperMint Access Key Secret
Body
tokens*
Array
tokens is an array of tokens to be created. Token ids will be assigned in the order provided in the array. See AddTokenRequest interface below for more details
Responses
200: OK
Responds with Array of tokens created. If the contract has been deployed, an interactionId will be returned which allows you to check the status of the new token request.
400: Bad Request
The contract has been disabled by an administrator
400: Bad Request
Attempted to create a new token on an ERC721 contract
404: Not Found
Contract does not exist or you do not have permission
See Get Interaction for a list of interaction types which are used and how to check the status if needed.

Request Interface

interface AddTokensRequest {
tokens: {
price: number;
totalSupply: number;
maxPerTransaction: number;
}[];
}
Property
Description
price
The price in ETH or SOL of the token. If not using buy functionality, this can be 0
totalSupply
The maximum number of tokens which can be minted
maxPerTransaction
The number of tokens each address can buy in one transaction. Set to 0 for infinite

Feedback

Something not quite right, unclear or can't find what you are looking for? Please let us know at [email protected] and we will get back to you as soon as we can.