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.