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({
  network: 'ETH',
  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.contractAddress);
console.log('Network:', contract.data.network);

getDeployedContractByAddress()

Get deployed contract details by contract address and network. Signature:
getDeployedContractByAddress(
  request: GetDeployedContractByAddressRequest,
  requestOptions?: RequestOptions
): Promise<DeployedContractResponse>
Parameters:
ParameterTypeRequiredDescription
request.contractAddressstringYesContract address
request.network'ETH' | 'tETH'YesBlockchain network
Example:
const contract = await client.deployedContracts.getDeployedContractByAddress({
  contractAddress: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
  network: 'ETH'
});

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',
  network: 'ETH'
});

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

addContractAbi()

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