We need to add an admin (God Mode) role to the contract to authorize privileged actions, such as minting. This issue focuses on implementing the initialization of the admin and the ability to update it securely.
Tasks
Definition of Done
Notes / Context
- The admin is the “God Mode” of the contract, responsible for privileged operations like minting tokens or pausing the contract in emergencies.
- Regular users cannot perform these actions.
- Ensure security checks are enforced properly to prevent unauthorized access.
We need to add an admin (God Mode) role to the contract to authorize privileged actions, such as minting. This issue focuses on implementing the initialization of the admin and the ability to update it securely.
Tasks
Implement
initialize(e: Env, admin: Address)Implement
update_admin(e: Env, new_admin: Address)e.call_stack().auth()to verify the caller.new_admin.Definition of Done
initializetwice fails.update_adminworks when signed by the admin, fails otherwise.Notes / Context