Several of the core Hyperdrive flows rely on Safe functions that will proactively catch arithmetic failures and return failure flags instead of reverting. After addressing Spearbit issue #55 in #812, it is now possible for arithmetic failures while casting to result in reversions in flows that we expect to always succeed.
Several changes need to be made to address this:
- Add a
powSafe variant that returns a failure flag instead of reverting when arithmetic issues occur.
- Add
to<X>Safe variants to the SafeCast functions that are currently being used with Safe functions.
- Ensure that these safe variants are being used within the
Safe functions used within Hyperdrive.