Skip to content

Instantly share code, notes, and snippets.

@entzik
Last active October 31, 2020 22:31
Show Gist options
  • Save entzik/b793416a95ef57c5d21521eea1e5e2c7 to your computer and use it in GitHub Desktop.
Save entzik/b793416a95ef57c5d21521eea1e5e2c7 to your computer and use it in GitHub Desktop.
nonconsuming choice Vote : ContractId Doodle
with
option: Text
controller voter
do
doodleContractId <- lookupByKey @Doodle (organizer, doodleName)
doodleContract <- fetch (fromSome doodleContractId)
assertMsg "this party does not own the doodle " (organizer == doodleContract.organizer)
exercise (fromSome doodleContractId) CastVote with voter = this.voter, option = option, inviteId = self
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment