Created
February 8, 2022 18:15
-
-
Save MCarlomagno/05e73e32f8919e42746a3d39600946b3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity >=0.7.0 <0.9.0; | |
import "github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.3/contracts/cryptography/ECDSA.sol"; | |
import "github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.3/contracts/utils/ReentrancyGuard.sol"; | |
contract UniDirectionalPaymentChannel is ReentrancyGuard { | |
using ECDSA for bytes32; | |
address payable public sender; | |
address payable public receiver; | |
constructor(address payable _receiver) payable { | |
require(_receiver != address(0), "receiver = zero address"); | |
sender = msg.sender; | |
receiver = _receiver; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment