1.1.1 Add Admin

Add Admin Step-by-Step Test Guide

Registers a new admin account. Ensures the caller has the configured whitelist origin, checks the account is not already registered, inserts it into AdminAccounts storage, emits AdminRegistered event, and returns Ok.

  1. Go to Developer → Extrinsics.

  2. In “Account”, select Sudo/Root account (e.g., Alice).

  3. Under “submit the following extrinsic”, choose sudo.

  4. Under “Call”, select sudoUncheckedWeight.

  5. In the parameters, choose:

    • call: select xcavateWhitelist → add_admin.

    • admin: type the account to add.

    • weight: set as default or leave blank.

  6. Click Submit Transaction → Sign and Submit.

  1. After clicking sign and submit, a green tick will appear at the top right hand corner

Check result:

  • Go to Developer → (1) Chain State → (2) xcavateWhitelist → adminAccounts(account) → (3) Click + Query.

  • Should return Some((adminAccounts address)).

Last updated