Constants are evaluated at deployment time and remain immutable. They commonly define error codes and contract administrators.
clarity (define-constant ERR_UNAUTHORIZED (err u100)) (define-constant OWNER tx-sender)
100 XP to Apprentice
Immutable values bound at deployment.
AI translates the explanation and quiz text while preserving code and answer scoring.
Constants are evaluated at deployment time and remain immutable. They commonly define error codes and contract administrators.
clarity (define-constant ERR_UNAUTHORIZED (err u100)) (define-constant OWNER tx-sender)
1. Can a constant be updated after deployment?
2. What is a common use for constants?