Blockwell

STASIS EURS Token

ERC20

This contract is an ERC20 token.

Name STASIS EURS Token
Symbol EURS
Decimals 2
Total Supply 31,979,207 EURS

About link

STASIS EURO (EURS) is a cryptocurrency and operates on the Ethereum platform. STASIS EURO has a current supply of 88,625,940. The last known price of STASIS EURO is 1.19325727 USD and is up 0.49 over the last 24 hours. It is currently trading on 8 active market(s) with $3,804,156.44 traded over the last 24 hours. More information can be found at https://stasis.net.

Stats

Public Functions 24
Event Types 6
Code Size 26,639 bytes

Events (6) keyboard_arrow_up

Approval Event

Parameters help
_owner
address help
_spender
address help
_value
uint256 help

Delegation Event

Parameters help
delegate
address help

FeeChange Event

Parameters help
fixedFee
uint256 help
minVariableFee
uint256 help
maxVariableFee
uint256 help
variableFeeNumerator
uint256 help

Freeze Event

Parameters help

Transfer Event

Parameters help
_from
address help
_to
address help
_value
uint256 help

Unfreeze Event

Parameters help

FEE_DENOMINATOR Constant

uint256 help
100000

MAX_FEE_NUMERATOR Constant

uint256 help

MIN_FEE_NUMERATIOR Constant

uint256 help
0

MAX_TOKENS_COUNT Constant

uint256 help

DEFAULT_FEE Constant

uint256 help
5e2

BLACK_LIST_FLAG Constant

uint256 help
0x01

ZERO_FEE_FLAG Constant

uint256 help
0x02

MAX_UINT256 Constant

uint256 help
0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

owner Variable

address help
Internal Variable

feeCollector Variable

address help
Internal Variable

tokensCount Variable

uint256 help
Internal Variable

frozen Variable

bool help
Internal Variable

nonces Variable

mapping(address => uint256) help
Internal Variable

fixedFee Variable

uint256 help
Internal Variable

minVariableFee Variable

uint256 help
Internal Variable

maxVariableFee Variable

uint256 help
Internal Variable

variableFeeNumerator Variable

uint256 help
Internal Variable

addressFlags Variable

mapping(address => uint256) help
Internal Variable

delegate Variable

address help
Internal Variable

accounts Variable

mapping(address => uint256) help
Internal Variable

allowances Variable

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

Functions Expand All Collapse All

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view

Modifiers help

delegatable checks for the following:
Source Code
function totalSupply() public view delegatable returns (uint256) {
  return tokensCount;
}

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help view

Modifiers help

delegatable checks for the following:
Source Code
function balanceOf(address _owner)
  public
  view
  delegatable
  returns (uint256 balance)
{
  return AbstractToken.balanceOf(_owner);
}

Parameters help

Name Type
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help payable

Modifiers help

delegatable checks for the following:
Source Code
function transfer(address _to, uint256 _value)
  public
  payable
  delegatable
  returns (bool)
{
  if (frozen) return false;
  else if (
    (addressFlags[msg.sender] | addressFlags[_to]) & BLACK_LIST_FLAG ==
    BLACK_LIST_FLAG
  ) return false;
  else {
    uint256 fee = (addressFlags[msg.sender] | addressFlags[_to]) &
      ZERO_FEE_FLAG ==
      ZERO_FEE_FLAG
      ? 0
      : calculateFee(_value);

    if (
      _value <= accounts[msg.sender] &&
      fee <= safeSub(accounts[msg.sender], _value)
    ) {
      require(AbstractToken.transfer(_to, _value));
      require(AbstractToken.transfer(feeCollector, fee));
      return true;
    } else return false;
  }
}

Parameters help

Name Type
_from
address help
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help payable

Modifiers help

delegatable checks for the following:
Source Code
function transferFrom(
  address _from,
  address _to,
  uint256 _value
) public payable delegatable returns (bool) {
  if (frozen) return false;
  else if (
    (addressFlags[_from] | addressFlags[_to]) & BLACK_LIST_FLAG ==
    BLACK_LIST_FLAG
  ) return false;
  else {
    uint256 fee = (addressFlags[_from] | addressFlags[_to]) & ZERO_FEE_FLAG ==
      ZERO_FEE_FLAG
      ? 0
      : calculateFee(_value);

    if (
      _value <= allowances[_from][msg.sender] &&
      fee <= safeSub(allowances[_from][msg.sender], _value) &&
      _value <= accounts[_from] &&
      fee <= safeSub(accounts[_from], _value)
    ) {
      require(AbstractToken.transferFrom(_from, _to, _value));
      require(AbstractToken.transferFrom(_from, feeCollector, fee));
      return true;
    } else return false;
  }
}

Parameters help

Name Type
_spender
address help
_value
uint256 help

Properties

Visibility help public
Mutability help payable

Modifiers help

