GSN compatibility (#1880)

* switch to using Context internally

* add context import

* Add smoke test to make sure enabling GSN support works

* Update test/GSN/ERC721GSNRecipientMock.test.js

Co-Authored-By: Francisco Giordano <frangio.1@gmail.com>

* Upgrade truffle

* add missing awaits

* Revert "Upgrade truffle"

This reverts commit f9b0ba9019.
This commit is contained in:
Nicolás Venturo
2019-08-14 09:21:38 -03:00
committed by Francisco Giordano
parent f095b62856
commit d1158ea68c
30 changed files with 645 additions and 108 deletions

View File

@ -1,5 +1,6 @@
pragma solidity ^0.5.0;
import "../GSN/Context.sol";
import "../token/ERC20/ERC20.sol";
import "../token/ERC20/ERC20Detailed.sol";
@ -9,12 +10,12 @@ import "../token/ERC20/ERC20Detailed.sol";
* Note they can later distribute these tokens as they wish using `transfer` and other
* `ERC20` functions.
*/
contract SimpleToken is ERC20, ERC20Detailed {
contract SimpleToken is Context, ERC20, ERC20Detailed {
/**
* @dev Constructor that gives msg.sender all of existing tokens.
* @dev Constructor that gives _msgSender() all of existing tokens.
*/
constructor () public ERC20Detailed("SimpleToken", "SIM", 18) {
_mint(msg.sender, 10000 * (10 ** uint256(decimals())));
_mint(_msgSender(), 10000 * (10 ** uint256(decimals())));
}
}