Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 2 internal transactions
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
21284783 | 46 days ago | Contract Creation | 0 ETH | |||
21227890 | 54 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Factory
Compiler Version
v0.8.26+commit.8a97fa7a
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.26; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Pausable.sol"; import "./interfaces/IFactory.sol"; import "./FairToken.sol"; import "./LPLocker.sol"; /// @title Factory Contract for FairToken and LPLocker /// @notice This contract creates FairToken instances and manages LPLocker contract Factory is Ownable, Pausable { string public constant VERSION = "Mintmeme.fun V1.0"; uint256 public constant DEFAULT_CREATOR_FEE_PERCENT = 3; // Immutable state variables address public immutable uniswapV3Factory; address public immutable nonfungiblePositionManager; address public immutable weth; address public immutable lpLocker; // Mutable state variables address public feeAddress; uint256 public minTotalEther; uint256 public creatorFeePercent; // Mappings mapping(address => address) public tokenCreators; mapping(address => uint256) public tokenPools; mapping(address => string) public tokenInfoHashes; // Events event FeeAddressUpdated( address indexed oldFeeAddress, address indexed newFeeAddress ); event FairTokenCreated( address indexed tokenAddress, address indexed creator, string infoHash, uint256 totalSupply, uint256 totalMinter, uint256 totalEther, uint256 liquidityPercent, uint256 startTime ); event LPTokenSet( uint256 indexed tokenId, address indexed tokenAddress, address indexed creator ); event MinTotalEtherUpdated( uint256 oldMinTotalEther, uint256 newMinTotalEther ); event CreatorFeePercentUpdated( uint256 oldCreatorFeePercent, uint256 newCreatorFeePercent ); event TokenInfoUpdated(address indexed tokenAddress, string newInfoHash); // Custom errors error ZeroAddress(); error InvalidFeeAddress(); error TokenNotCreatedByFactory(); error InsufficientTotalEther(uint256 provided, uint256 required); error OnlyTokenCreatorCanUpdate(); error ContractsAreNotAllowedToCreate(); /// @notice Constructor to initialize the Factory contract /// @param _minTotalEther The minimum total Ether for each FairToken /// @param _feeAddress The address to receive fees /// @param _uniswapV3Factory The address of Uniswap V3 Factory /// @param _nonfungiblePositionManager The address of Nonfungible Position Manager /// @param _weth The address of WETH token constructor( uint256 _minTotalEther, address _feeAddress, address _uniswapV3Factory, address _nonfungiblePositionManager, address _weth ) Ownable(msg.sender) { if ( _feeAddress == address(0) || _uniswapV3Factory == address(0) || _nonfungiblePositionManager == address(0) || _weth == address(0) ) { revert ZeroAddress(); } uniswapV3Factory = _uniswapV3Factory; nonfungiblePositionManager = _nonfungiblePositionManager; weth = _weth; _setFeeAddress(_feeAddress); _setMinTotalEther(_minTotalEther); _setCreatorFeePercent(DEFAULT_CREATOR_FEE_PERCENT); lpLocker = address( new LPLocker(address(this), nonfungiblePositionManager) ); } /// @notice Creates a new FairToken /// @param name The name of the token /// @param symbol The symbol of the token /// @param totalSupply The total supply of the token /// @param totalMinter The total number of minters /// @param totalEther The total amount of Ether for minting /// @param liquidityPercent The percentage of liquidity to be added /// @param startTime The start time for minting /// @param infoHash The IPFS hash of the stored token information /// @return TokenAddress The address of the newly created FairToken /// @dev Contracts are not allowed to create function create( string memory name, string memory symbol, uint256 totalSupply, uint256 totalMinter, uint256 totalEther, uint256 liquidityPercent, uint256 startTime, string memory infoHash ) external whenNotPaused returns (address) { if (msg.sender != tx.origin) { revert ContractsAreNotAllowedToCreate(); } if (totalEther > 0 && totalEther < minTotalEther) { revert InsufficientTotalEther(totalEther, minTotalEther); } FairToken newToken = new FairToken( name, symbol, totalSupply, totalMinter, totalEther, liquidityPercent, startTime, address(this) ); address tokenAddress = address(newToken); tokenCreators[tokenAddress] = msg.sender; _updateTokenInfo(tokenAddress, infoHash); emit FairTokenCreated( tokenAddress, msg.sender, infoHash, totalSupply, totalMinter, totalEther, liquidityPercent, startTime ); return tokenAddress; } /// @notice Update the token information hash /// @param tokenAddress The address of the token /// @param infoHash The IPFS hash of the stored token information function updateTokenInfo( address tokenAddress, string memory infoHash ) external { if (tokenCreators[tokenAddress] != msg.sender) { revert OnlyTokenCreatorCanUpdate(); } _updateTokenInfo(tokenAddress, infoHash); } /// @notice Sets the LP token for a given tokenId /// @param tokenId The ID of the LP token function setLPToken(uint256 tokenId) external { address creator = tokenCreators[msg.sender]; if (creator == address(0)) { revert TokenNotCreatedByFactory(); } tokenPools[msg.sender] = tokenId; emit LPTokenSet(tokenId, msg.sender, creator); } /// @notice Sets the fee address /// @param _feeAddress The new fee address function setFeeAddress(address payable _feeAddress) public onlyOwner { _setFeeAddress(_feeAddress); } /// @notice Sets the minimum total Ether for each FairToken /// @param _minTotalEther The new minimum total Ether function setMinTotalEther(uint256 _minTotalEther) public onlyOwner { _setMinTotalEther(_minTotalEther); } /// @notice Sets the creator fee percentage /// @param _creatorFeePercent The new creator fee percentage (0-100) function setCreatorFeePercent(uint256 _creatorFeePercent) public onlyOwner { _setCreatorFeePercent(_creatorFeePercent); } /// @notice Pauses the contract function pause() external onlyOwner { _pause(); } /// @notice Unpauses the contract function unpause() external onlyOwner { _unpause(); } /// @notice Internal function to set the fee address /// @param _feeAddress The new fee address function _setFeeAddress(address _feeAddress) internal { if (_feeAddress == address(0)) { revert InvalidFeeAddress(); } address oldFeeAddress = feeAddress; feeAddress = _feeAddress; emit FeeAddressUpdated(oldFeeAddress, _feeAddress); } /// @notice Sets the minimum total Ether for each FairToken /// @param _minTotalEther The new minimum total Ether function _setMinTotalEther(uint256 _minTotalEther) internal { uint256 oldMinTotalEther = minTotalEther; minTotalEther = _minTotalEther; emit MinTotalEtherUpdated(oldMinTotalEther, _minTotalEther); } /// @notice Internal function to set the creator fee percentage /// @param _creatorFeePercent The new creator fee percentage /// @dev Emits CreatorFeePercentUpdated event function _setCreatorFeePercent(uint256 _creatorFeePercent) internal { uint256 oldCreatorFeePercent = creatorFeePercent; creatorFeePercent = _creatorFeePercent; emit CreatorFeePercentUpdated(oldCreatorFeePercent, _creatorFeePercent); } /// @notice Internal function to update the token information hash /// @param tokenAddress The address of the token /// @param infoHash The IPFS hash of the stored token information function _updateTokenInfo( address tokenAddress, string memory infoHash ) internal { if (bytes(infoHash).length > 0) { tokenInfoHashes[tokenAddress] = infoHash; emit TokenInfoUpdated(tokenAddress, infoHash); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC-20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 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 ERC-721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-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 ERC-1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 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.1.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 ERC-20 * applications. */ 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}. * * Skips emitting an {Approval} event indicating an allowance update. This is not * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve]. * * 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: * * ```solidity * 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.1.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 ERC-20 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.1.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-20 standard as defined in the ERC. */ 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.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.20; import {IERC721} from "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC-721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon * a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC-721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or * {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon * a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC-721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the address zero. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/Address.sol) pragma solidity ^0.8.20; import {Errors} from "./Errors.sol"; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert Errors.InsufficientBalance(address(this).balance, amount); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert Errors.FailedCall(); } } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {Errors.FailedCall} error. * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert Errors.InsufficientBalance(address(this).balance, value); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case * of an unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {Errors.FailedCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}. */ function _revert(bytes memory returndata) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly ("memory-safe") { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert Errors.FailedCall(); } } }
// 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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol) pragma solidity ^0.8.20; /** * @dev Collection of common custom errors used in multiple contracts * * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library. * It is recommended to avoid relying on the error API for critical functionality. * * _Available since v5.1._ */ library Errors { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error InsufficientBalance(uint256 balance, uint256 needed); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedCall(); /** * @dev The deployment failed. */ error FailedDeployment(); /** * @dev A necessary precompile is missing. */ error MissingPrecompile(address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[ERC]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { bool private _paused; /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); /** * @dev The operation failed because the contract is paused. */ error EnforcedPause(); /** * @dev The operation failed because the contract is not paused. */ error ExpectedPause(); /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { if (paused()) { revert EnforcedPause(); } } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { if (!paused()) { revert ExpectedPause(); } } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol) pragma solidity ^0.8.20; /** * @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 EIP-1153 (transient storage) is available on the chain you're deploying at, * consider using {ReentrancyGuardTransient} instead. * * 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; /** * @dev Unauthorized reentrant call. */ error ReentrancyGuardReentrantCall(); 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 if (_status == ENTERED) { revert ReentrancyGuardReentrantCall(); } // 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; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.26; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "./libraries/TransferHelper.sol"; import "./interfaces/INonfungiblePositionManager.sol"; import "./interfaces/IWETH.sol"; import "./interfaces/IUniswapV3Factory.sol"; import "./interfaces/IUniswapV3Pool.sol"; import "./interfaces/IFactory.sol"; /// @title FairToken Contract /// @notice This contract implements a fair token distribution mechanism with Uniswap V3 liquidity provision /// @dev Inherits from OpenZeppelin's ERC20 contract contract FairToken is ERC20 { using Address for address payable; // Constants string public constant VERSION = "Mintmeme.fun V1.0"; int24 private constant TICK_LOWER = -887200; int24 private constant TICK_UPPER = 887200; uint24 private constant POOL_FEE = 10000; uint256 private constant BASE_DENOMINATOR = 100; uint256 private constant TOKEN_PRECISION = 1e18; uint256 private constant DEFAULT_CALL_GAS_LIMIT = 8000; // Immutable state variables uint256 public immutable maxMintAmount; uint256 public immutable mintAmountPerAddress; uint256 public immutable mintStartTime; uint256 public immutable etherPerMint; uint256 public immutable liquidityAmount; address public immutable lpLocker; IFactory public immutable factory; INonfungiblePositionManager public immutable nonfungiblePositionManager; // Mutable state variables bool public transfersLocked = true; address public poolAddress; // Mappings mapping(address => bool) public minted; // Events event TransfersUnlocked(); event LiquidityAddedV3( address poolAddress, uint256 tokenAmount, uint256 ethAmount, uint128 liquidity, uint256 tokenId ); event CreatorFeePaid(address indexed creator, uint256 amount); event CreatorFeeTransferFailed(address indexed creator, uint256 amount); /// @notice Constructs the FairToken contract /// @param name The name of the token /// @param symbol The symbol of the token /// @param totalSupply The total supply of the token /// @param totalMinter The total number of minters /// @param totalEther The total amount of Ether for minting /// @param liquidityPercent The percentage of tokens to be used for liquidity /// @param startTime The start time for minting /// @param factoryAddress The address of the factory contract constructor( string memory name, string memory symbol, uint256 totalSupply, uint256 totalMinter, uint256 totalEther, uint256 liquidityPercent, uint256 startTime, address factoryAddress ) ERC20(name, symbol) { factory = IFactory(factoryAddress); lpLocker = factory.lpLocker(); nonfungiblePositionManager = INonfungiblePositionManager( factory.nonfungiblePositionManager() ); _validateConstructorParams( totalSupply, totalMinter, liquidityPercent, totalEther, startTime ); ( maxMintAmount, mintAmountPerAddress, liquidityAmount ) = _calculateTokenAmounts(totalSupply, totalMinter, liquidityPercent); etherPerMint = _calculateEtherPerMint(totalEther, totalMinter); mintStartTime = _setMintStartTime(startTime); if (totalEther == 0) { _unlockTransfers(); } } /// @notice Allows the contract to receive Ether receive() external payable {} /// @notice Handles the receipt of an ERC721 token /// @dev Implements IERC721Receiver function onERC721Received( address, address, uint256, bytes memory ) public virtual returns (bytes4) { require( msg.sender == address(nonfungiblePositionManager), "Not from position manager" ); return this.onERC721Received.selector; } /// @notice Overrides the ERC20 transfer function to implement transfer locking /// @param recipient The address to transfer tokens to /// @param amount The amount of tokens to transfer function transfer( address recipient, uint256 amount ) public virtual override returns (bool) { require(!transfersLocked, "Transfers are locked"); return super.transfer(recipient, amount); } /// @notice Overrides the ERC20 transferFrom function to implement transfer locking /// @param sender The address to transfer tokens from /// @param recipient The address to transfer tokens to /// @param amount The amount of tokens to transfer function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { require(!transfersLocked, "Transfers are locked"); return super.transferFrom(sender, recipient, amount); } /// @notice Allows users to mint tokens function mint() public payable { _validateMint(); _processMint(); } function addLiquidity() public { _checkAndAddLiquidity(); _processAddLiquidity(); } /// @notice Validates the constructor parameters function _validateConstructorParams( uint256 totalSupply, uint256 totalMinter, uint256 liquidityPercent, uint256 totalEther, uint256 startTime ) private view { require(totalSupply > 0, "totalSupply must be greater than 0"); require(totalMinter > 0, "totalMinter must be greater than 0"); if (totalEther > 0) { require( totalEther >= factory.minTotalEther(), "totalEther must be greater than minTotalEther" ); require( liquidityPercent > 0 && liquidityPercent < BASE_DENOMINATOR, "liquidityPercent must be greater than 0 and less than BASE_DENOMINATOR" ); } else { require( liquidityPercent == 0, "liquidityPercent must be 0 when totalEther is 0" ); } if (startTime != 0) { require( startTime > block.timestamp, "startTime must be in the future" ); } require( totalEther % totalMinter == 0, "totalEther must evenly divide totalMinter" ); } /// @notice Calculates token amounts function _calculateTokenAmounts( uint256 totalSupply, uint256 totalMinter, uint256 liquidityPercent ) private pure returns (uint256, uint256, uint256) { uint256 maxSupply = totalSupply * TOKEN_PRECISION; uint256 _liquidityAmount = (maxSupply * liquidityPercent) / BASE_DENOMINATOR; uint256 _maxMintAmount = maxSupply - _liquidityAmount; require( _maxMintAmount % totalMinter == 0, "maxMintAmount must evenly divide totalMinter" ); uint256 _mintAmountPerAddress = _maxMintAmount / totalMinter; return (_maxMintAmount, _mintAmountPerAddress, _liquidityAmount); } /// @notice Calculates Ether per mint function _calculateEtherPerMint( uint256 totalEther, uint256 totalMinter ) private pure returns (uint256) { return totalEther / totalMinter; } /// @notice Sets the mint start time function _setMintStartTime( uint256 startTime ) private view returns (uint256) { return startTime == 0 ? block.timestamp : startTime; } /// @notice Unlocks token transfers function _unlockTransfers() private { transfersLocked = false; emit TransfersUnlocked(); } /// @notice Validates the mint operation function _validateMint() private view { require( block.timestamp >= mintStartTime, "minting has not started yet" ); require( totalSupply() + mintAmountPerAddress <= maxMintAmount, "minting would exceed max supply" ); require(msg.value >= etherPerMint, "insufficient payment"); require(msg.sender == tx.origin, "contracts are not allowed to mint"); require(!minted[msg.sender], "address has already minted"); } /// @notice Processes the mint operation function _processMint() private { minted[msg.sender] = true; _mint(msg.sender, mintAmountPerAddress); } /// @notice Checks if all tokens are minted and adds liquidity if necessary function _checkAndAddLiquidity() private view { require(totalSupply() == maxMintAmount, "minting is not complete"); require(liquidityAmount > 0, "liquidityAmount is 0"); require(address(this).balance > 0, "no ether to add liquidity"); require(poolAddress == address(0), "liquidity already added"); } /// @notice Processes the liquidity addition workflow /// @dev Unlocks transfers, adds liquidity, and transfers LP token to locker function _processAddLiquidity() private { _unlockTransfers(); uint256 tokenId = _addLiquidityToUniswapV3(); factory.setLPToken(tokenId); nonfungiblePositionManager.safeTransferFrom( address(this), lpLocker, tokenId ); } /// @notice Adds liquidity to Uniswap V3 function _addLiquidityToUniswapV3() private returns (uint256) { address weth = factory.weth(); ( uint256 creatorFee, uint256 liquidityEthAmount ) = _calculateCreatorFee(); _setTokenAllowance(weth, liquidityEthAmount); IUniswapV3Pool pool = _createPool( address(this), weth, liquidityAmount, liquidityEthAmount ); ( uint256 tokenId, uint128 liquidity, uint256 amount0, uint256 amount1 ) = _mintLiquidity( pool, address(this), weth, liquidityAmount, liquidityEthAmount ); _processCreatorFee(creatorFee); emit LiquidityAddedV3( poolAddress, amount0, amount1, liquidity, tokenId ); return tokenId; } /// @notice Calculates the creator fee and remaining ETH for liquidity /// @dev Splits the contract's ETH balance according to the creator fee percentage /// @return creatorFee The amount of ETH to be sent to the creator /// @return liquidityEthAmount The remaining ETH amount for liquidity provision function _calculateCreatorFee() private view returns (uint256 creatorFee, uint256 liquidityEthAmount) { creatorFee = (address(this).balance * factory.creatorFeePercent()) / BASE_DENOMINATOR; liquidityEthAmount = address(this).balance - creatorFee; } /// @notice Processes the creator fee payment /// @dev Attempts to send fee to creator, falls back to fee address if failed /// @param creatorFee The amount of ETH to be sent as creator fee function _processCreatorFee(uint256 creatorFee) private { address creator = factory.tokenCreators(address(this)); (bool success, ) = payable(creator).call{ value: creatorFee, gas: DEFAULT_CALL_GAS_LIMIT }(""); if (success) { emit CreatorFeePaid(creator, creatorFee); return; } address feeAddress = factory.feeAddress(); (success, ) = payable(feeAddress).call{ value: creatorFee, gas: DEFAULT_CALL_GAS_LIMIT }(""); if (success) { emit CreatorFeePaid(feeAddress, creatorFee); return; } emit CreatorFeeTransferFailed(creator, creatorFee); } /// @notice Sets token allowances for liquidity provision function _setTokenAllowance( address weth, uint256 liquidityEthAmount ) private { _mint(address(this), liquidityAmount); _approve( address(this), address(nonfungiblePositionManager), liquidityAmount ); IWETH(weth).deposit{value: liquidityEthAmount}(); TransferHelper.safeApprove( weth, address(nonfungiblePositionManager), liquidityEthAmount ); } /// @notice Creates a Uniswap V3 pool function _createPool( address token0, address token1, uint256 token0Amount, uint256 token1Amount ) private returns (IUniswapV3Pool) { poolAddress = IUniswapV3Factory(factory.uniswapV3Factory()).createPool( token0, token1, POOL_FEE ); IUniswapV3Pool pool = IUniswapV3Pool(poolAddress); uint256 amount0 = token0 == pool.token0() ? token0Amount : token1Amount; uint256 amount1 = token1 == pool.token1() ? token1Amount : token0Amount; uint160 sqrtPriceX96 = uint160( (_sqrt((amount1 * 1e18) / amount0) * (2 ** 96)) / 1e9 ); pool.initialize(sqrtPriceX96); return pool; } /// @notice Mints liquidity in Uniswap V3 function _mintLiquidity( IUniswapV3Pool pool, address token0, address token1, uint256 token0Amount, uint256 token1Amount ) private returns (uint256, uint128, uint256, uint256) { INonfungiblePositionManager.MintParams memory params = INonfungiblePositionManager.MintParams({ token0: pool.token0(), token1: pool.token1(), fee: pool.fee(), tickLower: TICK_LOWER, tickUpper: TICK_UPPER, amount0Desired: token0 == pool.token0() ? token0Amount : token1Amount, amount1Desired: token1 == pool.token1() ? token1Amount : token0Amount, amount0Min: 0, amount1Min: 0, recipient: address(this), deadline: block.timestamp }); return nonfungiblePositionManager.mint(params); } /// @notice Calculates the square root of a number function _sqrt(uint256 y) private pure returns (uint256 z) { if (y > 3) { z = y; uint256 x = y / 2 + 1; while (x < z) { z = x; x = (y / x + x) / 2; } } else if (y != 0) { z = 1; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.26; interface IFactory { function uniswapV3Factory() external view returns (address); function nonfungiblePositionManager() external view returns (address); function weth() external view returns (address); function lpLocker() external view returns (address); function feeAddress() external view returns (address); function minTotalEther() external view returns (uint256); function creatorFeePercent() external view returns (uint256); function tokenCreators(address) external view returns (address); function tokenPools(address) external view returns (uint256); function tokenInfoHashes(address) external view returns (string memory); function create( string memory name, string memory symbol, uint256 totalSupply, uint256 totalMinter, uint256 totalEther, uint256 liquidityPercent, uint256 startTime, string memory infoHash ) external returns (address); function setLPToken(uint256 tokenId) external; function setFeeAddress(address payable _feeAddress) external; function setMinTotalEther(uint256 _minTotalEther) external; function setCreatorFeePercent(uint256 _creatorFeePercent) external; function pause() external; function unpause() external; function updateTokenInfo( address tokenAddress, string memory infoHash ) external; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.26; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; /// @title Non-fungible token for positions /// @notice Wraps Uniswap V3 positions in a non-fungible token interface which allows for them to be transferred /// and authorized. interface INonfungiblePositionManager is IERC721Enumerable { /// @notice Emitted when liquidity is increased for a position NFT /// @dev Also emitted when a token is minted /// @param tokenId The ID of the token for which liquidity was increased /// @param liquidity The amount by which liquidity for the NFT position was increased /// @param amount0 The amount of token0 that was paid for the increase in liquidity /// @param amount1 The amount of token1 that was paid for the increase in liquidity event IncreaseLiquidity( uint256 indexed tokenId, uint128 liquidity, uint256 amount0, uint256 amount1 ); /// @notice Emitted when liquidity is decreased for a position NFT /// @param tokenId The ID of the token for which liquidity was decreased /// @param liquidity The amount by which liquidity for the NFT position was decreased /// @param amount0 The amount of token0 that was accounted for the decrease in liquidity /// @param amount1 The amount of token1 that was accounted for the decrease in liquidity event DecreaseLiquidity( uint256 indexed tokenId, uint128 liquidity, uint256 amount0, uint256 amount1 ); /// @notice Emitted when tokens are collected for a position NFT /// @dev The amounts reported may not be exactly equivalent to the amounts transferred, due to rounding behavior /// @param tokenId The ID of the token for which underlying tokens were collected /// @param recipient The address of the account that received the collected tokens /// @param amount0 The amount of token0 owed to the position that was collected /// @param amount1 The amount of token1 owed to the position that was collected event Collect( uint256 indexed tokenId, address recipient, uint256 amount0, uint256 amount1 ); /// @notice Returns the position information associated with a given token ID. /// @dev Throws if the token ID is not valid. /// @param tokenId The ID of the token that represents the position /// @return nonce The nonce for permits /// @return operator The address that is approved for spending /// @return token0 The address of the token0 for a specific pool /// @return token1 The address of the token1 for a specific pool /// @return fee The fee associated with the pool /// @return tickLower The lower end of the tick range for the position /// @return tickUpper The higher end of the tick range for the position /// @return liquidity The liquidity of the position /// @return feeGrowthInside0LastX128 The fee growth of token0 as of the last action on the individual position /// @return feeGrowthInside1LastX128 The fee growth of token1 as of the last action on the individual position /// @return tokensOwed0 The uncollected amount of token0 owed to the position as of the last computation /// @return tokensOwed1 The uncollected amount of token1 owed to the position as of the last computation function positions( uint256 tokenId ) external view returns ( uint96 nonce, address operator, address token0, address token1, uint24 fee, int24 tickLower, int24 tickUpper, uint128 liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1 ); struct MintParams { address token0; address token1; uint24 fee; int24 tickLower; int24 tickUpper; uint256 amount0Desired; uint256 amount1Desired; uint256 amount0Min; uint256 amount1Min; address recipient; uint256 deadline; } /// @notice Creates a new position wrapped in a NFT /// @dev Call this when the pool does exist and is initialized. Note that if the pool is created but not initialized /// a method does not exist, i.e. the pool is assumed to be initialized. /// @param params The params necessary to mint a position, encoded as `MintParams` in calldata /// @return tokenId The ID of the token that represents the minted position /// @return liquidity The amount of liquidity for this position /// @return amount0 The amount of token0 /// @return amount1 The amount of token1 function mint( MintParams calldata params ) external payable returns ( uint256 tokenId, uint128 liquidity, uint256 amount0, uint256 amount1 ); struct IncreaseLiquidityParams { uint256 tokenId; uint256 amount0Desired; uint256 amount1Desired; uint256 amount0Min; uint256 amount1Min; uint256 deadline; } /// @notice Increases the amount of liquidity in a position, with tokens paid by the `msg.sender` /// @param params tokenId The ID of the token for which liquidity is being increased, /// amount0Desired The desired amount of token0 to be spent, /// amount1Desired The desired amount of token1 to be spent, /// amount0Min The minimum amount of token0 to spend, which serves as a slippage check, /// amount1Min The minimum amount of token1 to spend, which serves as a slippage check, /// deadline The time by which the transaction must be included to effect the change /// @return liquidity The new liquidity amount as a result of the increase /// @return amount0 The amount of token0 to acheive resulting liquidity /// @return amount1 The amount of token1 to acheive resulting liquidity function increaseLiquidity( IncreaseLiquidityParams calldata params ) external payable returns (uint128 liquidity, uint256 amount0, uint256 amount1); struct DecreaseLiquidityParams { uint256 tokenId; uint128 liquidity; uint256 amount0Min; uint256 amount1Min; uint256 deadline; } /// @notice Decreases the amount of liquidity in a position and accounts it to the position /// @param params tokenId The ID of the token for which liquidity is being decreased, /// amount The amount by which liquidity will be decreased, /// amount0Min The minimum amount of token0 that should be accounted for the burned liquidity, /// amount1Min The minimum amount of token1 that should be accounted for the burned liquidity, /// deadline The time by which the transaction must be included to effect the change /// @return amount0 The amount of token0 accounted to the position's tokens owed /// @return amount1 The amount of token1 accounted to the position's tokens owed function decreaseLiquidity( DecreaseLiquidityParams calldata params ) external payable returns (uint256 amount0, uint256 amount1); struct CollectParams { uint256 tokenId; address recipient; uint128 amount0Max; uint128 amount1Max; } /// @notice Collects up to a maximum amount of fees owed to a specific position to the recipient /// @param params tokenId The ID of the NFT for which tokens are being collected, /// recipient The account that should receive the tokens, /// amount0Max The maximum amount of token0 to collect, /// amount1Max The maximum amount of token1 to collect /// @return amount0 The amount of fees collected in token0 /// @return amount1 The amount of fees collected in token1 function collect( CollectParams calldata params ) external payable returns (uint256 amount0, uint256 amount1); /// @notice Burns a token ID, which deletes it from the NFT contract. The token must have 0 liquidity and all tokens /// must be collected first. /// @param tokenId The ID of the token that is being burned function burn(uint256 tokenId) external payable; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.26; /// @title The interface for the Uniswap V3 Factory interface IUniswapV3Factory { /// @notice Creates a pool for the given two tokens and fee /// @param tokenA One of the two tokens in the desired pool /// @param tokenB The other of the two tokens in the desired pool /// @param fee The desired fee for the pool /// @dev tokenA and tokenB may be passed in either order: token0/token1 or token1/token0. tickSpacing is retrieved /// from the fee. The call will revert if the pool already exists, the fee is invalid, or the token arguments /// are invalid. /// @return pool The address of the newly created pool function createPool( address tokenA, address tokenB, uint24 fee ) external returns (address pool); /// @notice Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist /// @dev tokenA and tokenB may be passed in either token0/token1 or token1/token0 order /// @param tokenA The contract address of either token0 or token1 /// @param tokenB The contract address of the other token /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip /// @return pool The pool address function getPool( address tokenA, address tokenB, uint24 fee ) external view returns (address pool); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.26; /// @title The interface for a Uniswap V3 Pool interface IUniswapV3Pool { function initialize(uint160 sqrtPriceX96) external; function token0() external view returns (address); function token1() external view returns (address); function fee() external view returns (uint24); function slot0() external view returns ( uint160 sqrtPriceX96, int24 tick, uint16 observationIndex, uint16 observationCardinality, uint16 observationCardinalityNext, uint8 feeProtocol, bool unlocked ); function ticks( int24 tick ) external view returns ( uint128 liquidityGross, int128 liquidityNet, uint256 feeGrowthOutside0X128, uint256 feeGrowthOutside1X128, int56 tickCumulativeOutside, uint160 secondsPerLiquidityOutsideX128, uint32 secondsOutside, bool initialized ); function feeGrowthGlobal0X128() external view returns (uint256); function feeGrowthGlobal1X128() external view returns (uint256); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.26; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IWETH is IERC20 { function deposit() external payable; function withdraw(uint256) external; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.26; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; library TransferHelper { /// @notice Transfers tokens from the targeted address to the given destination /// @notice Errors with 'STF' if transfer fails /// @param token The contract address of the token to be transferred /// @param from The originating address from which the tokens will be transferred /// @param to The destination address of the transfer /// @param value The amount to be transferred function safeTransferFrom( address token, address from, address to, uint256 value ) internal { (bool success, bytes memory data) = token.call( abi.encodeWithSelector( IERC20.transferFrom.selector, from, to, value ) ); require( success && (data.length == 0 || abi.decode(data, (bool))), "STF" ); } /// @notice Transfers tokens from msg.sender to a recipient /// @dev Errors with ST if transfer fails /// @param token The contract address of the token which will be transferred /// @param to The recipient of the transfer /// @param value The value of the transfer function safeTransfer(address token, address to, uint256 value) internal { (bool success, bytes memory data) = token.call( abi.encodeWithSelector(IERC20.transfer.selector, to, value) ); require( success && (data.length == 0 || abi.decode(data, (bool))), "ST" ); } /// @notice Approves the stipulated contract to spend the given allowance in the given token /// @dev Errors with 'SA' if transfer fails /// @param token The contract address of the token to be approved /// @param to The target of the approval /// @param value The amount of the given token the target will be allowed to spend function safeApprove(address token, address to, uint256 value) internal { (bool success, bytes memory data) = token.call( abi.encodeWithSelector(IERC20.approve.selector, to, value) ); require( success && (data.length == 0 || abi.decode(data, (bool))), "SA" ); } /// @notice Transfers ETH to the recipient address /// @dev Fails with `STE` /// @param to The destination of the transfer /// @param value The value to be transferred function safeTransferETH(address to, uint256 value) internal { (bool success, ) = to.call{value: value}(new bytes(0)); require(success, "STE"); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.26; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./interfaces/INonfungiblePositionManager.sol"; import "./interfaces/IWETH.sol"; import "./interfaces/IFactory.sol"; /// @title LPLocker Contract /// @notice This contract locks Uniswap V3 LP tokens and manages fee collection /// @dev Implements ReentrancyGuard for protection against reentrancy attacks contract LPLocker is ReentrancyGuard { using Address for address payable; // Custom errors error TokenNotCreatedByFactory(); error NotFromPositionManager(); error PositionNotLocked(); error WETHNotInPosition(); /// @notice Reference to the Factory contract IFactory public immutable factory; /// @notice Reference to the Uniswap V3 NonfungiblePositionManager contract INonfungiblePositionManager public immutable nonfungiblePositionManager; /// @notice Mapping to track locked positions /// @dev Maps tokenId to a boolean indicating if the position is locked mapping(uint256 => bool) public lockedPositions; /// @notice Emitted when a position is locked /// @param tokenId The ID of the locked position /// @param tokenAddress The address of the token event PositionLocked(uint256 indexed tokenId, address indexed tokenAddress); /// @notice Emitted when fees are collected /// @param tokenId The ID of the position from which fees were collected /// @param totalETHAmount The total amount of ETH collected event FeesCollected(uint256 indexed tokenId, uint256 totalETHAmount); /// @notice Contract constructor /// @param _factory Address of the Factory contract /// @param _nonfungiblePositionManager Address of the NonfungiblePositionManager contract constructor(address _factory, address _nonfungiblePositionManager) { factory = IFactory(_factory); nonfungiblePositionManager = INonfungiblePositionManager( _nonfungiblePositionManager ); } /// @notice Allows the contract to receive ETH receive() external payable {} /// @notice Handles the receipt of an ERC721 token /// @dev Implements IERC721Receiver /// @param from The address from which the token is being transferred /// @param tokenId The NFT identifier which is being transferred /// @return bytes4 `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` function onERC721Received( address, address from, uint256 tokenId, bytes memory ) public returns (bytes4) { if (msg.sender != address(nonfungiblePositionManager)) { revert NotFromPositionManager(); } if (factory.tokenCreators(from) == address(0)) { revert TokenNotCreatedByFactory(); } lockedPositions[tokenId] = true; emit PositionLocked(tokenId, from); return this.onERC721Received.selector; } /// @notice Collects fees from a locked position /// @dev Can only be called for locked positions /// @param tokenId The ID of the position to collect fees from function collectFees(uint256 tokenId) external nonReentrant { if (!lockedPositions[tokenId]) { revert PositionNotLocked(); } bool isWethToken0 = _getPositionTokens(tokenId); (uint256 amount0, uint256 amount1) = _collectFeesFromPosition( tokenId, isWethToken0 ); uint256 wethAmount = isWethToken0 ? amount0 : amount1; _withdrawWETH(wethAmount); _distributeFees(wethAmount); emit FeesCollected(tokenId, wethAmount); } /// @notice Collects fees from a position /// @param tokenId The ID of the position /// @return amount0 The amount of token0 collected /// @return amount1 The amount of token1 collected function _collectFeesFromPosition( uint256 tokenId, bool isWethToken0 ) private returns (uint256, uint256) { return nonfungiblePositionManager.collect( INonfungiblePositionManager.CollectParams({ tokenId: tokenId, recipient: address(this), amount0Max: isWethToken0 ? type(uint128).max : 0, amount1Max: isWethToken0 ? 0 : type(uint128).max }) ); } /// @notice Gets the tokens associated with a position /// @param tokenId The ID of the position /// @return isWethToken0 Whether WETH is token0 function _getPositionTokens(uint256 tokenId) private view returns (bool) { ( , , address token0, address token1, , , , , , , , ) = nonfungiblePositionManager.positions(tokenId); address weth = factory.weth(); if (token0 != weth && token1 != weth) { revert WETHNotInPosition(); } return token0 == weth; } /// @notice Withdraws WETH to ETH /// @param wethAmount The amount of WETH to withdraw function _withdrawWETH(uint256 wethAmount) private { IWETH(factory.weth()).withdraw(wethAmount); } /// @notice Distributes fees to protocol /// @param protocolFee The amount of fees for the protocol function _distributeFees(uint256 protocolFee) private { payable(factory.feeAddress()).sendValue(protocolFee); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "viaIR": true, "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":"uint256","name":"_minTotalEther","type":"uint256"},{"internalType":"address","name":"_feeAddress","type":"address"},{"internalType":"address","name":"_uniswapV3Factory","type":"address"},{"internalType":"address","name":"_nonfungiblePositionManager","type":"address"},{"internalType":"address","name":"_weth","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ContractsAreNotAllowedToCreate","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[{"internalType":"uint256","name":"provided","type":"uint256"},{"internalType":"uint256","name":"required","type":"uint256"}],"name":"InsufficientTotalEther","type":"error"},{"inputs":[],"name":"InvalidFeeAddress","type":"error"},{"inputs":[],"name":"OnlyTokenCreatorCanUpdate","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"TokenNotCreatedByFactory","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldCreatorFeePercent","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCreatorFeePercent","type":"uint256"}],"name":"CreatorFeePercentUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":true,"internalType":"address","name":"creator","type":"address"},{"indexed":false,"internalType":"string","name":"infoHash","type":"string"},{"indexed":false,"internalType":"uint256","name":"totalSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalMinter","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalEther","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"liquidityPercent","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"}],"name":"FairTokenCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldFeeAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newFeeAddress","type":"address"}],"name":"FeeAddressUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":true,"internalType":"address","name":"creator","type":"address"}],"name":"LPTokenSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldMinTotalEther","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMinTotalEther","type":"uint256"}],"name":"MinTotalEtherUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"string","name":"newInfoHash","type":"string"}],"name":"TokenInfoUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_CREATOR_FEE_PERCENT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"totalSupply","type":"uint256"},{"internalType":"uint256","name":"totalMinter","type":"uint256"},{"internalType":"uint256","name":"totalEther","type":"uint256"},{"internalType":"uint256","name":"liquidityPercent","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"string","name":"infoHash","type":"string"}],"name":"create","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"creatorFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpLocker","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minTotalEther","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nonfungiblePositionManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_creatorFeePercent","type":"uint256"}],"name":"setCreatorFeePercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_feeAddress","type":"address"}],"name":"setFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"setLPToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minTotalEther","type":"uint256"}],"name":"setMinTotalEther","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenCreators","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenInfoHashes","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenPools","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapV3Factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"string","name":"infoHash","type":"string"}],"name":"updateTokenInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
610100346102bd57601f6140cc38819003918201601f19168301916001600160401b0383118484101761023c5780849260a0946040528339810103126102bd5780519061004e602082016102c2565b61005a604083016102c2565b610072608061006b606086016102c2565b94016102c2565b33156102a75760008054604051949133906001600160a01b038316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36001600160a81b0319163360ff60a01b1916176000556001600160a01b031693841592838015610296575b8015610285575b8015610274575b6102635760805260a05260c05261025257600180546001600160a01b0319811684179091557fb420a40084726ae29557ee58fb1af901767127a23aeec4e5e5daeaec97c3d2a39360409390916001600160a01b03167f11f35a22548bcd4c3788ab4a7e4fba427a2014f02e5d5e2da9af62212c03183f600080a36002548160025582526020820152a17f1f440356ff29d242b1f0e2afdae6b4be38d5cce2db5fbb241d3fdc363b942100604060035460038055815190815260036020820152a160a051604051906001600160a01b03166109e28083016001600160401b0381118482101761023c5760409284926136ea843930825260208201520301906000f08015610230576001600160a01b031660e05260405161341390816102d78239608051816104ca015260a0518161029e015260c051816105cc015260e05181610a800152f35b6040513d6000823e3d90fd5b634e487b7160e01b600052604160045260246000fd5b63ae33c5cd60e01b60005260046000fd5b63d92e233d60e01b60005260046000fd5b506001600160a01b038316156100eb565b506001600160a01b038216156100e4565b506001600160a01b038116156100dd565b631e4fbdf760e01b600052600060045260246000fd5b600080fd5b51906001600160a01b03821682036102bd5756fe608080604052600436101561001357600080fd5b60003560e01c90816303fc201314610a6d57508063076999ee14610a4f5780630b761a36146109695780630fcbf89414610758578063157b4719146106dc57806317e7ac72146106c05780633e4dddaf1461066c5780633f4ba83a146105fb5780633fc8cef3146105b6578063412753581461058d5780634eb40dc41461051757806353613dd3146104f95780635b549182146104b45780635c975abb1461048e5780636ff6c4b81461043a578063715018a6146103e15780638456cb591461037f5780638705fcd4146102f65780638da5cb5b146102cd578063b44a272214610288578063c3d2c3c11461024e578063ce7e8de81461020c578063f2fde38b146101835763ffa1ad741461012757600080fd5b3461017e57600036600319011261017e5761017a604080519061014a8183610aff565b601182527004d696e746d656d652e66756e2056312e3607c1b602083015251918291602083526020830190610b21565b0390f35b600080fd5b3461017e57602036600319011261017e5761019c610aaf565b6101a4610d69565b6001600160a01b031680156101f657600080546001600160a01b03198116831782556001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3005b631e4fbdf760e01b600052600060045260246000fd5b3461017e57602036600319011261017e576001600160a01b0361022d610aaf565b166000526004602052602060018060a01b0360406000205416604051908152f35b3461017e57602036600319011261017e576001600160a01b0361026f610aaf565b1660005260056020526020604060002054604051908152f35b3461017e57600036600319011261017e576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b3461017e57600036600319011261017e576000546040516001600160a01b039091168152602090f35b3461017e57602036600319011261017e576004356001600160a01b0381169081900361017e57610324610d69565b801561036e57600180546001600160a01b0319811683179091556001600160a01b03167f11f35a22548bcd4c3788ab4a7e4fba427a2014f02e5d5e2da9af62212c03183f600080a3005b63ae33c5cd60e01b60005260046000fd5b3461017e57600036600319011261017e57610398610d69565b6103a0610bb9565b6000805460ff60a01b1916600160a01b1790556040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25890602090a1005b3461017e57600036600319011261017e576103fa610d69565b600080546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461017e57602036600319011261017e577f1f440356ff29d242b1f0e2afdae6b4be38d5cce2db5fbb241d3fdc363b9421006040600435610479610d69565b600354908060035582519182526020820152a1005b3461017e57600036600319011261017e57602060ff60005460a01c166040519015158152f35b3461017e57600036600319011261017e576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b3461017e57600036600319011261017e576020600354604051908152f35b3461017e57604036600319011261017e57610530610aaf565b60243567ffffffffffffffff811161017e57610550903690600401610b62565b6001600160a01b0382811660009081526004602052604090205416330361057c5761057a91610bd9565b005b6322b8548560e01b60005260046000fd5b3461017e57600036600319011261017e576001546040516001600160a01b039091168152602090f35b3461017e57600036600319011261017e576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b3461017e57600036600319011261017e57610614610d69565b60005460ff8160a01c161561065b5760ff60a01b19166000556040513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa90602090a1005b638dfc202b60e01b60005260046000fd5b3461017e57602036600319011261017e577fb420a40084726ae29557ee58fb1af901767127a23aeec4e5e5daeaec97c3d2a360406004356106ab610d69565b600254908060025582519182526020820152a1005b3461017e57600036600319011261017e57602060405160038152f35b3461017e57602036600319011261017e5760043533600052600460205260018060a01b0360406000205416908115610747573360005260056020528060406000205533907fe28aa6fa88b8801606101ea7f7c54a658990ccba2cb2a8ce4db740f47910baa7600080a4005b6324f0519960e21b60005260046000fd5b3461017e5761010036600319011261017e5760043567ffffffffffffffff811161017e5761078a903690600401610b62565b60243567ffffffffffffffff811161017e576107aa903690600401610b62565b6044356064356084359260a4359460c4359160e43567ffffffffffffffff811161017e576107dc903690600401610b62565b916107e5610bb9565b323303610958578615158061094d575b610931576040519161264b918284019184831067ffffffffffffffff84111761091b57610836610844928695610d9387396101008552610100850190610b21565b908382036020850152610b21565b908760408201528660608201528860808201528960a08201528560c082015260e03091015203906000f091821561090f576020967f083b4465d87734a1ac76f6547d602e5614298f7411e6d56e2882bc8950194f3b9360018060a01b03169687958660005260048a526040600020336bffffffffffffffffffffffff60a01b8254161790556108d38588610bd9565b6108e86040519560c0875260c0870190610b21565b978a86015260408501526060840152608083015260a08201528033940390a3604051908152f35b6040513d6000823e3d90fd5b634e487b7160e01b600052604160045260246000fd5b86600254906301849e9b60e11b60005260045260245260446000fd5b5060025487106107f5565b63267ceadb60e21b60005260046000fd5b3461017e57602036600319011261017e576001600160a01b0361098a610aaf565b1660005260066020526040600020604051906000908054906109ab82610ac5565b8085529160018116908115610a2857506001146109e7575b61017a846109d381860382610aff565b604051918291602083526020830190610b21565b600090815260208120939250905b808210610a0e575090915081016020016109d3826109c3565b9192600181602092548385880101520191019092916109f5565b60ff191660208087019190915292151560051b850190920192506109d391508390506109c3565b3461017e57600036600319011261017e576020600254604051908152f35b3461017e57600036600319011261017e577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b600435906001600160a01b038216820361017e57565b90600182811c92168015610af5575b6020831014610adf57565b634e487b7160e01b600052602260045260246000fd5b91607f1691610ad4565b90601f8019910116810190811067ffffffffffffffff82111761091b57604052565b919082519283825260005b848110610b4d575050826000602080949584010152601f8019910116010190565b80602080928401015182828601015201610b2c565b81601f8201121561017e5780359067ffffffffffffffff821161091b5760405192610b97601f8401601f191660200185610aff565b8284526020838301011161017e57816000926020809301838601378301015290565b60ff60005460a01c16610bc857565b63d93c066560e01b60005260046000fd5b8151610be3575050565b6001600160a01b03166000818152600660205260409020825191929167ffffffffffffffff811161091b57610c188254610ac5565b601f8111610d21575b506020601f8211600114610c975791817f25c9905798f2c8f6e4cb2f05a20e5b661db0023ec859177bb6374800a39515ba9492610c8794600091610c8c575b508160011b916000199060031b1c1916179055604051918291602083526020830190610b21565b0390a2565b905083015138610c60565b601f1982169083600052806000209160005b818110610d09575092610c879492600192827f25c9905798f2c8f6e4cb2f05a20e5b661db0023ec859177bb6374800a39515ba989610610cf0575b5050811b0190556109d3565b85015160001960f88460031b161c191690553880610ce4565b9192602060018192868a015181550194019201610ca9565b826000526020600020601f830160051c81019160208410610d5f575b601f0160051c01905b818110610d535750610c21565b60008155600101610d46565b9091508190610d3d565b6000546001600160a01b03163303610d7d57565b63118cdaa760e01b6000523360045260246000fdfe61018080604052346105db5761264b803803809161001d8285610971565b8339810190610100818303126105db5780516001600160401b0381116105db5782610049918301610994565b602082015190926001600160401b0382116105db57610069918301610994565b9060408101519160608201519260808301519360a08401519261009360e060c08701519601610a03565b875190976001600160401b03821161086e5760035490600182811c92168015610967575b602083101461084e5781601f8493116108f7575b50602090601f831160011461088f57600092610884575b50508160011b916000199060031b1c1916176003555b8051906001600160401b03821161086e5760045490600182811c92168015610864575b602083101461084e5781601f8493116107de575b50602090601f83116001146107765760009261076b575b50508160011b916000199060031b1c1916176004555b6004602060ff1960055416976001891760055560018060a01b03168061014052604051928380926303fc201360e01b82525afa9081156105e857600091610731575b506101205261014051604051635a25139160e11b815290602090829060049082906001600160a01b03165afa9081156105e8576000916106f7575b506001600160a01b03166101605281156106a757801561065757841594856105f457610140516040516303b4ccf760e11b815290602090829060049082906001600160a01b03165afa9081156105e8576000916105b1575b508110610556578315158061054c575b156104d2575b8415938415610486575b61025b8383610a17565b61042f57670de0b6b3a7640000840293808504670de0b6b3a7640000036104195781670de0b6b3a7640000910202908482041484151715610419576064900492838103908111610419576102af8382610a17565b6103bf576102d1936102c18483610a37565b906101005260a052608052610a37565b60e052156103ba5750425b60c05261038c575b604051611c099081610a428239608051818181610197015281816111bf01526113d7015260a051818181610e6901526113af015260c051818181610fa90152611382015260e05181818161107a01526113fd0152610100518181816101bd01526110070152610120518181816107f301526116b301526101405181818161023901528181610d9c0152611a500152610160518181816102cc01528181610de101526112e70152f35b6005557f1d8b2f61c84f331c359476b447a0ddc4fd75f10d265a30e609526e440cdc3a47600080a1386102e4565b6102dc565b60405162461bcd60e51b815260206004820152602c60248201527f6d61784d696e74416d6f756e74206d757374206576656e6c792064697669646560448201526b103a37ba30b626b4b73a32b960a11b6064820152608490fd5b634e487b7160e01b600052601160045260246000fd5b60405162461bcd60e51b815260206004820152602960248201527f746f74616c4574686572206d757374206576656e6c792064697669646520746f6044820152683a30b626b4b73a32b960b91b6064820152608490fd5b4286116102515760405162461bcd60e51b815260206004820152601f60248201527f737461727454696d65206d75737420626520696e2074686520667574757265006044820152606490fd5b60405162461bcd60e51b815260206004820152604660248201527f6c697175696469747950657263656e74206d757374206265206772656174657260448201527f207468616e203020616e64206c657373207468616e20424153455f44454e4f4d60648201526524a720aa27a960d11b608482015260a490fd5b5060648410610241565b60405162461bcd60e51b815260206004820152602d60248201527f746f74616c4574686572206d7573742062652067726561746572207468616e2060448201526c36b4b72a37ba30b622ba3432b960991b6064820152608490fd5b90506020813d6020116105e0575b816105cc60209383610971565b810103126105db575138610231565b600080fd5b3d91506105bf565b6040513d6000823e3d90fd5b83156102475760405162461bcd60e51b815260206004820152602f60248201527f6c697175696469747950657263656e74206d7573742062652030207768656e2060448201526e0746f74616c4574686572206973203608c1b6064820152608490fd5b60405162461bcd60e51b815260206004820152602260248201527f746f74616c4d696e746572206d7573742062652067726561746572207468616e604482015261020360f41b6064820152608490fd5b60405162461bcd60e51b815260206004820152602260248201527f746f74616c537570706c79206d7573742062652067726561746572207468616e604482015261020360f41b6064820152608490fd5b90506020813d602011610729575b8161071260209383610971565b810103126105db5761072390610a03565b386101d9565b3d9150610705565b90506020813d602011610763575b8161074c60209383610971565b810103126105db5761075d90610a03565b3861019e565b3d915061073f565b015190503880610146565b600460009081528281209350601f198516905b8181106107c657509084600195949392106107ad575b505050811b0160045561015c565b015160001960f88460031b161c1916905538808061079f565b92936020600181928786015181550195019301610789565b60046000529091507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b601f840160051c81019160208510610844575b90601f859493920160051c01905b818110610835575061012f565b60008155849350600101610828565b909150819061081a565b634e487b7160e01b600052602260045260246000fd5b91607f169161011b565b634e487b7160e01b600052604160045260246000fd5b0151905038806100e2565b600360009081528281209350601f198516905b8181106108df57509084600195949392106108c6575b505050811b016003556100f8565b015160001960f88460031b161c191690553880806108b8565b929360206001819287860151815501950193016108a2565b60036000529091507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f840160051c8101916020851061095d575b90601f859493920160051c01905b81811061094e57506100cb565b60008155849350600101610941565b9091508190610933565b91607f16916100b7565b601f909101601f19168101906001600160401b0382119082101761086e57604052565b81601f820112156105db578051906001600160401b03821161086e57604051926109c8601f8401601f191660200185610971565b828452602083830101116105db5760005b8281106109ee57505060206000918301015290565b806020809284010151828287010152016109d9565b51906001600160a01b03821682036105db57565b8115610a21570690565b634e487b7160e01b600052601260045260246000fd5b8115610a2157049056fe608080604052600436101561001d575b50361561001b57600080fd5b005b600090813560e01c90816303fc20131461169f5750806306fdde03146115e2578063095ea7b3146115bb5780631249c58b14611374578063150b7a021461126c5780631755ff211461123f57806318160ddd146112215780631e7269c5146111e2578063239c70ae146111a757806323b872dd146110b9578063313ce5671461109d5780636bc5ec8f1461106257806370a082311461102a57806370baed4314610fef57806383f1211b14610fcc578063931e2e4914610f9157806395d89b4114610e8c578063a2fb130014610e51578063a9059cbb14610e10578063b44a272214610dcb578063c45a015514610d86578063dd62ed3e14610d3b578063e8078d94146101815763ffa1ad740361000f573461017e578060031936011261017e575061017a60405161015060408261175c565b601181527004d696e746d656d652e66756e2056312e3607c1b6020820152604051918291826116e2565b0390f35b80fd5b503461017e578060031936011261017e576002547f000000000000000000000000000000000000000000000000000000000000000003610cf6577f0000000000000000000000000000000000000000000000000000000000000000908115610cba574715610c7557600554600881901c6001600160a01b0316610c305760ff1916600555604051917f1d8b2f61c84f331c359476b447a0ddc4fd75f10d265a30e609526e440cdc3a478280a1633fc8cef360e01b83527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316602084600481845afa938415610c25578394610c04575b506040516353613dd360e01b815247602082600481865afa9182156108ee578592610bd0575b50818102918183041490151715610bbc5760649004904794828603958611610ba8576102ca84306118a9565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031693610300818630611816565b6001600160a01b03821691823b156108de57604051630d0e30db60e41b815287816004818c885af18015610a1457610b94575b5086809160405182602082019163095ea7b360e01b83528a60248201528c60448201526044815261036560648261175c565b51925af1610371611a0b565b81610b5c575b5015610b3257604051632daa48c160e11b8152602081600481875afa908115610b0a5787916020918391610b15575b5060405163a167129560e01b815230600482015260248101869052612710604482015292839160649183916001600160a01b03165af1908115610b0a578791610aeb575b5060058054610100600160a81b031916600892831b610100600160a81b03161790819055604051630dfe168160e01b8152911c6001600160a01b03169290602081600481875afa908115610a14578891610acc575b50306001600160a01b039190911603610ac657815b60405163d21220a760e01b8152602081600481885afa9081156109e8578991610aa7575b506001600160a01b03168203610aa157885b670de0b6b3a7640000810290808204670de0b6b3a76400001490151715610a8d57906104b5916119eb565b876003821115610a7f5750808060011c60018101809111610a6b57905b828210610a4c5750505b8060601b90808204600160601b1490151715610a3857833b15610a345760405163f637731d60e01b8152633b9aca009091046001600160a01b03166004820152878160248183885af18015610a1457908891610a1f575b5050604051630dfe168160e01b815297602089600481875afa988915610a145788996109f3575b5060405163d21220a760e01b815292602084600481885afa9384156109e85789946109c7575b5060405163ddca3f4360e01b815292602084600481895afa9384156109bc578a94610978575b50604051630dfe168160e01b81526020816004818a5afa908115610943578b91610959575b50306001600160a01b03919091160361094e576004602083975b60405163d21220a760e01b815292839182905afa908115610943578b91610914575b506001600160a01b03160361090d57505b60405193610160850199858b1067ffffffffffffffff8c11176108f957899a60405260018060a01b03168552602085019360018060a01b0316845262ffffff60408601931683526060850191620d899f1983526080860191620d89a0835260a0870190815260c0870191825260e08701928b84526101008801948c865262ffffff6101208a01973089526101408b0199428b526040519b634418b22b60e11b8d5260018060a01b0390511660048d015260018060a01b0390511660248c0152511660448a01525160020b60648901525160020b60848801525160a48701525160c48601525160e48501525161010484015260018060a01b03905116610124830152516101448201526080816101648188885af19283156108ee578593869187938892610888575b5060a0927f15b45263b60f046a8d4ea51dc645f820b07169e923b52fc98e109b09c69bfeb194926107776001600160801b0393611a3b565b600180861b0360055460081c169360405194855260208501526040840152166060820152846080820152a1803b156108835783809160246040518094819363157b471960e01b83528760048401525af1908115610878578491610863575b5050813b1561085f57604051632142170760e11b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316602482015260448101919091529082908290606490829084905af18015610854576108435750f35b8161084d9161175c565b61017e5780f35b6040513d84823e3d90fd5b5050fd5b8161086d9161175c565b61085f5782386107d5565b6040513d86823e3d90fd5b505050fd5b9550925050506080833d6080116108e6575b816108a76080938361175c565b810103126108e2578251926020810151936001600160801b03851685036108de5760408201516060909201519094919260a061073f565b8680fd5b8480fd5b3d915061089a565b6040513d87823e3d90fd5b634e487b7160e01b8a52604160045260248afd5b9050610618565b610936915060203d60201161093c575b61092e818361175c565b8101906119cc565b38610607565b503d610924565b6040513d8d823e3d90fd5b6004602084976105e5565b610972915060203d60201161093c5761092e818361175c565b386105cb565b9093506020813d6020116109b4575b816109946020938361175c565b810103126109b0575162ffffff811681036109b05792386105a6565b8980fd5b3d9150610987565b6040513d8c823e3d90fd5b6109e191945060203d60201161093c5761092e818361175c565b9238610580565b6040513d8b823e3d90fd5b610a0d91995060203d60201161093c5761092e818361175c565b973861055a565b6040513d8a823e3d90fd5b81610a299161175c565b6108de578638610533565b8780fd5b634e487b7160e01b88526011600452602488fd5b909150610a6282610a5d81846119eb565b6117f3565b60011c906104d2565b634e487b7160e01b8a52601160045260248afd5b90156104dc575060016104dc565b634e487b7160e01b89526011600452602489fd5b8261048a565b610ac0915060203d60201161093c5761092e818361175c565b38610478565b87610454565b610ae5915060203d60201161093c5761092e818361175c565b3861043f565b610b04915060203d60201161093c5761092e818361175c565b386103ea565b6040513d89823e3d90fd5b610b2c9150823d841161093c5761092e818361175c565b386103a6565b60405162461bcd60e51b8152602060048201526002602482015261534160f01b6044820152606490fd5b8051801592508215610b71575b505038610377565b81925090602091810103126108de576020015180151581036108de573880610b69565b87610ba19198929861175c565b9538610333565b634e487b7160e01b85526011600452602485fd5b634e487b7160e01b84526011600452602484fd5b9091506020813d602011610bfc575b81610bec6020938361175c565b810103126108e25751903861029e565b3d9150610bdf565b610c1e91945060203d60201161093c5761092e818361175c565b9238610278565b6040513d85823e3d90fd5b60405162461bcd60e51b815260206004820152601760248201527f6c697175696469747920616c72656164792061646465640000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601960248201527f6e6f20657468657220746f20616464206c6971756964697479000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601460248201527306c6971756964697479416d6f756e7420697320360641b6044820152606490fd5b60405162461bcd60e51b815260206004820152601760248201527f6d696e74696e67206973206e6f7420636f6d706c6574650000000000000000006044820152606490fd5b503461017e57604036600319011261017e576040602091610d5a61172b565b610d62611746565b6001600160a01b039182168352600185528383209116825283522054604051908152f35b503461017e578060031936011261017e576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b503461017e578060031936011261017e576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b503461017e57604036600319011261017e57610e46610e2d61172b565b610e3c60ff60055416156117b0565b602435903361191d565b602060405160018152f35b503461017e578060031936011261017e5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b503461017e578060031936011261017e576040519080600454908160011c91600181168015610f87575b602084108114610f7357838652908115610f4c5750600114610eef575b61017a84610ee38186038261175c565b604051918291826116e2565b600481527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b939250905b808210610f3257509091508101602001610ee382610ed3565b919260018160209254838588010152019101909291610f19565b60ff191660208087019190915292151560051b85019092019250610ee39150839050610ed3565b634e487b7160e01b83526022600452602483fd5b92607f1692610eb6565b503461017e578060031936011261017e5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b503461017e578060031936011261017e57602060ff600554166040519015158152f35b503461017e578060031936011261017e5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b503461017e57602036600319011261017e576020906040906001600160a01b0361105261172b565b1681528083522054604051908152f35b503461017e578060031936011261017e5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b503461017e578060031936011261017e57602060405160128152f35b503461017e57606036600319011261017e576110d361172b565b6110db611746565b604435916110ee60ff60055416156117b0565b6001600160a01b03811680855260016020818152604080882033895290915286205491908201611125575b5050610e46935061191d565b84821061118c578015611178573315611164576040868692610e469852600160205281812060018060a01b033316825260205220910390553880611119565b634a1406b160e11b86526004869052602486fd5b63e602df0560e01b86526004869052602486fd5b6064868684637dc7a0d960e11b835233600452602452604452fd5b503461017e578060031936011261017e5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b503461017e57602036600319011261017e5760209060ff906040906001600160a01b0361120d61172b565b168152600684522054166040519015158152f35b503461017e578060031936011261017e576020600254604051908152f35b503461017e578060031936011261017e5760055460405160089190911c6001600160a01b03168152602090f35b503461017e57608036600319011261017e5761128661172b565b5061128f611746565b5060643567ffffffffffffffff811161137057366023820112156113705780600401356112bb81611794565b6112c8604051918261175c565b818152366024838501011161136c5781602460209401848301370101527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361132757604051630a85bd0160e11b8152602090f35b60405162461bcd60e51b815260206004820152601960248201527f4e6f742066726f6d20706f736974696f6e206d616e61676572000000000000006044820152606490fd5b8380fd5b5080fd5b508060031936011261017e577f00000000000000000000000000000000000000000000000000000000000000004210611576576002546113d57f000000000000000000000000000000000000000000000000000000000000000080926117f3565b7f000000000000000000000000000000000000000000000000000000000000000010611531577f000000000000000000000000000000000000000000000000000000000000000034106114f5573233036114a657338252600660205260ff6040832054166114615761145e90338352600660205260408320600160ff19825416179055336118a9565b80f35b60405162461bcd60e51b815260206004820152601a60248201527f616464726573732068617320616c7265616479206d696e7465640000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152602160248201527f636f6e74726163747320617265206e6f7420616c6c6f77656420746f206d696e6044820152601d60fa1b6064820152608490fd5b60405162461bcd60e51b81526020600482015260146024820152731a5b9cdd59999a58da595b9d081c185e5b595b9d60621b6044820152606490fd5b60405162461bcd60e51b815260206004820152601f60248201527f6d696e74696e6720776f756c6420657863656564206d617820737570706c79006044820152606490fd5b60405162461bcd60e51b815260206004820152601b60248201527f6d696e74696e6720686173206e6f7420737461727465642079657400000000006044820152606490fd5b503461017e57604036600319011261017e57610e466115d861172b565b6024359033611816565b503461017e578060031936011261017e576040519080600354908160011c91600181168015611695575b602084108114610f7357838652908115610f4c57506001146116385761017a84610ee38186038261175c565b600381527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b939250905b80821061167b57509091508101602001610ee382610ed3565b919260018160209254838588010152019101909291611662565b92607f169261160c565b9050346113705781600319360112611370577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b91909160208152825180602083015260005b818110611715575060409293506000838284010152601f8019910116010190565b80602080928701015160408286010152016116f4565b600435906001600160a01b038216820361174157565b600080fd5b602435906001600160a01b038216820361174157565b90601f8019910116810190811067ffffffffffffffff82111761177e57604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff811161177e57601f01601f191660200190565b156117b757565b60405162461bcd60e51b8152602060048201526014602482015273151c985b9cd9995c9cc8185c99481b1bd8dad95960621b6044820152606490fd5b9190820180921161180057565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0316908115611893576001600160a01b031691821561187d5760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260018252604060002085600052825280604060002055604051908152a3565b634a1406b160e11b600052600060045260246000fd5b63e602df0560e01b600052600060045260246000fd5b6001600160a01b0316908115611907576118c5816002546117f3565b6002557fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602060009284845283825260408420818154019055604051908152a3565b63ec442f0560e01b600052600060045260246000fd5b6001600160a01b03169081156119b6576001600160a01b031691821561190757600082815280602052604081205482811061199c5791604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef958760209652828652038282205586815280845220818154019055604051908152a3565b916064928463391434e360e21b8452600452602452604452fd5b634b637e8f60e11b600052600060045260246000fd5b9081602091031261174157516001600160a01b03811681036117415790565b81156119f5570490565b634e487b7160e01b600052601260045260246000fd5b3d15611a36573d90611a1c82611794565b91611a2a604051938461175c565b82523d6000602084013e565b606090565b6040516319cfd1bd60e31b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169190602081602481865afa908115611b7a57600091611bb4575b506001600160a01b03169160008080808587611f40f1611ab0611a0b565b50611b8657602060049160405192838092630824ea6b60e31b82525afa908115611b7a57600091611b5b575b506001600160a01b031660008080808585611f40f1611af9611a0b565b50611b2c575060207f7bde4cee589fca1cd293184d2ed4b334511e42beb53077bbacee55b51db497b991604051908152a2565b915060207f83bad9dc00e441f3f6bb4546287f288189a4ab296585f5d7fa2bd686242ca8ed91604051908152a2565b611b74915060203d60201161093c5761092e818361175c565b38611adc565b6040513d6000823e3d90fd5b5060207f83bad9dc00e441f3f6bb4546287f288189a4ab296585f5d7fa2bd686242ca8ed91604051908152a2565b611bcd915060203d60201161093c5761092e818361175c565b38611a9256fea2646970667358221220f7072c1f9e05b05a082c8e59590a55b77b82b5530c2bd582f6c8cc89b84e247464736f6c634300081a0033a2646970667358221220b5adbe6bd26e0109ea1ddbd3fa29796ae688da99c4f4a4886ac5699151b3d34164736f6c634300081a003360c034609d57601f6109e238819003918201601f19168301916001600160401b0383118484101760a2578084926040948552833981010312609d57604b602060458360b8565b920160b8565b60016000556001600160a01b039182166080521660a05260405161091690816100cc82396080518181816072015281816101880152610715015260a05181818160ba0152818161013601526106cb0152f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b0382168203609d5756fe608080604052600436101561001d575b50361561001b57600080fd5b005b600090813560e01c90816301a5e1631461080f57508063150b7a021461063a578063b17acdcd146100e9578063b44a2722146100a45763c45a01550361000f57346100a157806003193601126100a1576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b80fd5b50346100a157806003193601126100a1576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b50346100a15760203660031901126100a157600435600282541461062b5760028255808252600160205260ff6040832054161561061c5760405163133f757160e31b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661018082602481845afa9182156104035784908593610556575b50604051633fc8cef360e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169390602081600481885afa90811561054b57879161050d575b506001600160a01b039081169216821491821591826104f9575b50506104ea5780156104e3576001600160801b03915b81156104d55785905b604051906080820182811067ffffffffffffffff8211176104c15791886084926040959486528983526001600160801b036020840195308752818886019a168a528160608601911681528188519a8b98899763fc6f786560e01b895251600489015260018060a01b03905116602488015251166044860152511660648401525af19081156104265785928692610482575b501561047a5750905b604051633fc8cef360e01b81528490602081600481865afa90811561046f578291610435575b506001600160a01b0316803b15610431578190602460405180948193632e1a7d4d60e01b83528860048401525af180156104265761040e575b50602060049160405192838092630824ea6b60e31b82525afa9081156104035784916103c5575b508147106103ad5783808084819460018060a01b03165af13d156103a8573d61034a8161088e565b906103586040519283610856565b81528460203d92013e5b156103995760207f49d512bf9cb224241c05691e73eb9fab078cf350c7dbcbcf66788f1fc0cc8b0b91604051908152a26001815580f35b63d6bda27560e01b8352600483fd5b610362565b63cf47918160e01b8452476004526024829052604484fd5b90506020813d6020116103fb575b816103e060209383610856565b810103126103f7576103f1906108aa565b38610322565b8380fd5b3d91506103d3565b6040513d86823e3d90fd5b8461041e60049396602093610856565b9491506102fb565b6040513d87823e3d90fd5b5080fd5b90506020813d602011610467575b8161045060209383610856565b8101031261043157610461906108aa565b386102c2565b3d9150610443565b6040513d84823e3d90fd5b90509061029c565b925090506040823d6040116104b9575b8161049f60409383610856565b810103126104b557602082519201519038610293565b8480fd5b3d9150610492565b634e487b7160e01b89526041600452602489fd5b6001600160801b0390610202565b84916101f9565b630cffb00960e31b8552600485fd5b6001600160a01b03161415905038806101e3565b90506020813d602011610543575b8161052860209383610856565b8101031261053f57610539906108aa565b386101c9565b8680fd5b3d915061051b565b6040513d89823e3d90fd5b925050610180823d8211610614575b816105736101809383610856565b810103126103f75781516bffffffffffffffffffffffff8116036103f75761059d602083016108aa565b506105aa604083016108aa565b6105b6606084016108aa565b92608081015162ffffff81160361061057610160816105da60a061060994016108be565b506105e760c082016108be565b506105f460e082016108cc565b5061060261014082016108cc565b50016108cc565b5038610178565b8580fd5b3d9150610565565b636ac7cb4360e11b8252600482fd5b633ee5aeb560e01b8252600482fd5b50346100a15760803660031901126100a15761065461083b565b506024356001600160a01b03811691908290036100a1576044359160643567ffffffffffffffff81116107e957366023820112156107e95780600401359061069b8261088e565b906106a96040519283610856565b82825236602484830101116104b55791602091816024879501848301370101527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163303610800576040516319cfd1bd60e31b8152600481018290526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156107f55783916107b7575b506001600160a01b0316156107a8578260209383526001845260408320600160ff198254161790557fdd67f326f26468245c1778c9e66467a1e59e8ed2f3aa040511c03fe0c07daaa16040519380a3630a85bd0160e11b8152f35b6324f0519960e21b8252600482fd5b90506020813d6020116107ed575b816107d260209383610856565b810103126107e9576107e3906108aa565b3861074d565b8280fd5b3d91506107c5565b6040513d85823e3d90fd5b63f06b2ad360e01b8252600482fd5b9050346104315760203660031901126104315760ff604060209360043581526001855220541615158152f35b600435906001600160a01b038216820361085157565b600080fd5b90601f8019910116810190811067ffffffffffffffff82111761087857604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff811161087857601f01601f191660200190565b51906001600160a01b038216820361085157565b51908160020b820361085157565b51906001600160801b03821682036108515756fea2646970667358221220b0584cc816e74de4027998b68fb26f33072f92be7b77f9e8d129fb01e4a31e5064736f6c634300081a00330000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000014802de1221f41ccc1101cfc95e9161f2717631e0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f984000000000000000000000000c36442b4a4522e871399cd717abdd847ab11fe88000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Deployed Bytecode
0x608080604052600436101561001357600080fd5b60003560e01c90816303fc201314610a6d57508063076999ee14610a4f5780630b761a36146109695780630fcbf89414610758578063157b4719146106dc57806317e7ac72146106c05780633e4dddaf1461066c5780633f4ba83a146105fb5780633fc8cef3146105b6578063412753581461058d5780634eb40dc41461051757806353613dd3146104f95780635b549182146104b45780635c975abb1461048e5780636ff6c4b81461043a578063715018a6146103e15780638456cb591461037f5780638705fcd4146102f65780638da5cb5b146102cd578063b44a272214610288578063c3d2c3c11461024e578063ce7e8de81461020c578063f2fde38b146101835763ffa1ad741461012757600080fd5b3461017e57600036600319011261017e5761017a604080519061014a8183610aff565b601182527004d696e746d656d652e66756e2056312e3607c1b602083015251918291602083526020830190610b21565b0390f35b600080fd5b3461017e57602036600319011261017e5761019c610aaf565b6101a4610d69565b6001600160a01b031680156101f657600080546001600160a01b03198116831782556001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3005b631e4fbdf760e01b600052600060045260246000fd5b3461017e57602036600319011261017e576001600160a01b0361022d610aaf565b166000526004602052602060018060a01b0360406000205416604051908152f35b3461017e57602036600319011261017e576001600160a01b0361026f610aaf565b1660005260056020526020604060002054604051908152f35b3461017e57600036600319011261017e576040517f000000000000000000000000c36442b4a4522e871399cd717abdd847ab11fe886001600160a01b03168152602090f35b3461017e57600036600319011261017e576000546040516001600160a01b039091168152602090f35b3461017e57602036600319011261017e576004356001600160a01b0381169081900361017e57610324610d69565b801561036e57600180546001600160a01b0319811683179091556001600160a01b03167f11f35a22548bcd4c3788ab4a7e4fba427a2014f02e5d5e2da9af62212c03183f600080a3005b63ae33c5cd60e01b60005260046000fd5b3461017e57600036600319011261017e57610398610d69565b6103a0610bb9565b6000805460ff60a01b1916600160a01b1790556040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25890602090a1005b3461017e57600036600319011261017e576103fa610d69565b600080546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461017e57602036600319011261017e577f1f440356ff29d242b1f0e2afdae6b4be38d5cce2db5fbb241d3fdc363b9421006040600435610479610d69565b600354908060035582519182526020820152a1005b3461017e57600036600319011261017e57602060ff60005460a01c166040519015158152f35b3461017e57600036600319011261017e576040517f0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f9846001600160a01b03168152602090f35b3461017e57600036600319011261017e576020600354604051908152f35b3461017e57604036600319011261017e57610530610aaf565b60243567ffffffffffffffff811161017e57610550903690600401610b62565b6001600160a01b0382811660009081526004602052604090205416330361057c5761057a91610bd9565b005b6322b8548560e01b60005260046000fd5b3461017e57600036600319011261017e576001546040516001600160a01b039091168152602090f35b3461017e57600036600319011261017e576040517f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b03168152602090f35b3461017e57600036600319011261017e57610614610d69565b60005460ff8160a01c161561065b5760ff60a01b19166000556040513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa90602090a1005b638dfc202b60e01b60005260046000fd5b3461017e57602036600319011261017e577fb420a40084726ae29557ee58fb1af901767127a23aeec4e5e5daeaec97c3d2a360406004356106ab610d69565b600254908060025582519182526020820152a1005b3461017e57600036600319011261017e57602060405160038152f35b3461017e57602036600319011261017e5760043533600052600460205260018060a01b0360406000205416908115610747573360005260056020528060406000205533907fe28aa6fa88b8801606101ea7f7c54a658990ccba2cb2a8ce4db740f47910baa7600080a4005b6324f0519960e21b60005260046000fd5b3461017e5761010036600319011261017e5760043567ffffffffffffffff811161017e5761078a903690600401610b62565b60243567ffffffffffffffff811161017e576107aa903690600401610b62565b6044356064356084359260a4359460c4359160e43567ffffffffffffffff811161017e576107dc903690600401610b62565b916107e5610bb9565b323303610958578615158061094d575b610931576040519161264b918284019184831067ffffffffffffffff84111761091b57610836610844928695610d9387396101008552610100850190610b21565b908382036020850152610b21565b908760408201528660608201528860808201528960a08201528560c082015260e03091015203906000f091821561090f576020967f083b4465d87734a1ac76f6547d602e5614298f7411e6d56e2882bc8950194f3b9360018060a01b03169687958660005260048a526040600020336bffffffffffffffffffffffff60a01b8254161790556108d38588610bd9565b6108e86040519560c0875260c0870190610b21565b978a86015260408501526060840152608083015260a08201528033940390a3604051908152f35b6040513d6000823e3d90fd5b634e487b7160e01b600052604160045260246000fd5b86600254906301849e9b60e11b60005260045260245260446000fd5b5060025487106107f5565b63267ceadb60e21b60005260046000fd5b3461017e57602036600319011261017e576001600160a01b0361098a610aaf565b1660005260066020526040600020604051906000908054906109ab82610ac5565b8085529160018116908115610a2857506001146109e7575b61017a846109d381860382610aff565b604051918291602083526020830190610b21565b600090815260208120939250905b808210610a0e575090915081016020016109d3826109c3565b9192600181602092548385880101520191019092916109f5565b60ff191660208087019190915292151560051b850190920192506109d391508390506109c3565b3461017e57600036600319011261017e576020600254604051908152f35b3461017e57600036600319011261017e577f0000000000000000000000001c2459a2c54afa400c0429ae3c432db9b1bafa146001600160a01b03168152602090f35b600435906001600160a01b038216820361017e57565b90600182811c92168015610af5575b6020831014610adf57565b634e487b7160e01b600052602260045260246000fd5b91607f1691610ad4565b90601f8019910116810190811067ffffffffffffffff82111761091b57604052565b919082519283825260005b848110610b4d575050826000602080949584010152601f8019910116010190565b80602080928401015182828601015201610b2c565b81601f8201121561017e5780359067ffffffffffffffff821161091b5760405192610b97601f8401601f191660200185610aff565b8284526020838301011161017e57816000926020809301838601378301015290565b60ff60005460a01c16610bc857565b63d93c066560e01b60005260046000fd5b8151610be3575050565b6001600160a01b03166000818152600660205260409020825191929167ffffffffffffffff811161091b57610c188254610ac5565b601f8111610d21575b506020601f8211600114610c975791817f25c9905798f2c8f6e4cb2f05a20e5b661db0023ec859177bb6374800a39515ba9492610c8794600091610c8c575b508160011b916000199060031b1c1916179055604051918291602083526020830190610b21565b0390a2565b905083015138610c60565b601f1982169083600052806000209160005b818110610d09575092610c879492600192827f25c9905798f2c8f6e4cb2f05a20e5b661db0023ec859177bb6374800a39515ba989610610cf0575b5050811b0190556109d3565b85015160001960f88460031b161c191690553880610ce4565b9192602060018192868a015181550194019201610ca9565b826000526020600020601f830160051c81019160208410610d5f575b601f0160051c01905b818110610d535750610c21565b60008155600101610d46565b9091508190610d3d565b6000546001600160a01b03163303610d7d57565b63118cdaa760e01b6000523360045260246000fdfe61018080604052346105db5761264b803803809161001d8285610971565b8339810190610100818303126105db5780516001600160401b0381116105db5782610049918301610994565b602082015190926001600160401b0382116105db57610069918301610994565b9060408101519160608201519260808301519360a08401519261009360e060c08701519601610a03565b875190976001600160401b03821161086e5760035490600182811c92168015610967575b602083101461084e5781601f8493116108f7575b50602090601f831160011461088f57600092610884575b50508160011b916000199060031b1c1916176003555b8051906001600160401b03821161086e5760045490600182811c92168015610864575b602083101461084e5781601f8493116107de575b50602090601f83116001146107765760009261076b575b50508160011b916000199060031b1c1916176004555b6004602060ff1960055416976001891760055560018060a01b03168061014052604051928380926303fc201360e01b82525afa9081156105e857600091610731575b506101205261014051604051635a25139160e11b815290602090829060049082906001600160a01b03165afa9081156105e8576000916106f7575b506001600160a01b03166101605281156106a757801561065757841594856105f457610140516040516303b4ccf760e11b815290602090829060049082906001600160a01b03165afa9081156105e8576000916105b1575b508110610556578315158061054c575b156104d2575b8415938415610486575b61025b8383610a17565b61042f57670de0b6b3a7640000840293808504670de0b6b3a7640000036104195781670de0b6b3a7640000910202908482041484151715610419576064900492838103908111610419576102af8382610a17565b6103bf576102d1936102c18483610a37565b906101005260a052608052610a37565b60e052156103ba5750425b60c05261038c575b604051611c099081610a428239608051818181610197015281816111bf01526113d7015260a051818181610e6901526113af015260c051818181610fa90152611382015260e05181818161107a01526113fd0152610100518181816101bd01526110070152610120518181816107f301526116b301526101405181818161023901528181610d9c0152611a500152610160518181816102cc01528181610de101526112e70152f35b6005557f1d8b2f61c84f331c359476b447a0ddc4fd75f10d265a30e609526e440cdc3a47600080a1386102e4565b6102dc565b60405162461bcd60e51b815260206004820152602c60248201527f6d61784d696e74416d6f756e74206d757374206576656e6c792064697669646560448201526b103a37ba30b626b4b73a32b960a11b6064820152608490fd5b634e487b7160e01b600052601160045260246000fd5b60405162461bcd60e51b815260206004820152602960248201527f746f74616c4574686572206d757374206576656e6c792064697669646520746f6044820152683a30b626b4b73a32b960b91b6064820152608490fd5b4286116102515760405162461bcd60e51b815260206004820152601f60248201527f737461727454696d65206d75737420626520696e2074686520667574757265006044820152606490fd5b60405162461bcd60e51b815260206004820152604660248201527f6c697175696469747950657263656e74206d757374206265206772656174657260448201527f207468616e203020616e64206c657373207468616e20424153455f44454e4f4d60648201526524a720aa27a960d11b608482015260a490fd5b5060648410610241565b60405162461bcd60e51b815260206004820152602d60248201527f746f74616c4574686572206d7573742062652067726561746572207468616e2060448201526c36b4b72a37ba30b622ba3432b960991b6064820152608490fd5b90506020813d6020116105e0575b816105cc60209383610971565b810103126105db575138610231565b600080fd5b3d91506105bf565b6040513d6000823e3d90fd5b83156102475760405162461bcd60e51b815260206004820152602f60248201527f6c697175696469747950657263656e74206d7573742062652030207768656e2060448201526e0746f74616c4574686572206973203608c1b6064820152608490fd5b60405162461bcd60e51b815260206004820152602260248201527f746f74616c4d696e746572206d7573742062652067726561746572207468616e604482015261020360f41b6064820152608490fd5b60405162461bcd60e51b815260206004820152602260248201527f746f74616c537570706c79206d7573742062652067726561746572207468616e604482015261020360f41b6064820152608490fd5b90506020813d602011610729575b8161071260209383610971565b810103126105db5761072390610a03565b386101d9565b3d9150610705565b90506020813d602011610763575b8161074c60209383610971565b810103126105db5761075d90610a03565b3861019e565b3d915061073f565b015190503880610146565b600460009081528281209350601f198516905b8181106107c657509084600195949392106107ad575b505050811b0160045561015c565b015160001960f88460031b161c1916905538808061079f565b92936020600181928786015181550195019301610789565b60046000529091507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b601f840160051c81019160208510610844575b90601f859493920160051c01905b818110610835575061012f565b60008155849350600101610828565b909150819061081a565b634e487b7160e01b600052602260045260246000fd5b91607f169161011b565b634e487b7160e01b600052604160045260246000fd5b0151905038806100e2565b600360009081528281209350601f198516905b8181106108df57509084600195949392106108c6575b505050811b016003556100f8565b015160001960f88460031b161c191690553880806108b8565b929360206001819287860151815501950193016108a2565b60036000529091507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f840160051c8101916020851061095d575b90601f859493920160051c01905b81811061094e57506100cb565b60008155849350600101610941565b9091508190610933565b91607f16916100b7565b601f909101601f19168101906001600160401b0382119082101761086e57604052565b81601f820112156105db578051906001600160401b03821161086e57604051926109c8601f8401601f191660200185610971565b828452602083830101116105db5760005b8281106109ee57505060206000918301015290565b806020809284010151828287010152016109d9565b51906001600160a01b03821682036105db57565b8115610a21570690565b634e487b7160e01b600052601260045260246000fd5b8115610a2157049056fe608080604052600436101561001d575b50361561001b57600080fd5b005b600090813560e01c90816303fc20131461169f5750806306fdde03146115e2578063095ea7b3146115bb5780631249c58b14611374578063150b7a021461126c5780631755ff211461123f57806318160ddd146112215780631e7269c5146111e2578063239c70ae146111a757806323b872dd146110b9578063313ce5671461109d5780636bc5ec8f1461106257806370a082311461102a57806370baed4314610fef57806383f1211b14610fcc578063931e2e4914610f9157806395d89b4114610e8c578063a2fb130014610e51578063a9059cbb14610e10578063b44a272214610dcb578063c45a015514610d86578063dd62ed3e14610d3b578063e8078d94146101815763ffa1ad740361000f573461017e578060031936011261017e575061017a60405161015060408261175c565b601181527004d696e746d656d652e66756e2056312e3607c1b6020820152604051918291826116e2565b0390f35b80fd5b503461017e578060031936011261017e576002547f000000000000000000000000000000000000000000000000000000000000000003610cf6577f0000000000000000000000000000000000000000000000000000000000000000908115610cba574715610c7557600554600881901c6001600160a01b0316610c305760ff1916600555604051917f1d8b2f61c84f331c359476b447a0ddc4fd75f10d265a30e609526e440cdc3a478280a1633fc8cef360e01b83527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316602084600481845afa938415610c25578394610c04575b506040516353613dd360e01b815247602082600481865afa9182156108ee578592610bd0575b50818102918183041490151715610bbc5760649004904794828603958611610ba8576102ca84306118a9565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031693610300818630611816565b6001600160a01b03821691823b156108de57604051630d0e30db60e41b815287816004818c885af18015610a1457610b94575b5086809160405182602082019163095ea7b360e01b83528a60248201528c60448201526044815261036560648261175c565b51925af1610371611a0b565b81610b5c575b5015610b3257604051632daa48c160e11b8152602081600481875afa908115610b0a5787916020918391610b15575b5060405163a167129560e01b815230600482015260248101869052612710604482015292839160649183916001600160a01b03165af1908115610b0a578791610aeb575b5060058054610100600160a81b031916600892831b610100600160a81b03161790819055604051630dfe168160e01b8152911c6001600160a01b03169290602081600481875afa908115610a14578891610acc575b50306001600160a01b039190911603610ac657815b60405163d21220a760e01b8152602081600481885afa9081156109e8578991610aa7575b506001600160a01b03168203610aa157885b670de0b6b3a7640000810290808204670de0b6b3a76400001490151715610a8d57906104b5916119eb565b876003821115610a7f5750808060011c60018101809111610a6b57905b828210610a4c5750505b8060601b90808204600160601b1490151715610a3857833b15610a345760405163f637731d60e01b8152633b9aca009091046001600160a01b03166004820152878160248183885af18015610a1457908891610a1f575b5050604051630dfe168160e01b815297602089600481875afa988915610a145788996109f3575b5060405163d21220a760e01b815292602084600481885afa9384156109e85789946109c7575b5060405163ddca3f4360e01b815292602084600481895afa9384156109bc578a94610978575b50604051630dfe168160e01b81526020816004818a5afa908115610943578b91610959575b50306001600160a01b03919091160361094e576004602083975b60405163d21220a760e01b815292839182905afa908115610943578b91610914575b506001600160a01b03160361090d57505b60405193610160850199858b1067ffffffffffffffff8c11176108f957899a60405260018060a01b03168552602085019360018060a01b0316845262ffffff60408601931683526060850191620d899f1983526080860191620d89a0835260a0870190815260c0870191825260e08701928b84526101008801948c865262ffffff6101208a01973089526101408b0199428b526040519b634418b22b60e11b8d5260018060a01b0390511660048d015260018060a01b0390511660248c0152511660448a01525160020b60648901525160020b60848801525160a48701525160c48601525160e48501525161010484015260018060a01b03905116610124830152516101448201526080816101648188885af19283156108ee578593869187938892610888575b5060a0927f15b45263b60f046a8d4ea51dc645f820b07169e923b52fc98e109b09c69bfeb194926107776001600160801b0393611a3b565b600180861b0360055460081c169360405194855260208501526040840152166060820152846080820152a1803b156108835783809160246040518094819363157b471960e01b83528760048401525af1908115610878578491610863575b5050813b1561085f57604051632142170760e11b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316602482015260448101919091529082908290606490829084905af18015610854576108435750f35b8161084d9161175c565b61017e5780f35b6040513d84823e3d90fd5b5050fd5b8161086d9161175c565b61085f5782386107d5565b6040513d86823e3d90fd5b505050fd5b9550925050506080833d6080116108e6575b816108a76080938361175c565b810103126108e2578251926020810151936001600160801b03851685036108de5760408201516060909201519094919260a061073f565b8680fd5b8480fd5b3d915061089a565b6040513d87823e3d90fd5b634e487b7160e01b8a52604160045260248afd5b9050610618565b610936915060203d60201161093c575b61092e818361175c565b8101906119cc565b38610607565b503d610924565b6040513d8d823e3d90fd5b6004602084976105e5565b610972915060203d60201161093c5761092e818361175c565b386105cb565b9093506020813d6020116109b4575b816109946020938361175c565b810103126109b0575162ffffff811681036109b05792386105a6565b8980fd5b3d9150610987565b6040513d8c823e3d90fd5b6109e191945060203d60201161093c5761092e818361175c565b9238610580565b6040513d8b823e3d90fd5b610a0d91995060203d60201161093c5761092e818361175c565b973861055a565b6040513d8a823e3d90fd5b81610a299161175c565b6108de578638610533565b8780fd5b634e487b7160e01b88526011600452602488fd5b909150610a6282610a5d81846119eb565b6117f3565b60011c906104d2565b634e487b7160e01b8a52601160045260248afd5b90156104dc575060016104dc565b634e487b7160e01b89526011600452602489fd5b8261048a565b610ac0915060203d60201161093c5761092e818361175c565b38610478565b87610454565b610ae5915060203d60201161093c5761092e818361175c565b3861043f565b610b04915060203d60201161093c5761092e818361175c565b386103ea565b6040513d89823e3d90fd5b610b2c9150823d841161093c5761092e818361175c565b386103a6565b60405162461bcd60e51b8152602060048201526002602482015261534160f01b6044820152606490fd5b8051801592508215610b71575b505038610377565b81925090602091810103126108de576020015180151581036108de573880610b69565b87610ba19198929861175c565b9538610333565b634e487b7160e01b85526011600452602485fd5b634e487b7160e01b84526011600452602484fd5b9091506020813d602011610bfc575b81610bec6020938361175c565b810103126108e25751903861029e565b3d9150610bdf565b610c1e91945060203d60201161093c5761092e818361175c565b9238610278565b6040513d85823e3d90fd5b60405162461bcd60e51b815260206004820152601760248201527f6c697175696469747920616c72656164792061646465640000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601960248201527f6e6f20657468657220746f20616464206c6971756964697479000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601460248201527306c6971756964697479416d6f756e7420697320360641b6044820152606490fd5b60405162461bcd60e51b815260206004820152601760248201527f6d696e74696e67206973206e6f7420636f6d706c6574650000000000000000006044820152606490fd5b503461017e57604036600319011261017e576040602091610d5a61172b565b610d62611746565b6001600160a01b039182168352600185528383209116825283522054604051908152f35b503461017e578060031936011261017e576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b503461017e578060031936011261017e576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b503461017e57604036600319011261017e57610e46610e2d61172b565b610e3c60ff60055416156117b0565b602435903361191d565b602060405160018152f35b503461017e578060031936011261017e5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b503461017e578060031936011261017e576040519080600454908160011c91600181168015610f87575b602084108114610f7357838652908115610f4c5750600114610eef575b61017a84610ee38186038261175c565b604051918291826116e2565b600481527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b939250905b808210610f3257509091508101602001610ee382610ed3565b919260018160209254838588010152019101909291610f19565b60ff191660208087019190915292151560051b85019092019250610ee39150839050610ed3565b634e487b7160e01b83526022600452602483fd5b92607f1692610eb6565b503461017e578060031936011261017e5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b503461017e578060031936011261017e57602060ff600554166040519015158152f35b503461017e578060031936011261017e5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b503461017e57602036600319011261017e576020906040906001600160a01b0361105261172b565b1681528083522054604051908152f35b503461017e578060031936011261017e5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b503461017e578060031936011261017e57602060405160128152f35b503461017e57606036600319011261017e576110d361172b565b6110db611746565b604435916110ee60ff60055416156117b0565b6001600160a01b03811680855260016020818152604080882033895290915286205491908201611125575b5050610e46935061191d565b84821061118c578015611178573315611164576040868692610e469852600160205281812060018060a01b033316825260205220910390553880611119565b634a1406b160e11b86526004869052602486fd5b63e602df0560e01b86526004869052602486fd5b6064868684637dc7a0d960e11b835233600452602452604452fd5b503461017e578060031936011261017e5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b503461017e57602036600319011261017e5760209060ff906040906001600160a01b0361120d61172b565b168152600684522054166040519015158152f35b503461017e578060031936011261017e576020600254604051908152f35b503461017e578060031936011261017e5760055460405160089190911c6001600160a01b03168152602090f35b503461017e57608036600319011261017e5761128661172b565b5061128f611746565b5060643567ffffffffffffffff811161137057366023820112156113705780600401356112bb81611794565b6112c8604051918261175c565b818152366024838501011161136c5781602460209401848301370101527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361132757604051630a85bd0160e11b8152602090f35b60405162461bcd60e51b815260206004820152601960248201527f4e6f742066726f6d20706f736974696f6e206d616e61676572000000000000006044820152606490fd5b8380fd5b5080fd5b508060031936011261017e577f00000000000000000000000000000000000000000000000000000000000000004210611576576002546113d57f000000000000000000000000000000000000000000000000000000000000000080926117f3565b7f000000000000000000000000000000000000000000000000000000000000000010611531577f000000000000000000000000000000000000000000000000000000000000000034106114f5573233036114a657338252600660205260ff6040832054166114615761145e90338352600660205260408320600160ff19825416179055336118a9565b80f35b60405162461bcd60e51b815260206004820152601a60248201527f616464726573732068617320616c7265616479206d696e7465640000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152602160248201527f636f6e74726163747320617265206e6f7420616c6c6f77656420746f206d696e6044820152601d60fa1b6064820152608490fd5b60405162461bcd60e51b81526020600482015260146024820152731a5b9cdd59999a58da595b9d081c185e5b595b9d60621b6044820152606490fd5b60405162461bcd60e51b815260206004820152601f60248201527f6d696e74696e6720776f756c6420657863656564206d617820737570706c79006044820152606490fd5b60405162461bcd60e51b815260206004820152601b60248201527f6d696e74696e6720686173206e6f7420737461727465642079657400000000006044820152606490fd5b503461017e57604036600319011261017e57610e466115d861172b565b6024359033611816565b503461017e578060031936011261017e576040519080600354908160011c91600181168015611695575b602084108114610f7357838652908115610f4c57506001146116385761017a84610ee38186038261175c565b600381527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b939250905b80821061167b57509091508101602001610ee382610ed3565b919260018160209254838588010152019101909291611662565b92607f169261160c565b9050346113705781600319360112611370577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b91909160208152825180602083015260005b818110611715575060409293506000838284010152601f8019910116010190565b80602080928701015160408286010152016116f4565b600435906001600160a01b038216820361174157565b600080fd5b602435906001600160a01b038216820361174157565b90601f8019910116810190811067ffffffffffffffff82111761177e57604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff811161177e57601f01601f191660200190565b156117b757565b60405162461bcd60e51b8152602060048201526014602482015273151c985b9cd9995c9cc8185c99481b1bd8dad95960621b6044820152606490fd5b9190820180921161180057565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0316908115611893576001600160a01b031691821561187d5760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260018252604060002085600052825280604060002055604051908152a3565b634a1406b160e11b600052600060045260246000fd5b63e602df0560e01b600052600060045260246000fd5b6001600160a01b0316908115611907576118c5816002546117f3565b6002557fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602060009284845283825260408420818154019055604051908152a3565b63ec442f0560e01b600052600060045260246000fd5b6001600160a01b03169081156119b6576001600160a01b031691821561190757600082815280602052604081205482811061199c5791604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef958760209652828652038282205586815280845220818154019055604051908152a3565b916064928463391434e360e21b8452600452602452604452fd5b634b637e8f60e11b600052600060045260246000fd5b9081602091031261174157516001600160a01b03811681036117415790565b81156119f5570490565b634e487b7160e01b600052601260045260246000fd5b3d15611a36573d90611a1c82611794565b91611a2a604051938461175c565b82523d6000602084013e565b606090565b6040516319cfd1bd60e31b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169190602081602481865afa908115611b7a57600091611bb4575b506001600160a01b03169160008080808587611f40f1611ab0611a0b565b50611b8657602060049160405192838092630824ea6b60e31b82525afa908115611b7a57600091611b5b575b506001600160a01b031660008080808585611f40f1611af9611a0b565b50611b2c575060207f7bde4cee589fca1cd293184d2ed4b334511e42beb53077bbacee55b51db497b991604051908152a2565b915060207f83bad9dc00e441f3f6bb4546287f288189a4ab296585f5d7fa2bd686242ca8ed91604051908152a2565b611b74915060203d60201161093c5761092e818361175c565b38611adc565b6040513d6000823e3d90fd5b5060207f83bad9dc00e441f3f6bb4546287f288189a4ab296585f5d7fa2bd686242ca8ed91604051908152a2565b611bcd915060203d60201161093c5761092e818361175c565b38611a9256fea2646970667358221220f7072c1f9e05b05a082c8e59590a55b77b82b5530c2bd582f6c8cc89b84e247464736f6c634300081a0033a2646970667358221220b5adbe6bd26e0109ea1ddbd3fa29796ae688da99c4f4a4886ac5699151b3d34164736f6c634300081a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000014802de1221f41ccc1101cfc95e9161f2717631e0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f984000000000000000000000000c36442b4a4522e871399cd717abdd847ab11fe88000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
-----Decoded View---------------
Arg [0] : _minTotalEther (uint256): 1000000000000000000
Arg [1] : _feeAddress (address): 0x14802DE1221f41cCc1101cfC95E9161f2717631E
Arg [2] : _uniswapV3Factory (address): 0x1F98431c8aD98523631AE4a59f267346ea31F984
Arg [3] : _nonfungiblePositionManager (address): 0xC36442b4a4522E871399CD717aBDD847Ab11FE88
Arg [4] : _weth (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000de0b6b3a7640000
Arg [1] : 00000000000000000000000014802de1221f41ccc1101cfc95e9161f2717631e
Arg [2] : 0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f984
Arg [3] : 000000000000000000000000c36442b4a4522e871399cd717abdd847ab11fe88
Arg [4] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.