Blockwell

USDK

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

AddressFrozen Event

Parameters help
addr
address help

AddressUnfrozen Event

Parameters help
addr
address help

Approval Event

Parameters help
owner
address help
spender
address help
value
uint256 help

FrozenAddressWiped Event

Parameters help
addr
address help

LawEnforcementRoleSet Event

Parameters help
oldLawEnforcementRole
address help
newLawEnforcementRole
address help

OwnershipTransferred Event

Parameters help
oldOwner
address help
newOwner
address help

Pause Event

Parameters help

SupplyControllerSet Event

Parameters help
oldSupplyController
address help
newSupplyController
address help

SupplyDecreased Event

Parameters help
from
address help
value
uint256 help

SupplyIncreased Event

Parameters help
to
address help
value
uint256 help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

Unpause Event

Parameters help

name Constant

string help
USDK

symbol Constant

string help
USDK

decimals Constant

uint8 help
18

owner Variable

address help

paused Variable

bool help

lawEnforcementRole Variable

address help

supplyController Variable

address help

initialized Variable

bool help
Internal Variable

balances Variable

mapping(address => uint256) help
Internal Variable

totalSupply_ Variable

uint256 help
Internal Variable

_allowed Variable

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

frozen Variable

mapping(address => bool) help
Internal Variable

Functions Expand All Collapse All

initialize keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function initialize() public {
  require(!initialized, "already initialized");
  owner = msg.sender;
  lawEnforcementRole = address(0);
  totalSupply_ = 0;
  supplyController = msg.sender;
  initialized = true;
}

Parameters help

This function has no parameters.

Properties

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

Parameters help

Name Type
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers 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;
}

Parameters help

Name Type
_addr
address help

Properties

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

Parameters help

Name Type
_from
address help
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

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;
}

Parameters help

Name Type
spender
address help
value
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function approve(address spender, uint256 value)
  public
  whenNotPaused
  returns (bool)
{
  _approve(msg.sender, spender, value);
  return true;
}

Parameters help

Name Type
_owner
address help
spender
address help

Properties

Visibility help public
Mutability help view
Source Code
function allowance(address _owner, address spender)
  public
  view
  returns (uint256)
{
  return _allowed[_owner][spender];
}

Parameters help

Name Type
spender
address help
addedValue
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers 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;
}

Parameters help

Name Type
spender
address help
subtractedValue
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers 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

Parameters help

Name Type
_newOwner
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

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

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function pause() public onlyOwner {
  require(!paused, "already paused");
  paused = true;
  emit Pause();
}

unpause keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function unpause() public onlyOwner {
  require(paused, "already unpaused");
  paused = false;
  emit Unpause();
}

setLawEnforcementRole keyboard_arrow_up

Parameters help

Name Type
_newLawEnforcementRole
address help

Properties

Visibility help public
Mutability help transaction
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

Parameters help

Name Type
_addr
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function freeze(address _addr) public onlyLawEnforcementRole {
  require(!frozen[_addr], "address already frozen");
  frozen[_addr] = true;
  emit AddressFrozen(_addr);
}

unfreeze keyboard_arrow_up

Parameters help

Name Type
_addr
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function unfreeze(address _addr) public onlyLawEnforcementRole {
  require(frozen[_addr], "address already unfrozen");
  frozen[_addr] = false;
  emit AddressUnfrozen(_addr);
}

wipeFrozenAddress keyboard_arrow_up

Parameters help

Name Type
_addr
address help

Properties

Visibility help public
Mutability help transaction
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

Parameters help

Name Type
_addr
address help

Properties

Visibility help public
Mutability help view
Source Code
function isFrozen(address _addr) public view returns (bool) {
  return frozen[_addr];
}

setSupplyController keyboard_arrow_up

Parameters help

Name Type
_newSupplyController
address help

Properties

Visibility help public
Mutability help transaction
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

Parameters help

Name Type
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
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

Parameters help

Name Type
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
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 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 USDKImplementation._approve keyboard_arrow_up

Parameters help

Name Type
_owner
address help
spender
address help
value
uint256 help

Properties

Visibility help internal
Mutability help transaction
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);
}