Skip to content

State Management examples #44

Description

@KyrylR

It would be nice to reorganise Simplicity contracts that work with state via Taproot.

Currently, they are just in the contracts repository. I would suggest keeping them under the state_management folder, or something similar.

Also, right now we have four different storage examples:

  1. Asset-based storage
  2. Taproot storage when we need to store up to 256 bits of data
  3. Storage where we have witness::STATE_1, witness::STATE_2, etc. (array-based storage)
  4. Storage where we store the root of the Merkle tree, and then use Merkle tree proofs to read/update storage

The bytes32 storage already works, though MT-based and array-based (both Taproot storages) are under review.

Eventually, what we want to have is a structure with documentation, helper functions, and examples to help others understand how to work with it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions