To get the ABI of a contract ID use the getAbi('contractId')
method on the window.fuel
object.
const abiInfo = await fuel.getAbi(contractId);
console.log("Abi ", abiInfo);
To add Abi, use the wallet.addAbi
method and pass in the AbiMap
you want to add.
const abiMap: AbiMap = {
[contractId]: abi,
};
await fuel.addAbi(abiMap);
* Input's initial contractId and ABI are from
SwaySwapWas this page helpful?