Hello everyone,
I’ve written a simple contract that calls the approve function on a SAC client.
I’m invoking this contract using the .NET SDK (though I believe the SDK is not the issue). With the exact same arguments, the invocation sometimes fails and sometimes succeeds.
At the start of the function, I have this:
address.require_auth();
and later:
client.approve(...)
and later, some small instance storage writes:
e.storage().instance().set(...
Here are the transaction hashes on testnet for reference:
Failed transaction hash: bc60124baae241537e4a21e8105bc662fb86c95e3a7bf52ca868fde55f479f4b
Successful transaction hash: e3d8c458f1514e3b5a01c8d59907b8af3e2e5dea5850d5e9e4b87348edee1bbe
One of the diagnostic events for the failed transaction indicates an Unauthorized function call for address error for the approve function. However, the address did sign the transaction, so I’m unsure if the error message is misleading or if I’m missing something.
Any suggestions on how to diagnose and resolve this issue would be greatly appreciated.
Thank you for your help!