Create contract

This guide explains how you can create a smart contract for your NFT collection on the blockchain.

The creation of an NFT contract is the deployment of a new smart contract on a specific blockchain. The concept of a contract can be considered as the creation of a collection.

Let's start by defining your first contract. This contract will represent a collection for the NFTs. We will create a contract on the Polygon (MATIC) testnet chain.

Request Endpoint: reference

 POST /api/minter/contracts

Request Body:

ParameterDescriptionTypeRequired
nameThe name of your NFT collection/contractStringโœ…
descriptionThe description of your NFT collection/contractStringโœ…
imageThe image URL for your NFT collection/contract that will be displayedStringโœ…
chainThis is the blockchain on which you want to create the contract onStringโœ…
externalUrlThis can be any link such as a link to your website, landing page, etc.Stringโœ…
{
  "name": "My first collection",
  "description": "Sample description",
  "image": "https://pbs.twimg.com/profile_images/1669300450649157635/4xg-wsbK_400x400.jpg",
  "chain": "MATIC",
  "externalUrl": "www.venly.io"
}

Response Body:

๐Ÿ“˜

Save the id from the response body. This is the contract ID.

The transactionHash that is return is the transction that created the contract on-chain. The confirmed attribute is a boolean field that indicates if the transaction has been mined yet.

{
  "name": "My first collection",
  "description": "Sample description",
  "confirmed": true,
  "id": 53492,
  "secretType": "MATIC",
  "symbol": "MYFICO",
  "externalUrl": "www.venly.io",
  "image": "https://pbs.twimg.com/profile_images/1669300450649157635/4xg-wsbK_400x400.jpg",
  "media": [],
  "transactionHash": "0x5baa0794fc31584b04514b8d40d9e016594d335eb5dae2555ad3ca68cf620e18",
  "storage": {
    "type": "cloud",
    "location": "https://metadata-staging.arkane.network/metadata/contracts/53492"
  },
  "external_link": "www.venly.io"
}

Whatโ€™s Next

For more information on the metadata of an NFT contract please read Collection Info.