Docs Icon ChevronRight For Developers Icon ChevronRight ABIs

ABIs

Get ABI of contract ID

To get the ABI of a contract ID use the getAbi('contractId') method on the window.fuel object.

Abi.tsx Icon Link
1const abiInfo = await fuel.getAbi(contractId);
2console.log("Abi ", abiInfo);

Adding ABI

To add Abi, use the wallet.addAbi method and pass in the AbiMap you want to add.

AddAbi.tsx Icon Link
1const abiMap: AbiMap = {
2  [contractId]: abi,
3};
4await fuel.addAbi(abiMap);