Files
openzeppelin-contracts/contracts/mocks/ERC20DecimalsMock.sol
Hadrien Croubois b840341a77 Remove the storage associated with decimals (#2502)
* Removing the storage associated with decimals

* changelog entry

* changelog link to new issue number

* Update contracts/token/ERC20/ERC20.sol

Co-authored-by: Francisco Giordano <frangio.1@gmail.com>

* Update contracts/token/ERC20/ERC20.sol

Co-authored-by: Francisco Giordano <frangio.1@gmail.com>

* Update CHANGELOG.md

Co-authored-by: Francisco Giordano <frangio.1@gmail.com>

Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
2021-02-04 20:06:00 +01:00

18 lines
417 B
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../token/ERC20/ERC20.sol";
contract ERC20DecimalsMock is ERC20 {
uint8 immutable private _decimals;
constructor (string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {
_decimals = decimals_;
}
function decimals() public view virtual override returns (uint8) {
return _decimals;
}
}