PUT: Add Tokens (ERC-1155)
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
https://api.hypermint.com/v1/nft-contract/:contractId/tokens
Adds Tokens to ERC-1155 Contract
Parameters
Header
Parameter | Description |
---|---|
HM_ACCESS_KEY | HyperMint Access Key |
HM_ACCESS_KEY_SECRET | HyperMint Access Key Secret |
Body
Parameter | Type | Required | Description |
---|---|---|---|
tokens | Array | Y | 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 |
Response
Code | Meaning |
---|---|
🟢 200: OK | Successfully added |
🟠 404: Not Found | Contract does not exist or you don't have permission |
🟠 400: Bad Request | The contract has been disabled by administrator |
🟠 400: Bad Request | Attempted to create a token on an ERC-721 contract |
interface AddTokensResponse {
tokens: {
tokenId: number;
totalSupply: number;
price: number;
maxPerTransaction: number;
}[];
interactionId?: string;
}
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;
}[];
}
Parameter | Type | Description |
---|---|---|
price | number | The price in ETH or SOL of the token. If not using buy functionality, this can be 0 |
totalSupply | number | The maximum number of tokens which can be minted |
maxPerTransaction | number | 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 support.moonpay.com and we will get back to you as soon as we can.
Updated 9 months ago