PATCH: Update Contract (ERC-721a)
Sets the erc721Price
and erc721MaxPerTransaction
fields on a contract record. erc721TotalSupply
is used to alter the total supply of tokens for the contract. erc721TotalSupply
must be more than the total number of minted tokens for a deployed contract.
Changes to deployed contracts will be broadcasted immediately
https://api.hypermint.com/v1/nft-contract/:contractId/
Update Contract Name and Symbol
Parameters
Header
Parameter | Description |
---|---|
HM_ACCESS_KEY | HyperMint Access Key |
HM_ACCESS_KEY_SECRET | HyperMint Access Key Secret |
Body
Parameter | Type | Required | Description |
---|---|---|---|
name | string | Y | Name of the contract |
symbol | string | Y | Symbol of the contract |
network | CreateUpdateNFTDraftContractNetworkInput Object | N | See interface for CreateUpdateNFTDraftContractNetworkInput object |
secondarySaleBasisPoints | Number | N | Secondary royalty percentage |
erc721TotalSupply | Number | N | Total supply of the ERC-721 tokens available |
erc721MaxPerTransaction | Number | N | Maximum number a wallet can buy in a single transaction |
erc721Price | Number | N | Price of the token |
Response
Code | Meaning |
---|---|
🟢 200: OK | If contract is deployed the endpoint returns with a list of interaction Ids |
🟠 404: Not Found | Contract does not exist or you don't have permission |
🟠 400: Bad Request | The request sent was malformed or did not pass as a valid contract update request. The error message will explain the reason as to why the request couldn't be serviced |
interface UpdateErc721ContractResponse {
interactions: string[];
}
The interaction Ids returned from this endpoint can be used with Get Interaction Status to get the state of each interaction.
Object Interface
interface CreateUpdateNFTDraftContractNetworkInput {
type?: NetworkType;
environment?: NetworkEnvironment;
chain?: NetworkChain;
recoveryAddress?: string;
collectionOwnerAddress?: string;
customerPrimaryRoyaltyAddress?: string;
}
enum NetworkType {
Ethereum = 'Ethereum',
Polygon = 'Polygon'
}
enum NetworkEnvironment {
Emulator = 'Emulator',
Testnet = 'Testnet',
Mainnet = 'Mainnet'
}
enum NetworkChain {
EVMLocal = 'EVMLocal',
Ethereum = 'Ethereum',
Goerli = 'Goerli',
Polygon = 'Polygon',
Mumbai = 'Mumbai'
}
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