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?
- Open the address on kaiascan.io.
- 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")andformatEther(value). - Identifiers (
ivyId, token ids) areuint256→bigintin JavaScript. - Post references are
bytes32→ thekeccak256digest of the content.
Takıldığın bir yer mi var?
Teknik destek, entegrasyon ve ortaklık için ekibe ulaş: info@ivy.live