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
  • Supported types
  • Examples
  • 1. Execute ERC20 transfer
  • 2. Tuple support
  1. Walletify Api
  2. Basic Guides

Execute a contract call

An endpoint to execute a function on a smart contract (write) on any (supported) blockchain. As a result, a new transaction will be submitted to the network containing the smart contract execution.

PreviousRead a contractNextGet Transaction status

Last updated 10 months ago

This function is only available for EVM-based chains.

Request Endpoint:

HTTP

POST /api/transactions/execute
Parameter
Param Type
Value
Description
Example Value

Signing-Method

Header

id:value

id: This is the ID of the signing method value: This is the value of the signing method

756ae7a7-3713-43ee-9936-0dff50306488:123456

Parameter
Param Type
Description
Data Type
Mandatory

secretType

Body

On which blockchain the contract exists

String

✅

pincode (Deprecated)

Body

The pincode of the wallet

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

✅

chainSpecificFields

Body

Field that contains chain-specific values, see below for examples.

Object

✅

type

Body

This will be CONTRACT_EXECUTION

String

✅

walletId

Body

Id of the wallet that will initiate the tx

String

✅

to

Body

Destination Address (contract address)

String

✅

value

Body

The amount you want to transfer to

Integer

✅

transactionRequest

Body

The transactionRequest object

Object

✅

Supported types

address, bool, bytes, bytes1, bytes2, bytes3, bytes4, bytes5, bytes6, bytes7, bytes8, bytes9, bytes10, bytes11, bytes12, bytes13, bytes14, bytes15, bytes16, bytes17, bytes18, bytes19, bytes20, bytes21, bytes22, bytes23, bytes24, bytes25, bytes26, bytes27, bytes28, bytes29, bytes30, bytes31, bytes32, int8, int16, int24, int32, int40, int48, int56, int64, int72, int80, int88, int96, int104, int112, int120, int128, int136, int144, int152, int160, int168, int176, int184, int192, int200, int208, int216, int224, int232, int240, int248, int256, string, uint8, uint16, uint24, uint32, uint40, uint48, uint56, uint64, uint72, uint80, uint88, uint96, uint104, uint112, uint120, uint128, uint136, uint144, uint152, uint160, uint168, uint176, uint184, uint192, uint200, uint208, uint216, uint224, uint232, uint240, uint248, uint256, tuple

For arrays, please provide the type from above followed by square braces ( ex: uint256[] ). The values for an array must be surrounded with square brackets and delimited with "," (ex. [1,2,3]). Byte values must be hex-encoded.

📘

🧙 The signatures endpoint supports the EIP-712 standard, Ethereum typed structured data hashing and signing. This EIP aims to improve the usability of off-chain message signing for use on-chain.

Examples

1. Execute ERC20 transfer

This example will execute an ERC20 transfer using the direct execution of the smart contract function "transfer". The inputs for this function are: destination (address) and amount (uint265)

HTTP

POST https://api-wallet.venly.io/api/transactions/execute

Request Body:

JSON

{
	"transactionRequest": {

		"type": "CONTRACT_EXECUTION",
		"walletId": "adc4c08a-b8fa-4e4c-z5a2-92c87b80f174",
		"to": "0xdc71b72db51e227e65a45004ab2798d31e8934c9",
		"alias": null,
		"secretType": "ETHEREUM",
		"functionName": "transfer",
		"value": 0,
		"inputs": [{
			"type": "address",
			"value": "0x80cbb6c4342948e5be81987dce8251dbedd69138"
		}, {
			"type": "uint256",
			"value": 73680000
		}],
		"chainSpecificFields": {
			"gasLimit": "300000"
		}
	}
}

Response Body:

JSON

{
  "transactionHash" : "0x621f692e386a8bc0c53d36aa793864893106e10f54f63fa9c063e24ad975d907"
}

2. Tuple support

HTTP

POST https://api-wallet.venly.io/api/transactions/execute

Request Body:

JSON

{
    "transactionRequest": {
        "type": "CONTRACT_EXECUTION",
        "secretType": "MATIC",
        "walletId": "355351bd-41ae-41fa-8f36-12675f056759",
        "to": "0xb48d8c9e8783465a548f562cb83e8b84d0525a96",
        "functionName": "setValue",
        "inputs": [
            {
                "type": "tuple",
                "value": [
                    {
                        "type": "address",
                        "value": "0xb48d8c9e8783465a548f562cb83e8b84d0525a96"
                    },
                    {
                        "type": "uint256",
                        "value": "100"
                    }
                ]
            }
        ],
        "outputs": []
    }
}
reference