Skip to content

feat: new state variable initialization method #316

@cusma

Description

@cusma

We should generally have an initialization method to handle the init of new state variables. This general pattern would require a coherent solution, such as passing the new variable key and the initial value.

However, for this specific case, the request_id is just a counter to ensure uniqueness in the same Box Name space. We can use the same counter (and increment it) for both subscribe and unsubscribe request boxes. There is no need to add a more complex derivation.

If we want to take the opportunity to add the init_new_global_var method, we can do it. The method MUST be permissioned to the xgov_manager and MUST NOT init already existing variables (avoid accidental overwrite).

Originally posted by @cusma in #314 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions