Draft: Incrementable global counter
This is a toy exercise for extending the protocol with:
-
Extend the context with a global counter -
Introduce a new operation for incrementing the counter -
Add a command get global-counterthat reads the current state of the counter -
Add a command increment-global-counter accountthat updates the current value of the counter -
Add a Michelson instruction INCREMENT_GLOBAL_COUNTER -
Add tests
Example michelson script for updating:
parameter string;
storage string; code {CAR; NIL operation; INCREMENT_GLOBAL_COUNTER; CONS; PAIR; };
Edited by Joel Bjornson