Blockwell

Quickswap

ERC20

This contract is an ERC20 token.

Name Quickswap
Symbol QUICK
Decimals 18
Total Supply 1,000,000 QUICK

About link description

QuickSwap (QUICK) is a cryptocurrency and operates on the Ethereum platform. QuickSwap has a current supply of 1,000,000 with 159,753 in circulation. The last known price of QuickSwap is 307.66191571 USD and is down -4.51 over the last 24 hours. It is currently trading on 31 active market(s) with $9,143,855.55 traded over the last 24 hours. More information can be found at https://quickswap.exchange/.

Stats

Public Functions 7
Event Types 3
Code Size 14,818 bytes

Events (3) keyboard_arrow_up

Approval Event

Parameters help
owner
address help
spender
address help
amount
uint256 help

MinterChanged Event

Parameters help
minter
address help
newMinter
address help

Transfer Event

Parameters help
from
address help
to
address help
amount
uint256 help

name Constant

string help
Quickswap

symbol Constant

string help
QUICK

decimals Constant

uint8 help
18

minimumTimeBetweenMints Constant

uint32 help
1 days * 365

mintCap Constant

uint8 help
2

totalSupply Variable

uint help

minter Variable

address help

mintingAllowedAfter Variable

uint help

allowances Variable

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

balances Variable

mapping(address => uint96) help
Internal Variable

Functions Expand All Collapse All

setMinter keyboard_arrow_up

Parameters help

Name Type
minter_
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function setMinter(address minter_) external {
  require(
    msg.sender == minter,
    "Quick::setMinter: only the minter can change the minter address"
  );
  emit MinterChanged(minter, minter_);
  minter = minter_;
}

mint keyboard_arrow_up

Parameters help

Name Type
dst
address help
rawAmount
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function mint(address dst, uint256 rawAmount) external {
  require(msg.sender == minter, "Quick::mint: only the minter can mint");
  require(
    block.timestamp >= mintingAllowedAfter,
    "Quick::mint: minting not allowed yet"
  );
  require(
    dst != address(0),
    "Quick::mint: cannot transfer to the zero address"
  );

  // record the mint
  mintingAllowedAfter = SafeMath.add(block.timestamp, minimumTimeBetweenMints);

  // mint the amount
  uint96 amount = safe96(rawAmount, "Quick::mint: amount exceeds 96 bits");
  require(
    amount <= SafeMath.div(SafeMath.mul(totalSupply, mintCap), 100),
    "Quick::mint: exceeded mint cap"
  );
  totalSupply = safe96(
    SafeMath.add(totalSupply, amount),
    "Quick::mint: totalSupply exceeds 96 bits"
  );

  // transfer the amount to the recipient
  balances[dst] = add96(
    balances[dst],
    amount,
    "Quick::mint: transfer amount overflows"
  );
  emit Transfer(address(0), dst, amount);
}

Parameters help

Name Type
account
address help
spender
address help

Properties

Visibility help public
Mutability help view
Source Code
function allowance(address account, address spender)
  external
  view
  returns (uint256)
{
  return allowances[account][spender];
}

Parameters help

Name Type
spender
address help
rawAmount
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function approve(address spender, uint256 rawAmount) external returns (bool) {
  uint96 amount;
  if (rawAmount == uint256(-1)) {
    amount = uint96(-1);
  } else {
    amount = safe96(rawAmount, "Quick::approve: amount exceeds 96 bits");
  }

  allowances[msg.sender][spender] = amount;

  emit Approval(msg.sender, spender, amount);
  return true;
}

Parameters help

Name Type
account
address help

Properties

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

Parameters help

Name Type
dst
address help
rawAmount
uint help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transfer(address dst, uint256 rawAmount) external returns (bool) {
  uint96 amount = safe96(rawAmount, "Quick::transfer: amount exceeds 96 bits");
  _transferTokens(msg.sender, dst, amount);
  return true;
}

Parameters help

Name Type
src
address help
dst
address help
rawAmount
uint help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transferFrom(
  address src,
  address dst,
  uint256 rawAmount
) external returns (bool) {
  address spender = msg.sender;
  uint96 spenderAllowance = allowances[src][spender];
  uint96 amount = safe96(rawAmount, "Quick::approve: amount exceeds 96 bits");

  if (spender != src && spenderAllowance != uint96(-1)) {
    uint96 newAllowance = sub96(
      spenderAllowance,
      amount,
      "Quick::transferFrom: transfer amount exceeds spender allowance"
    );
    allowances[src][spender] = newAllowance;

    emit Approval(src, spender, newAllowance);
  }

  _transferTokens(src, dst, 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 QuickToken._transferTokens keyboard_arrow_up

Parameters help

Name Type
src
address help
dst
address help
amount
uint96 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _transferTokens(
  address src,
  address dst,
  uint96 amount
) internal {
  require(
    src != address(0),
    "Quick::_transferTokens: cannot transfer from the zero address"
  );
  require(
    dst != address(0),
    "Quick::_transferTokens: cannot transfer to the zero address"
  );

  balances[src] = sub96(
    balances[src],
    amount,
    "Quick::_transferTokens: transfer amount exceeds balance"
  );
  balances[dst] = add96(
    balances[dst],
    amount,
    "Quick::_transferTokens: transfer amount overflows"
  );
  emit Transfer(src, dst, amount);
}

internal QuickToken.safe32 keyboard_arrow_up

Parameters help

Name Type
n
uint help
errorMessage
string help

Properties

Visibility help internal
Mutability help pure

Requirements help

Source Code
function safe32(uint256 n, string memory errorMessage)
  internal
  pure
  returns (uint32)
{
  require(n < 2**32, errorMessage);
  return uint32(n);
}

internal QuickToken.safe96 keyboard_arrow_up

Parameters help

Name Type
n
uint help
errorMessage
string help

Properties

Visibility help internal
Mutability help pure

Requirements help

Source Code
function safe96(uint256 n, string memory errorMessage)
  internal
  pure
  returns (uint96)
{
  require(n < 2**96, errorMessage);
  return uint96(n);
}

internal QuickToken.add96 keyboard_arrow_up

Parameters help

Name Type
a
uint96 help
b
uint96 help
errorMessage
string help

Properties

Visibility help internal
Mutability help pure

Requirements help

Source Code
function add96(
  uint96 a,
  uint96 b,
  string memory errorMessage
) internal pure returns (uint96) {
  uint96 c = a + b;
  require(c >= a, errorMessage);
  return c;
}

internal QuickToken.sub96 keyboard_arrow_up

Parameters help

Name Type
a
uint96 help
b
uint96 help
errorMessage
string help

Properties

Visibility help internal
Mutability help pure

Requirements help

Source Code
function sub96(
  uint96 a,
  uint96 b,
  string memory errorMessage
) internal pure returns (uint96) {
  require(b <= a, errorMessage);
  return a - b;
}