ContractsResource
Access via urblock.contracts.
Browse the public ABI registry. Every contract standard deployed through the platform has its full ABI available — use them with ethers.js, viem, or any client.
Methods
listAbis(params?)
List all available ABIs, optionally filtered by standard.
| Parameter | Type | Required | Description |
|---|---|---|---|
standard | string | No | Filter by standard (e.g., erc20, trex, confidential) |
// All ABIs
const all = await urblock.contracts.listAbis();
console.log(`${all.data.length} ABIs available`);
// Filter by standard
const trex = await urblock.contracts.listAbis({ standard: "trex" });
Returns: ListResponse<AbiEntry>
getAbi(name)
Get a single ABI by its registry name.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | ABI name (e.g., erc20, governor, trex) |
const erc20 = await urblock.contracts.getAbi("erc20");
// Use with ethers.js
import { Contract } from "ethers";
const token = new Contract(address, erc20.abi, signer);
const balance = await token.balanceOf(owner);
Returns: AbiEntry
Available ABIs
See Contracts & ABIs API Reference for the full list of 36 available ABIs covering ERC-20, ERC-721, ERC-1155, Governor, Timelock, T-REX, fhEVM confidential tokens, and more.