Skip to content

Commit

Permalink
documenting INITIALIZATION_SLOT_SEPARATOR
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Feb 26, 2024
1 parent 03adebc commit 431a755
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ global FUNCTION_SELECTOR_NUM_BYTES: Field = 4;
global NUM_FIELDS_PER_SHA256: Field = 2;
global ARGS_HASH_CHUNK_LENGTH: u32 = 32;
global ARGS_HASH_CHUNK_COUNT: u32 = 32;
// The following is used in immutable state variables to compute an initialization slot whose value is used to
// determine whether a given variable has been initialized (by asserting that the value in the slot is 0).
// The initialization slot is computed by adding the constant bellow to the variable's storage slot. This constant has
// to be large enough so that it's ensured that it doesn't collide with storage slots of other variables.
global INITIALIZATION_SLOT_SEPARATOR: Field = 1000;

// CONTRACT CLASS CONSTANTS
Expand Down

0 comments on commit 431a755

Please sign in to comment.