Child Address Write
curl --request POST \
--url https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/contracts/write \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"calls": [
{
"abi": [
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"address": "0x337610d27c682E347C9cD60BD4b3b107C9d34dDd",
"method": "transfer",
"parameters": [
"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22",
"10000"
]
},
{
"abi": [
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"address": "0x337610d27c682E347C9cD60BD4b3b107C9d34dDd",
"method": "transfer",
"parameters": [
"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22",
"10000"
]
}
]
}
'import requests
url = "https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/contracts/write"
payload = { "calls": [
{
"abi": [
{
"constant": False,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [],
"payable": False,
"stateMutability": "nonpayable",
"type": "function"
}
],
"address": "0x337610d27c682E347C9cD60BD4b3b107C9d34dDd",
"method": "transfer",
"parameters": ["0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22", "10000"]
},
{
"abi": [
{
"constant": False,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [],
"payable": False,
"stateMutability": "nonpayable",
"type": "function"
}
],
"address": "0x337610d27c682E347C9cD60BD4b3b107C9d34dDd",
"method": "transfer",
"parameters": ["0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22", "10000"]
}
] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
calls: [
{
abi: [
{
constant: false,
inputs: [{name: '_to', type: 'address'}, {name: '_value', type: 'uint256'}],
name: 'transfer',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
}
],
address: '0x337610d27c682E347C9cD60BD4b3b107C9d34dDd',
method: 'transfer',
parameters: ['0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22', '10000']
},
{
abi: [
{
constant: false,
inputs: [{name: '_to', type: 'address'}, {name: '_value', type: 'uint256'}],
name: 'transfer',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
}
],
address: '0x337610d27c682E347C9cD60BD4b3b107C9d34dDd',
method: 'transfer',
parameters: ['0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22', '10000']
}
]
})
};
fetch('https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/contracts/write', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/contracts/write",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'calls' => [
[
'abi' => [
[
'constant' => false,
'inputs' => [
[
'name' => '_to',
'type' => 'address'
],
[
'name' => '_value',
'type' => 'uint256'
]
],
'name' => 'transfer',
'outputs' => [
],
'payable' => false,
'stateMutability' => 'nonpayable',
'type' => 'function'
]
],
'address' => '0x337610d27c682E347C9cD60BD4b3b107C9d34dDd',
'method' => 'transfer',
'parameters' => [
'0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22',
'10000'
]
],
[
'abi' => [
[
'constant' => false,
'inputs' => [
[
'name' => '_to',
'type' => 'address'
],
[
'name' => '_value',
'type' => 'uint256'
]
],
'name' => 'transfer',
'outputs' => [
],
'payable' => false,
'stateMutability' => 'nonpayable',
'type' => 'function'
]
],
'address' => '0x337610d27c682E347C9cD60BD4b3b107C9d34dDd',
'method' => 'transfer',
'parameters' => [
'0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22',
'10000'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/contracts/write"
payload := strings.NewReader("{\n \"calls\": [\n {\n \"abi\": [\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"name\": \"_to\",\n \"type\": \"address\"\n },\n {\n \"name\": \"_value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [],\n \"payable\": false,\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ],\n \"address\": \"0x337610d27c682E347C9cD60BD4b3b107C9d34dDd\",\n \"method\": \"transfer\",\n \"parameters\": [\n \"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22\",\n \"10000\"\n ]\n },\n {\n \"abi\": [\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"name\": \"_to\",\n \"type\": \"address\"\n },\n {\n \"name\": \"_value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [],\n \"payable\": false,\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ],\n \"address\": \"0x337610d27c682E347C9cD60BD4b3b107C9d34dDd\",\n \"method\": \"transfer\",\n \"parameters\": [\n \"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22\",\n \"10000\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/contracts/write")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"calls\": [\n {\n \"abi\": [\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"name\": \"_to\",\n \"type\": \"address\"\n },\n {\n \"name\": \"_value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [],\n \"payable\": false,\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ],\n \"address\": \"0x337610d27c682E347C9cD60BD4b3b107C9d34dDd\",\n \"method\": \"transfer\",\n \"parameters\": [\n \"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22\",\n \"10000\"\n ]\n },\n {\n \"abi\": [\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"name\": \"_to\",\n \"type\": \"address\"\n },\n {\n \"name\": \"_value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [],\n \"payable\": false,\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ],\n \"address\": \"0x337610d27c682E347C9cD60BD4b3b107C9d34dDd\",\n \"method\": \"transfer\",\n \"parameters\": [\n \"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22\",\n \"10000\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/contracts/write")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"calls\": [\n {\n \"abi\": [\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"name\": \"_to\",\n \"type\": \"address\"\n },\n {\n \"name\": \"_value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [],\n \"payable\": false,\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ],\n \"address\": \"0x337610d27c682E347C9cD60BD4b3b107C9d34dDd\",\n \"method\": \"transfer\",\n \"parameters\": [\n \"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22\",\n \"10000\"\n ]\n },\n {\n \"abi\": [\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"name\": \"_to\",\n \"type\": \"address\"\n },\n {\n \"name\": \"_value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [],\n \"payable\": false,\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ],\n \"address\": \"0x337610d27c682E347C9cD60BD4b3b107C9d34dDd\",\n \"method\": \"transfer\",\n \"parameters\": [\n \"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22\",\n \"10000\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"amlScreening": null,
"amountPaid": null,
"assetSwept": null,
"assetSweptAmount": null,
"assetSweptAt": null,
"assetSweptGasFee": null,
"assetSweptHash": null,
"assetSweptRecipientAddress": null,
"assetSweptResponse": null,
"assetSweptSenderAddress": null,
"blockHash": null,
"blockNumber": null,
"blockchain": {
"createdAt": "2024-05-14T17:53:33.106Z",
"derivationPath": "m/44'/60'/0'/0",
"id": "b80d3d5e-16f1-4d99-be5e-6dfcd27f89aa",
"isActive": true,
"isEvmCompatible": true,
"isL2": false,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800080/crypto-assets/bnb-bnb-logo_e4qdyk.png",
"name": "BNB smart chain",
"slug": "bnb-smart-chain",
"symbol": "bnb",
"tokenStandard": "BEP20",
"updatedAt": "2024-11-26T19:04:13.941Z"
},
"chainId": null,
"confirmations": null,
"confirmed": false,
"createdAt": "2025-01-15T21:17:24.013Z",
"currency": null,
"fee": null,
"feeMetadata": null,
"gasFee": null,
"gasPrice": null,
"gasUsed": null,
"hash": null,
"id": "42e94af1-1b8c-47fd-9250-276a3c8a3a71",
"metadata": null,
"network": "testnet",
"note": null,
"reason": "{\"method\":\"transfer\",\"parameters\":[\"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22\",\"100000\"],\"abi\":{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}}",
"recipientAddress": "0x337610d27c682E347C9cD60BD4b3b107C9d34dDd",
"response": null,
"senderAddress": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
"status": "PENDING",
"tokenAddress": "0x337610d27c682E347C9cD60BD4b3b107C9d34dDd",
"type": "CUSTOM_SMART_CONTRACT",
"updatedAt": "2025-01-15T21:17:24.013Z",
"wallet": {
"address": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
"business": {
"id": "4b96c271-35eb-45e8-b558-6a53f95df601",
"name": "Test One Inc"
},
"createdAt": "2024-08-22T15:29:11.387Z",
"derivationPath": "m/44'/60'/0'/0/0",
"description": "This is BNB smart chain testnet master wallet",
"id": "4465468a-3c36-4536-918a-91d689e18a74",
"isActive": true,
"name": "BNB smart chain Master Wallet",
"network": "testnet",
"status": "ACTIVE",
"updatedAt": "2024-10-30T13:11:56.221Z"
}
},
"message": "Contract write initiated successfully",
"statusCode": 200
}Child Address Write
This API provides endpoints for interacting with smart contracts on the blockchain. It allows for executing contract functions.
Request Body
The request body should be in raw format and include the following parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| address | string | Yes | The address of the contract. |
| method | string | Yes | The method to be called on the contract. |
| parameters | array | Yes | An array of parameters to pass to the method. |
| abi | array | Yes | An array containing the ABI of the contract or method. |
POST
/
v1
/
wallets
/
{walletId}
/
addresses
/
{addressId}
/
contracts
/
write
Child Address Write
curl --request POST \
--url https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/contracts/write \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"calls": [
{
"abi": [
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"address": "0x337610d27c682E347C9cD60BD4b3b107C9d34dDd",
"method": "transfer",
"parameters": [
"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22",
"10000"
]
},
{
"abi": [
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"address": "0x337610d27c682E347C9cD60BD4b3b107C9d34dDd",
"method": "transfer",
"parameters": [
"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22",
"10000"
]
}
]
}
'import requests
url = "https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/contracts/write"
payload = { "calls": [
{
"abi": [
{
"constant": False,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [],
"payable": False,
"stateMutability": "nonpayable",
"type": "function"
}
],
"address": "0x337610d27c682E347C9cD60BD4b3b107C9d34dDd",
"method": "transfer",
"parameters": ["0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22", "10000"]
},
{
"abi": [
{
"constant": False,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [],
"payable": False,
"stateMutability": "nonpayable",
"type": "function"
}
],
"address": "0x337610d27c682E347C9cD60BD4b3b107C9d34dDd",
"method": "transfer",
"parameters": ["0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22", "10000"]
}
] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
calls: [
{
abi: [
{
constant: false,
inputs: [{name: '_to', type: 'address'}, {name: '_value', type: 'uint256'}],
name: 'transfer',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
}
],
address: '0x337610d27c682E347C9cD60BD4b3b107C9d34dDd',
method: 'transfer',
parameters: ['0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22', '10000']
},
{
abi: [
{
constant: false,
inputs: [{name: '_to', type: 'address'}, {name: '_value', type: 'uint256'}],
name: 'transfer',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
}
],
address: '0x337610d27c682E347C9cD60BD4b3b107C9d34dDd',
method: 'transfer',
parameters: ['0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22', '10000']
}
]
})
};
fetch('https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/contracts/write', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/contracts/write",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'calls' => [
[
'abi' => [
[
'constant' => false,
'inputs' => [
[
'name' => '_to',
'type' => 'address'
],
[
'name' => '_value',
'type' => 'uint256'
]
],
'name' => 'transfer',
'outputs' => [
],
'payable' => false,
'stateMutability' => 'nonpayable',
'type' => 'function'
]
],
'address' => '0x337610d27c682E347C9cD60BD4b3b107C9d34dDd',
'method' => 'transfer',
'parameters' => [
'0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22',
'10000'
]
],
[
'abi' => [
[
'constant' => false,
'inputs' => [
[
'name' => '_to',
'type' => 'address'
],
[
'name' => '_value',
'type' => 'uint256'
]
],
'name' => 'transfer',
'outputs' => [
],
'payable' => false,
'stateMutability' => 'nonpayable',
'type' => 'function'
]
],
'address' => '0x337610d27c682E347C9cD60BD4b3b107C9d34dDd',
'method' => 'transfer',
'parameters' => [
'0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22',
'10000'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/contracts/write"
payload := strings.NewReader("{\n \"calls\": [\n {\n \"abi\": [\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"name\": \"_to\",\n \"type\": \"address\"\n },\n {\n \"name\": \"_value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [],\n \"payable\": false,\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ],\n \"address\": \"0x337610d27c682E347C9cD60BD4b3b107C9d34dDd\",\n \"method\": \"transfer\",\n \"parameters\": [\n \"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22\",\n \"10000\"\n ]\n },\n {\n \"abi\": [\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"name\": \"_to\",\n \"type\": \"address\"\n },\n {\n \"name\": \"_value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [],\n \"payable\": false,\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ],\n \"address\": \"0x337610d27c682E347C9cD60BD4b3b107C9d34dDd\",\n \"method\": \"transfer\",\n \"parameters\": [\n \"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22\",\n \"10000\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/contracts/write")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"calls\": [\n {\n \"abi\": [\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"name\": \"_to\",\n \"type\": \"address\"\n },\n {\n \"name\": \"_value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [],\n \"payable\": false,\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ],\n \"address\": \"0x337610d27c682E347C9cD60BD4b3b107C9d34dDd\",\n \"method\": \"transfer\",\n \"parameters\": [\n \"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22\",\n \"10000\"\n ]\n },\n {\n \"abi\": [\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"name\": \"_to\",\n \"type\": \"address\"\n },\n {\n \"name\": \"_value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [],\n \"payable\": false,\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ],\n \"address\": \"0x337610d27c682E347C9cD60BD4b3b107C9d34dDd\",\n \"method\": \"transfer\",\n \"parameters\": [\n \"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22\",\n \"10000\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}/contracts/write")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"calls\": [\n {\n \"abi\": [\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"name\": \"_to\",\n \"type\": \"address\"\n },\n {\n \"name\": \"_value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [],\n \"payable\": false,\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ],\n \"address\": \"0x337610d27c682E347C9cD60BD4b3b107C9d34dDd\",\n \"method\": \"transfer\",\n \"parameters\": [\n \"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22\",\n \"10000\"\n ]\n },\n {\n \"abi\": [\n {\n \"constant\": false,\n \"inputs\": [\n {\n \"name\": \"_to\",\n \"type\": \"address\"\n },\n {\n \"name\": \"_value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [],\n \"payable\": false,\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ],\n \"address\": \"0x337610d27c682E347C9cD60BD4b3b107C9d34dDd\",\n \"method\": \"transfer\",\n \"parameters\": [\n \"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22\",\n \"10000\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"amlScreening": null,
"amountPaid": null,
"assetSwept": null,
"assetSweptAmount": null,
"assetSweptAt": null,
"assetSweptGasFee": null,
"assetSweptHash": null,
"assetSweptRecipientAddress": null,
"assetSweptResponse": null,
"assetSweptSenderAddress": null,
"blockHash": null,
"blockNumber": null,
"blockchain": {
"createdAt": "2024-05-14T17:53:33.106Z",
"derivationPath": "m/44'/60'/0'/0",
"id": "b80d3d5e-16f1-4d99-be5e-6dfcd27f89aa",
"isActive": true,
"isEvmCompatible": true,
"isL2": false,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800080/crypto-assets/bnb-bnb-logo_e4qdyk.png",
"name": "BNB smart chain",
"slug": "bnb-smart-chain",
"symbol": "bnb",
"tokenStandard": "BEP20",
"updatedAt": "2024-11-26T19:04:13.941Z"
},
"chainId": null,
"confirmations": null,
"confirmed": false,
"createdAt": "2025-01-15T21:17:24.013Z",
"currency": null,
"fee": null,
"feeMetadata": null,
"gasFee": null,
"gasPrice": null,
"gasUsed": null,
"hash": null,
"id": "42e94af1-1b8c-47fd-9250-276a3c8a3a71",
"metadata": null,
"network": "testnet",
"note": null,
"reason": "{\"method\":\"transfer\",\"parameters\":[\"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22\",\"100000\"],\"abi\":{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}}",
"recipientAddress": "0x337610d27c682E347C9cD60BD4b3b107C9d34dDd",
"response": null,
"senderAddress": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
"status": "PENDING",
"tokenAddress": "0x337610d27c682E347C9cD60BD4b3b107C9d34dDd",
"type": "CUSTOM_SMART_CONTRACT",
"updatedAt": "2025-01-15T21:17:24.013Z",
"wallet": {
"address": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
"business": {
"id": "4b96c271-35eb-45e8-b558-6a53f95df601",
"name": "Test One Inc"
},
"createdAt": "2024-08-22T15:29:11.387Z",
"derivationPath": "m/44'/60'/0'/0/0",
"description": "This is BNB smart chain testnet master wallet",
"id": "4465468a-3c36-4536-918a-91d689e18a74",
"isActive": true,
"name": "BNB smart chain Master Wallet",
"network": "testnet",
"status": "ACTIVE",
"updatedAt": "2024-10-30T13:11:56.221Z"
}
},
"message": "Contract write initiated successfully",
"statusCode": 200
}Batch Operations
This endpoint supports batch operations, allowing you to execute multiple contract write operations from a specific child address in a single API call.Batch Request Format
To execute multiple writes, use thecalls array:
{
"calls": [
{
"address": "0xTokenContract...",
"method": "approve",
"parameters": ["0xSpender...", "1000000000000000000"],
"abi": [...],
"reference": "approve-tx",
"metadata": { "step": "approval" }
},
{
"address": "0xProtocolContract...",
"method": "deposit",
"parameters": ["1000000000000000000"],
"abi": [...],
"reference": "deposit-tx",
"metadata": { "step": "deposit" }
}
],
"code": "123456"
}
Batch Response Format
Batch responses includesuccess and errors arrays:
{
"message": "Batch contract write initiated successfully",
"statusCode": 200,
"data": {
"success": [
{ "id": "tx-uuid-1", "hash": "0x...", "status": "pending", "reference": "approve-tx" },
{ "id": "tx-uuid-2", "hash": "0x...", "status": "pending", "reference": "deposit-tx" }
],
"errors": []
}
}
Batch Call Item Schema
| Parameter | Type | Required | Description |
|---|---|---|---|
| address | string | Yes | Smart contract address |
| method | string | Yes | Method name to call |
| parameters | array | No | Method parameters (defaults to []) |
| abi | array | Yes | Contract ABI |
| reference | string | No | Custom reference for tracking |
| metadata | object | No | Custom metadata |
Error Handling
Batch operations use a partial success pattern:- Operations are executed sequentially
- A failure in one operation does not stop subsequent operations
- Check both
successanderrorsarrays to determine overall result
Validation Rules
| Rule | Value |
|---|---|
| Max batch size | 20 operations |
| Min batch size | 1 operation |
| 2FA required | Yes |
Use Cases
- Approve + Deposit: Approve token spending then deposit in one call
- Multi-step transactions: Chain multiple contract calls for DeFi operations
- Protocol interactions: Execute complex protocol interactions atomically
Authorizations
Path Parameters
Example:
"YOUR_WALLET_ID"
Example:
"ADDRESS_ID"
Body
application/json
Show child attributes
Show child attributes
Example:
[
{
"abi": [
{
"constant": false,
"inputs": [
{ "name": "_to", "type": "address" },
{ "name": "_value", "type": "uint256" }
],
"name": "transfer",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"address": "0x337610d27c682E347C9cD60BD4b3b107C9d34dDd",
"method": "transfer",
"parameters": [
"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22",
"10000"
]
},
{
"abi": [
{
"constant": false,
"inputs": [
{ "name": "_to", "type": "address" },
{ "name": "_value", "type": "uint256" }
],
"name": "transfer",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"address": "0x337610d27c682E347C9cD60BD4b3b107C9d34dDd",
"method": "transfer",
"parameters": [
"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22",
"10000"
]
}
]⌘I

