ERC20
This contract is an ERC20 token.
Name
XSGD
Symbol
XSGD
Decimals
6
Total Supply
17,322,556 XSGD
About link
XSGD (XSGD) is a cryptocurrency and operates on the Ethereum platform. XSGD has a current supply of 46,739,090.03 with 38,294,099.450558 in circulation. The last known price of XSGD is 0.73482788 USD and is up 0.90 over the last 24 hours. It is currently trading on 7 active market(s) with $71,709.64 traded over the last 24 hours. More information can be found at https://www.xfers.com/sg/stablecoin.
Stats
Public Functions
28
Event Types
14
Code Size
28,936 bytes
Library Use
Uses SafeMath for uint256.
Events (14) keyboard_arrow_up
State Variables (15) keyboard_arrow_up
Functions
owner keyboard_arrow_up
transferOwnership keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Requirements help
Source Code
function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0), "transferOwnership: 0x0 invalid");
require(newOwner != owner(), "transferOwnership: same address");
emit OwnershipTransferred(owner(), newOwner);
setOwner(newOwner);
}
isBlacklisted keyboard_arrow_up
blacklist keyboard_arrow_up
Modifiers help
onlyBlacklister checks for the following:
Requirements help
Source Code
function blacklist(address _account) public onlyBlacklister {
require(_account != address(0), "blacklist: 0x0 invalid");
require(!isBlacklisted(_account), "blacklist: already blacklisted");
blacklisted[_account] = true;
emit Blacklisted(_account);
}
unBlacklist keyboard_arrow_up
Modifiers help
onlyBlacklister checks for the following:
Source Code
function unBlacklist(address _account) public onlyBlacklister {
require(_account != address(0), "unBlacklist: 0x0 invalid");
require(isBlacklisted(_account), "unBlacklist: not blacklisted");
blacklisted[_account] = false;
emit UnBlacklisted(_account);
}
updateBlacklister keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Requirements help
Source Code
function updateBlacklister(address _newBlacklister) public onlyOwner {
require(_newBlacklister != address(0), "updateBlacklister: 0x0 invalid");
require(_newBlacklister != blacklister, "updateBlacklister: same address");
blacklister = _newBlacklister;
emit BlacklisterChanged(blacklister);
}
pause keyboard_arrow_up
unpause keyboard_arrow_up
updatePauser keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Requirements help
Source Code
function updatePauser(address _newPauser) public onlyOwner {
require(_newPauser != address(0), "updatePauser: 0x0 invalid");
require(_newPauser != pauser, "updatePauser: same address");
pauser = _newPauser;
emit PauserChanged(pauser);
}
initialize keyboard_arrow_up
Parameters help
Requirements help
Source Code
function initialize(
string _name,
string _symbol,
uint8 _decimals,
address _masterMinter,
address _pauser,
address _blacklister,
address _owner
) public {
require(!initialized, "already initialized!");
require(_masterMinter != address(0), "master minter can't be 0x0");
require(_pauser != address(0), "pauser can't be 0x0");
require(_blacklister != address(0), "blacklister can't be 0x0");
require(_owner != address(0), "owner can't be 0x0");
name = _name;
symbol = _symbol;
decimals = _decimals;
masterMinter = _masterMinter;
pauser = _pauser;
blacklister = _blacklister;
setOwner(_owner);
initialized = true;
}
mint keyboard_arrow_up
Modifiers help
whenNotPaused checks for the following:
onlyMinters checks for the following:
notBlacklisted checks for the following:
notBlacklisted checks for the following:
Requirements help
Source Code
function mint(address _to, uint256 _amount)
public
whenNotPaused
onlyMinters
notBlacklisted(msg.sender)
notBlacklisted(_to)
returns (bool)
{
require(_to != address(0), "can't mint to 0x0");
require(_amount > 0, "amount to mint has to be > 0");
uint256 mintingAllowedAmount = minterAllowance(msg.sender);
require(_amount <= mintingAllowedAmount, "minter allowance too low");
totalSupply_ = totalSupply_.add(_amount);
balances[_to] = balances[_to].add(_amount);
minterAllowed[msg.sender] = mintingAllowedAmount.sub(_amount);
if (minterAllowance(msg.sender) == 0) {
minters[msg.sender] = false;
emit MinterRemoved(msg.sender);
}
emit Mint(msg.sender, _to, _amount);
emit Transfer(0x0, _to, _amount);
return true;
}
minterAllowance keyboard_arrow_up
isMinter keyboard_arrow_up
totalSupply keyboard_arrow_up
balanceOf keyboard_arrow_up
approve keyboard_arrow_up
Modifiers help
whenNotPaused checks for the following:
notBlacklisted checks for the following:
notBlacklisted checks for the following:
Source Code
function approve(address _spender, uint256 _amount)
public
whenNotPaused
notBlacklisted(msg.sender)
notBlacklisted(_spender)
returns (bool)
{
return _approve(_spender, _amount);
}
increaseAllowance keyboard_arrow_up
Modifiers help
whenNotPaused checks for the following:
notBlacklisted checks for the following:
notBlacklisted checks for the following:
Source Code
function increaseAllowance(address _spender, uint256 _addedValue)
public
whenNotPaused
notBlacklisted(msg.sender)
notBlacklisted(_spender)
returns (bool)
{
uint256 updatedAllowance = allowed[msg.sender][_spender].add(_addedValue);
return _approve(_spender, updatedAllowance);
}
decreaseAllowance keyboard_arrow_up
Modifiers help
whenNotPaused checks for the following:
notBlacklisted checks for the following:
notBlacklisted checks for the following:
Source Code
function decreaseAllowance(address _spender, uint256 _subtractedValue)
public
whenNotPaused
notBlacklisted(msg.sender)
notBlacklisted(_spender)
returns (bool)
{
uint256 updatedAllowance = allowed[msg.sender][_spender].sub(
_subtractedValue
);
return _approve(_spender, updatedAllowance);
}
allowance keyboard_arrow_up
transferFrom keyboard_arrow_up
Modifiers help
whenNotPaused checks for the following:
notBlacklisted checks for the following:
notBlacklisted checks for the following:
notBlacklisted checks for the following:
Requirements help
Source Code
function transferFrom(
address _from,
address _to,
uint256 _amount
)
public
whenNotPaused
notBlacklisted(_to)
notBlacklisted(msg.sender)
notBlacklisted(_from)
returns (bool)
{
require(_to != address(0), "can't transfer to 0x0");
require(_amount <= balances[_from], "insufficient balance");
require(_amount <= allowed[_from][msg.sender], "token allowance is too low");
balances[_from] = balances[_from].sub(_amount);
balances[_to] = balances[_to].add(_amount);
allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_amount);
emit Transfer(_from, _to, _amount);
return true;
}
transfer keyboard_arrow_up
Modifiers help
whenNotPaused checks for the following:
notBlacklisted checks for the following:
notBlacklisted checks for the following:
Requirements help
Source Code
function transfer(address _to, uint256 _amount)
public
whenNotPaused
notBlacklisted(msg.sender)
notBlacklisted(_to)
returns (bool)
{
require(_to != address(0), "can't transfer to 0x0");
require(_amount <= balances[msg.sender], "insufficient balance");
balances[msg.sender] = balances[msg.sender].sub(_amount);
balances[_to] = balances[_to].add(_amount);
emit Transfer(msg.sender, _to, _amount);
return true;
}
increaseMinterAllowance keyboard_arrow_up
Modifiers help
onlyMasterMinter checks for the following:
Source Code
function increaseMinterAllowance(address _minter, uint256 _increasedAmount)
public
onlyMasterMinter
{
require(_minter != address(0), "minter can't be 0x0");
uint256 updatedAllowance = minterAllowance(_minter).add(_increasedAmount);
minterAllowed[_minter] = updatedAllowance;
minters[_minter] = true;
emit MinterConfigured(_minter, updatedAllowance);
}
decreaseMinterAllowance keyboard_arrow_up
Modifiers help
onlyMasterMinter checks for the following:
Source Code
function decreaseMinterAllowance(address _minter, uint256 _decreasedAmount)
public
onlyMasterMinter
{
require(_minter != address(0), "minter can't be 0x0");
require(minters[_minter], "not a minter");
uint256 updatedAllowance = minterAllowance(_minter).sub(_decreasedAmount);
minterAllowed[_minter] = updatedAllowance;
if (minterAllowance(_minter) > 0) {
emit MinterConfigured(_minter, updatedAllowance);
} else {
minters[_minter] = false;
emit MinterRemoved(_minter);
}
}
burn keyboard_arrow_up
Modifiers help
whenNotPaused checks for the following:
onlyMinters checks for the following:
notBlacklisted checks for the following:
Source Code
function burn(uint256 _amount)
public
whenNotPaused
onlyMinters
notBlacklisted(msg.sender)
{
uint256 balance = balances[msg.sender];
require(_amount > 0, "burn amount has to be > 0");
require(balance >= _amount, "balance in minter is < amount to burn");
totalSupply_ = totalSupply_.sub(_amount);
balances[msg.sender] = balance.sub(_amount);
emit Burn(msg.sender, _amount);
emit Transfer(msg.sender, address(0), _amount);
}
lawEnforcementWipingBurn keyboard_arrow_up
Modifiers help
whenNotPaused checks for the following:
onlyBlacklister checks for the following:
Requirements help
null
Source Code
function lawEnforcementWipingBurn(address _from)
public
whenNotPaused
onlyBlacklister
{
require(
isBlacklisted(_from),
"Can't wipe balances of a non blacklisted address"
);
uint256 balance = balances[_from];
totalSupply_ = totalSupply_.sub(balance);
balances[_from] = 0;
emit Burn(_from, balance);
emit Transfer(_from, address(0), balance);
}
updateMasterMinter keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Requirements help
Source Code
function updateMasterMinter(address _newMasterMinter) public onlyOwner {
require(_newMasterMinter != address(0), "master minter can't be 0x0");
require(_newMasterMinter != masterMinter, "master minter is the same");
masterMinter = _newMasterMinter;
emit MasterMinterChanged(masterMinter);
}
tokenFallback keyboard_arrow_up
reclaimToken keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Requirements help
Source Code
function reclaimToken(address _tokenAddress) external onlyOwner {
require(_tokenAddress != address(0), "token can't be 0x0");
ERC20Recovery token = ERC20Recovery(_tokenAddress);
uint256 balance = token.balanceOf(this);
require(token.transfer(owner(), balance), "reclaim token failed");
}
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 FiatTokenV1._approve keyboard_arrow_up
Source Code
function _approve(address _spender, uint256 _amount) internal returns (bool) {
allowed[msg.sender][_spender] = _amount;
emit Approval(msg.sender, _spender, _amount);
return true;
}