Skip to main content

Recovery method

If there's the possibility that the method being called to submit a mint will revert, then you should provide a recovery method so that the mint signature can still be redeemed.

The two options of doing this are:

  1. Accept all the same parameters as the main method, and then mint and forward the ren-asset to the user.
  2. Accept a pHash parameter to skip needing to calculate it in the contract, and then mint and forward the ren-asset to the user.
caution

A recovery method could be mis-used to prevent a user from calling the main method, so, if possible, such a recovery method should restrict the msg.sender to being the recipient specified in the parameters, if there is one.