NFT 1155
Welcome to the documentation of the ERC1155 API! This feature-rich API empowers developers to deploy contracts, check balances, mint new tokens individually or in batches, and perform seamless transfers of ERC1155 tokens. Let's get started!
Endpoints​
Deploy​
This endpoint deploys an ERC-1155 smart contract. The call that must be performed is:
POST https://api.vottun.tech/erc/v1/erc1155/deploy
Request
The request must include a json body with the following fields:
name | type | required | description | example |
---|---|---|---|---|
name | string | yes | This field represents the name of the token. | VottunPOAP |
symbol | string | yes | The symbol of the smart contract, which will be assigned in the blockchain and will represent the assets. | VTN1155 |
ipfsUri | string | yes | The base uri of the metadata for all the assets in the smart contract. Each asset will have its metadata assigned in ipfsUri/{tokenId}.json | https://ipfsgw.vottun.tech/ipfs/baeiag3e...6hh3aumr7ly |
royaltyRecipient | string | yes | The address where the royalties will be recived. | 0xFBeF8ED1bb6bcc081736373C65f2a719556e194B |
royaltyValue | int | yes | The percentage of the transaction value that is going to be charge as royalty. | 5 |
network | int | yes | The chain id. | 80001 |
gasLimit | int | no | the maximum amount of work you estimate a validator will do for the transaction. It this field is not set, the platform will estimate the gas in background before sending the transaction. | 4000000 |
alias | string | yes | This field represents an alias or a user-friendly nickname for the contract. | My first ERC1155 contract |
With a body like this:
{
"name": "ERC1155API",
"symbol": "ERCAPI",
"ipfsUri": "https://ipfsgw.vottun.tech/ipfs/QmSdQEwYVjQc4u9hkKvTwC85w5xFp4S4kZBDp62XLyzrZE",
"royaltyRecipient": "0xFBeF8ED1bb6bcc081736373C65f2a719556e194B",
"royaltyValue": 5,
"network": 43113,
"gasLimit": 6000000,
"alias": "api erc1155 contract"
}
Response
It will return a json with the following fields:
name | type | description | example |
---|---|---|---|
contractAddress | string | The contract Address | 0x62F0E381Cd7f3e856176a..2b9cB7Eb02856C511 |
txHash | string | The transaction Hash | 0x72f9f35c4fe92b6580..6db6719e903 |
Example
{
"contractAddress": "0x62F0E381Cd7f3e..b2b9cB7Eb02856C511",
"txHash": "0x72f9f35c4fe92b658..c5608c31df06807fc9f5e7243e6db6719e903"
}
Http status
result | http status |
---|---|
The smart contract transaction has been inserted succesfully | 201 |
The request does not include the correct information as per format or content | 400 |
The customer is not authorized | 401 |
There is an error with any of the vottun dependencies or with the customer (in this case contact with Vottun) | 503 |
Mint​
This endpoint mints amount
copies of an NFT with the provided metadata to the given address. The operation is performed in the given contract and network.
The call that must be performed is:
POST https://api.vottun.tech/erc/v1/erc1155/mint
name | type | required | description | example |
---|---|---|---|---|
contractAddress | string | yes | This field represents represent the address of the contract. | 0x9b7127AfAE2cF200...65c5b03Ac9d291d9a90Dc |
network | int | yes | The chain id | 43113 |
to | string | yes | This field is the account where the tokens are going to be sent. | 0xfE463ce3BFda970...C15547D0425D1332A8994a |
id | int | yes | The id or the token that will be transfered. | 1 |
amount | int | yes | The amount of tokens that will be transfered. | 5 |
With a body like this:
{
"contractAddress": "0xD2C2EE38649E3725F754Fc8FdAAB8299eBF4D6D7",
"network": 43113,
"to": "0x323d7A1A9EEECaE3966F59a370893cccE8Bb1f85",
"id":1,
"amount": 5
}
Response
The transfer request will return a json with the following information:
name | type | description | example |
---|---|---|---|
txHash | string | The transaction Hash | 0xb3ba0828ac232..63ddfef73b5d6860a82a6 |
nonce | int | the transaction number from the accounth | 27 |
Example
{
"txHash": "0xb3ba0828ac232c48b69bb3..63ddfef73b5d6860a82a6",
"nonce": 27
}
Http status
result | http status |
---|---|
The transaction has been inserted succesfully | 201 |
The request does not include the correct information as per format or content | 400 |
The customer is not authorized | 401 |
There is an error with any of the vottun dependencies or with the customer (in this case contact with Vottun) | 503 |
Mint batch​
This endpoint mints amounts
copies of multiple NFTs with the provided metadata to the given address. The operation is performed in the given contract and network. The call that must be performed is:
POST https://api.vottun.tech/erc/v1/erc1155/mintbatch
name | type | required | description | example |
---|---|---|---|---|
contractAddress | string | yes | This field represents represent the address of the contract. | 0x9b7127AfAE2cF200...65c5b03Ac9d291d9a90Dc |
network | int | yes | The chain id | 43113 |
to | string | yes | This field is the account where the tokens are going to be sent. | 0xfE463ce3BFda970...C15547D0425D1332A8994a |
amounts | []int | yes | The amount of tokens that will be minted of each id. | [5, 100, 500] |
ids | []int | yes | The ids of the tokens that will be minted. | [1, 2, 3] |
With a body like this:
{
"contractAddress": "0xD2C2EE38649E3725F754Fc8FdAAB8299eBF4D6D7",
"network": 43113,
"to": "0x323d7A1A9EEECaE3966F59a370893cccE8Bb1f85",
"amounts": [
5,
100,
500
],
"ids": [
1,
2,
3
]
}
Response
The transfer request will return a json with the following information:
name | type | description | example |
---|---|---|---|
txHash | string | The transaction Hash | 0xb3ba0828ac232..63ddfef73b5d6860a82a6 |
nonce | int | the transaction number from the accounth | 27 |
Example
{
"txHash": "0xb3ba0828ac232c48b69bb3..63ddfef73b5d6860a82a6",
"nonce": 27
}
Http status
result | http status |
---|---|
The transaction has been inserted succesfully | 201 |
The request does not include the correct information as per format or content | 400 |
The customer is not authorized | 401 |
There is an error with any of the vottun dependencies or with the customer (in this case contact with Vottun) | 503 |
Transfer​
This endpoint transfers amount
copies of an NFT to the given address. The operation is performed in the given contract and network and as it is mentioded before the operation can only be executed by the minter of the tokens.
The call that must be performed is:
POST https://api.vottun.tech/erc/v1/erc1155/transfer
Request
The request must include a json body with the following fields:
name | type | required | description | example |
---|---|---|---|---|
contractAddress | string | yes | This field represents represent the address of the contract. | 0x9b7127AfAE2cF200...65c5b03Ac9d291d9a90Dc |
network | int | yes | The chain id | 43113 |
to | string | yes | This field is the account where the tokens are going to be sent. | 0xfE463ce3BFda970...C15547D0425D1332A8994a |
id | int | yes | The id or the token that will be transfered. | 1 |
amount | int | yes | The amount of tokens that will be transfered. | 5 |
With a body like this:
{
"contractAddress": "0xD2C2EE38649E3725F754Fc8FdAAB8299eBF4D6D7",
"network": 43113,
"to": "0xc235ef36Ba17D7845E9A070cE40b8834f6204CDB",
"id": 1,
"amount": 1
}
Response
The transfer request will return a json with the following information:
name | type | description | example |
---|---|---|---|
txHash | string | The transaction Hash | 0xb3ba0828ac232..63ddfef73b5d6860a82a6 |
nonce | int | the transaction number from the accounth | 27 |
Example
{
"txHash": "0xb3ba0828ac232c48b69bb3..63ddfef73b5d6860a82a6",
"nonce": 27
}
Http status
result | http status |
---|---|
The transaction has been inserted succesfully | 201 |
The request does not include the correct information as per format or content | 400 |
The customer is not authorized | 401 |
There is an error with any of the vottun dependencies or with the customer (in this case contact with Vottun) | 503 |
Transfer batch​
This endpoint transfers amounts
copies of different NFTs to a given address. The operation is performed in the given contract and network.
The call that must be performed is:
POST https://api.vottun.tech/erc/v1/erc1155/transferBatch
Request
name | type | required | description | example |
---|---|---|---|---|
contractAddress | string | yes | This field represents represent the address of the contract. | 0x9b7127AfAE2cF200...65c5b03Ac9d291d9a90Dc |
network | int | yes | The chain id | 43113 |
to | string | yes | This field is the account where the tokens are going to be sent. | 0xfE463ce3BFda970...C15547D0425D1332A8994a |
ids | []int | yes | The ids of the tokens that will be transfered . | [1, 2, 3], |
amounts | []int | yes | The amounts of each token that will be transfered. | [2, 5, 10] |
With a body like this:
{
"contractAddress": "0xD2C2EE38649E3725F754Fc8FdAAB8299eBF4D6D7",
"network": 43113,
"to": "0xc235ef36Ba17D7845E9A070cE40b8834f6204CDB",
"ids": [
2,
3
],
"amounts": [
3,
4
]
}
Response
The transfer batch request will return a json with the following information:
name | type | description | example |
---|---|---|---|
txHash | string | The transaction Hash | 0xb3ba0828ac232..63ddfef73b5d6860a82a6 |
nonce | int | the transaction number from the accounth | 27 |
Example
{
"txHash": "0xb3ba0828ac598248b69bb3..63ddfef73b5d6860a82a6",
"nonce": 5
}
Http status
result | http status |
---|---|
The transaction has been inserted succesfully | 201 |
The request does not include the correct information as per format or content | 400 |
The customer is not authorized | 401 |
There is an error with any of the vottun dependencies or with the customer (in this case contact with Vottun) | 503 |
Balance Of​
This endpoint retrieves the amount of a specific NFT for the given address and smart contract, on the specified network. The call that must be performed is:
GET|POST https://api.vottun.tech/erc/v1/erc1155/balanceOf
Request
name | type | required | description | example |
---|---|---|---|---|
contractAddress | string | yes | This field represents represent the address of the contract. | 0x9b7127AfAE2cF200...65c5b03Ac9d291d9a90Dc |
network | int | yes | The chain id | 43113 |
address | string | yes | This field represents the address where you wanted to know the amount of tokens it has. | 0xfE463ce3BFd..47D0425D1332A8994a |
id | int | yes | The id of the token you wanted to know the amount that the given address has. | 3 |
With a body like this:
{
"contractAddress": "0xD2C2EE38649E3725F754Fc8FdAAB8299eBF4D6D7",
"network": 43113,
"address": "0x323d7A1A9EEECaE3966F59a370893cccE8Bb1f85",
"id":3
}
Response
The response will return a json object with the balance of the address we sent
Example
{
"balance": 9
}
Http status
result | http status |
---|---|
Information request is successful | 200 |
The request does not include the correct information as per format or content | 400 |
The customer is not authorized | 401 |
Token Uri​
This endpoint retrieves the uri of the metadata of the given NFT from the given contract. Usually resolves to a JSON object that contains the information about the NFT. The call that must be performed is:
GET|POST https://api.vottun.tech/erc/v1/erc1155/tokenUri
Request
name | type | required | description | example |
---|---|---|---|---|
contractAddress | string | yes | This field represents represent the address of the contract. | 0x9b7127AfAE2cF200...65c5b03Ac9d291d9a90Dc |
network | int | yes | The chain id | 43113 |
id | int | yes | The id of the token you wanted to know uri of the token. | 3 |
With a body like this:
{
"contractAddress": "0xD2C2EE38649E3725F754Fc8FdAAB8299eBF4D6D7",
"network": 43113,
"id": 3
}
Response
The response will uri of the given token id
Example
{
"uri": "https://ipfsgw.vottun.tech/ipfs/bafkreiag3egtcizssi6p2g4mczednwdhba5vriqf2rlhnry6hh3aumr7ly/1.json"
}
Http status
result | http status |
---|---|
Information request is successful | 200 |
The request does not include the correct information as per format or content | 400 |
The customer is not authorized | 401 |