From 453409188f384e6979ec6053b5faffd96052689b Mon Sep 17 00:00:00 2001 From: James Foley Date: Tue, 5 May 2020 16:22:50 -0700 Subject: [PATCH] compatibility with solc 0.6.6 --- src/base.sol | 12 +++++++----- src/token.sol | 3 ++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/base.sol b/src/base.sol index 4cf46d7..be41724 100644 --- a/src/base.sol +++ b/src/base.sol @@ -30,22 +30,24 @@ contract DSTokenBase is ERC20, DSMath { _supply = supply; } - function totalSupply() public view returns (uint) { + function totalSupply() public override view returns (uint) { return _supply; } - function balanceOf(address src) public view returns (uint) { + function balanceOf(address src) public override view returns (uint) { return _balances[src]; } - function allowance(address src, address guy) public view returns (uint) { + function allowance(address src, address guy) public override view returns (uint) { return _approvals[src][guy]; } - function transfer(address dst, uint wad) public returns (bool) { + function transfer(address dst, uint wad) public override returns (bool) { return transferFrom(msg.sender, dst, wad); } function transferFrom(address src, address dst, uint wad) public + override + virtual returns (bool) { if (src != msg.sender) { @@ -62,7 +64,7 @@ contract DSTokenBase is ERC20, DSMath { return true; } - function approve(address guy, uint wad) public returns (bool) { + function approve(address guy, uint wad) public override virtual returns (bool) { _approvals[msg.sender][guy] = wad; emit Approval(msg.sender, guy, wad); diff --git a/src/token.sol b/src/token.sol index fb43edc..2f4217f 100644 --- a/src/token.sol +++ b/src/token.sol @@ -37,12 +37,13 @@ contract DSToken is DSTokenBase(0), DSStop { return super.approve(guy, uint(-1)); } - function approve(address guy, uint wad) public stoppable returns (bool) { + function approve(address guy, uint wad) public override stoppable returns (bool) { return super.approve(guy, wad); } function transferFrom(address src, address dst, uint wad) public + override stoppable returns (bool) {