State Variables
Defining Custom State
State Variable
Stackr allows rollupors to define their own custom state almost completely unrestricted in terms of what they can do with it
This is done by defining a StateVariable
and providing relevant types.
this could be as basic as a boolean or a single integer
or as complex as a full object with multiple properties and methods.
You can also rename the state variable to something more meaningful to your rollup.
But hey, that’s a constant 😉
State Transport
Once you have defined your state variable, you need to define how it is transported around.
StateTransport is just a wrapper around your state variable that allows you to define how it is transported around. It also helps in defining how it is stored and how the state root is calculated.
This transport can also be whatever you want it to be.
MerkleTree state is considered the most common state transport but Stackr allows you to define any crazy ideas that helps move state in most efficient format.