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
Constants (1) keyboard_arrow_up
State Variables (18) keyboard_arrow_up
Functions
isOwner keyboard_arrow_up
ownersCount keyboard_arrow_up
allOperationsCount keyboard_arrow_up
cancelPending keyboard_arrow_up
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);
}
}
transferOwnership keyboard_arrow_up
Modifiers help
onlyManyOwners checks for the following:
Source Code
function transferOwnership(address _newOwner, address _oldOwner)
public
onlyManyOwners
{
_transferOwnership(_newOwner, _oldOwner);
}
pause keyboard_arrow_up
unpause keyboard_arrow_up
addAddressToGovernanceContract keyboard_arrow_up
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;
}
}
removeAddressFromGovernanceContract keyboard_arrow_up
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;
}
}
addAddressToBlacklist keyboard_arrow_up
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;
}
}
removeAddressFromBlacklist keyboard_arrow_up
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;
}
}
totalSupply keyboard_arrow_up
balanceOf keyboard_arrow_up
transfer keyboard_arrow_up
Requirements help
Source Code
function transfer(address _to, uint256 _value)
public
whenNotPaused
returns (bool)
{
require(!blacklist[msg.sender]);
return super.transfer(_to, _value);
}
allowance keyboard_arrow_up
transferFrom keyboard_arrow_up
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);
}
approve keyboard_arrow_up
Source Code
function approve(address _spender, uint256 _value)
public
whenNotPaused
returns (bool)
{
return super.approve(_spender, _value);
}
increaseApproval keyboard_arrow_up
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;
}
decreaseApproval keyboard_arrow_up
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;
}
increaseApproval keyboard_arrow_up
Source Code
function increaseApproval(address _spender, uint256 _addedValue)
public
whenNotPaused
returns (bool success)
{
return super.increaseApproval(_spender, _addedValue);
}
decreaseApproval keyboard_arrow_up
Source Code
function decreaseApproval(address _spender, uint256 _subtractedValue)
public
whenNotPaused
returns (bool success)
{
return super.decreaseApproval(_spender, _subtractedValue);
}
mint keyboard_arrow_up
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;
}
approveForOtherContracts keyboard_arrow_up
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);
}
burnFrom keyboard_arrow_up
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
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
Requirements help
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
Requirements help
UNKNOWN VALUE
must be equal to
0
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
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
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);
}