Quantum
  • Welcome to Quantum
  • Developer portal
    • Pricing
  • Self-Custody Infrastructure
    • Pincode Management
    • Private Key Management
  • Quickstart guide
  • Authentication
    • API Authentication
  • Faucets
  • Networks & URLs
  • Walletify Api
    • Overview
    • Getting started
    • User Management
    • Signing Methods
    • Testnet Assets
    • Basic Guides
      • Create a user
      • Retrieve a user
      • Update a user
      • Delete a user
      • Create a signing method
      • Update a signing method
      • Delete a signing method
      • Create a wallet
      • Retrieve wallet
      • Archive a wallet
      • Import a wallet
      • Export a wallet
      • Retrieve native balance
      • Retrieve ERC20 tokens
      • Retrieve NFTs
      • Transfer a native token
      • Transfer an ERC20 token
      • Transfer an NFT
      • Transfer a fungible token
      • Signatures
      • Read a contract
      • Execute a contract call
      • Get Transaction status
      • Resubmit a transaction
      • Get wallet events
      • Webhooks
    • Advanced Guides
      • Burn an NFT
      • Filter Spam NFTs
      • Filter NSFW NFTs
      • SWAP Token Pairs
      • Gasless/Meta Transactions
      • Sign RAW Transactions
      • Using Fiat Onramp with Walletify-API
      • Deploy an Ethereum contract
      • Integrate with WalletConnect
      • Set Up NFT Token Gating
      • Chain Specific Fields
      • Integrate with WalletConnect
      • Encrypted PIN Transfer
  • Nft Wizard Api
    • Overview
    • Getting started
    • Basic Guides
      • Get any NFT info
      • Get any NFT contract
      • Get NFTs by any wallet
      • Get wallets by any NFT
      • Create contract
      • Retrieve Contract
      • Delete Contract
      • Check Contract Status
      • Retrieve Contract Metadata
      • Update Contract Metadata
      • Create Token-type (NFT template)
      • Retrieve Token-type (NFT template)
      • Delete Token-type (NFT Template)
      • Check Token-type Status
      • Retrieve Token-type Metadata
      • Update Token-type Metadata
      • Mint an NFT
      • Batch Mint NFTs
      • Update NFT Metadata
      • Retrieve NFT Metadata
      • Add Audio to your NFTs
      • Add Video to your NFTs
      • Store NFT Media
      • Webhooks
    • Advanced Guides
      • Mass Minting
      • Speed Up Minting
      • Dynamic NFTs
      • Configure Royalties
      • Create Company Minter Wallet
      • Retrieve Company Minter Wallets
      • Store NFT Metadata on IPFS
      • View NFT on sandbox/testnet
    • NFT Configuration
      • Attributes
      • Animation & Media
      • Collection Info
      • Max Supply
      • Mint Number
      • Burnable
      • Metadata Storage
  • TMINTER API
    • Overview
    • Getting started
    • Basic Guide
      • Retrieve Any NFT Information
      • Retrieve NFT Contract Information
      • Retrieve NFTs by Wallet Address
      • Retrieve Wallets by NFT
      • Create a New NFT Contract
      • Retrieve a Contract
      • Delete a Contract
      • Check Contract Status
      • Retrieve Contract Metadata
      • Update Contract Metadata
      • Create Token-Type
      • Retrieve Token-Type
      • Delete Token-Type
      • Check Token-Type Status
      • Retrieve Token-Type Metadata
      • Update Token-Type Metadata
      • Mint a Single NFT
      • Batch Mint Multiple NFTs
      • Update NFT Metadata
      • Retrieve NFT Metadata
      • Add Audio to Your NFTs
      • Add Video to Your NFTs
      • Store NFT Media
      • Webhooks for NFT Events
    • Advance Guide
      • Dynamic NFT Creation
      • Token Economics and Supply Control
      • Advanced Minting: Royalty Distribution
      • Cross-Chain NFT Minting
      • NFT Sharding (Fractional Ownership)
      • Batch NFT Minting with Custom Metadata
      • Add Interactivity to NFTs
      • Advanced Media Integration: VR and AR
      • Webhook Triggers for Automated Processes
Powered by GitBook
On this page
  • Examples
  • 1. Get balance of
  • 2. Get Mint Number
  • 3. Get Contract URI
  1. Walletify Api
  2. Basic Guides

Read a contract

Endpoint that allows you to read contract functions.

PreviousSignaturesNextExecute a contract call

Last updated 10 months ago

This function is only available for EVM-based chains.

Request Endpoint:

This endpoint allows you to read contract functions. This function is only available for EVM-based chains.

HTTP

POST /api/contracts/read
Parameter
Param Type
Description
Data Type
Mandatory

secretType

Body

On which blockchain the contract exists

String

✅

contractAddress

Body

The contract address that you want to read

String

✅

functionName

Body

The contract function that you want to call

String

✅

inputs

Body

TArray of inputs needed to call the function

Array

✅

inputs.type

Body

Type of the input parameter (ex. uint256)

String

✅

inputs.value

Body

Value of the input parameter. This needs to be passed as a string value

Object

✅

outputs

Body

An array of expected outputs

Array

✅

outputs.type

Body

Type of output

String

✅

Examples

1. Get balance of

This example will get the balance of a certain NFT for a specific wallet.

HTTP

POST https://api-wallet.venly.io/api/contracts/read

Request Body:

JSON

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

Response Body:

JSON

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

2. Get Mint Number

This example will get the mint number for a specific NFT.

HTTP

POST https://api-wallet.venly.io/api/contracts/read

Request Body:

JSON

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

Response Body:

JSON

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

3. Get Contract URI

This example will fetch the contract URI, which contains the metadata, for a specific contract.

HTTP

POST https://api-wallet.venly.io/api/contracts/read

Request Body:

JSON

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

Response Body:

JSON

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