Skip to content

Instantly share code, notes, and snippets.

@cwhinfrey
Created May 10, 2019 23:38
Show Gist options
  • Save cwhinfrey/5b7cf154130db80a0b36bed652183827 to your computer and use it in GitHub Desktop.
Save cwhinfrey/5b7cf154130db80a0b36bed652183827 to your computer and use it in GitHub Desktop.
Bouncer
pragma solidity ^0.5.8;
contract Channels {
function deposit(address _participant) public payable;
}
contract Bouncer {
Channels channelContract;
address participant;
constructor(Channels _channelContract, address _participant) public {
channelContract = _channelContract;
participant = _participant;
}
function() external payable {
channelContract.deposit.value(msg.value)(participant);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment