Skip to main content

Interface

Storage

variable organizer : address = @tz1NUKyDbQtSu4g1bgpwgvwqTeggbtKrNkdv
variable prize : tez = 10tz
constant oracle : key = "edpkv9k8WZNMyEMuLLVwQfGDqm4pfxSEkTmvgq5DakPUnNbNnQuB14"
constant noncelength : nat = 8
asset submission {
competitor : address;
score : nat;
timestamp : date;
}
states =
| Created initial
| InProgress
| Done
| Closed

Entry points

Confirm

transition confirm () {
called by organizer
from Created
to InProgress when { transferred = prize }
}

Submit

entry submit (packed_score : bytes, signed_score : signature) {
...
}

Decide

transition decide () {
called by organizer
from InProgress
to Done
with effect {
...
}
}