delegatable checks for the following:
Source Code
function approve(address _spender, uint256 _value)
  public
  payable
  delegatable
  returns (bool success)
{
  return AbstractToken.approve(_spender, _value);
}

Parameters help

Name Type
_owner
address help
_spender
address help

Properties

Visibility help public
Mutability help view

Modifiers help

delegatable checks for the following:
Source Code
function allowance(address _owner, address _spender)
  public
  view
  delegatable
  returns (uint256 remaining)
{
  return AbstractToken.allowance(_owner, _spender);
}

constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable

Modifiers help

delegatable checks for the following:
Source Code
function() public payable delegatable {
  revert(); // Revert if not delegated
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view

Modifiers help

delegatable checks for the following:
Source Code
function name() public view delegatable returns (string) {
  return "STASIS EURS Token";
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view

Modifiers help

delegatable checks for the following:
Source Code
function symbol() public view delegatable returns (string) {
  return "EURS";
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view

Modifiers help

delegatable checks for the following:
Source Code
function decimals() public view delegatable returns (uint8) {
  return 2;
}

delegatedTransfer keyboard_arrow_up

Parameters help

Name Type
_to
address help
_value
uint256 help
_fee
uint256 help
_nonce
uint256 help
_v
uint8 help
_r
bytes32 help
_s
bytes32 help

Properties

Visibility help public
Mutability help payable

Modifiers help

delegatable checks for the following:
Source Code
function delegatedTransfer(
  address _to,
  uint256 _value,
  uint256 _fee,
  uint256 _nonce,
  uint8 _v,
  bytes32 _r,
  bytes32 _s
) public payable delegatable returns (bool) {
  if (frozen) return false;
  else {
    address _from = ecrecover(
      keccak256(
        thisAddress(),
        messageSenderAddress(),
        _to,
        _value,
        _fee,
        _nonce
      ),
      _v,
      _r,
      _s
    );

    if (_nonce != nonces[_from]) return false;

    if (
      (addressFlags[_from] | addressFlags[_to]) & BLACK_LIST_FLAG ==
      BLACK_LIST_FLAG
    ) return false;

    uint256 fee = (addressFlags[_from] | addressFlags[_to]) & ZERO_FEE_FLAG ==
      ZERO_FEE_FLAG
      ? 0
      : calculateFee(_value);

    uint256 balance = accounts[_from];
    if (_value > balance) return false;
    balance = safeSub(balance, _value);
    if (fee > balance) return false;
    balance = safeSub(balance, fee);
    if (_fee > balance) return false;
    balance = safeSub(balance, _fee);

    nonces[_from] = _nonce + 1;

    accounts[_from] = balance;
    accounts[_to] = safeAdd(accounts[_to], _value);
    accounts[feeCollector] = safeAdd(accounts[feeCollector], fee);
    accounts[msg.sender] = safeAdd(accounts[msg.sender], _fee);

    Transfer(_from, _to, _value);
    Transfer(_from, feeCollector, fee);
    Transfer(_from, msg.sender, _fee);

    return true;
  }
}

createTokens keyboard_arrow_up

Parameters help

Name Type
_value
uint256 help

Properties

Visibility help public
Mutability help payable

Modifiers help

delegatable checks for the following:
Source Code
function createTokens(uint256 _value)
  public
  payable
  delegatable
  returns (bool)
{
  require(msg.sender == owner);

  if (_value > 0) {
    if (_value <= safeSub(MAX_TOKENS_COUNT, tokensCount)) {
      accounts[msg.sender] = safeAdd(accounts[msg.sender], _value);
      tokensCount = safeAdd(tokensCount, _value);

      Transfer(address(0), msg.sender, _value);

      return true;
    } else return false;
  } else return true;
}

burnTokens keyboard_arrow_up

Parameters help

Name Type
_value
uint256 help

Properties

Visibility help public
Mutability help payable

Modifiers help

delegatable checks for the following:
Source Code
function burnTokens(uint256 _value) public payable delegatable returns (bool) {
  require(msg.sender == owner);

  if (_value > 0) {
    if (_value <= accounts[msg.sender]) {
      accounts[msg.sender] = safeSub(accounts[msg.sender], _value);
      tokensCount = safeSub(tokensCount, _value);

      Transfer(msg.sender, address(0), _value);

      return true;
    } else return false;
  } else return true;
}

freezeTransfers keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable

Modifiers help

delegatable checks for the following:
Source Code
function freezeTransfers() public payable delegatable {
  require(msg.sender == owner);

  if (!frozen) {
    frozen = true;

    Freeze();
  }
}

unfreezeTransfers keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable

Modifiers help

delegatable checks for the following:
Source Code
function unfreezeTransfers() public payable delegatable {
  require(msg.sender == owner);

  if (frozen) {
    frozen = false;

    Unfreeze();
  }
}

setOwner keyboard_arrow_up

Parameters help

Name Type
_newOwner
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function setOwner(address _newOwner) public {
  require(msg.sender == owner);

  owner = _newOwner;
}

setFeeCollector keyboard_arrow_up

Parameters help

Name Type
_newFeeCollector
address help

Properties

Visibility help public
Mutability help payable

Modifiers help

delegatable checks for the following:
Source Code
function setFeeCollector(address _newFeeCollector) public payable delegatable {
  require(msg.sender == owner);

  feeCollector = _newFeeCollector;
}

nonce keyboard_arrow_up

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help view

Modifiers help

delegatable checks for the following:
Source Code
function nonce(address _owner) public view delegatable returns (uint256) {
  return nonces[_owner];
}

setFeeParameters keyboard_arrow_up

Parameters help

Name Type
_fixedFee
uint256 help
_minVariableFee
uint256 help
_maxVariableFee
uint256 help
_variableFeeNumerator
uint256 help

Properties

Visibility help public
Mutability help payable

Modifiers help

delegatable checks for the following:
Source Code
function setFeeParameters(
  uint256 _fixedFee,
  uint256 _minVariableFee,
  uint256 _maxVariableFee,
  uint256 _variableFeeNumerator
) public payable delegatable {
  require(msg.sender == owner);

  require(_minVariableFee <= _maxVariableFee);
  require(_variableFeeNumerator <= MAX_FEE_NUMERATOR);

  fixedFee = _fixedFee;
  minVariableFee = _minVariableFee;
  maxVariableFee = _maxVariableFee;
  variableFeeNumerator = _variableFeeNumerator;

  FeeChange(_fixedFee, _minVariableFee, _maxVariableFee, _variableFeeNumerator);
}

getFeeParameters keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view

Modifiers help

delegatable checks for the following:
Source Code
function getFeeParameters()
  public
  view
  delegatable
  returns (
    uint256 _fixedFee,
    uint256 _minVariableFee,
    uint256 _maxVariableFee,
    uint256 _variableFeeNumnerator
  )
{
  _fixedFee = fixedFee;
  _minVariableFee = minVariableFee;
  _maxVariableFee = maxVariableFee;
  _variableFeeNumnerator = variableFeeNumerator;
}

calculateFee keyboard_arrow_up

Parameters help

Name Type
_amount
uint256 help

Properties

Visibility help public
Mutability help view

Modifiers help

delegatable checks for the following:
Source Code
function calculateFee(uint256 _amount)
  public
  view
  delegatable
  returns (uint256 _fee)
{
  require(_amount <= MAX_TOKENS_COUNT);

  _fee = safeMul(_amount, variableFeeNumerator) / FEE_DENOMINATOR;
  if (_fee < minVariableFee) _fee = minVariableFee;
  if (_fee > maxVariableFee) _fee = maxVariableFee;
  _fee = safeAdd(_fee, fixedFee);
}

setFlags keyboard_arrow_up

Parameters help

Name Type
_address
address help
_flags
uint256 help

Properties

Visibility help public
Mutability help payable

Modifiers help

delegatable checks for the following:
Source Code
function setFlags(address _address, uint256 _flags) public payable delegatable {
  require(msg.sender == owner);

  addressFlags[_address] = _flags;
}

flags keyboard_arrow_up

Parameters help

Name Type
_address
address help

Properties

Visibility help public
Mutability help view

Modifiers help

delegatable checks for the following:
Source Code
function flags(address _address) public view delegatable returns (uint256) {
  return addressFlags[_address];
}

setDelegate keyboard_arrow_up

Parameters help

Name Type
_delegate
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function setDelegate(address _delegate) public {
  require(msg.sender == owner);

  if (delegate != _delegate) {
    delegate = _delegate;
    Delegation(delegate);
  }
}

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 EURSToken.thisAddress keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function thisAddress() internal view returns (address) {
  return this;
}

internal EURSToken.messageSenderAddress keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function messageSenderAddress() internal view returns (address) {
  return msg.sender;
}

internal SafeMath.safeAdd keyboard_arrow_up

Parameters help

Name Type
x
uint256 help
y
uint256 help

Properties

Visibility help internal
Mutability help pure
Source Code
function safeAdd(uint256 x, uint256 y) internal pure returns (uint256 z) {
  assert(x <= MAX_UINT256 - y);
  return x + y;
}

internal SafeMath.safeSub keyboard_arrow_up

Parameters help

Name Type
x
uint256 help
y
uint256 help

Properties

Visibility help internal
Mutability help pure

Requirements help

Source Code
function safeSub(uint256 x, uint256 y) internal pure returns (uint256 z) {
  assert(x >= y);
  return x - y;
}

internal SafeMath.safeMul keyboard_arrow_up

Parameters help

Name Type
x
uint256 help
y
uint256 help

Properties

Visibility help internal
Mutability help pure
Source Code
function safeMul(uint256 x, uint256 y) internal pure returns (uint256 z) {
  if (y == 0) return 0; // Prevent division by zero at the next line
  assert(x <= MAX_UINT256 / y);
  return x * y;
}