Skip to main content

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:

nametyperequireddescriptionexample
namestringyesThis field represents the name of the token.VottunPOAP
symbolstringyesThe symbol of the smart contract, which will be assigned in the blockchain and will represent the assets.VTN1155
ipfsUristringyesThe base uri of the metadata for all the assets in the smart contract. Each asset will have its metadata assigned in ipfsUri/{tokenId}.jsonhttps://ipfsgw.vottun.tech/ipfs/baeiag3e...6hh3aumr7ly
royaltyRecipientstringyesThe address where the royalties will be recived.0xFBeF8ED1bb6bcc081736373C65f2a719556e194B
royaltyValueintyesThe percentage of the transaction value that is going to be charge as royalty.5
networkintyesThe chain id.80001
gasLimitintnothe 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
aliasstringyesThis 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:

nametypedescriptionexample
contractAddressstringThe contract Address0x62F0E381Cd7f3e856176a..2b9cB7Eb02856C511
txHashstringThe transaction Hash0x72f9f35c4fe92b6580..6db6719e903

Example

{
"contractAddress": "0x62F0E381Cd7f3e..b2b9cB7Eb02856C511",
"txHash": "0x72f9f35c4fe92b658..c5608c31df06807fc9f5e7243e6db6719e903"
}

Http status

resulthttp status
The smart contract transaction has been inserted succesfully201
The request does not include the correct information as per format or content400
The customer is not authorized401
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
nametyperequireddescriptionexample
contractAddressstringyesThis field represents represent the address of the contract.0x9b7127AfAE2cF200...65c5b03Ac9d291d9a90Dc
networkintyesThe chain id43113
tostringyesThis field is the account where the tokens are going to be sent.0xfE463ce3BFda970...C15547D0425D1332A8994a
idintyesThe id or the token that will be transfered.1
amountintyesThe 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:

nametypedescriptionexample
txHashstringThe transaction Hash0xb3ba0828ac232..63ddfef73b5d6860a82a6
nonceintthe transaction number from the accounth27

Example

{
"txHash": "0xb3ba0828ac232c48b69bb3..63ddfef73b5d6860a82a6",
"nonce": 27
}

Http status

resulthttp status
The transaction has been inserted succesfully201
The request does not include the correct information as per format or content400
The customer is not authorized401
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
nametyperequireddescriptionexample
contractAddressstringyesThis field represents represent the address of the contract.0x9b7127AfAE2cF200...65c5b03Ac9d291d9a90Dc
networkintyesThe chain id43113
tostringyesThis field is the account where the tokens are going to be sent.0xfE463ce3BFda970...C15547D0425D1332A8994a
amounts[]intyesThe amount of tokens that will be minted of each id.[5, 100, 500]
ids[]intyesThe 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:

nametypedescriptionexample
txHashstringThe transaction Hash0xb3ba0828ac232..63ddfef73b5d6860a82a6
nonceintthe transaction number from the accounth27

Example

{
"txHash": "0xb3ba0828ac232c48b69bb3..63ddfef73b5d6860a82a6",
"nonce": 27
}

Http status

resulthttp status
The transaction has been inserted succesfully201
The request does not include the correct information as per format or content400
The customer is not authorized401
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:

nametyperequireddescriptionexample
contractAddressstringyesThis field represents represent the address of the contract.0x9b7127AfAE2cF200...65c5b03Ac9d291d9a90Dc
networkintyesThe chain id43113
tostringyesThis field is the account where the tokens are going to be sent.0xfE463ce3BFda970...C15547D0425D1332A8994a
idintyesThe id or the token that will be transfered.1
amountintyesThe 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:

nametypedescriptionexample
txHashstringThe transaction Hash0xb3ba0828ac232..63ddfef73b5d6860a82a6
nonceintthe transaction number from the accounth27

Example

{
"txHash": "0xb3ba0828ac232c48b69bb3..63ddfef73b5d6860a82a6",
"nonce": 27
}

Http status

resulthttp status
The transaction has been inserted succesfully201
The request does not include the correct information as per format or content400
The customer is not authorized401
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

nametyperequireddescriptionexample
contractAddressstringyesThis field represents represent the address of the contract.0x9b7127AfAE2cF200...65c5b03Ac9d291d9a90Dc
networkintyesThe chain id43113
tostringyesThis field is the account where the tokens are going to be sent.0xfE463ce3BFda970...C15547D0425D1332A8994a
ids[]intyesThe ids of the tokens that will be transfered .[1, 2, 3],
amounts[]intyesThe 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:

nametypedescriptionexample
txHashstringThe transaction Hash0xb3ba0828ac232..63ddfef73b5d6860a82a6
nonceintthe transaction number from the accounth27

Example

{
"txHash": "0xb3ba0828ac598248b69bb3..63ddfef73b5d6860a82a6",
"nonce": 5
}

Http status

resulthttp status
The transaction has been inserted succesfully201
The request does not include the correct information as per format or content400
The customer is not authorized401
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

nametyperequireddescriptionexample
contractAddressstringyesThis field represents represent the address of the contract.0x9b7127AfAE2cF200...65c5b03Ac9d291d9a90Dc
networkintyesThe chain id43113
addressstringyesThis field represents the address where you wanted to know the amount of tokens it has.0xfE463ce3BFd..47D0425D1332A8994a
idintyesThe 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

resulthttp status
Information request is successful200
The request does not include the correct information as per format or content400
The customer is not authorized401

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

nametyperequireddescriptionexample
contractAddressstringyesThis field represents represent the address of the contract.0x9b7127AfAE2cF200...65c5b03Ac9d291d9a90Dc
networkintyesThe chain id43113
idintyesThe 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

resulthttp status
Information request is successful200
The request does not include the correct information as per format or content400
The customer is not authorized401