Blockwell

DSToken

ERC20

This contract is an ERC20 token.

Name DSToken
Symbol MKR
Decimals 18
Total Supply 1,005,577 MKR

About link description

Maker (MKR) is a cryptocurrency and operates on the Ethereum platform. Maker has a current supply of 991,328.38195493. The last known price of Maker is 2,474.87137393 USD and is down -1.99 over the last 24 hours. It is currently trading on 217 active market(s) with $118,268,031.48 traded over the last 24 hours. More information can be found at https://makerdao.com/.

Stats

Public Functions 19
Event Types 7
Code Size 15,513 bytes

Events (7) keyboard_arrow_up

Approval Event

Parameters help
owner
address help
spender
address help
value
uint help

Burn Event

Parameters help
guy
address help
wad
uint help

LogNote Event

Parameters help
sig
bytes4 help
guy
address help
foo
bytes32 help
bar
bytes32 help
wad
uint help
fax
bytes help

LogSetAuthority Event

Parameters help
authority
address help

LogSetOwner Event

Parameters help
owner
address help

Mint Event

Parameters help
guy
address help
wad
uint help

Transfer Event

Parameters help
from
address help
to
address help
value
uint help

WAD Constant

uint help
UNKNOWN VALUE

RAY Constant

uint help
UNKNOWN VALUE

symbol Variable

bytes32 help

decimals Variable

uint256 help

name Variable

bytes32 help

stopped Variable

bool help

authority Variable

DSAuthority help

owner Variable

address help

_supply Variable

uint256 help
Internal Variable

_balances Variable

mapping(address => uint256) help
Internal Variable

_approvals Variable

mapping(address => mapping(address => uint256)) help
Internal Variable

Functions Expand All Collapse All

Parameters help

Name Type
owner_
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

auth checks for the following:
null
Source Code
function setOwner(address owner_) public auth {
  owner = owner_;
  LogSetOwner(owner);
}

Parameters help

Name Type
authority_
DSAuthority help

Properties

Visibility help public
Mutability help transaction

Modifiers help

