Blockwell

USDQ Stablecoin by Q DAO v1.0

ERC20

This contract is an ERC20 token.

Name USDQ Stablecoin by Q DAO v1.0
Symbol USDQ
Decimals 18
Total Supply 5,531,633 USDQ

About link description

USDQ (USDQ) is a cryptocurrency and operates on the Ethereum platform. USDQ has a current supply of 5,400,096.16524405 with 0 in circulation. The last known price of USDQ is 1.20029796 USD and is down -33.32 over the last 24 hours. It is currently trading on 1 active market(s) with $39.66 traded over the last 24 hours. More information can be found at https://usdq.platinum.fund/.

Stats

Public Functions 24
Event Types 17
Code Size 15,707 bytes

Events (17) keyboard_arrow_up

Approval Event

Parameters help
owner
address help
spender
address help
value
uint256 help

BlacklistedAddressAdded Event

Parameters help
addr
address help

BlacklistedAddressRemoved Event

Parameters help
addr
address help

Burn Event

Parameters help
burner
address help
value
uint256 help

GovernanceContractAdded Event

Parameters help
addr
address help

GovernanceContractRemoved Event

Parameters help
addr
address help

Mint Event

Parameters help
to
address help
amount
uint256 help

OperationCancelled Event

Parameters help
operation
bytes32 help
lastCanceller
address help

OperationCreated Event

Parameters help
operation
bytes32 help
howMany
uint help
ownersCount
uint help
proposer
address help

OperationDownvoted Event

Parameters help
operation
bytes32 help
votes
uint help
ownersCount
uint help
downvoter
address help

OperationPerformed Event

Parameters help
operation
bytes32 help
howMany
uint help
ownersCount
uint help
performer
address help

OperationUpvoted Event

Parameters help
operation
bytes32 help
votes
uint help
howMany
uint help
ownersCount
uint help
upvoter
address help

OwnershipRenounced Event

Parameters help
previousOwner
address help

OwnershipTransferred Event

Parameters help
previousOwner
address help
newOwner
address help

Pause Event

Parameters help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

Unpause Event

Parameters help

DECIMALS Constant

uint8 help
18

name Variable

string help

symbol Variable

string help

decimals Variable

uint8 help

paused Variable

bool help

howManyOwnersDecide Variable

uint256 help

blacklist Variable

mapping(address => bool) help

governanceContracts Variable

mapping(address => bool) help

ownersIndices Variable

mapping(address => uint) help

allOperationsIndicies Variable

mapping(bytes32 => uint) help

votesMaskByOperation Variable

mapping(bytes32 => uint256) help

votesCountByOperation Variable

mapping(bytes32 => uint256) help

allowed Variable

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

balances Variable

mapping(address => uint256) help
Internal Variable

totalSupply_ Variable

uint256 help
Internal Variable

owners Variable

address[] help
Internal Variable

allOperations Variable

bytes32[] help
Internal Variable

insideCallSender Variable

address help
Internal Variable

insideCallCount Variable

uint256 help
Internal Variable

Functions Expand All Collapse All

Parameters help

Name Type
wallet
address help

Properties

