Venly API
Search…
Read contract
Endpoint that allows you to read contract functions
post
https://api-wallet.venly.io
/api/contracts/read
Read a contract

Examples

Get Balance of

This example will get the balance of a certain NFT for a specific wallet
POST: https://api-wallet.venly.io/api/contracts/read

Request Body

{
"secretType": "MATIC",
"walletAddress": "0x0000000000000000000000000000000000000000",
"contractAddress": "0xE80F3baA739c18fd4eBf97716529a4b85BE464Dd",
"functionName": "balanceOf",
"inputs": [
{
"type": "address",
"value": "0x427d0addaa77d8bb871dbea3458dea4b5198730c"
},
{
"type": "uint256",
"value": "202"
}
],
"outputs": [
{
"type": "uint256"
}
]
}

Response

{
"success": true,
"result": [
{
"type": "uint256",
"value": 1
}
]
}

Get Mint Number

This example will get the mint number for a specific NFT.
POST : https://api.arkane.network/api/contracts/read

Request Body

{
"secretType": "MATIC",
"walletAddress": "0x0000000000000000000000000000000000000000",
"contractAddress": "0xf86013ac3a23d26efb3337b4d63de6e6ec2a9861",
"functionName": "mintNumber",
"inputs": [
{
"type": "uint256",
"value": "51"
}
],
"outputs": [
{
"type": "uint256"
}
]
}

Response

{
"success": true,
"result": [
{
"type": "uint256",
"value": 2
}
]
}

Get Contract URI

This example will fetch the contract URI, which contains the metadata, for a specific contract.
POST : https://api.arkane.network/api/contracts/read

Request Body

{
"secretType": "MATIC",
"walletAddress": "0x0000000000000000000000000000000000000000",
"contractAddress": "0x8c53de6a889cf0a3151168c3e84263c982d09a2f",
"functionName": "contractURI",
"outputs": [
{
"type": "string"
}
]
}

Response

{
"success": true,
"result": [
{
"type": "string",
"value": "https://metadata.arkane.network/api/apps/0ed3a778-4f11-4cdf-b3cc-45f3225a9065/contracts/76/metadata"
}
]
}