Skip to content

Instantly share code, notes, and snippets.

@bwbush
Created May 12, 2021 22:04
Show Gist options
  • Save bwbush/43e8a484492de0448c3b776d3b910e10 to your computer and use it in GitHub Desktop.
Save bwbush/43e8a484492de0448c3b776d3b910e10 to your computer and use it in GitHub Desktop.
PIGY Example
When
[Case
(Deposit
(Role "BOBS POOL")
(Role "BOBS POOL")
(Token "2aa9c1557fcf8e7caa049fa0911a8724a1cdaf8037fe0b431c6ac664" "PIGY")
(ConstantParam "reward")
)
(When
[Case
(Choice
(ChoiceId
"ALICE DELEGATED FOR 2 EPOCHS"
(Role "CHARLIE THE ORACLE")
)
[Bound 1 1]
)
(Pay
(Role "BOBS POOL")
(Party (Role "ALICE THE DELEGATOR"))
(Token "2aa9c1557fcf8e7caa049fa0911a8724a1cdaf8037fe0b431c6ac664" "PIGY")
(ConstantParam "reward")
Close
), Case
(Choice
(ChoiceId
"ALICE DELEGATED FOR 2 EPOCHS"
(Role "CHARLIE THE ORACLE")
)
[Bound 0 0]
)
Close ]
(SlotParam "how many slots to wait")
Close
)]
(SlotParam "how many slots to wait")
Close
{"valueParameterDescriptions":[],"slotParameterDescriptions":[],"roleDescriptions":[],"contractType":"O","contractName":"","contractDescription":"","choiceDescriptions":[]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment