What
Several functions, types, and constants are defined but never referenced anywhere in the codebase.
Why
Dead code increases maintenance burden, confuses contributors, and may mask incomplete implementations. Removing it keeps the codebase clean and makes the actual API surface clear.
Scope
Remove the following:
get_progress_client helper function in learn-token — never called
EnrollmentStatus enum in packages/shared/src/constants.rs — never used
TOKEN_DECIMALS constant in packages/shared/src/constants.rs — never imported or used
Technical Context
- File:
contracts/learn-token/src/lib.rs (lines ~587-590) — get_progress_client
- File:
packages/shared/src/constants.rs (lines ~55-62) — EnrollmentStatus, TOKEN_DECIMALS
claim_reward uses env.invoke_contract directly instead of get_progress_client
Acceptance Criteria
What
Several functions, types, and constants are defined but never referenced anywhere in the codebase.
Why
Dead code increases maintenance burden, confuses contributors, and may mask incomplete implementations. Removing it keeps the codebase clean and makes the actual API surface clear.
Scope
Remove the following:
get_progress_clienthelper function inlearn-token— never calledEnrollmentStatusenum inpackages/shared/src/constants.rs— never usedTOKEN_DECIMALSconstant inpackages/shared/src/constants.rs— never imported or usedTechnical Context
contracts/learn-token/src/lib.rs(lines ~587-590) —get_progress_clientpackages/shared/src/constants.rs(lines ~55-62) —EnrollmentStatus,TOKEN_DECIMALSclaim_rewardusesenv.invoke_contractdirectly instead ofget_progress_clientAcceptance Criteria
cargo checkpasses with no errorscargo testpasses — no tests depend on removed code