ERC20
This contract is an ERC20 token.
Name
USDK
Symbol
USDK
Decimals
18
Total Supply
32,478,711 USDK
About
link
USDK (USDK) is a cryptocurrency and operates on the Ethereum platform. USDK has a current supply of 28,600,072. The last known price of USDK is 1.00091268 USD and is down -0.08 over the last 24 hours. It is currently trading on 19 active market(s) with $98,318,944.61 traded over the last 24 hours. More information can be found at https://www.oklink.com/.
Stats
Public Functions
20
Event Types
12
Code Size
15,142 bytes
Library Use
Uses SafeMath for uint256.
Events (12) keyboard_arrow_up
State Variables (9) keyboard_arrow_up
Functions
initialize keyboard_arrow_up
totalSupply keyboard_arrow_up
transfer keyboard_arrow_up
Requirements help
Source Code
function transfer(address _to, uint256 _value)
public
whenNotPaused
returns (bool)
{
require(_to != address(0), "cannot transfer to address zero");
require(!frozen[_to] && !frozen[msg.sender], "address frozen");
require(_value <= balances[msg.sender], "insufficient funds");
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
emit Transfer(msg.sender, _to, _value);
return true;
}
balanceOf keyboard_arrow_up
transferFrom keyboard_arrow_up
Requirements help
Source Code
function transferFrom(
address _from,
address _to,
uint256 _value
) public whenNotPaused returns (bool) {
require(_to != address(0), "cannot transfer to address zero");
require(
!frozen[_to] && !frozen[_from] && !frozen[msg.sender],
"address frozen"
);
require(_value <= balances[_from], "insufficient funds");
require(_value <= _allowed[_from][msg.sender], "insufficient allowance");
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
_allowed[_from][msg.sender] = _allowed[_from][msg.sender].sub(_value);
emit Transfer(_from, _to, _value);
return true;
}
approve keyboard_arrow_up
Requirements help
Source Code
function approve(address spender, uint256 value)
public
whenNotPaused
returns (bool)
{
_approve(msg.sender, spender, value);
return true;
}
allowance keyboard_arrow_up
increaseAllowance keyboard_arrow_up
Requirements help
Source Code
function increaseAllowance(address spender, uint256 addedValue)
public
whenNotPaused
returns (bool)
{
_approve(msg.sender, spender, _allowed[msg.sender][spender].add(addedValue));
return true;
}
decreaseAllowance keyboard_arrow_up
Requirements help
Source Code
function decreaseAllowance(address spender, uint256 subtractedValue)
public
whenNotPaused
returns (bool)
{
_approve(
msg.sender,
spender,
_allowed[msg.sender][spender].sub(subtractedValue)
);
return true;
}
transferOwnership keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function transferOwnership(address _newOwner) public onlyOwner {
require(_newOwner != address(0), "cannot transfer ownership to address zero");
emit OwnershipTransferred(owner, _newOwner);
owner = _newOwner;
}
pause keyboard_arrow_up
unpause keyboard_arrow_up
setLawEnforcementRole keyboard_arrow_up
Requirements help
One or more of the following:
-
owner
must be equal to
the sender's address
- OR
lawEnforcementRole
must be equal to
the sender's address
Source Code
function setLawEnforcementRole(address _newLawEnforcementRole) public {
require(
_newLawEnforcementRole != address(0),
"lawEnforcementRole cannot address(0)"
);
require(
msg.sender == lawEnforcementRole || msg.sender == owner,
"only lawEnforcementRole or Owner"
);
emit LawEnforcementRoleSet(lawEnforcementRole, _newLawEnforcementRole);
lawEnforcementRole = _newLawEnforcementRole;
}
freeze keyboard_arrow_up
Modifiers help
onlyLawEnforcementRole checks for the following:
Source Code
function freeze(address _addr) public onlyLawEnforcementRole {
require(!frozen[_addr], "address already frozen");
frozen[_addr] = true;
emit AddressFrozen(_addr);
}
unfreeze keyboard_arrow_up
Modifiers help
onlyLawEnforcementRole checks for the following:
Source Code
function unfreeze(address _addr) public onlyLawEnforcementRole {
require(frozen[_addr], "address already unfrozen");
frozen[_addr] = false;
emit AddressUnfrozen(_addr);
}
wipeFrozenAddress keyboard_arrow_up
Modifiers help
onlyLawEnforcementRole checks for the following:
Source Code
function wipeFrozenAddress(address _addr) public onlyLawEnforcementRole {
require(frozen[_addr], "address is not frozen");
uint256 _balance = balances[_addr];
balances[_addr] = 0;
totalSupply_ = totalSupply_.sub(_balance);
emit FrozenAddressWiped(_addr);
emit SupplyDecreased(_addr, _balance);
emit Transfer(_addr, address(0), _balance);
}
isFrozen keyboard_arrow_up
setSupplyController keyboard_arrow_up
Requirements help
One or more of the following:
-
owner
must be equal to
the sender's address
- OR
supplyController
must be equal to
the sender's address
Source Code
function setSupplyController(address _newSupplyController) public {
require(
msg.sender == supplyController || msg.sender == owner,
"only SupplyController or Owner"
);
require(
_newSupplyController != address(0),
"cannot set supply controller to address zero"
);
emit SupplyControllerSet(supplyController, _newSupplyController);
supplyController = _newSupplyController;
}
increaseSupply keyboard_arrow_up
Modifiers help
onlySupplyController checks for the following:
Source Code
function increaseSupply(uint256 _value)
public
onlySupplyController
returns (bool success)
{
totalSupply_ = totalSupply_.add(_value);
balances[supplyController] = balances[supplyController].add(_value);
emit SupplyIncreased(supplyController, _value);
emit Transfer(address(0), supplyController, _value);
return true;
}
decreaseSupply keyboard_arrow_up
Modifiers help
onlySupplyController checks for the following:
Requirements help
Source Code
function decreaseSupply(uint256 _value)
public
onlySupplyController
returns (bool success)
{
require(_value <= balances[supplyController], "not enough supply");
balances[supplyController] = balances[supplyController].sub(_value);
totalSupply_ = totalSupply_.sub(_value);
emit SupplyDecreased(supplyController, _value);
emit Transfer(supplyController, address(0), _value);
return true;
}
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 USDKImplementation._approve keyboard_arrow_up
Requirements help
Source Code
function _approve(
address _owner,
address spender,
uint256 value
) internal {
require(!frozen[spender] && !frozen[_owner], "address frozen");
require(spender != address(0) && _owner != address(0), "not address(0)");
_allowed[_owner][spender] = value;
emit Approval(_owner, spender, value);
}