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
Functions
setMinter keyboard_arrow_up
Requirements help
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
Requirements help
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);
}
allowance keyboard_arrow_up
approve keyboard_arrow_up
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;
}
balanceOf keyboard_arrow_up
transfer keyboard_arrow_up
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;
}
transferFrom keyboard_arrow_up
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
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
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
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
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
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
Source Code
function sub96(
uint96 a,
uint96 b,
string memory errorMessage
) internal pure returns (uint96) {
require(b <= a, errorMessage);
return a - b;
}