I have a smart contract with a simple purpose. It has a function that takes an id
and an address
as input, performs checks based on the id
, and then transfers funds to the specified address.
However, for one of the transactions, it reverted with a panic. Sometimes it executes successfully, while other times it throws a panic and reverts.
How can I determine the exact reason for the contract’s panic ?
Here is the TypeScript code used to send the transaction:
contract.functions
.watch(sequenceNumber, receiver)
.txParams({
variableOutputs: 1,
})
.callParams({
forward: [parsedAmount, assetId.bits],
})
Here is the Panic Receipt
{
pc:"10384",
is:"10368",
reason:"589198682725810176",
receiptType:"PANIC"
}
Any insights on debugging this would be appreciated!