Skip to main content
Manage deployed smart contracts and contract ABIs.

Methods

getDeployedContracts()

Get a paginated list of deployed contracts. Signature:
getDeployedContracts(
  request?: GetDeployedContractsRequest,
  requestOptions?: RequestOptions
): Promise<DeployedContractsResponse>
Example:
const contracts = await client.deployedContracts.getDeployedContracts({
  networkId: 'your-network-id',
  skip: 0,
  take: 50
});

console.log('Deployed contracts:', contracts.data);

getDeployedContractById()

Get details for a specific deployed contract by deployment ID. Signature:
getDeployedContractById(
  deploymentId: string,
  requestOptions?: RequestOptions
): Promise<DeployedContractResponse>
Example:
const contract = await client.deployedContracts.getDeployedContractById('deployment-id');

console.log('Contract Address:', contract.data.deployedContract?.contractAddress);
console.log('Network:', contract.data.deployedContract?.network);

getDeployedContractByAddress()

Get deployed contract details by contract address and network. Signature:
getDeployedContractByAddress(
  contractAddress: string,
  networkId: string,
  requestOptions?: RequestOptions
): Promise<DeployedContractResponse>
Parameters:
ParameterTypeRequiredDescription
contractAddressstringYesContract address
networkIdstringYesNetwork ID (UUID from getNetworks())
Example:
const contract = await client.deployedContracts.getDeployedContractByAddress(
  '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
  'your-network-id'
);

fetchContractAbi()

Fetch contract ABI from a blockchain explorer. Signature:
fetchContractAbi(
  request: FetchContractAbiRequest,
  requestOptions?: RequestOptions
): Promise<ContractAbiResponse>
Example:
const abi = await client.deployedContracts.fetchContractAbi({
  contractAddress: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
  networkId: 'your-network-id'
});

console.log('ABI:', abi.data.contractAbi?.abi);

addContractAbi()

Add or update contract ABI manually. Signature:
addContractAbi(
  request: AddContractAbiRequest,
  requestOptions?: RequestOptions
): Promise<void>
Example:
await client.deployedContracts.addContractAbi({
  contractAddress: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
  networkId: 'your-network-id',
  name: 'MyContract',
  abi: [
    {
      "inputs": [],
      "name": "name",
      "outputs": [{"type": "string"}],
      "stateMutability": "view",
      "type": "function"
    }
  ]
});