What
All three contracts (learn-token, credential-nft, progress-tracker) allow transfer_admin to transfer admin rights to the zero address, which would permanently brick the contract.
Why
If admin is transferred to the zero address (accidentally or maliciously), no further admin operations will be possible — no minting, no course creation, no credential revocation, no progress-tracker updates. The contract becomes permanently admin-less with no recovery path.
Scope
- Add zero-address validation to
transfer_admin in all three contracts
- Return a clear error message if zero address is provided
- Add tests verifying the rejection
Technical Context
- Files:
contracts/learn-token/src/lib.rs (~line 470)
contracts/credential-nft/src/lib.rs (~line 270)
contracts/progress-tracker/src/lib.rs (~line 603)
- Zero address in Soroban:
Address::from_string(&SorobanString::from_str(&env, "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF"))
Acceptance Criteria
What
All three contracts (
learn-token,credential-nft,progress-tracker) allowtransfer_adminto transfer admin rights to the zero address, which would permanently brick the contract.Why
If admin is transferred to the zero address (accidentally or maliciously), no further admin operations will be possible — no minting, no course creation, no credential revocation, no progress-tracker updates. The contract becomes permanently admin-less with no recovery path.
Scope
transfer_adminin all three contractsTechnical Context
contracts/learn-token/src/lib.rs(~line 470)contracts/credential-nft/src/lib.rs(~line 270)contracts/progress-tracker/src/lib.rs(~line 603)Address::from_string(&SorobanString::from_str(&env, "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF"))Acceptance Criteria
transfer_adminpanics with a clear error when called with zero address