Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compatibility with solc 0.6.6 #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/base.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion src/token.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down