Clarity theorytheory 0/50 · 0%
State · easy

12. Constants (define-constant)

Immutable values defined at deployment.

Constants are set when the contract is deployed and cannot be changed later. They are often used for error codes or configuration.

clarity
(define-constant ERR_NOT_AUTHORIZED (err u100))

Check your understanding

  1. 1. Can a constant be changed after deployment?