Digix Gold Token
ERC20
This contract is an ERC20 token.
Name
Digix Gold Token
Symbol
DGX
Decimals
9
Total Supply
120,400 DGX
About link
Digix Gold Token (DGX) is a cryptocurrency and operates on the Ethereum platform. Digix Gold Token has a current supply of 78,000 with 74,655.61417938 in circulation. The last known price of Digix Gold Token is 48.09749687 USD and is down -3.58 over the last 24 hours. It is currently trading on 21 active market(s) with $8,599.34 traded over the last 24 hours. More information can be found at https://digix.global/dgx.
Stats
Public Functions
16
Event Types
2
Code Size
14,974 bytes
Constants (81) keyboard_arrow_up
Functions
destroy keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function destroy() public returns (bool _success) {
bool _is_locked = ContractResolver(resolver).locked();
require(!_is_locked);
address _owner_of_contract_resolver = ContractResolver(resolver).owner();
require(msg.sender == _owner_of_contract_resolver);
_success = ContractResolver(resolver).unregister_contract(key);
require(_success);
selfdestruct(_owner_of_contract_resolver);
}
get_contract keyboard_arrow_up
log_mint keyboard_arrow_up
Modifiers help
if_sender_is checks for the following:
Source Code
function log_mint(address _to, uint256 _value)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS)
{
Transfer(address(0x0), _to, _value);
}
log_recast_fees keyboard_arrow_up
Modifiers help
if_sender_is checks for the following:
Source Code
function log_recast_fees(
address _from,
address _to,
uint256 _value
) public if_sender_is(CONTRACT_CONTROLLER_ASSETS_RECAST) {
Transfer(_from, _to, _value);
}
log_recast keyboard_arrow_up
Modifiers help
if_sender_is checks for the following:
Source Code
function log_recast(address _from, uint256 _value)
public
if_sender_is(CONTRACT_CONTROLLER_ASSETS_RECAST)
{
Transfer(_from, address(0x0), _value);
}
log_demurrage_fees keyboard_arrow_up
Modifiers help
if_sender_is checks for the following:
Source Code
function log_demurrage_fees(
address _from,
address _to,
uint256 _value
) public if_sender_is(CONTRACT_SERVICE_TOKEN_DEMURRAGE) {
Transfer(_from, _to, _value);
}
log_move_fees keyboard_arrow_up
Modifiers help
if_sender_is checks for the following:
Source Code
function log_move_fees(
address _from,
address _to,
uint256 _value
) public if_sender_is(CONTRACT_CONTROLLER_TOKEN_CONFIG) {
Transfer(_from, _to, _value);
}
log_transfer keyboard_arrow_up
Modifiers help
if_sender_is checks for the following:
Source Code
function log_transfer(
address _from,
address _to,
uint256 _value
) public if_sender_is(CONTRACT_CONTROLLER_TOKEN_TRANSFER) {
Transfer(_from, _to, _value);
}
log_approve keyboard_arrow_up
Modifiers help
if_sender_is checks for the following:
Source Code
function log_approve(
address _owner,
address _spender,
uint256 _value
) public if_sender_is(CONTRACT_CONTROLLER_TOKEN_APPROVAL) {
Approval(_owner, _spender, _value);
}
totalSupply keyboard_arrow_up
balanceOf keyboard_arrow_up
transfer keyboard_arrow_up
Source Code
function transfer(address _to, uint256 _value) public returns (bool success) {
success = TokenTransferController(
get_contract(CONTRACT_CONTROLLER_TOKEN_TRANSFER)
).put_transfer(msg.sender, _to, 0x0, _value, false);
}
transferFrom keyboard_arrow_up
Source Code
function transferFrom(
address _from,
address _to,
uint256 _value
) public returns (bool success) {
success = TokenTransferController(
get_contract(CONTRACT_CONTROLLER_TOKEN_TRANSFER)
).put_transfer(_from, _to, msg.sender, _value, true);
}
transferAndCall keyboard_arrow_up
Source Code
function transferAndCall(
address _receiver,
uint256 _amount,
bytes32 _data
) public returns (bool success) {
transfer(_receiver, _amount);
success = TokenReceiver(_receiver).tokenFallback(msg.sender, _amount, _data);
require(success);
}
approve keyboard_arrow_up
Source Code
function approve(address _spender, uint256 _value)
public
returns (bool success)
{
success = TokenApprovalController(
get_contract(CONTRACT_CONTROLLER_TOKEN_APPROVAL)
).approve(msg.sender, _spender, _value);
}
allowance keyboard_arrow_up
Source Code
function allowance(address _owner, address _spender)
public
constant
returns (uint256 remaining)
{
remaining = TokenInfoController(get_contract(CONTRACT_CONTROLLER_TOKEN_INFO))
.get_allowance(_owner, _spender);
}
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 ResolverClient.init keyboard_arrow_up
Source Code
function init(bytes32 _key, address _resolver)
internal
returns (bool _success)
{
bool _is_locked = ContractResolver(_resolver).locked();
if (_is_locked == false) {
CONTRACT_ADDRESS = address(this);
resolver = _resolver;
key = _key;
require(
ContractResolver(resolver).init_register_contract(key, CONTRACT_ADDRESS)
);
_success = true;
} else {
_success = false;
}
}