Feature Tip: Add private address tag to any address under My Name Tag !
ERC-20
Finance
Overview
Max Total Supply
311,020,080 NOTHING
Holders
462 (0.00%)
Market
Price
$0.00 @ 0.000000 ETH
Onchain Market Cap
$197,416.89
Circulating Supply Market Cap
$0.00
Other Info
Token Contract (WITH 18 Decimals)
Balance
0.553336701723075182 NOTHINGValue
$0.00 ( ~0 Eth) [0.0000%]Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
Nothing
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT /********************************************************************* ,/ // ,// ___ /| |// `__/\_ --(/|___/-/ \|\_-\___ __-_`- /-/ \. |\_-___,-\_____--/_)' ) \ \ -_ / __ \( `( __`\| `\__| |\)\ ) /(/| ,._____., ',--//-| \ | ' / / __. \, / /,---| \ / / / _. \ \ `/`_/ _,' | | | | ( ( \ | ,/\'__/'/ | | | \ \`--, `_/_------______/ \( )/ | | \ \_. \, \___/\ | | \_ \ \ \ \ \ \_ \ \ / \ \ \ \._ \__ \_| | \ \ \___ \ \ | \ \__ \__ \ \_ | \ | | \_____ \ ____ | | | \ \__ ---' .__\ | | | \ \__ --- / ) | \ / \ \____/ / ()( \ `---_ /| \__________/(,--__ \_________. | ./ | | \ \ `---_\--, \ \_,./ | | \ \_ ` \ /`---_______-\ \\ / \ \.___,`| / \ \\ \ \ | \_ \| \ ( |: | \ \ \ | / / | ; \ \ \ \ ( `_' \ | \. \ \. \ `__/ | | \ \ \. \ | | \ \ \ \ ( ) \ | \ | | | | \ \ \ I ` ( __; ( _; ('-_'; |___\ \___: \___: *********************************************************************/ /********************************************************************* ,--, ,.-. , \, '-,-`,'-.' | ._ /| \ , |\ } )/ / `-,', [ , |\ /| | | / \| |/` ,` | | ,.` `,` `, | | _,...( ( .', \ \ __ ,-` ` , , `/ |,' Y ( /_L\ \ \_\,``, ` , , / | ) _,/ \ ' ` ,_ _`_,-,<._.< / / ', `>.,` ` ` ,., |_ | / \/` `, ` ,` | /__,.-` _, `\ -,-..\ _ \ ` / , / `._) _,-\` \ \_,,.) /\ ` / / ) (-,, `` , | ,` ) | \_\ '-` | `( \ / /```( , --, ,' \ |`<` , | / /_,--`\ <\ V /> ,` )<_/) | \ _____) ,-, ,` ` (_,\ \ | /) / __/ / `----` (-, \ ) \ ('_.-._)/ /,` / | / ` `/ \\ V V, /` / ,--\( , <_/`\\ || / ( ,``- \/| \-A.A-`| / ,>,_ )_,..( )\ -,,_-` _--` (_ \|` _,/_ / \_ ,--` \( ` <.,../` `-.._ _,-` *********************************************************************/ pragma solidity 0.8.23; import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import {IUniswapV2Factory} from "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; import {Transformable} from "./Transformable.sol"; import "./Common.sol"; /// @title NOTHING contract /// @notice An ERC20 token contract Nothing is ERC20, Transformable { /// @notice Thrown when transform done is called even after it's done error AlreadyTransformed(); /// @notice Thrown when transform() is called in block having token transfer error NotAllowed(); /// @notice Thrown when unlock() is called and transfers are already unlocked error AlreadyUnlocked(); string private constant NOTHING = "NOTHING"; string private constant SOMETHING = "SOMETHING"; uint256 private constant TOTAL_SUPPLY = 311_020_080e18; uint256 public lastUpdateBlock; bool private _unlocked; address private immutable _initialHolder; bool public isTransforming; bool public isTransformed; /// @dev Constructor /// @param initHolder The address of the wallet to which initial tokens will be minted /// @param baseToken The address of the baseToken token /// @param usdt The address of the usdt token /// @param factory The uniswap factory contract address constructor( address initHolder, IERC20Metadata baseToken, IERC20Metadata usdt, IUniswapV2Factory factory ) ERC20(NOTHING, NOTHING) Transformable(baseToken, usdt, factory, 1e18) { if ( initHolder == address(0) || address(baseToken) == address(0) || address(usdt) == address(0) || address(factory) == address(0) ) { revert ZeroAddress(); } _mint(initHolder, TOTAL_SUPPLY); _initialHolder = initHolder; } /// @inheritdoc ERC20 /// @dev May return nothing or something function name() public view override returns (string memory) { if (isTransformed) { return SOMETHING; } return super.name(); } /// @inheritdoc ERC20 /// @dev May return nothing or something function symbol() public view override returns (string memory) { if (isTransformed) { return SOMETHING; } return super.symbol(); } /// @notice Updates unlocked to true so transfers are enabled function unlock() external { if (msg.sender != _initialHolder) { revert NotAllowed(); } if (_unlocked) { revert AlreadyUnlocked(); } _unlocked = true; } /// @notice Updates name and symbol when the price reaches 1 dollar function transform() external { if (block.number == lastUpdateBlock) { revert NotAllowed(); } if (isTransformed) { revert AlreadyTransformed(); } if (!isTransforming) { _initTransform(); isTransforming = true; } else { if (_finalizeTransform()) { isTransformed = true; } isTransforming = false; } } /// @inheritdoc ERC20 /// @dev Overridden to store block number on every update function _update( address from, address to, uint256 value ) internal override { uint256 lastBlock = lastUpdateBlock; if (lastBlock != block.number) { lastUpdateBlock = block.number; } if (!_unlocked && from != _initialHolder) { revert NotAllowed(); } super._update(from, to, value); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "./IERC20.sol"; import {IERC20Metadata} from "./extensions/IERC20Metadata.sol"; import {Context} from "../../utils/Context.sol"; import {IERC20Errors} from "../../interfaces/draft-IERC6093.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}. * * 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]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * 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. */ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { mapping(address account => uint256) private _balances; mapping(address account => mapping(address spender => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * 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 returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual 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 default value returned by this function, unless * it's 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 returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual 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 `value`. */ function transfer(address to, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _transfer(owner, to, value); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `value` 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 value) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, value); 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 `value`. * - the caller must have allowance for ``from``'s tokens of at least * `value`. */ function transferFrom(address from, address to, uint256 value) public virtual returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, value); _transfer(from, to, value); return true; } /** * @dev Moves a `value` 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. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _transfer(address from, address to, uint256 value) internal { if (from == address(0)) { revert ERC20InvalidSender(address(0)); } if (to == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(from, to, value); } /** * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding * this function. * * Emits a {Transfer} event. */ function _update(address from, address to, uint256 value) internal virtual { if (from == address(0)) { // Overflow check required: The rest of the code assumes that totalSupply never overflows _totalSupply += value; } else { uint256 fromBalance = _balances[from]; if (fromBalance < value) { revert ERC20InsufficientBalance(from, fromBalance, value); } unchecked { // Overflow not possible: value <= fromBalance <= totalSupply. _balances[from] = fromBalance - value; } } if (to == address(0)) { unchecked { // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply. _totalSupply -= value; } } else { unchecked { // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256. _balances[to] += value; } } emit Transfer(from, to, value); } /** * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0). * Relies on the `_update` mechanism * * Emits a {Transfer} event with `from` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _mint(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(address(0), account, value); } /** * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply. * Relies on the `_update` mechanism. * * Emits a {Transfer} event with `to` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead */ function _burn(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidSender(address(0)); } _update(account, address(0), value); } /** * @dev Sets `value` 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. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address owner, address spender, uint256 value) internal { _approve(owner, spender, value, true); } /** * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event. * * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any * `Approval` event during `transferFrom` operations. * * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to * true using the following override: * ``` * function _approve(address owner, address spender, uint256 value, bool) internal virtual override { * super._approve(owner, spender, value, true); * } * ``` * * Requirements are the same as {_approve}. */ function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual { if (owner == address(0)) { revert ERC20InvalidApprover(address(0)); } if (spender == address(0)) { revert ERC20InvalidSpender(address(0)); } _allowances[owner][spender] = value; if (emitEvent) { emit Approval(owner, spender, value); } } /** * @dev Updates `owner` s allowance for `spender` based on spent `value`. * * Does not update the allowance value in case of infinite allowance. * Revert if not enough allowance is available. * * Does not emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 value) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { if (currentAllowance < value) { revert ERC20InsufficientAllowance(spender, currentAllowance, value); } unchecked { _approve(owner, spender, currentAllowance - value, false); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. */ 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 v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @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 value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` 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 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
pragma solidity >=0.5.0; interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; }
pragma solidity >=0.5.0; interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.23; /// @notice Thrown when updating an address with zero address error ZeroAddress();
// SPDX-License-Identifier: MIT pragma solidity 0.8.23; import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import {IUniswapV2Factory} from "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; import {UniswapV2Helper} from "./UniswapV2Helper.sol"; import {ZeroAddress} from "./Common.sol"; /// @title Transformable contract /// @dev Implements a price oracle that computes the price and transforms the contract accordingly, /// @notice Please note that the price if once met the threshold needs to be above the threshold /// for a number of minutes for the transformation to happen abstract contract Transformable { /// @notice Thrown when price of token is less than 1 dollar error PriceTooLow(); /// @notice Thrown when second update is called in less than PRICE_TRANSFORMATION_INTERVAL error PeriodNotOver(); uint256 public constant PRICE_TRANSFORMATION_INTERVAL = 2 minutes; uint256 private immutable ONE_USDT; uint256 private immutable ONE_NOTHING; uint256 private _initBlock; address private immutable NOTHING; address private immutable BASE_TOKEN; IUniswapV2Factory public immutable FACTORY; IERC20Metadata private immutable USDT; /// @dev Emitted when transform is initiated event TransformInitiated(); /// @dev Emitted when transform is finalized event Transformed(); /// @dev Constructor /// @param baseToken The address of the baseToken token /// @param usdt The total the usdt token /// @param factory The uniswap factory contract address /// @param oneNothing The one nothing token amount constructor( IERC20Metadata baseToken, IERC20Metadata usdt, IUniswapV2Factory factory, uint256 oneNothing ) { if ( address(baseToken) == address(0) || address(usdt) == address(0) || address(factory) == address(0) ) { revert ZeroAddress(); } NOTHING = address(this); BASE_TOKEN = address(baseToken); USDT = usdt; ONE_USDT = 10 ** USDT.decimals(); ONE_NOTHING = oneNothing; FACTORY = factory; } /// @dev Initiates the transform process, only called when token price reaches 1 dollar function _initTransform() internal { uint256 priceUSDT = _getPrice(); if (priceUSDT < ONE_USDT) { revert PriceTooLow(); } _initBlock = block.timestamp; emit TransformInitiated(); } /// @dev Finalizes the transform process, only called after a period of PRICE_TRANSFORMATION_INTERVAL when /// transform is initiated function _finalizeTransform() internal returns (bool) { uint256 blockTimestampPrev = _initBlock; uint256 timeElapsed = block.timestamp - blockTimestampPrev; if (timeElapsed < PRICE_TRANSFORMATION_INTERVAL) { revert PeriodNotOver(); } uint256 priceUSDT = _getPrice(); if (priceUSDT >= ONE_USDT) { emit Transformed(); return true; } _initBlock = 0; return false; } /// @dev Gives the current price of token function _getPrice() private view returns (uint256 priceUSDT) { address[] memory path = new address[](3); path[0] = NOTHING; path[1] = BASE_TOKEN; path[2] = address(USDT); priceUSDT = UniswapV2Helper.getAmountsOut(FACTORY, ONE_NOTHING, path)[ path.length - 1 ]; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.23; import {IUniswapV2Pair} from "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol"; import {IUniswapV2Factory} from "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; import "./Common.sol"; library UniswapV2Helper { /// @notice Thrown when two tokens are identical error IdenticalAddresses(); /// @notice Thrown when input amount is zero error InsufficientAmount(); /// @notice Thrown when there is no liquidity of the tokens error InsufficientLiquidity(); /// @notice Thrown when path array length is less than two error InvalidPath(); /// @dev Returns sorted token addresses, used to handle return values from pairs sorted in this order function sortTokens( address tokenA, address tokenB ) internal pure returns (address token0, address token1) { if (tokenA == tokenB) { revert IdenticalAddresses(); } (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA); if (token0 == address(0)) { revert ZeroAddress(); } } /// @dev Calculates the CREATE2 address for a pair without making any external calls function pairFor( IUniswapV2Factory factory, address tokenA, address tokenB ) internal view returns (address pair) { (address token0, address token1) = sortTokens(tokenA, tokenB); pair = factory.getPair(token0, token1); } /// @dev Fetches and sorts the reserves for a pair function getReserves( IUniswapV2Factory factory, address tokenA, address tokenB ) internal view returns (uint112 reserveA, uint112 reserveB) { (address token0, ) = sortTokens(tokenA, tokenB); IUniswapV2Pair pair = IUniswapV2Pair(pairFor(factory, tokenA, tokenB)); uint112 reserve0; uint112 reserve1; if (address(pair) != address(0)) { (reserve0, reserve1, ) = IUniswapV2Pair(pair).getReserves(); } (reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0); } /// @dev Given some amount of an asset and pair reserves, returns an equivalent amount of the other function quote( uint256 amountA, uint256 reserveA, uint256 reserveB ) internal pure returns (uint256 amountB) { if (amountA == 0) { revert InsufficientAmount(); } if (reserveA == 0 && reserveB == 0) { revert InsufficientLiquidity(); } amountB = (amountA * reserveB) / reserveA; } /// @dev Given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset function getAmountOut( uint256 amountIn, uint256 reserveIn, uint256 reserveOut ) internal pure returns (uint256 amountOut) { if (amountIn == 0) { revert InsufficientAmount(); } if (reserveIn == 0 && reserveOut == 0) { revert InsufficientLiquidity(); } uint256 numerator = amountIn * reserveOut; uint256 denominator = reserveIn; amountOut = numerator / denominator; } /// @dev Performs chained getAmountOut calculations on any number of pairs function getAmountsOut( IUniswapV2Factory factory, uint256 amountIn, address[] memory path ) internal view returns (uint256[] memory amounts) { if (path.length < 2) { revert InvalidPath(); } amounts = new uint256[](path.length); amounts[0] = amountIn; for (uint256 i; i < path.length - 1; i++) { (uint256 reserveIn, uint256 reserveOut) = getReserves( factory, path[i], path[i + 1] ); amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut); } } }
{ "optimizer": { "enabled": true, "runs": 1000000 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"initHolder","type":"address"},{"internalType":"contract IERC20Metadata","name":"baseToken","type":"address"},{"internalType":"contract IERC20Metadata","name":"usdt","type":"address"},{"internalType":"contract IUniswapV2Factory","name":"factory","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyTransformed","type":"error"},{"inputs":[],"name":"AlreadyUnlocked","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[],"name":"IdenticalAddresses","type":"error"},{"inputs":[],"name":"InsufficientAmount","type":"error"},{"inputs":[],"name":"InsufficientLiquidity","type":"error"},{"inputs":[],"name":"InvalidPath","type":"error"},{"inputs":[],"name":"NotAllowed","type":"error"},{"inputs":[],"name":"PeriodNotOver","type":"error"},{"inputs":[],"name":"PriceTooLow","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"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"},{"anonymous":false,"inputs":[],"name":"TransformInitiated","type":"event"},{"anonymous":false,"inputs":[],"name":"Transformed","type":"event"},{"inputs":[],"name":"FACTORY","outputs":[{"internalType":"contract IUniswapV2Factory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE_TRANSFORMATION_INTERVAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"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":"value","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":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isTransformed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isTransforming","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"value","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":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"transform","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlock","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6101606040523480156200001257600080fd5b5060405162001ed338038062001ed3833981016040819052620000359162000418565b828282670de0b6b3a7640000604051806040016040528060078152602001664e4f5448494e4760c81b815250604051806040016040528060078152602001664e4f5448494e4760c81b815250816003908162000092919062000527565b506004620000a1828262000527565b5050506001600160a01b0384161580620000c257506001600160a01b038316155b80620000d557506001600160a01b038216155b15620000f45760405163d92e233d60e01b815260040160405180910390fd5b3060c0526001600160a01b0384811660e05283166101208190526040805163313ce56760e01b8152905163313ce567916004808201926020929091908290030181865afa1580156200014a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001709190620005f3565b6200017d90600a62000734565b60805260a0526001600160a01b03908116610100528616159150819050620001ac57506001600160a01b038316155b80620001bf57506001600160a01b038216155b80620001d257506001600160a01b038116155b15620001f15760405163d92e233d60e01b815260040160405180910390fd5b62000209846b010145105235a0484ac000006200021f565b5050506001600160a01b0316610140526200075b565b6001600160a01b0382166200024f5760405163ec442f0560e01b8152600060048201526024015b60405180910390fd5b6200025d6000838362000261565b5050565b6006544381146200027157436006555b60075460ff161580156200029a5750610140516001600160a01b0316846001600160a01b031614155b15620002b957604051631eb49d6d60e11b815260040160405180910390fd5b620002c6848484620002cc565b50505050565b6001600160a01b038316620002fb578060026000828254620002ef919062000745565b909155506200036f9050565b6001600160a01b03831660009081526020819052604090205481811015620003505760405163391434e360e21b81526001600160a01b0385166004820152602481018290526044810183905260640162000246565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b0382166200038d57600280548290039055620003ac565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051620003f291815260200190565b60405180910390a3505050565b6001600160a01b03811681146200041557600080fd5b50565b600080600080608085870312156200042f57600080fd5b84516200043c81620003ff565b60208601519094506200044f81620003ff565b60408601519093506200046281620003ff565b60608601519092506200047581620003ff565b939692955090935050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620004ab57607f821691505b602082108103620004cc57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000522576000816000526020600020601f850160051c81016020861015620004fd5750805b601f850160051c820191505b818110156200051e5782815560010162000509565b5050505b505050565b81516001600160401b0381111562000543576200054362000480565b6200055b8162000554845462000496565b84620004d2565b602080601f8311600181146200059357600084156200057a5750858301515b600019600386901b1c1916600185901b1785556200051e565b600085815260208120601f198616915b82811015620005c457888601518255948401946001909101908401620005a3565b5085821015620005e35787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000602082840312156200060657600080fd5b815160ff811681146200061857600080fd5b9392505050565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115620006765781600019048211156200065a576200065a6200061f565b808516156200066857918102915b93841c93908002906200063a565b509250929050565b6000826200068f575060016200072e565b816200069e575060006200072e565b8160018114620006b75760028114620006c257620006e2565b60019150506200072e565b60ff841115620006d657620006d66200061f565b50506001821b6200072e565b5060208310610133831016604e8410600b841016171562000707575081810a6200072e565b62000713838362000635565b80600019048211156200072a576200072a6200061f565b0290505b92915050565b60006200061860ff8416836200067e565b808201808211156200072e576200072e6200061f565b60805160a05160c05160e051610100516101205161014051611708620007cb600039600081816104d00152610a9101526000610c260152600081816101700152610c9701526000610bb801526000610b4a01526000610cb80152600081816107d001526108b401526117086000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c806370a0823111610097578063a69df4b511610066578063a69df4b514610232578063a9059cbb1461023a578063c6bc6d501461024d578063dd62ed3e1461025f57600080fd5b806370a08231146101d85780638551be571461020e57806395d89b4114610221578063a218141b1461022957600080fd5b80632dd31000116100d35780632dd310001461016b5780633054c79a146101b7578063313ce567146101c15780636c86d79f146101d057600080fd5b806306fdde0314610105578063095ea7b31461012357806318160ddd1461014657806323b872dd14610158575b600080fd5b61010d6102a5565b60405161011a919061138e565b60405180910390f35b610136610131366004611420565b6102fe565b604051901515815260200161011a565b6002545b60405190815260200161011a565b61013661016636600461144c565b610318565b6101927f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161011a565b6101bf61033c565b005b6040516012815260200161011a565b61014a607881565b61014a6101e636600461148d565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6007546101369062010000900460ff1681565b61010d610464565b61014a60065481565b6101bf6104b8565b610136610248366004611420565b610591565b60075461013690610100900460ff1681565b61014a61026d3660046114b1565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b60075460609062010000900460ff16156102f1575060408051808201909152600981527f534f4d455448494e470000000000000000000000000000000000000000000000602082015290565b6102f961059f565b905090565b60003361030c818585610631565b60019150505b92915050565b600033610326858285610643565b610331858585610717565b506001949350505050565b6006544303610377576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60075462010000900460ff16156103ba576040517fcc5f7e6c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600754610100900460ff166103ff576103d16107c2565b600780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100179055565b610407610858565b1561043a57600780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff16620100001790555b600780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055565b60075460609062010000900460ff16156104b0575060408051808201909152600981527f534f4d455448494e470000000000000000000000000000000000000000000000602082015290565b6102f961091b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610527576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60075460ff1615610564576040517f5090d6c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60003361030c818585610717565b6060600380546105ae906114ea565b80601f01602080910402602001604051908101604052809291908181526020018280546105da906114ea565b80156106275780601f106105fc57610100808354040283529160200191610627565b820191906000526020600020905b81548152906001019060200180831161060a57829003601f168201915b5050505050905090565b61063e838383600161092a565b505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107115781811015610702576040517ffb8f41b200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416600482015260248101829052604481018390526064015b60405180910390fd5b6107118484848403600061092a565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316610767576040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600060048201526024016106f9565b73ffffffffffffffffffffffffffffffffffffffff82166107b7576040517fec442f05000000000000000000000000000000000000000000000000000000008152600060048201526024016106f9565b61063e838383610a72565b60006107cc610b22565b90507f0000000000000000000000000000000000000000000000000000000000000000811015610828576040517fdbbbe82200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b426005556040517f6ec09119c59b5a7c413a0563366b5fc0707fcb28b20aab4c8c7473a88281c7ec90600090a150565b60055460009081610869824261156c565b905060788110156108a6576040517fbef9bbeb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006108b0610b22565b90507f0000000000000000000000000000000000000000000000000000000000000000811061090c576040517f3e4b7b9be5fd5dbf0d9ae62922437cf1ae76014cf526695323952dba5b14005990600090a16001935050505090565b50506000600581905592915050565b6060600480546105ae906114ea565b73ffffffffffffffffffffffffffffffffffffffff841661097a576040517fe602df05000000000000000000000000000000000000000000000000000000008152600060048201526024016106f9565b73ffffffffffffffffffffffffffffffffffffffff83166109ca576040517f94280d62000000000000000000000000000000000000000000000000000000008152600060048201526024016106f9565b73ffffffffffffffffffffffffffffffffffffffff80851660009081526001602090815260408083209387168352929052208290558015610711578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610a6491815260200190565b60405180910390a350505050565b600654438114610a8157436006555b60075460ff16158015610ae057507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b15610b17576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610711848484610d09565b60408051600380825260808201909252600091829190602082016060803683370190505090507f000000000000000000000000000000000000000000000000000000000000000081600081518110610b7c57610b7c6115ae565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610bea57610bea6115ae565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600281518110610c5857610c586115ae565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050610cdd7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000083610eb4565b60018251610ceb919061156c565b81518110610cfb57610cfb6115ae565b602002602001015191505090565b73ffffffffffffffffffffffffffffffffffffffff8316610d41578060026000828254610d3691906115dd565b90915550610df39050565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610dc7576040517fe450d38c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516600482015260248101829052604481018390526064016106f9565b73ffffffffffffffffffffffffffffffffffffffff841660009081526020819052604090209082900390555b73ffffffffffffffffffffffffffffffffffffffff8216610e1c57600280548290039055610e48565b73ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604090208054820190555b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610ea791815260200190565b60405180910390a3505050565b6060600282511015610ef2576040517f20db826700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815167ffffffffffffffff811115610f0c57610f0c61157f565b604051908082528060200260200182016040528015610f35578160200160208202803683370190505b5090508281600081518110610f4c57610f4c6115ae565b60200260200101818152505060005b60018351610f69919061156c565b81101561103557600080610fbc87868581518110610f8957610f896115ae565b602002602001015187866001610f9f91906115dd565b81518110610faf57610faf6115ae565b602002602001015161103d565b6dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff169150611004848481518110610ff557610ff56115ae565b60200260200101518383611140565b846110108560016115dd565b81518110611020576110206115ae565b60209081029190910101525050600101610f5b565b509392505050565b600080600061104c85856111e2565b509050600061105c8787876112e0565b905060008073ffffffffffffffffffffffffffffffffffffffff8316156110f3578273ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156110c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ec9190611613565b5090925090505b8373ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161461112d578082611130565b81815b909a909950975050505050505050565b60008360000361117c576040517f5945ea5600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82158015611188575081155b156111bf576040517fbb55fd2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006111cb8386611663565b9050836111d8818361167a565b9695505050505050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff160361124a576040517fbd969eb000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610611284578284611287565b83835b909250905073ffffffffffffffffffffffffffffffffffffffff82166112d9576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250929050565b60008060006112ef85856111e2565b6040517fe6a4390500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808416600483015280831660248301529294509092509087169063e6a4390590604401602060405180830381865afa15801561136a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d891906116b5565b60006020808352835180602085015260005b818110156113bc578581018301518582016040015282016113a0565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b73ffffffffffffffffffffffffffffffffffffffff8116811461141d57600080fd5b50565b6000806040838503121561143357600080fd5b823561143e816113fb565b946020939093013593505050565b60008060006060848603121561146157600080fd5b833561146c816113fb565b9250602084013561147c816113fb565b929592945050506040919091013590565b60006020828403121561149f57600080fd5b81356114aa816113fb565b9392505050565b600080604083850312156114c457600080fd5b82356114cf816113fb565b915060208301356114df816113fb565b809150509250929050565b600181811c908216806114fe57607f821691505b602082108103611537577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b818103818111156103125761031261153d565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b808201808211156103125761031261153d565b80516dffffffffffffffffffffffffffff8116811461160e57600080fd5b919050565b60008060006060848603121561162857600080fd5b611631846115f0565b925061163f602085016115f0565b9150604084015163ffffffff8116811461165857600080fd5b809150509250925092565b80820281158282048414176103125761031261153d565b6000826116b0577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000602082840312156116c757600080fd5b81516114aa816113fb56fea264697066735822122069e6c9b585e669a64375b4c0571ee307bc5835f1daf685b52ca06370aee8b8c864736f6c63430008170033000000000000000000000000b20f9d5e82c3d0f34877db3887249f1a26d0b9850000000000000000000000004385328cc4d643ca98dfea734360c0f596c83449000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000005c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101005760003560e01c806370a0823111610097578063a69df4b511610066578063a69df4b514610232578063a9059cbb1461023a578063c6bc6d501461024d578063dd62ed3e1461025f57600080fd5b806370a08231146101d85780638551be571461020e57806395d89b4114610221578063a218141b1461022957600080fd5b80632dd31000116100d35780632dd310001461016b5780633054c79a146101b7578063313ce567146101c15780636c86d79f146101d057600080fd5b806306fdde0314610105578063095ea7b31461012357806318160ddd1461014657806323b872dd14610158575b600080fd5b61010d6102a5565b60405161011a919061138e565b60405180910390f35b610136610131366004611420565b6102fe565b604051901515815260200161011a565b6002545b60405190815260200161011a565b61013661016636600461144c565b610318565b6101927f0000000000000000000000005c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f81565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161011a565b6101bf61033c565b005b6040516012815260200161011a565b61014a607881565b61014a6101e636600461148d565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6007546101369062010000900460ff1681565b61010d610464565b61014a60065481565b6101bf6104b8565b610136610248366004611420565b610591565b60075461013690610100900460ff1681565b61014a61026d3660046114b1565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b60075460609062010000900460ff16156102f1575060408051808201909152600981527f534f4d455448494e470000000000000000000000000000000000000000000000602082015290565b6102f961059f565b905090565b60003361030c818585610631565b60019150505b92915050565b600033610326858285610643565b610331858585610717565b506001949350505050565b6006544303610377576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60075462010000900460ff16156103ba576040517fcc5f7e6c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600754610100900460ff166103ff576103d16107c2565b600780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100179055565b610407610858565b1561043a57600780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff16620100001790555b600780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055565b60075460609062010000900460ff16156104b0575060408051808201909152600981527f534f4d455448494e470000000000000000000000000000000000000000000000602082015290565b6102f961091b565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000b20f9d5e82c3d0f34877db3887249f1a26d0b9851614610527576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60075460ff1615610564576040517f5090d6c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60003361030c818585610717565b6060600380546105ae906114ea565b80601f01602080910402602001604051908101604052809291908181526020018280546105da906114ea565b80156106275780601f106105fc57610100808354040283529160200191610627565b820191906000526020600020905b81548152906001019060200180831161060a57829003601f168201915b5050505050905090565b61063e838383600161092a565b505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107115781811015610702576040517ffb8f41b200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416600482015260248101829052604481018390526064015b60405180910390fd5b6107118484848403600061092a565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316610767576040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600060048201526024016106f9565b73ffffffffffffffffffffffffffffffffffffffff82166107b7576040517fec442f05000000000000000000000000000000000000000000000000000000008152600060048201526024016106f9565b61063e838383610a72565b60006107cc610b22565b90507f00000000000000000000000000000000000000000000000000000000000f4240811015610828576040517fdbbbe82200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b426005556040517f6ec09119c59b5a7c413a0563366b5fc0707fcb28b20aab4c8c7473a88281c7ec90600090a150565b60055460009081610869824261156c565b905060788110156108a6576040517fbef9bbeb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006108b0610b22565b90507f00000000000000000000000000000000000000000000000000000000000f4240811061090c576040517f3e4b7b9be5fd5dbf0d9ae62922437cf1ae76014cf526695323952dba5b14005990600090a16001935050505090565b50506000600581905592915050565b6060600480546105ae906114ea565b73ffffffffffffffffffffffffffffffffffffffff841661097a576040517fe602df05000000000000000000000000000000000000000000000000000000008152600060048201526024016106f9565b73ffffffffffffffffffffffffffffffffffffffff83166109ca576040517f94280d62000000000000000000000000000000000000000000000000000000008152600060048201526024016106f9565b73ffffffffffffffffffffffffffffffffffffffff80851660009081526001602090815260408083209387168352929052208290558015610711578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610a6491815260200190565b60405180910390a350505050565b600654438114610a8157436006555b60075460ff16158015610ae057507f000000000000000000000000b20f9d5e82c3d0f34877db3887249f1a26d0b98573ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b15610b17576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610711848484610d09565b60408051600380825260808201909252600091829190602082016060803683370190505090507f0000000000000000000000007ab7d54f8cb054141142f04ba0b3d41ac4c4d61c81600081518110610b7c57610b7c6115ae565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000004385328cc4d643ca98dfea734360c0f596c8344981600181518110610bea57610bea6115ae565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec781600281518110610c5857610c586115ae565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050610cdd7f0000000000000000000000005c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f7f0000000000000000000000000000000000000000000000000de0b6b3a764000083610eb4565b60018251610ceb919061156c565b81518110610cfb57610cfb6115ae565b602002602001015191505090565b73ffffffffffffffffffffffffffffffffffffffff8316610d41578060026000828254610d3691906115dd565b90915550610df39050565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610dc7576040517fe450d38c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516600482015260248101829052604481018390526064016106f9565b73ffffffffffffffffffffffffffffffffffffffff841660009081526020819052604090209082900390555b73ffffffffffffffffffffffffffffffffffffffff8216610e1c57600280548290039055610e48565b73ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604090208054820190555b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610ea791815260200190565b60405180910390a3505050565b6060600282511015610ef2576040517f20db826700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815167ffffffffffffffff811115610f0c57610f0c61157f565b604051908082528060200260200182016040528015610f35578160200160208202803683370190505b5090508281600081518110610f4c57610f4c6115ae565b60200260200101818152505060005b60018351610f69919061156c565b81101561103557600080610fbc87868581518110610f8957610f896115ae565b602002602001015187866001610f9f91906115dd565b81518110610faf57610faf6115ae565b602002602001015161103d565b6dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff169150611004848481518110610ff557610ff56115ae565b60200260200101518383611140565b846110108560016115dd565b81518110611020576110206115ae565b60209081029190910101525050600101610f5b565b509392505050565b600080600061104c85856111e2565b509050600061105c8787876112e0565b905060008073ffffffffffffffffffffffffffffffffffffffff8316156110f3578273ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156110c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ec9190611613565b5090925090505b8373ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161461112d578082611130565b81815b909a909950975050505050505050565b60008360000361117c576040517f5945ea5600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82158015611188575081155b156111bf576040517fbb55fd2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006111cb8386611663565b9050836111d8818361167a565b9695505050505050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff160361124a576040517fbd969eb000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610611284578284611287565b83835b909250905073ffffffffffffffffffffffffffffffffffffffff82166112d9576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250929050565b60008060006112ef85856111e2565b6040517fe6a4390500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808416600483015280831660248301529294509092509087169063e6a4390590604401602060405180830381865afa15801561136a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d891906116b5565b60006020808352835180602085015260005b818110156113bc578581018301518582016040015282016113a0565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b73ffffffffffffffffffffffffffffffffffffffff8116811461141d57600080fd5b50565b6000806040838503121561143357600080fd5b823561143e816113fb565b946020939093013593505050565b60008060006060848603121561146157600080fd5b833561146c816113fb565b9250602084013561147c816113fb565b929592945050506040919091013590565b60006020828403121561149f57600080fd5b81356114aa816113fb565b9392505050565b600080604083850312156114c457600080fd5b82356114cf816113fb565b915060208301356114df816113fb565b809150509250929050565b600181811c908216806114fe57607f821691505b602082108103611537577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b818103818111156103125761031261153d565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b808201808211156103125761031261153d565b80516dffffffffffffffffffffffffffff8116811461160e57600080fd5b919050565b60008060006060848603121561162857600080fd5b611631846115f0565b925061163f602085016115f0565b9150604084015163ffffffff8116811461165857600080fd5b809150509250925092565b80820281158282048414176103125761031261153d565b6000826116b0577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000602082840312156116c757600080fd5b81516114aa816113fb56fea264697066735822122069e6c9b585e669a64375b4c0571ee307bc5835f1daf685b52ca06370aee8b8c864736f6c63430008170033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000b20f9d5e82c3d0f34877db3887249f1a26d0b9850000000000000000000000004385328cc4d643ca98dfea734360c0f596c83449000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000005c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f
-----Decoded View---------------
Arg [0] : initHolder (address): 0xb20f9d5e82C3d0f34877Db3887249f1A26D0B985
Arg [1] : baseToken (address): 0x4385328cc4D643Ca98DfEA734360C0F596C83449
Arg [2] : usdt (address): 0xdAC17F958D2ee523a2206206994597C13D831ec7
Arg [3] : factory (address): 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000b20f9d5e82c3d0f34877db3887249f1a26d0b985
Arg [1] : 0000000000000000000000004385328cc4d643ca98dfea734360c0f596c83449
Arg [2] : 000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7
Arg [3] : 0000000000000000000000005c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f
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.