Log type with logId 'xxxxx' doesnt't exist in the ABI

I know already exist similar question, but let me ask it because I can’t solve it.
I ran the script below and it worked fine.
However, as soon as I perform a SUPPLY or BORROW on that account, I get the title error.
No doubt because I have changed accounts many times and performed the same operation.

  const userAddress = Address.fromString('0xABCxxxxxxxxxxx');
  const addressInput = { bits: userAddress.toB256() };
  const identityAddress = { Address: addressInput };

  const liquidationResult = await contract.functions.is_liquidatable(identityAddress).get();
  console.log("Is Liquidatable:", liquidationResult.value);

By the way, when I run it with addContract, I get the following error.

TypeError: contract.functions.is_liquidatable(…).addContract is not a function

Can someone help me with this issue?
Thanks for reading this far.

1 Like

Hey @doronumakun :wave:

Sorry to hear about this.

I assume if you’re trying to add a contract then you’re making a call from your contract to another contract (an inter-contract call). If that assumption is correct, the we have the following documentation.

By the way, when I run it with addContract, I get the following error.

TypeError: contract.functions.is_liquidatable(…).addContract is not a function

This will be because the method name is addContracts (see docs above). This will take a contract instance which you should be able to initialise given you have the contract address and ABI.

2 Likes