auth checks for the following:
null
Source Code
function setAuthority(DSAuthority authority_) public auth {
  authority = authority_;
  LogSetAuthority(authority);
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Modifiers help

auth checks for the following:
null
note checks for the following:
Source Code
function stop() public auth note {
  stopped = true;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Modifiers help

auth checks for the following:
null
note checks for the following:
Source Code
function start() public auth note {
  stopped = false;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function totalSupply() public view returns (uint256) {
  return _supply;
}

Parameters help

Name Type
src
address help

Properties

Visibility help public
Mutability help view
Source Code
function balanceOf(address src) public view returns (uint256) {
  return _balances[src];
}

Parameters help

Name Type
src
address help
guy
address help

Properties

Visibility help public
Mutability help view
Source Code
function allowance(address src, address guy) public view returns (uint256) {
  return _approvals[src][guy];
}

Parameters help

Name Type
dst
address help
wad
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function transfer(address dst, uint256 wad) public returns (bool) {
  return transferFrom(msg.sender, dst, wad);
}

Parameters help

Name Type
src
address help
dst
address help
wad
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function transferFrom(
  address src,
  address dst,
  uint256 wad
) public stoppable returns (bool) {
  if (src != msg.sender && _approvals[src][msg.sender] != uint256(-1)) {
    _approvals[src][msg.sender] = sub(_approvals[src][msg.sender], wad);
  }

  _balances[src] = sub(_balances[src], wad);
  _balances[dst] = add(_balances[dst], wad);

  Transfer(src, dst, wad);

  return true;
}

Parameters help

Name Type
guy
address help
wad
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function approve(address guy, uint256 wad) public stoppable returns (bool) {
  return super.approve(guy, wad);
}

Parameters help

Name Type
guy
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function approve(address guy) public stoppable returns (bool) {
  return super.approve(guy, uint256(-1));
}

Parameters help

Name Type
dst
address help
wad
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function push(address dst, uint256 wad) public {
  transferFrom(msg.sender, dst, wad);
}

Parameters help

Name Type
src
address help
wad
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function pull(address src, uint256 wad) public {
  transferFrom(src, msg.sender, wad);
}

Parameters help

Name Type
src
address help
dst
address help
wad
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function move(
  address src,
  address dst,
  uint256 wad
) public {
  transferFrom(src, dst, wad);
}

Parameters help

Name Type
wad
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function mint(uint256 wad) public {
  mint(msg.sender, wad);
}

Parameters help

Name Type
wad
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function burn(uint256 wad) public {
  burn(msg.sender, wad);
}

Parameters help

Name Type
guy
address help
wad
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function mint(address guy, uint256 wad) public auth stoppable {
  _balances[guy] = add(_balances[guy], wad);
  _supply = add(_supply, wad);
  Mint(guy, wad);
}

Parameters help

Name Type
guy
address help
wad
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function burn(address guy, uint256 wad) public auth stoppable {
  if (guy != msg.sender && _approvals[guy][msg.sender] != uint256(-1)) {
    _approvals[guy][msg.sender] = sub(_approvals[guy][msg.sender], wad);
  }

  _balances[guy] = sub(_balances[guy], wad);
  _supply = sub(_supply, wad);
  Burn(guy, wad);
}

Parameters help

Name Type
name_
bytes32 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

auth checks for the following:
null
Source Code
function setName(bytes32 name_) public auth {
  name = name_;
}

Internal Functions Expand All Collapse All

Internal functions are parts of the contract that can't be used directly, but instead are used by the public functions listed above.

internal DSMath.add keyboard_arrow_up

Parameters help

Name Type
x
uint help
y
uint help

Properties

Visibility help internal
Mutability help pure

Requirements help

Source Code
function add(uint256 x, uint256 y) internal pure returns (uint256 z) {
  require((z = x + y) >= x);
}

internal DSMath.sub keyboard_arrow_up

Parameters help

Name Type
x
uint help
y
uint help

Properties

Visibility help internal
Mutability help pure

Requirements help

Source Code
function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {
  require((z = x - y) <= x);
}

internal DSMath.mul keyboard_arrow_up

Parameters help

Name Type
x
uint help
y
uint help

Properties

Visibility help internal
Mutability help pure
Source Code
function mul(uint256 x, uint256 y) internal pure returns (uint256 z) {
  require(y == 0 || (z = x * y) / y == x);
}

internal DSMath.min keyboard_arrow_up

Parameters help

Name Type
x
uint help
y
uint help

Properties

Visibility help internal
Mutability help pure
Source Code
function min(uint256 x, uint256 y) internal pure returns (uint256 z) {
  return x <= y ? x : y;
}

internal DSMath.max keyboard_arrow_up

Parameters help

Name Type
x
uint help
y
uint help

Properties

Visibility help internal
Mutability help pure
Source Code
function max(uint256 x, uint256 y) internal pure returns (uint256 z) {
  return x >= y ? x : y;
}

internal DSMath.imin keyboard_arrow_up

Parameters help

Name Type
x
int help
y
int help

Properties

Visibility help internal
Mutability help pure
Source Code
function imin(int256 x, int256 y) internal pure returns (int256 z) {
  return x <= y ? x : y;
}

internal DSMath.imax keyboard_arrow_up

Parameters help

Name Type
x
int help
y
int help

Properties

Visibility help internal
Mutability help pure
Source Code
function imax(int256 x, int256 y) internal pure returns (int256 z) {
  return x >= y ? x : y;
}

internal DSMath.wmul keyboard_arrow_up

Parameters help

Name Type
x
uint help
y
uint help

Properties

Visibility help internal
Mutability help pure
Source Code
function wmul(uint256 x, uint256 y) internal pure returns (uint256 z) {
  z = add(mul(x, y), WAD / 2) / WAD;
}

internal DSMath.rmul keyboard_arrow_up

Parameters help

Name Type
x
uint help
y
uint help

Properties

Visibility help internal
Mutability help pure
Source Code
function rmul(uint256 x, uint256 y) internal pure returns (uint256 z) {
  z = add(mul(x, y), RAY / 2) / RAY;
}

internal DSMath.wdiv keyboard_arrow_up

Parameters help

Name Type
x
uint help
y
uint help

Properties

Visibility help internal
Mutability help pure
Source Code
function wdiv(uint256 x, uint256 y) internal pure returns (uint256 z) {
  z = add(mul(x, WAD), y / 2) / y;
}

internal DSMath.rdiv keyboard_arrow_up

Parameters help

Name Type
x
uint help
y
uint help

Properties

Visibility help internal
Mutability help pure
Source Code
function rdiv(uint256 x, uint256 y) internal pure returns (uint256 z) {
  z = add(mul(x, RAY), y / 2) / y;
}

internal DSMath.rpow keyboard_arrow_up

Parameters help

Name Type
x
uint help
n
uint help

Properties

Visibility help internal
Mutability help pure
Source Code
function rpow(uint256 x, uint256 n) internal pure returns (uint256 z) {
  z = n % 2 != 0 ? x : RAY;

  for (n /= 2; n != 0; n /= 2) {
    x = rmul(x, x);

    if (n % 2 != 0) {
      z = rmul(z, x);
    }
  }
}

internal DSAuth.isAuthorized keyboard_arrow_up

Parameters help

Name Type
src
address help
sig
bytes4 help

Properties

Visibility help internal
Mutability help view
Source Code
function isAuthorized(address src, bytes4 sig) internal view returns (bool) {
  if (src == address(this)) {
    return true;
  } else if (src == owner) {
    return true;
  } else if (authority == DSAuthority(0)) {
    return false;
  } else {
    return authority.canCall(src, this, sig);
  }
}