Callback Debugging

Tips on debugging callback issues.

If you encounter an error in your contract after the data is proven and the callback is called, you can use the following tips to help you debug the potential issues.

It's always recommended to simulate the callback by calling your callback function (either via test or on a local fork) with the expected inputs. You may want to either disable the AxiomV2Query check or deploy a version of your contract that sets AxiomV2Query as an address that you control.

If you do run into a callback error, Axiom Explorer will still show the Query as CallbackFailed.

When you click on the Fulfill TxHash transaction hash, you'll see that there is an error. The error is in one of the Internal Transactions (likely the final one that calls the callback function on your contract).

To figure out the source of the error, you can get more information by clicking the Internal Transactions button at the top and then clicking More > Parity Trace at the top right.

Scroll all the way to the bottom. The Output box will be hidden by a "Show more" link, which you can click to reveal the box. Change the value from Hex to Text to read the revert information.

If you have an error in your callback wherein there is no output data for the revert (and you are using require with a revert string), there may be some EVM error at some point in your code that causes it to revert. Check that things like type conversions are done correctly.

Last updated