Skip to main content

SDK — API Reference

All exports from @yellow-org/contracts.

ABIs

Each ABI is exported as a const array for full type inference with viem and wagmi.

import {
YellowTokenAbi,
NodeRegistryAbi,
AppRegistryAbi,
YellowGovernorAbi,
TimelockControllerAbi,
TreasuryAbi,
FaucetAbi,
ILockAbi,
ISlashAbi,
} from "@yellow-org/contracts";
ExportContractABI EntriesDescription
YellowTokenAbiYellowToken33ERC-20 + EIP-2612 permit
NodeRegistryAbiNodeRegistry48Staking + voting (ILock + IVotes)
AppRegistryAbiAppRegistry46Collateral + slashing (ILock + ISlash + AccessControl)
YellowGovernorAbiYellowGovernor98Governance (Governor + extensions)
TimelockControllerAbiTimelockController46Delayed execution
TreasuryAbiTreasury16Foundation vault
FaucetAbiFaucet16Testnet faucet
ILockAbiILock19Lock/unlock interface (shared by both registries)
ISlashAbiISlash4Slash interface

Interface ABIs

Use ILockAbi to write generic code that works with both NodeRegistry and AppRegistry:

import { ILockAbi } from "@yellow-org/contracts";

// Works with either registry
const balance = await client.readContract({
address: registryAddress,
abi: ILockAbi,
functionName: "balanceOf",
args: [userAddress],
});

Addresses

import { addresses, type ContractAddresses } from "@yellow-org/contracts";

addresses

Record<number, Partial<ContractAddresses>> — deployed addresses keyed by chain ID.

addresses[1]         // Ethereum Mainnet
addresses[11155111] // Sepolia

ContractAddresses type

type ContractAddresses = {
yellowToken: `0x${string}`;
nodeRegistry: `0x${string}`;
appRegistry: `0x${string}`;
governor: `0x${string}`;
timelock: `0x${string}`;
treasury: `0x${string}`;
faucet?: `0x${string}`; // testnet only
};

Current Addresses

See Deployed Addresses for the full list.