ERC-20
Source Code
Overview
Max Total Supply
3,333 rich
Holders
3
Market
Price
$0.00 @ 0.000000 ETH
Onchain Market Cap
-
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xe5541B6B...d9c8816F7 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
Inscription
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./Logarithm.sol";
import "./TransferHelper.sol";
// This is common token interface, get balance of owner's token by ERC20/ERC721.
interface ICommonToken {
function balanceOf(address owner) external returns(uint256);
}
// This contract is extended from ERC20
contract Inscription is ERC20, ReentrancyGuard {
using Logarithm for int256;
uint256 public cap; // Max amount
uint256 public limitPerMint; // Limitaion of each mint
uint256 public inscriptionId; // Inscription Id
uint256 public maxMintSize; // max mint size, that means the max mint quantity is: maxMintSize * limitPerMint
uint256 public freezeTime; // The frozen time (interval) between two mints is a fixed number of seconds. You can mint, but you will need to pay an additional mint fee, and this fee will be double for each mint.
address public onlyContractAddress; // Only addresses that hold these assets can mint
uint256 public onlyMinQuantity; // Only addresses that the quantity of assets hold more than this amount can mint
uint256 public baseFee; // base fee of the second mint after frozen interval. The first mint after frozen time is free.
uint256 public fundingCommission; // commission rate of fund raising, 100 means 1%
uint256 public crowdFundingRate; // rate of crowdfunding
address payable public crowdfundingAddress; // receiving fee of crowdfunding
address payable public inscriptionFactory;
mapping(address => uint256) public lastMintTimestamp; // record the last mint timestamp of account
mapping(address => uint256) public lastMintFee; // record the last mint fee
constructor(
string memory _name, // token name
string memory _tick, // token tick, same as symbol. must be 4 characters.
uint256 _cap, // Max amount
uint256 _limitPerMint, // Limitaion of each mint
uint256 _inscriptionId, // Inscription Id
uint256 _maxMintSize, // max mint size, that means the max mint quantity is: maxMintSize * limitPerMint. This is only availabe for non-frozen time token.
uint256 _freezeTime, // The frozen time (interval) between two mints is a fixed number of seconds. You can mint, but you will need to pay an additional mint fee, and this fee will be double for each mint.
address _onlyContractAddress, // Only addresses that hold these assets can mint
uint256 _onlyMinQuantity, // Only addresses that the quantity of assets hold more than this amount can mint
uint256 _baseFee, // base fee of the second mint after frozen interval. The first mint after frozen time is free.
uint256 _fundingCommission, // commission rate of fund raising, 100 means 1%
uint256 _crowdFundingRate, // rate of crowdfunding
address payable _crowdFundingAddress, // receiving fee of crowdfunding
address payable _inscriptionFactory
) ERC20(_name, _tick) {
require(_cap >= _limitPerMint, "Limit per mint exceed cap");
cap = _cap;
limitPerMint = _limitPerMint;
inscriptionId = _inscriptionId;
maxMintSize = _maxMintSize;
freezeTime = _freezeTime;
onlyContractAddress = _onlyContractAddress;
onlyMinQuantity = _onlyMinQuantity;
baseFee = _baseFee;
fundingCommission = _fundingCommission;
crowdFundingRate = _crowdFundingRate;
crowdfundingAddress = _crowdFundingAddress;
inscriptionFactory = _inscriptionFactory;
}
function mint(address _to) payable public nonReentrant {
require(msg.sender == tx.origin, "only EOA");
require(msg.sender == _to, "only self mint");
// Check if the quantity after mint will exceed the cap
require(totalSupply() + limitPerMint <= cap, "Touched cap");
// Check if the assets in the msg.sender is satisfied
require(onlyContractAddress == address(0x0) || ICommonToken(onlyContractAddress).balanceOf(msg.sender) >= onlyMinQuantity, "You don't have required assets");
if(lastMintTimestamp[msg.sender] + freezeTime > block.timestamp) {
// The min extra tip is double of last mint fee
lastMintFee[msg.sender] = lastMintFee[msg.sender] == 0 ? baseFee : lastMintFee[msg.sender] * 2;
// Transfer the fee to the crowdfunding address
if(crowdFundingRate > 0) {
// Check if the tip is high than the min extra fee
require(msg.value >= crowdFundingRate + lastMintFee[msg.sender], "Send some ETH as fee and crowdfunding");
_dispatchFunding(crowdFundingRate);
}
// double check the tip
require(msg.value >= crowdFundingRate + lastMintFee[msg.sender], "Insufficient mint fee");
// Transfer the tip to InscriptionFactory smart contract
if(msg.value - crowdFundingRate > 0) TransferHelper.safeTransferETH(inscriptionFactory, msg.value - crowdFundingRate);
} else {
// Transfer the fee to the crowdfunding address
if(crowdFundingRate > 0) {
require(msg.value >= crowdFundingRate, "Send some ETH as crowdfunding");
_dispatchFunding(msg.value);
}
// Out of frozen time, free mint. Reset the timestamp and mint times.
lastMintFee[msg.sender] = 0;
lastMintTimestamp[msg.sender] = block.timestamp;
}
// Do mint
_mint(_to, limitPerMint);
}
// batch mint is only available for non-frozen-time tokens
function batchMint(address _to, uint256 _num) payable public nonReentrant {
require(msg.sender == tx.origin, "only EOA");
require(msg.sender == _to, "only self mint");
require(_num <= maxMintSize, "exceed max mint size");
require(totalSupply() + _num * limitPerMint <= cap, "Touch cap");
require(freezeTime == 0, "Batch mint only for non-frozen token");
require(onlyContractAddress == address(0x0) || ICommonToken(onlyContractAddress).balanceOf(msg.sender) >= onlyMinQuantity, "You don't have required assets");
if(crowdFundingRate > 0) {
require(msg.value >= crowdFundingRate * _num, "Crowdfunding ETH not enough");
_dispatchFunding(msg.value);
}
for(uint256 i = 0; i < _num; i++) _mint(_to, limitPerMint);
}
function getMintFee(address _addr) public view returns(uint256 mintedTimes, uint256 nextMintFee) {
if(lastMintTimestamp[_addr] + freezeTime > block.timestamp) {
int256 scale = 1e18;
int256 halfScale = 5e17;
// times = log_2(lastMintFee / baseFee) + 1 (if lastMintFee > 0)
nextMintFee = lastMintFee[_addr] == 0 ? baseFee : lastMintFee[_addr] * 2;
mintedTimes = uint256((Logarithm.log2(int256(nextMintFee / baseFee) * scale, scale, halfScale) + 1) / scale) + 1;
}
}
function _dispatchFunding(uint256 _amount) private {
uint256 commission = _amount * fundingCommission / 10000;
TransferHelper.safeTransferETH(crowdfundingAddress, _amount - commission);
if(commission > 0) TransferHelper.safeTransferETH(inscriptionFactory, commission);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be _NOT_ENTERED
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overridden;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address to, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_transfer(owner, to, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_approve(owner, spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(
address from,
address to,
uint256 amount
) public virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, allowance(owner, spender) + addedValue);
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
address owner = _msgSender();
uint256 currentAllowance = allowance(owner, spender);
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `from` to `to`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
function _transfer(
address from,
address to,
uint256 amount
) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(from, to, amount);
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[from] = fromBalance - amount;
// Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
// decrementing then incrementing.
_balances[to] += amount;
}
emit Transfer(from, to, amount);
_afterTokenTransfer(from, to, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
unchecked {
// Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
_balances[account] += amount;
}
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
// Overflow not possible: amount <= accountBalance <= totalSupply.
_totalSupply -= amount;
}
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Updates `owner` s allowance for `spender` based on spent `amount`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(
address owner,
address spender,
uint256 amount
) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "ERC20: insufficient allowance");
unchecked {
_approve(owner, spender, currentAllowance - amount);
}
}
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
library Logarithm {
/// @notice Finds the zero-based index of the first one in the binary representation of x.
/// @dev See the note on msb in the "Find First Set" Wikipedia article https://en.wikipedia.org/wiki/Find_first_set
/// @param x The uint256 number for which to find the index of the most significant bit.
/// @return msb The index of the most significant bit as an uint256.
function mostSignificantBit(uint256 x) internal pure returns (uint256 msb) {
if (x >= 2**128) {
x >>= 128;
msb += 128;
}
if (x >= 2**64) {
x >>= 64;
msb += 64;
}
if (x >= 2**32) {
x >>= 32;
msb += 32;
}
if (x >= 2**16) {
x >>= 16;
msb += 16;
}
if (x >= 2**8) {
x >>= 8;
msb += 8;
}
if (x >= 2**4) {
x >>= 4;
msb += 4;
}
if (x >= 2**2) {
x >>= 2;
msb += 2;
}
if (x >= 2**1) {
// No need to shift x any more.
msb += 1;
}
}
/// @notice Calculates the binary logarithm of x.
///
/// @dev Based on the iterative approximation algorithm.
/// https://en.wikipedia.org/wiki/Binary_logarithm#Iterative_approximation
///
/// Requirements:
/// - x must be greater than zero.
///
/// Caveats:
/// - The results are nor perfectly accurate to the last digit, due to the lossy precision of the iterative approximation.
///
/// @param x The signed 59.18-decimal fixed-point number for which to calculate the binary logarithm.
/// @return result The binary logarithm as a signed 59.18-decimal fixed-point number.
function log2(int256 x, int256 scale, int256 halfScale) internal pure returns (int256 result) {
require(x > 0);
unchecked {
// This works because log2(x) = -log2(1/x).
int256 sign;
if (x >= scale) {
sign = 1;
} else {
sign = -1;
// Do the fixed-point inversion inline to save gas. The numerator is SCALE * SCALE.
assembly {
x := div(1000000000000000000000000000000000000, x)
}
}
// Calculate the integer part of the logarithm and add it to the result and finally calculate y = x * 2^(-n).
uint256 n = mostSignificantBit(uint256(x / scale));
// The integer part of the logarithm as a signed 59.18-decimal fixed-point number. The operation can't overflow
// because n is maximum 255, SCALE is 1e18 and sign is either 1 or -1.
result = int256(n) * scale;
// This is y = x * 2^(-n).
int256 y = x >> n;
// If y = 1, the fractional part is zero.
if (y == scale) {
return result * sign;
}
// Calculate the fractional part via the iterative approximation.
// The "delta >>= 1" part is equivalent to "delta /= 2", but shifting bits is faster.
for (int256 delta = int256(halfScale); delta > 0; delta >>= 1) {
y = (y * y) / scale;
// Is y^2 > 2 and so in the range [2,4)?
if (y >= 2 * scale) {
// Add the 2^(-m) factor to the logarithm.
result += delta;
// Corresponds to z/2 on Wikipedia.
y >>= 1;
}
}
result *= sign;
}
}
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.6.0;
// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
function safeApprove(
address token,
address to,
uint256 value
) internal {
// bytes4(keccak256(bytes('approve(address,uint256)')));
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
require(
success && (data.length == 0 || abi.decode(data, (bool))),
'TransferHelper::safeApprove: approve failed'
);
}
function safeTransfer(
address token,
address to,
uint256 value
) internal {
// bytes4(keccak256(bytes('transfer(address,uint256)')));
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
require(
success && (data.length == 0 || abi.decode(data, (bool))),
'TransferHelper::safeTransfer: transfer failed'
);
}
function safeTransferFrom(
address token,
address from,
address to,
uint256 value
) internal {
// bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
require(
success && (data.length == 0 || abi.decode(data, (bool))),
'TransferHelper::transferFrom: transferFrom failed'
);
}
function safeTransferETH(address to, uint256 value) internal {
(bool success, ) = to.call{value: value}(new bytes(0));
require(success, 'TransferHelper::safeTransferETH: ETH transfer failed');
}
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"viaIR": true,
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_tick","type":"string"},{"internalType":"uint256","name":"_cap","type":"uint256"},{"internalType":"uint256","name":"_limitPerMint","type":"uint256"},{"internalType":"uint256","name":"_inscriptionId","type":"uint256"},{"internalType":"uint256","name":"_maxMintSize","type":"uint256"},{"internalType":"uint256","name":"_freezeTime","type":"uint256"},{"internalType":"address","name":"_onlyContractAddress","type":"address"},{"internalType":"uint256","name":"_onlyMinQuantity","type":"uint256"},{"internalType":"uint256","name":"_baseFee","type":"uint256"},{"internalType":"uint256","name":"_fundingCommission","type":"uint256"},{"internalType":"uint256","name":"_crowdFundingRate","type":"uint256"},{"internalType":"address payable","name":"_crowdFundingAddress","type":"address"},{"internalType":"address payable","name":"_inscriptionFactory","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_num","type":"uint256"}],"name":"batchMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"cap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"crowdFundingRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"crowdfundingAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"freezeTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundingCommission","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"getMintFee","outputs":[{"internalType":"uint256","name":"mintedTimes","type":"uint256"},{"internalType":"uint256","name":"nextMintFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"inscriptionFactory","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"inscriptionId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastMintFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastMintTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"limitPerMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"onlyContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"onlyMinQuantity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
0x608060405234620004c85762001ca8803803806200001d81620004cd565b92833981016101c082820312620004c85781516001600160401b038111620004c857816200004d918401620004f3565b602083015190916001600160401b038211620004c85762000070918401620004f3565b60408301516060840151608085015160a086015160c087015160e08801519795929492916001600160a01b0389168903620004c8578695869586958695620000e36101a0620000db6101806101606101406101206101008e01519d01519d01519d01519d0162000565565b9c0162000565565b8c51909c6001600160401b0382116200039b5760035490600182811c92168015620004bd575b60208310146200037a5781601f84931162000448575b50602090601f8311600114620003bd57600092620003b1575b50508160011b916000199060031b1c1916176003555b8051906001600160401b0382116200039b5760045490600182811c9216801562000390575b60208310146200037a5781601f84931162000308575b50602090601f83116001146200027d5760009262000271575b50508160011b916000199060031b1c1916176004555b60016005558181106200022c57600655600755600855600955600a5560018060a01b03199660018060a01b031687600b541617600b55600c55600d55600e55600f5560018060a01b031682601054161760105560018060a01b031690601154161760115560405161172d90816200057b8239f35b60405162461bcd60e51b815260206004820152601960248201527f4c696d697420706572206d696e742065786365656420636170000000000000006044820152606490fd5b015190503880620001a2565b600460009081527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b9350601f198516905b818110620002ef5750908460019594939210620002d5575b505050811b01600455620001b8565b015160001960f88460031b161c19169055388080620002c6565b92936020600181928786015181550195019301620002ae565b60046000529091507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b601f840160051c81016020851062000372575b90849392915b601f830160051c820181106200036257505062000189565b600081558594506001016200034a565b508062000344565b634e487b7160e01b600052602260045260246000fd5b91607f169162000173565b634e487b7160e01b600052604160045260246000fd5b01519050388062000138565b600360009081527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b9350601f198516905b8181106200042f575090846001959493921062000415575b505050811b016003556200014e565b015160001960f88460031b161c1916905538808062000406565b92936020600181928786015181550195019301620003ee565b60036000529091507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f840160051c81019160208510620004b2575b90601f859493920160051c01905b818110620004a257506200011f565b6000815584935060010162000493565b909150819062000485565b91607f169162000109565b600080fd5b6040519190601f01601f191682016001600160401b038111838210176200039b57604052565b919080601f84011215620004c85782516001600160401b0381116200039b5760209062000529601f8201601f19168301620004cd565b92818452828287010111620004c85760005b8181106200055157508260009394955001015290565b85810183015184820184015282016200053b565b51906001600160a01b0382168203620004c85756fe608060408181526004918236101561001657600080fd5b600092833560e01c91826306fdde0314610dff57508163095ea7b314610dd557816316b8060c14610db657816318160ddd14610d975781631c4cd1a514610d5f57816323b872dd14610c955781632ca9160414610c76578163313ce56714610c5a578163355274ea14610c3b5781633950935114610beb57816343508b05146109795781635c4caf95146109505781636a627842146106265781636ef25c3a1461060757816370a08231146105d05781638f81537b1461049e57816395d89b411461039b5781639f805924146103725781639fc6a1dc14610349578163a457c2d7146102a157508063a9059cbb14610271578063bde593c614610253578063be13197b1461021c578063cb06bfdb146101fe578063dd62ed3e146101b6578063def504bb14610198578063e2ce9f511461017a5763fd7e1bee1461015957600080fd5b34610176578160031936011261017657602090600a549051908152f35b5080fd5b50346101765781600319360112610176576020906007549051908152f35b5034610176578160031936011261017657602090600c549051908152f35b5034610176578060031936011261017657806020926101d3610f3d565b6101db610f58565b6001600160a01b0391821683526001865283832091168252845220549051908152f35b5034610176578160031936011261017657602090600e549051908152f35b50346101765760203660031901126101765760209181906001600160a01b03610243610f3d565b1681526012845220549051908152f35b50346101765781600319360112610176576020906008549051908152f35b503461017657806003193601126101765760209061029a610290610f3d565b6024359033610fc9565b5160018152f35b905082346103465782600319360112610346576102bc610f3d565b918360243592338152600160205281812060018060a01b03861682526020522054908282106102f55760208561029a8585038733611137565b608490602086519162461bcd60e51b8352820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152fd5b80fd5b50503461017657816003193601126101765760115490516001600160a01b039091168152602090f35b505034610176578160031936011261017657600b5490516001600160a01b039091168152602090f35b838334610176578160031936011261017657805191809380549160019083821c92828516948515610494575b60209586861081146104815785895290811561045d5750600114610405575b61040187876103f7828c0383610f6e565b5191829182610ef4565b0390f35b81529295507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b82841061044a5750505082610401946103f7928201019486806103e6565b805486850188015292860192810161042c565b60ff19168887015250505050151560051b83010192506103f78261040186806103e6565b634e487b7160e01b845260228352602484fd5b93607f16936103c7565b90508234610346576020366003190112610346576104ba610f3d565b908092819260018060a01b031680835260126020526104df86842054600a5490610fa6565b42106104f5575b50505082519182526020820152f35b82526013602052848220549193509150806105a95750600d54915b600d548381156105965704670de0b6b3a764000090818102908082058314901517156105835761053f90611454565b60018101908360018312911290801582169115161761058357059160018301809311610570575050908380806104e6565b634e487b7160e01b825260119052602490fd5b634e487b7160e01b835260118452602483fd5b634e487b7160e01b835260128452602483fd5b8060011b9081046002036105bd5791610510565b634e487b7160e01b835260118252602483fd5b5050346101765760203660031901126101765760209181906001600160a01b036105f8610f3d565b16815280845220549051908152f35b505034610176578160031936011261017657602090600d549051908152f35b8391506020908160031936011261094c5761063f610f3d565b91610648611319565b610653323314611239565b6001600160a01b03916106693385851614611270565b61067860025460075490610fa6565b6006541061091d578483600b54168381159182156108a8575b505061069d91506112ad565b338552601282526106b486862054600a5490610fa6565b42101561081c573385526013825285852054806107fa5750600d545b338652601383528087872055600f54908161078a575b5050600f5491338652601381526107008787205484610fa6565b3410610750575050610729939450610718813461130c565b610731575b50505b6007549061136f565b600160055580f35b6107436107499260115416913461130c565b90611616565b838061071d565b865162461bcd60e51b8152918201526015602482015274496e73756666696369656e74206d696e742066656560581b604482015260649150fd5b6107949082610fa6565b34106107aa576107a390611412565b86806106e6565b5060849186519162461bcd60e51b8352820152602560248201527f53656e6420736f6d65204554482061732066656520616e642063726f776466756044820152646e64696e6760d81b6064820152fd5b8060011b908104600203156106d057634e487b7160e01b865260118252602486fd5b90949150600f5480610849575b505060126107299394338652601381528583812055524290842055610720565b341061086757506012610729939461086034611412565b9493610829565b84606492519162461bcd60e51b8352820152601d60248201527f53656e6420736f6d65204554482061732063726f776466756e64696e670000006044820152fd5b90915060248951809481936370a0823160e01b835233888401525af180156109135786906108e0575b600c5487925011158389610691565b508281813d831161090c575b6108f68183610f6e565b810103126109085761069d90516108d1565b8580fd5b503d6108ec565b87513d88823e3d90fd5b60649186519162461bcd60e51b8352820152600b60248201526a0546f7563686564206361760ac1b6044820152fd5b8280fd5b50503461017657816003193601126101765760105490516001600160a01b039091168152602090f35b9180915060031936011261094c5761098f610f3d565b9160249283359261099e611319565b6109a9323314611239565b6001600160a01b03906109bf3384841614611270565b6009548511610bb357600254916109e36007936109dd8554896112f9565b90610fa6565b60065410610b8557600a54610b36578790600b54168015908115610abc575b50610a0d91506112ad565b600f548581610a5a575b505050855b848110610a2c5786600160055580f35b610a3782548461136f565b6000198114610a4857600101610a1c565b634e487b7160e01b8752601184528587fd5b610a63916112f9565b3410610a7b5750610a7334611412565b388085610a17565b5162461bcd60e51b8152602081850152601b818701527f43726f776466756e64696e6720455448206e6f7420656e6f75676800000000006044820152606490fd5b60209150888451809481936370a0823160e01b8352338b8401525af18015610b2c578890610af5575b600c548992501115610a0d610a02565b506020813d8211610b24575b81610b0e60209383610f6e565b81010312610b2057610a0d9051610ae5565b8780fd5b3d9150610b01565b82513d8a823e3d90fd5b815162461bcd60e51b81526020818701528088018890527f4261746368206d696e74206f6e6c7920666f72206e6f6e2d66726f7a656e207460448201526337b5b2b760e11b6064820152608490fd5b815162461bcd60e51b8152602081870152600981890152680546f756368206361760bc1b6044820152606490fd5b5162461bcd60e51b815260208185015260148187015273657863656564206d6178206d696e742073697a6560601b6044820152606490fd5b50503461017657806003193601126101765761029a602092610c34610c0e610f3d565b338352600186528483206001600160a01b03821684528652918490205460243590610fa6565b9033611137565b5050346101765781600319360112610176576020906006549051908152f35b5050346101765781600319360112610176576020905160128152f35b505034610176578160031936011261017657602090600f549051908152f35b8391503461017657606036600319011261017657610cb1610f3d565b610cb9610f58565b91846044359460018060a01b038416815260016020528181203382526020522054906000198203610cf3575b60208661029a878787610fc9565b848210610d1c5750918391610d116020969561029a95033383611137565b919394819350610ce5565b606490602087519162461bcd60e51b8352820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152fd5b5050346101765760203660031901126101765760209181906001600160a01b03610d87610f3d565b1681526013845220549051908152f35b5050346101765781600319360112610176576020906002549051908152f35b5050346101765781600319360112610176576020906009549051908152f35b50503461017657806003193601126101765760209061029a610df5610f3d565b6024359033611137565b92915034610ef05783600319360112610ef057600354600181811c9186908281168015610ee6575b6020958686108214610ed35750848852908115610eb15750600114610e58575b61040186866103f7828b0383610f6e565b929550600383527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b828410610e9e5750505082610401946103f7928201019438610e47565b8054868501880152928601928101610e81565b60ff191687860152505050151560051b83010192506103f78261040138610e47565b634e487b7160e01b845260229052602483fd5b93607f1693610e27565b8380fd5b6020808252825181830181905290939260005b828110610f2957505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501610f07565b600435906001600160a01b0382168203610f5357565b600080fd5b602435906001600160a01b0382168203610f5357565b90601f8019910116810190811067ffffffffffffffff821117610f9057604052565b634e487b7160e01b600052604160045260246000fd5b91908201809211610fb357565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b039081169182156110e457169182156110935760008281528060205260408120549180831061103f57604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef958760209652828652038282205586815220818154019055604051908152a3565b60405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608490fd5b60405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608490fd5b60405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608490fd5b6001600160a01b039081169182156111e857169182156111985760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260018252604060002085600052825280604060002055604051908152a3565b60405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b60405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b1561124057565b60405162461bcd60e51b81526020600482015260086024820152676f6e6c7920454f4160c01b6044820152606490fd5b1561127757565b60405162461bcd60e51b815260206004820152600e60248201526d1bdb9b1e481cd95b19881b5a5b9d60921b6044820152606490fd5b156112b457565b60405162461bcd60e51b815260206004820152601e60248201527f596f7520646f6e277420686176652072657175697265642061737365747300006044820152606490fd5b81810292918115918404141715610fb357565b91908203918211610fb357565b60026005541461132a576002600555565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b6001600160a01b03169081156113cd577fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020826113b1600094600254610fa6565b60025584845283825260408420818154019055604051908152a3565b60405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606490fd5b612710611421600e54836112f9565b0461143c60018060a01b03926107438385601054169261130c565b80611445575050565b6114529160115416611616565b565b6000908181131561017657670de0b6b3a7640000918282126115f8576001925b81818405600160801b8110156115ed575b680100000000000000008110156115d8575b6401000000008110156115c3575b620100008110156115ae575b610100811015611599575b6010811015611584575b600481101561155b575b6002111561153b575b81810293811d9082821461153057506706f05b59d3b20000905b83821361150257505050500290565b808391020590671bc16d674ec80000821215611522575b60011d906114f3565b809194019360011d90611519565b925050929150020290565b60018101809111156114d957634e487b7160e01b83526011600452602483fd5b60021c906002810180911161157057906114d0565b634e487b7160e01b84526011600452602484fd5b60041c906004810180911161157057906114c6565b60081c906008810180911161157057906114bc565b60101c906010810180911161157057906114b1565b60201c906020810180911161157057906114a5565b60401c90604081018091116115705790611497565b60809150811c611485565b600019926ec097ce7bc90715b34b9f10000000009290920491611474565b60405167ffffffffffffffff91906020810183811182821017610f905760405260008080958194828095525af1913d156116f0573d9182116116dc576040519161166a601f8201601f191660200184610f6e565b825260203d92013e5b1561167a57565b60405162461bcd60e51b815260206004820152603460248201527f5472616e7366657248656c7065723a3a736166655472616e736665724554483a60448201527308115512081d1c985b9cd9995c8819985a5b195960621b6064820152608490fd5b634e487b7160e01b81526041600452602490fd5b505061167356fea2646970667358221220541762ac11c9322e70e21a2d84a435c2211cdca4519cb8b247cc0d634d0fe80564736f6c6343000813003300000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000001b91e6eba26bb2bb40000000000000000000000000000000000000000000000000003c3a38e5ab72fc0000000000000000000000000000000000000000000000000000000000000000003a00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000258000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c6bf52634000000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000019945ca262000000000000000000000000000330f292220464310bf9e939c4614d9e2b398c26d0000000000000000000000003c3db7f2965bf79e3c565810ee8a73fa28a3c3910000000000000000000000000000000000000000000000000000000000000008626520726963682100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000047269636800000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060408181526004918236101561001657600080fd5b600092833560e01c91826306fdde0314610dff57508163095ea7b314610dd557816316b8060c14610db657816318160ddd14610d975781631c4cd1a514610d5f57816323b872dd14610c955781632ca9160414610c76578163313ce56714610c5a578163355274ea14610c3b5781633950935114610beb57816343508b05146109795781635c4caf95146109505781636a627842146106265781636ef25c3a1461060757816370a08231146105d05781638f81537b1461049e57816395d89b411461039b5781639f805924146103725781639fc6a1dc14610349578163a457c2d7146102a157508063a9059cbb14610271578063bde593c614610253578063be13197b1461021c578063cb06bfdb146101fe578063dd62ed3e146101b6578063def504bb14610198578063e2ce9f511461017a5763fd7e1bee1461015957600080fd5b34610176578160031936011261017657602090600a549051908152f35b5080fd5b50346101765781600319360112610176576020906007549051908152f35b5034610176578160031936011261017657602090600c549051908152f35b5034610176578060031936011261017657806020926101d3610f3d565b6101db610f58565b6001600160a01b0391821683526001865283832091168252845220549051908152f35b5034610176578160031936011261017657602090600e549051908152f35b50346101765760203660031901126101765760209181906001600160a01b03610243610f3d565b1681526012845220549051908152f35b50346101765781600319360112610176576020906008549051908152f35b503461017657806003193601126101765760209061029a610290610f3d565b6024359033610fc9565b5160018152f35b905082346103465782600319360112610346576102bc610f3d565b918360243592338152600160205281812060018060a01b03861682526020522054908282106102f55760208561029a8585038733611137565b608490602086519162461bcd60e51b8352820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152fd5b80fd5b50503461017657816003193601126101765760115490516001600160a01b039091168152602090f35b505034610176578160031936011261017657600b5490516001600160a01b039091168152602090f35b838334610176578160031936011261017657805191809380549160019083821c92828516948515610494575b60209586861081146104815785895290811561045d5750600114610405575b61040187876103f7828c0383610f6e565b5191829182610ef4565b0390f35b81529295507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b82841061044a5750505082610401946103f7928201019486806103e6565b805486850188015292860192810161042c565b60ff19168887015250505050151560051b83010192506103f78261040186806103e6565b634e487b7160e01b845260228352602484fd5b93607f16936103c7565b90508234610346576020366003190112610346576104ba610f3d565b908092819260018060a01b031680835260126020526104df86842054600a5490610fa6565b42106104f5575b50505082519182526020820152f35b82526013602052848220549193509150806105a95750600d54915b600d548381156105965704670de0b6b3a764000090818102908082058314901517156105835761053f90611454565b60018101908360018312911290801582169115161761058357059160018301809311610570575050908380806104e6565b634e487b7160e01b825260119052602490fd5b634e487b7160e01b835260118452602483fd5b634e487b7160e01b835260128452602483fd5b8060011b9081046002036105bd5791610510565b634e487b7160e01b835260118252602483fd5b5050346101765760203660031901126101765760209181906001600160a01b036105f8610f3d565b16815280845220549051908152f35b505034610176578160031936011261017657602090600d549051908152f35b8391506020908160031936011261094c5761063f610f3d565b91610648611319565b610653323314611239565b6001600160a01b03916106693385851614611270565b61067860025460075490610fa6565b6006541061091d578483600b54168381159182156108a8575b505061069d91506112ad565b338552601282526106b486862054600a5490610fa6565b42101561081c573385526013825285852054806107fa5750600d545b338652601383528087872055600f54908161078a575b5050600f5491338652601381526107008787205484610fa6565b3410610750575050610729939450610718813461130c565b610731575b50505b6007549061136f565b600160055580f35b6107436107499260115416913461130c565b90611616565b838061071d565b865162461bcd60e51b8152918201526015602482015274496e73756666696369656e74206d696e742066656560581b604482015260649150fd5b6107949082610fa6565b34106107aa576107a390611412565b86806106e6565b5060849186519162461bcd60e51b8352820152602560248201527f53656e6420736f6d65204554482061732066656520616e642063726f776466756044820152646e64696e6760d81b6064820152fd5b8060011b908104600203156106d057634e487b7160e01b865260118252602486fd5b90949150600f5480610849575b505060126107299394338652601381528583812055524290842055610720565b341061086757506012610729939461086034611412565b9493610829565b84606492519162461bcd60e51b8352820152601d60248201527f53656e6420736f6d65204554482061732063726f776466756e64696e670000006044820152fd5b90915060248951809481936370a0823160e01b835233888401525af180156109135786906108e0575b600c5487925011158389610691565b508281813d831161090c575b6108f68183610f6e565b810103126109085761069d90516108d1565b8580fd5b503d6108ec565b87513d88823e3d90fd5b60649186519162461bcd60e51b8352820152600b60248201526a0546f7563686564206361760ac1b6044820152fd5b8280fd5b50503461017657816003193601126101765760105490516001600160a01b039091168152602090f35b9180915060031936011261094c5761098f610f3d565b9160249283359261099e611319565b6109a9323314611239565b6001600160a01b03906109bf3384841614611270565b6009548511610bb357600254916109e36007936109dd8554896112f9565b90610fa6565b60065410610b8557600a54610b36578790600b54168015908115610abc575b50610a0d91506112ad565b600f548581610a5a575b505050855b848110610a2c5786600160055580f35b610a3782548461136f565b6000198114610a4857600101610a1c565b634e487b7160e01b8752601184528587fd5b610a63916112f9565b3410610a7b5750610a7334611412565b388085610a17565b5162461bcd60e51b8152602081850152601b818701527f43726f776466756e64696e6720455448206e6f7420656e6f75676800000000006044820152606490fd5b60209150888451809481936370a0823160e01b8352338b8401525af18015610b2c578890610af5575b600c548992501115610a0d610a02565b506020813d8211610b24575b81610b0e60209383610f6e565b81010312610b2057610a0d9051610ae5565b8780fd5b3d9150610b01565b82513d8a823e3d90fd5b815162461bcd60e51b81526020818701528088018890527f4261746368206d696e74206f6e6c7920666f72206e6f6e2d66726f7a656e207460448201526337b5b2b760e11b6064820152608490fd5b815162461bcd60e51b8152602081870152600981890152680546f756368206361760bc1b6044820152606490fd5b5162461bcd60e51b815260208185015260148187015273657863656564206d6178206d696e742073697a6560601b6044820152606490fd5b50503461017657806003193601126101765761029a602092610c34610c0e610f3d565b338352600186528483206001600160a01b03821684528652918490205460243590610fa6565b9033611137565b5050346101765781600319360112610176576020906006549051908152f35b5050346101765781600319360112610176576020905160128152f35b505034610176578160031936011261017657602090600f549051908152f35b8391503461017657606036600319011261017657610cb1610f3d565b610cb9610f58565b91846044359460018060a01b038416815260016020528181203382526020522054906000198203610cf3575b60208661029a878787610fc9565b848210610d1c5750918391610d116020969561029a95033383611137565b919394819350610ce5565b606490602087519162461bcd60e51b8352820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152fd5b5050346101765760203660031901126101765760209181906001600160a01b03610d87610f3d565b1681526013845220549051908152f35b5050346101765781600319360112610176576020906002549051908152f35b5050346101765781600319360112610176576020906009549051908152f35b50503461017657806003193601126101765760209061029a610df5610f3d565b6024359033611137565b92915034610ef05783600319360112610ef057600354600181811c9186908281168015610ee6575b6020958686108214610ed35750848852908115610eb15750600114610e58575b61040186866103f7828b0383610f6e565b929550600383527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b828410610e9e5750505082610401946103f7928201019438610e47565b8054868501880152928601928101610e81565b60ff191687860152505050151560051b83010192506103f78261040138610e47565b634e487b7160e01b845260229052602483fd5b93607f1693610e27565b8380fd5b6020808252825181830181905290939260005b828110610f2957505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501610f07565b600435906001600160a01b0382168203610f5357565b600080fd5b602435906001600160a01b0382168203610f5357565b90601f8019910116810190811067ffffffffffffffff821117610f9057604052565b634e487b7160e01b600052604160045260246000fd5b91908201809211610fb357565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b039081169182156110e457169182156110935760008281528060205260408120549180831061103f57604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef958760209652828652038282205586815220818154019055604051908152a3565b60405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608490fd5b60405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608490fd5b60405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608490fd5b6001600160a01b039081169182156111e857169182156111985760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260018252604060002085600052825280604060002055604051908152a3565b60405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b60405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b1561124057565b60405162461bcd60e51b81526020600482015260086024820152676f6e6c7920454f4160c01b6044820152606490fd5b1561127757565b60405162461bcd60e51b815260206004820152600e60248201526d1bdb9b1e481cd95b19881b5a5b9d60921b6044820152606490fd5b156112b457565b60405162461bcd60e51b815260206004820152601e60248201527f596f7520646f6e277420686176652072657175697265642061737365747300006044820152606490fd5b81810292918115918404141715610fb357565b91908203918211610fb357565b60026005541461132a576002600555565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b6001600160a01b03169081156113cd577fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020826113b1600094600254610fa6565b60025584845283825260408420818154019055604051908152a3565b60405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606490fd5b612710611421600e54836112f9565b0461143c60018060a01b03926107438385601054169261130c565b80611445575050565b6114529160115416611616565b565b6000908181131561017657670de0b6b3a7640000918282126115f8576001925b81818405600160801b8110156115ed575b680100000000000000008110156115d8575b6401000000008110156115c3575b620100008110156115ae575b610100811015611599575b6010811015611584575b600481101561155b575b6002111561153b575b81810293811d9082821461153057506706f05b59d3b20000905b83821361150257505050500290565b808391020590671bc16d674ec80000821215611522575b60011d906114f3565b809194019360011d90611519565b925050929150020290565b60018101809111156114d957634e487b7160e01b83526011600452602483fd5b60021c906002810180911161157057906114d0565b634e487b7160e01b84526011600452602484fd5b60041c906004810180911161157057906114c6565b60081c906008810180911161157057906114bc565b60101c906010810180911161157057906114b1565b60201c906020810180911161157057906114a5565b60401c90604081018091116115705790611497565b60809150811c611485565b600019926ec097ce7bc90715b34b9f10000000009290920491611474565b60405167ffffffffffffffff91906020810183811182821017610f905760405260008080958194828095525af1913d156116f0573d9182116116dc576040519161166a601f8201601f191660200184610f6e565b825260203d92013e5b1561167a57565b60405162461bcd60e51b815260206004820152603460248201527f5472616e7366657248656c7065723a3a736166655472616e736665724554483a60448201527308115512081d1c985b9cd9995c8819985a5b195960621b6064820152608490fd5b634e487b7160e01b81526041600452602490fd5b505061167356fea2646970667358221220541762ac11c9322e70e21a2d84a435c2211cdca4519cb8b247cc0d634d0fe80564736f6c63430008130033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.
Add Token to MetaMask (Web3)