INTEGRATION

ABIs

How to obtain and use the ABIs of Ivy contracts.


Ivy contracts are verified on Kaia, so their ABIs are public.

#Where do I get an ABI?

  1. Open the address on kaiascan.io.
  2. Copy the full ABI from the Contract → Code / ABI tab.

You can do this for every address on the Contract Addresses page.

#The minimal ABI approach

Most of the time you do not need the full ABI, only the fragment for the function you call. viem and wagmi support this:

const ivyIdOfAbi = [{
  type: "function",
  name: "ivyIdOf",
  stateMutability: "view",
  inputs: [{name: "wallet", type: "address"}],
  outputs: [{type: "uint256"}],
}] as const;

Adding as const lets viem infer argument and return types automatically, giving you full type safety.

#Types

  • Amounts are in wei (1 KAIA = 10^18 wei). In viem use parseEther("0.5") and formatEther(value).
  • Identifiers (ivyId, token ids) are uint256bigint in JavaScript.
  • Post references are bytes32 → the keccak256 digest of the content.

Takıldığın bir yer mi var?

Teknik destek, entegrasyon ve ortaklık için ekibe ulaş: info@ivy.live

ABIs · Ivy Developers · Ivy