semaphore-protocol / semaphore

A zero-knowledge protocol for anonymous interactions.
https://semaphore.pse.dev
MIT License
910 stars 201 forks source link

two-step admin update #690

Closed 0xDatapunk closed 7 months ago

0xDatapunk commented 7 months ago

the best practice for updateGroupAdmin is through a two-step update: existing admin assign the new potential admin to a new address the new address accept the admin role. This is to avoid exisitng admin making a mistake and assign it to a wrong address

per @blockdev: You can take inspiration from ownable2step in OZ

https://github.com/semaphore-protocol/semaphore/blob/8eb19e83fda62644872b2fcfbd85011d3b2c21e2/packages/contracts/contracts/base/SemaphoreGroups.sol#L58