Skip to content

Instantly share code, notes, and snippets.

@yidongw
Created December 20, 2018 23:02
Show Gist options
  • Save yidongw/a911cdc407970b057d570bd87a90f657 to your computer and use it in GitHub Desktop.
Save yidongw/a911cdc407970b057d570bd87a90f657 to your computer and use it in GitHub Desktop.
Perun8
function VCClose(uint vid, uint cash1, uint cash2, uint version, bytes sig, bytes sigB) AliceOrBob public {
VirtualContract memory vc = virtual[vid];
require(vc.status == VCStatus.Closing);
require(msg.sender != vc.Ingrid);
vc.cashFinal1 = cash1;
vc.cashFinal2 = cash2;
require(CheckVersion(Other(msg.sender, vc.p1, vc.p2), msg.sender, vid, vc, version, sig, sigB));
EventVCClose(vid, cash1, cash2, version, sig, sigB); // smart contract is getting the info for Ingrid
vc.status = VCStatus.WaitingToClose;
virtual[vid] = vc;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment