Fix the GSNBouncerERC20Fee token decimals to 18 (#1929)

* fix erc20 fee token decimals to 18

* lint

* Update contracts/GSN/bouncers/GSNBouncerERC20Fee.sol

Co-Authored-By: Nicolás Venturo <nicolas.venturo@gmail.com>

* change location of hardcoded decimals for clarity

* remove mention of decimals from docs

* remove trailing whitespace from guide

(cherry picked from commit b8ccf8e0f1)
This commit is contained in:
Francisco Giordano
2019-10-07 19:21:28 -03:00
parent 8026a8ae2e
commit 4f4d305784
4 changed files with 17 additions and 21 deletions

View File

@ -27,11 +27,10 @@ contract GSNBouncerERC20Fee is GSNBouncerBase {
__unstable__ERC20PrimaryAdmin private _token;
/**
* @dev The arguments to the constructor are the details that the gas payment token will have: `name`, `symbol`, and
* `decimals`.
* @dev The arguments to the constructor are the details that the gas payment token will have: `name` and `symbol`. `decimals` is hard-coded to 18.
*/
constructor(string memory name, string memory symbol, uint8 decimals) public {
_token = new __unstable__ERC20PrimaryAdmin(name, symbol, decimals);
constructor(string memory name, string memory symbol) public {
_token = new __unstable__ERC20PrimaryAdmin(name, symbol, 18);
}
/**

View File

@ -4,7 +4,7 @@ import "../GSN/GSNRecipient.sol";
import "../GSN/bouncers/GSNBouncerERC20Fee.sol";
contract GSNBouncerERC20FeeMock is GSNRecipient, GSNBouncerERC20Fee {
constructor(string memory name, string memory symbol, uint8 decimals) public GSNBouncerERC20Fee(name, symbol, decimals) {
constructor(string memory name, string memory symbol) public GSNBouncerERC20Fee(name, symbol) {
// solhint-disable-previous-line no-empty-blocks
}