ERC20
This contract is an ERC20 token.
Name
RING
Symbol
Decimals
18
Total Supply
989,153,247
About
link
description
Darwinia Network (RING) is a cryptocurrency and operates on the Ethereum platform. Darwinia Network has a current supply of 2,058,420,923.6562107 with 451,602,953.8689697 in circulation. The last known price of Darwinia Network is 0.03662799 USD and is down -0.32 over the last 24 hours. It is currently trading on 26 active market(s) with $9,597,741.88 traded over the last 24 hours. More information can be found at https://darwinia.network/.
Stats
Public Functions
34
Event Types
9
Code Size
20,053 bytes
Events (9) keyboard_arrow_up
State Variables (13) keyboard_arrow_up
Functions
transferOwnership keyboard_arrow_up
Modifiers help
auth checks for the following:
null
Source Code
function transferOwnership(address _newOwner) public auth {
require(_newOwner != owner);
newOwner = _newOwner;
}
acceptOwnership keyboard_arrow_up
disableTransfers keyboard_arrow_up
issue keyboard_arrow_up
destroy keyboard_arrow_up
Modifiers help
auth checks for the following:
null
stoppable checks for the following:
Source Code
function destroy(address _from, uint256 _amount) public auth stoppable {
// do not require allowance
_balances[_from] = sub(_balances[_from], _amount);
_supply = sub(_supply, _amount);
emit Burn(_from, _amount);
emit Transfer(_from, 0, _amount);
}
setOwner keyboard_arrow_up
setAuthority keyboard_arrow_up
stop keyboard_arrow_up
start keyboard_arrow_up
totalSupply keyboard_arrow_up
balanceOf keyboard_arrow_up
allowance keyboard_arrow_up
approve keyboard_arrow_up
Source Code
function approve(address guy, uint256 wad) public stoppable returns (bool) {
return super.approve(guy, wad);
}
transfer keyboard_arrow_up
transferFrom keyboard_arrow_up
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);
emit Transfer(src, dst, wad);
return true;
}
approve keyboard_arrow_up
push keyboard_arrow_up
pull keyboard_arrow_up
move keyboard_arrow_up
mint keyboard_arrow_up
burn keyboard_arrow_up
mint keyboard_arrow_up
burn keyboard_arrow_up
Modifiers help
auth checks for the following:
null
stoppable checks for the following:
Source Code
function burn(address _guy, uint256 _wad) auth stoppable {
super.burn(_guy, _wad);
emit Transfer(_guy, 0, _wad);
}
setName keyboard_arrow_up
changeCap keyboard_arrow_up
Modifiers help
auth checks for the following:
null
Source Code
function changeCap(uint256 _newCap) public auth {
require(_newCap >= _supply);
cap = _newCap;
}
changeController keyboard_arrow_up
transferFrom keyboard_arrow_up
Modifiers help
transfersAllowed checks for the following:
transfersEnabled must be true
Source Code
function transferFrom(
address _from,
address _to,
uint256 _amount
) public transfersAllowed returns (bool success) {
// Alerts the token controller of the transfer
if (isContract(controller)) {
if (!TokenController(controller).onTransfer(_from, _to, _amount)) revert();
}
success = super.transferFrom(_from, _to, _amount);
}
transferFrom keyboard_arrow_up
Modifiers help
transfersAllowed checks for the following:
transfersEnabled must be true
Source Code
function transferFrom(
address _from,
address _to,
uint256 _amount,
bytes _data
) public transfersAllowed returns (bool success) {
// Alerts the token controller of the transfer
if (isContract(controller)) {
if (!TokenController(controller).onTransfer(_from, _to, _amount)) revert();
}
require(super.transferFrom(_from, _to, _amount));
if (isContract(_to)) {
ERC223ReceivingContract receiver = ERC223ReceivingContract(_to);
receiver.tokenFallback(_from, _amount, _data);
}
emit ERC223Transfer(_from, _to, _amount, _data);
return true;
}
transfer keyboard_arrow_up
Source Code
function transfer(
address _to,
uint256 _amount,
bytes _data
) public returns (bool success) {
return transferFrom(msg.sender, _to, _amount, _data);
}
approve keyboard_arrow_up
Source Code
function approve(address _spender, uint256 _amount) returns (bool success) {
// Alerts the token controller of the approve function call
if (isContract(controller)) {
if (!TokenController(controller).onApprove(msg.sender, _spender, _amount))
revert();
}
return super.approve(_spender, _amount);
}
approveAndCall keyboard_arrow_up
Source Code
function approveAndCall(
address _spender,
uint256 _amount,
bytes _extraData
) returns (bool success) {
if (!approve(_spender, _amount)) revert();
ApproveAndCallFallBack(_spender).receiveApproval(
msg.sender,
_amount,
this,
_extraData
);
return true;
}
constructor keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function() payable {
if (isContract(controller)) {
if (
!TokenController(controller).proxyPayment.value(msg.value)(
msg.sender,
msg.sig,
msg.data
)
) revert();
} else {
revert();
}
}
claimTokens keyboard_arrow_up
Modifiers help
auth checks for the following:
null
Source Code
function claimTokens(address _token) public auth {
if (_token == 0x0) {
address(msg.sender).transfer(address(this).balance);
return;
}
ERC20 token = ERC20(_token);
uint256 balance = token.balanceOf(this);
token.transfer(address(msg.sender), balance);
emit ClaimedTokens(_token, address(msg.sender), balance);
}
withdrawTokens keyboard_arrow_up
Modifiers help
auth checks for the following:
null
Source Code
function withdrawTokens(
ERC20 _token,
address _to,
uint256 _amount
) public auth {
assert(_token.transfer(_to, _amount));
}
Internal Functions
Internal functions are parts of the contract that can't be used directly, but instead are used by the public functions listed above.
internal RING.isContract keyboard_arrow_up
internal DSMath.add keyboard_arrow_up
internal DSMath.sub keyboard_arrow_up
internal DSMath.mul keyboard_arrow_up
Requirements help
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
internal DSMath.max keyboard_arrow_up
internal DSMath.imin keyboard_arrow_up
internal DSMath.imax keyboard_arrow_up
internal DSMath.wmul keyboard_arrow_up
internal DSMath.rmul keyboard_arrow_up
internal DSMath.wdiv keyboard_arrow_up
internal DSMath.rdiv keyboard_arrow_up
internal DSMath.rpow keyboard_arrow_up
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
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);
}
}