Q DAO Governance token v1.0
ERC20
This contract is an ERC20 token.
Name
Q DAO Governance token v1.0
Symbol
QDAO
Decimals
18
Total Supply
999,999 QDAO
About
link
description
Q DAO Governance token v1.0 (QDAO) is a cryptocurrency and operates on the Ethereum platform. Q DAO Governance token v1.0 has a current supply of 999,081.58 with 263,856.1254 in circulation. The last known price of Q DAO Governance token v1.0 is 11.61357277 USD and is up 7.79 over the last 24 hours. It is currently trading on 5 active market(s) with $760.98 traded over the last 24 hours. More information can be found at https://qdefi.io/en.
Stats
Public Functions
23
Event Types
15
Code Size
18,112 bytes
Events (15) keyboard_arrow_up
Constants (1) keyboard_arrow_up
State Variables (17) 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;
}
}
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)
{
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) {
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;
}
transferMany keyboard_arrow_up
Modifiers help
onlyGovernanceContracts checks for the following:
Requirements help
Source Code
function transferMany(address[] _recipients, uint256[] _values)
public
onlyGovernanceContracts()
{
require(_recipients.length == _values.length);
require(_recipients.length > 0);
for (uint256 i = 0; i < _recipients.length; i++) {
address recipient = _recipients[i];
uint256 value = _values[i];
require(recipient != address(0) && value != 0);
balances[msg.sender] = balances[msg.sender].sub(value);
balances[recipient] = balances[recipient].add(value);
emit Transfer(msg.sender, recipient, value);
}
}
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 QDAOBurnableToken._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);
}