The FlowNFT hooks were implemented wrapped in try/catch out of caution, because we don't want the whole tx to fail for any reason related to NFT minting/burning.
The intention was to have the same behaviour as SuperApp hooks: if the hook invocation reverts with outofgas, the whole tx should revert. If it reverts for other reasons, the tx should not revert.
Yet we see non-reverting transactions with the NFT hook reverting due to outofgas, for example this.
This is likely to happen due to the way geth gas estimation works: it does a binary search for the lower limit of gas required (see source).
AC
[ ] test case reproducing the issue, ideally by fuzzing
What & Why
The FlowNFT hooks were implemented wrapped in try/catch out of caution, because we don't want the whole tx to fail for any reason related to NFT minting/burning.
The intention was to have the same behaviour as SuperApp hooks: if the hook invocation reverts with outofgas, the whole tx should revert. If it reverts for other reasons, the tx should not revert.
Yet we see non-reverting transactions with the NFT hook reverting due to outofgas, for example this.
This is likely to happen due to the way geth gas estimation works: it does a binary search for the lower limit of gas required (see source).
AC