Visibility help public
Mutability help constant
Source Code
function isOwner(address wallet) public constant returns (bool) {
  return ownersIndices[wallet] > 0;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function ownersCount() public view returns (uint256) {
  return owners.length;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function allOperationsCount() public view returns (uint256) {
  return allOperations.length;
}

Parameters help

Name Type
operation
bytes32 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyAnyOwner checks for the following:

Requirements help

UNKNOWN VALUE must not be equal to 0
Source Code
function cancelPending(bytes32 operation) public onlyAnyOwner {
  uint256 ownerIndex = ownersIndices[msg.sender] - 1;
  require(
    (votesMaskByOperation[operation] & (2**ownerIndex)) != 0,
    "cancelPending: operation not found for this user"
  );
  votesMaskByOperation[operation] &= ~(2**ownerIndex);
  uint256 operationVotesCount = votesCountByOperation[operation] - 1;
  votesCountByOperation[operation] = operationVotesCount;
  emit OperationDownvoted(
    operation,
    operationVotesCount,
    owners.length,
    msg.sender
  );
  if (operationVotesCount == 0) {
    deleteOperation(operation);
    emit OperationCancelled(operation, msg.sender);
  }
}

Parameters help

Name Type
_newOwner
address help
_oldOwner
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyManyOwners checks for the following:

Requirements help

Source Code
function transferOwnership(address _newOwner, address _oldOwner)
  public
  onlyManyOwners
{
  _transferOwnership(_newOwner, _oldOwner);
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyManyOwners checks for the following:
Source Code
function pause() public onlyManyOwners whenNotPaused {
  paused = true;
  emit Pause();
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function unpause() public onlyManyOwners whenPaused {
  paused = false;
  emit Unpause();
}

Parameters help

Name Type
addr
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyManyOwners checks for the following:
Source Code
function addAddressToGovernanceContract(address addr)
  public
  onlyManyOwners
  returns (bool success)
{
  if (!governanceContracts[addr]) {
    governanceContracts[addr] = true;
    emit GovernanceContractAdded(addr);
    success = true;
  }
}

Parameters help

Name Type
addr
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyManyOwners checks for the following:
Source Code
function removeAddressFromGovernanceContract(address addr)
  public
  onlyManyOwners
  returns (bool success)
{
  if (governanceContracts[addr]) {
    governanceContracts[addr] = false;
    emit GovernanceContractRemoved(addr);
    success = true;
  }
}

Parameters help

Name Type
addr
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyGovernanceContracts checks for the following:
Source Code
function addAddressToBlacklist(address addr)
  public
  onlyGovernanceContracts()
  returns (bool success)
{
  if (!blacklist[addr]) {
    blacklist[addr] = true;
    emit BlacklistedAddressAdded(addr);
    success = true;
  }
}

Parameters help

Name Type
addr
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyGovernanceContracts checks for the following:
Source Code
function removeAddressFromBlacklist(address addr)
  public
  onlyGovernanceContracts()
  returns (bool success)
{
  if (blacklist[addr]) {
    blacklist[addr] = false;
    emit BlacklistedAddressRemoved(addr);
    success = 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
_owner
address help

Properties

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

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(!blacklist[msg.sender]);
  return super.transfer(_to, _value);
}

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
_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(!blacklist[_from]);
  return super.transferFrom(_from, _to, _value);
}

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)
{
  return super.approve(_spender, _value);
}

Parameters help

Name Type
_spender
address help
_addedValue
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function increaseApproval(address _spender, uint256 _addedValue)
  public
  returns (bool)
{
  allowed[msg.sender][_spender] = (
    allowed[msg.sender][_spender].add(_addedValue)
  );
  emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
  return true;
}

Parameters help

Name Type
_spender
address help
_subtractedValue
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function decreaseApproval(address _spender, uint256 _subtractedValue)
  public
  returns (bool)
{
  uint256 oldValue = allowed[msg.sender][_spender];
  if (_subtractedValue >= oldValue) {
    allowed[msg.sender][_spender] = 0;
  } else {
    allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
  }
  emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
  return true;
}

Parameters help

Name Type
_spender
address help
_addedValue
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function increaseApproval(address _spender, uint256 _addedValue)
  public
  whenNotPaused
  returns (bool success)
{
  return super.increaseApproval(_spender, _addedValue);
}

Parameters help

Name Type
_spender
address help
_subtractedValue
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function decreaseApproval(address _spender, uint256 _subtractedValue)
  public
  whenNotPaused
  returns (bool success)
{
  return super.decreaseApproval(_spender, _subtractedValue);
}

Parameters help

Name Type
_to
address help
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyGovernanceContracts checks for the following:
Source Code
function mint(address _to, uint256 _amount)
  external
  onlyGovernanceContracts()
  returns (bool)
{
  totalSupply_ = totalSupply_.add(_amount);
  balances[_to] = balances[_to].add(_amount);
  emit Mint(_to, _amount);
  emit Transfer(address(0), _to, _amount);
  return true;
}

Parameters help

Name Type
_sender
address help
_spender
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyGovernanceContracts checks for the following:
Source Code
function approveForOtherContracts(
  address _sender,
  address _spender,
  uint256 _value
) external onlyGovernanceContracts() {
  allowed[_sender][_spender] = _value;
  emit Approval(_sender, _spender, _value);
}

Parameters help

Name Type
_to
address help
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyGovernanceContracts checks for the following:

Requirements help

Source Code
function burnFrom(address _to, uint256 _amount)
  external
  onlyGovernanceContracts()
  returns (bool)
{
  allowed[_to][msg.sender] = _amount;
  transferFrom(_to, msg.sender, _amount);
  _burn(msg.sender, _amount);
  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 TrueBurnableToken._burn keyboard_arrow_up

Parameters help

Name Type
_who
address help
_value
uint256 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _burn(address _who, uint256 _value) internal {
  require(_value <= balances[_who]);

  balances[_who] = balances[_who].sub(_value);
  totalSupply_ = totalSupply_.sub(_value);
  emit Burn(_who, _value);
  emit Transfer(_who, address(0), _value);
}

internal Multiownable.checkHowManyOwners keyboard_arrow_up

Parameters help

Name Type
howMany
uint help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function checkHowManyOwners(uint256 howMany) internal returns (bool) {
  if (insideCallSender == msg.sender) {
    require(
      howMany <= insideCallCount,
      "checkHowManyOwners: nested owners modifier check require more owners"
    );
    return true;
  }

  uint256 ownerIndex = ownersIndices[msg.sender] - 1;
  require(
    ownerIndex < owners.length,
    "checkHowManyOwners: msg.sender is not an owner"
  );
  bytes32 operation = keccak256(abi.encodePacked(msg.data));

  require(
    (votesMaskByOperation[operation] & (2**ownerIndex)) == 0,
    "checkHowManyOwners: owner already voted for the operation"
  );
  votesMaskByOperation[operation] |= (2**ownerIndex);
  uint256 operationVotesCount = votesCountByOperation[operation] + 1;
  votesCountByOperation[operation] = operationVotesCount;
  if (operationVotesCount == 1) {
    allOperationsIndicies[operation] = allOperations.length;
    allOperations.push(operation);
    emit OperationCreated(operation, howMany, owners.length, msg.sender);
  }
  emit OperationUpvoted(
    operation,
    operationVotesCount,
    howMany,
    owners.length,
    msg.sender
  );

  // If enough owners confirmed the same operation
  if (votesCountByOperation[operation] == howMany) {
    deleteOperation(operation);
    emit OperationPerformed(operation, howMany, owners.length, msg.sender);
    return true;
  }

  return false;
}

internal Multiownable.deleteOperation keyboard_arrow_up

Parameters help

Name Type
operation
bytes32 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function deleteOperation(bytes32 operation) internal {
  uint256 index = allOperationsIndicies[operation];
  if (index < allOperations.length - 1) {
    // Not last
    allOperations[index] = allOperations[allOperations.length - 1];
    allOperationsIndicies[allOperations[index]] = index;
  }
  allOperations.length--;

  delete votesMaskByOperation[operation];
  delete votesCountByOperation[operation];
  delete allOperationsIndicies[operation];
}

internal Multiownable._transferOwnership keyboard_arrow_up

Parameters help

Name Type
_newOwner
address help
_oldOwner
address help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _transferOwnership(address _newOwner, address _oldOwner) internal {
  require(_newOwner != address(0));

  for (uint256 i = 0; i < owners.length; i++) {
    if (_oldOwner == owners[i]) {
      owners[i] = _newOwner;
      ownersIndices[_newOwner] = ownersIndices[_oldOwner];
      ownersIndices[_oldOwner] = 0;
      break;
    }
  }
  emit OwnershipTransferred(_oldOwner, _newOwner);
}