bcnmy / scw-contracts

SCW contracts for Biconomy Smart Account
MIT License
115 stars 82 forks source link

Added: Recovery counter, flow change, changeGuardianParams issue #185

Closed filmakarov closed 8 months ago

filmakarov commented 9 months ago

Summary

changeGuardianParams issue

Fixed issue with 'changeGuardianParams' could be added by SA to also add guardians leading to inconsistency of guardiansCount.

Recoveries limitation

Added recoveriesLeft counter. Now, only user-defined # of recoveries can happen. After this, no userOps can be validated, so the user may reset the module and set new guardians. To achieve this, it is required to change the flow of how recovery request is executed:

Also, the module now checks that the recovery request uses executeRecovery. Requests that do not use executeRecovery are not allowed.

Reset Module

resetModule method was introduced. It still requires to provide guardians from off-chain. Otherwise, it would require storing them in a mapping, which is ugly. In any case, all the guardians are available through events.

Tests

The according changes were made to the test suite.

Related Issue: #SMA-28

Change Type

Checklist

linear[bot] commented 9 months ago

SMA-28 Account Recovery Kawach

livingrockrises commented 9 months ago

what is defined as recoverer.RecoveryMethod?

filmakarov commented 9 months ago

do not merge please, may need slight improvement before merging as per Zellic notes

livingrockrises commented 8 months ago

do not merge please, may need slight improvement before merging as per Zellic notes

let us know here once all improvements are pushed.

filmakarov commented 8 months ago

do not merge please, may need slight improvement before merging as per Zellic notes

let us know here once all improvements are pushed.

all improvements are pushed, waiting for the confirmation from Zellic that all good

filmakarov commented 8 months ago

@livingrockrises can you review and approve please?