Return deployed contract's ABI
Return deployed contract’s ABI by blockchain native asset id and contract address. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, and Viewer.
GET
/
contract_interactions
/
base_asset_id
/
{baseAssetId}
/
contract_address
/
{contractAddress}
/
functions
TypeScript
const response: Promise<FireblocksResponse<ContractAbiResponseDto>> = fireblocks.contractInteractions.getDeployedContractAbi(contractInteractionsApiGetDeployedContractAbiRequest);CompletableFuture<ApiResponse<ContractAbiResponseDto>> response = fireblocks.contractInteractions().getDeployedContractAbi(contractAddress, baseAssetId, idempotencyKey);response = fireblocks.contract_interactions.get_deployed_contract_abi(contract_address, base_asset_id, idempotency_key);curl --request GET \
--url https://api.fireblocks.io/v1/contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functionsconst options = {method: 'GET'};
fetch('https://api.fireblocks.io/v1/contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions', 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.fireblocks.io/v1/contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fireblocks.io/v1/contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "implementation",
"type": "address"
},
{
"internalType": "bytes",
"name": "_data",
"type": "bytes"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
}
],
"implementationAbi": [
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "mint"
}
]
}{
"message": "<string>",
"code": 123
}Headers
A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.
Path Parameters
The contract's onchain address
The blockchain base assetId
Response
The abi of the contract
- Option 1
- Option 2
Show child attributes
Show child attributes
Example:
[
{
"inputs": [
{
"internalType": "address",
"name": "implementation",
"type": "address"
},
{
"internalType": "bytes",
"name": "_data",
"type": "bytes"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
}
]
The abi of the implementation contract if exists. Relevant only for proxy patterns
Show child attributes
Show child attributes
Example:
[
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "mint"
}
]
Was this page helpful?
Previous
Call a read function on a deployed contractCall a read function on a deployed contract by blockchain native asset id and contract address
Next
⌘I
TypeScript
const response: Promise<FireblocksResponse<ContractAbiResponseDto>> = fireblocks.contractInteractions.getDeployedContractAbi(contractInteractionsApiGetDeployedContractAbiRequest);CompletableFuture<ApiResponse<ContractAbiResponseDto>> response = fireblocks.contractInteractions().getDeployedContractAbi(contractAddress, baseAssetId, idempotencyKey);response = fireblocks.contract_interactions.get_deployed_contract_abi(contract_address, base_asset_id, idempotency_key);curl --request GET \
--url https://api.fireblocks.io/v1/contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functionsconst options = {method: 'GET'};
fetch('https://api.fireblocks.io/v1/contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions', 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.fireblocks.io/v1/contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fireblocks.io/v1/contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "implementation",
"type": "address"
},
{
"internalType": "bytes",
"name": "_data",
"type": "bytes"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
}
],
"implementationAbi": [
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "mint"
}
]
}{
"message": "<string>",
"code": 123
}