Skip to content

Instantly share code, notes, and snippets.

@xhliu
Last active Apr 16, 2021
Embed
What would you like to do?
ct
contract CoinToss {
// same as before ...
public function toss(bytes aliceNonce, bytes bobNonce, Sig sig) {
// same as before ...
}
public function forfeit(Sig aliceSig, Sig bobSig) {
require(checkSig(aliceSig, this.alice));
require(checkSig(bobSig, this.bob));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment