[go: up one dir, main page]

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-counter that reads the current state of the counter
  • Add a command increment-global-counter account that 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

Merge request reports

Loading