Created
August 18, 2019 13:19
-
-
Save crazyrabbitLTC/cd2c335842d31bb4e8c68ce97f1c5a97 to your computer and use it in GitHub Desktop.
GSN Enabled Solidity Contract
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.5.0; | |
| import "@openzeppelin/contracts-ethereum-package/contracts/GSN/GSNRecipient.sol"; | |
| contract Counter is GSNRecipient { | |
| uint256 public value; | |
| function increase() public { | |
| value += 1; | |
| } | |
| function acceptRelayedCall( | |
| address relay, | |
| address from, | |
| bytes calldata encodedFunction, | |
| uint256 transactionFee, | |
| uint256 gasPrice, | |
| uint256 gasLimit, | |
| uint256 nonce, | |
| bytes calldata approvalData, | |
| uint256 maxPossibleCharge | |
| ) external view returns (uint256, bytes memory) { | |
| return _approveRelayedCall(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment