More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 1,152 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Execute | 58159084 | 50 days ago | IN | 0 AVAX | 0.0000385 | ||||
Execute | 58158997 | 50 days ago | IN | 0 AVAX | 0.00003926 | ||||
Execute | 58158936 | 50 days ago | IN | 0 AVAX | 0.0000497 | ||||
Execute | 58158857 | 50 days ago | IN | 0 AVAX | 0.00006273 | ||||
Execute | 58158829 | 50 days ago | IN | 0 AVAX | 0.00006076 | ||||
Distribute Token... | 58157879 | 50 days ago | IN | 0 AVAX | 0.01386881 | ||||
Distribute Token... | 58157861 | 50 days ago | IN | 0 AVAX | 0.1121928 | ||||
Distribute Token... | 58157837 | 50 days ago | IN | 0 AVAX | 0.08769632 | ||||
Distribute Token... | 58157829 | 50 days ago | IN | 0 AVAX | 0.08770973 | ||||
Distribute Token... | 58157812 | 50 days ago | IN | 0 AVAX | 0.09044541 | ||||
Distribute Token... | 58157796 | 50 days ago | IN | 0 AVAX | 0.18420703 | ||||
Distribute Token... | 58157785 | 50 days ago | IN | 0 AVAX | 0.06360151 | ||||
Distribute Token... | 58157773 | 50 days ago | IN | 0 AVAX | 0.08710158 | ||||
Distribute Token... | 58157759 | 50 days ago | IN | 0 AVAX | 0.15523378 | ||||
Distribute Token... | 58157737 | 50 days ago | IN | 0 AVAX | 0.13219481 | ||||
Distribute Token... | 58157728 | 50 days ago | IN | 0 AVAX | 0.13348997 | ||||
Distribute Token... | 58157710 | 50 days ago | IN | 0 AVAX | 0.15114998 | ||||
Finalize Fundrai... | 58157686 | 50 days ago | IN | 0 AVAX | 0.16485371 | ||||
Contribute | 58152922 | 50 days ago | IN | 7.5 AVAX | 0.0257283 | ||||
Contribute | 58152922 | 50 days ago | IN | 7.5 AVAX | 0.0257283 | ||||
Contribute | 58152922 | 50 days ago | IN | 7.5 AVAX | 0.0257283 | ||||
Contribute | 58152922 | 50 days ago | IN | 7.5 AVAX | 0.0257283 | ||||
Contribute | 58152921 | 50 days ago | IN | 7.5 AVAX | 0.0257283 | ||||
Contribute | 58152921 | 50 days ago | IN | 7.5 AVAX | 0.0257283 | ||||
Contribute | 58152921 | 50 days ago | IN | 7.5 AVAX | 0.0257283 |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
EarningsBayV1_6
Compiler Version
v0.8.25+commit.b61c2a91
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import {INonfungiblePositionManager, IClPoolFactory, ILockerFactory, ILocker} from "./util/interface_avax.sol"; import {TickMath} from "./util/TickMath.sol"; import {IERC721Receiver} from "./util/IERC721Receiver.sol"; import {EarningsBayV3Token} from "./EarningsBayV3Token.sol"; import {IWAVAX} from "./util/IWAVAX.sol"; contract EarningsBayV1_6 is Ownable, ReentrancyGuard { using SafeERC20 for ERC20; using TickMath for int24; IClPoolFactory public constant CL_FACTORY = IClPoolFactory(0xAAA32926fcE6bE95ea2c51cB4Fcb60836D320C42); INonfungiblePositionManager public constant POSITION_MANAGER = INonfungiblePositionManager(0xAAA78E8C4241990B4ce159E105dA08129345946A); ILockerFactory public liquidityLockerFactory; address public constant WAVAX = 0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7; address public constant DQN_TOKENS_ADDRESS = 0x332f91766Ae8306bd85Ad2e1A560bBA0cd5c05f6; uint24 public constant UNI_V3_FEE = 10000; uint256 public constant SUPPLY_TO_LP = 200_000_000 ether; uint256 public constant SUPPLY_TO_DQN = 250_000_000 ether; // rewards, staking, team uint256 public constant SUPPLY_TO_FUNDRAISERS = 1_000_000_000 ether; uint256 public constant MIN_CONTRIBUTION = 0.01 ether; uint256 public constant MAX_CONTRIBUTORS = 3000; uint256 public constant MAX_BATCH_SIZE = 65; address public liquidityLocker; address public protocolAdmin; address public daoToken; uint256 public totalRaised; uint256 public fundraisingGoal; uint256 public fundraisingDeadline; uint256 public fundExpiry; uint256 public maxWhitelistAmount; uint256 public maxPublicContributionAmount; uint256 public nextDistributionIndex; uint8 public lpFeesCut = 60; bool public fundraisingFinalized; bool public goalReached; bool public distributionComplete; string public name; string public symbol; mapping(address => uint256) public contributions; mapping(address => bool) public whitelist; mapping(address => uint256) private whitelistIndices; mapping(address => bool) public hasReceivedTokens; mapping(address => uint256) private contributorIndices; address[] public whitelistArray; address[] public contributors; event Contribution(address indexed contributor, uint256 amount); event FundraisingFinalized(bool success); event Refund(address indexed contributor, uint256 amount); event AddWhitelist(address); event RemoveWhitelist(address); event MaxWhitelistAmountUpdated(uint256 newAmount); event MaxPublicContributionAmountUpdated(uint256 newAmount); event FundraisingDeadlineExtended(uint256 newDeadline); event FundExpiryExtended(uint256 newExpiry); event TokensDistributed(uint256 startIndex, uint256 endIndex); constructor( uint256 _fundraisingGoal, string memory _name, string memory _symbol, uint256 _fundraisingDeadline, uint256 _fundExpiry, address _daoManager, address _liquidityLockerFactory, uint256 _maxWhitelistAmount, address _protocolAdmin, uint256 _maxPublicContributionAmount ) Ownable(_daoManager) { require( _fundraisingGoal > 0, "Fundraising goal must be greater than 0" ); require( _fundraisingDeadline > block.timestamp, "Fundraising deadline must be in the future" ); require( _fundExpiry > _fundraisingDeadline, "Fund expiry must be after fundraising deadline" ); require( _protocolAdmin != address(0), "Protocol admin cannot be zero address" ); name = _name; symbol = _symbol; fundraisingGoal = _fundraisingGoal; fundraisingDeadline = _fundraisingDeadline; fundExpiry = _fundExpiry; liquidityLockerFactory = ILockerFactory(_liquidityLockerFactory); maxWhitelistAmount = _maxWhitelistAmount; protocolAdmin = _protocolAdmin; maxPublicContributionAmount = _maxPublicContributionAmount; } function getWhitelistLength() external view returns (uint256) { return whitelistArray.length; } function contribute() public payable nonReentrant { require(!goalReached, "Goal already reached"); require(block.timestamp < fundraisingDeadline, "Deadline hit"); require(msg.value >= MIN_CONTRIBUTION, "Contribution below minimum"); require( contributors.length < MAX_CONTRIBUTORS, "Max contributors reached" ); if (maxWhitelistAmount > 0) { require(whitelist[msg.sender], "You are not whitelisted"); require( contributions[msg.sender] + msg.value <= maxWhitelistAmount, "Exceeding maxWhitelistAmount" ); } else if (maxPublicContributionAmount > 0) { require( contributions[msg.sender] + msg.value <= maxPublicContributionAmount, "Exceeding maxPublicContributionAmount" ); } uint256 effectiveContribution = msg.value; if (totalRaised + msg.value > fundraisingGoal) { effectiveContribution = fundraisingGoal - totalRaised; transferAndWrapIfFail( msg.sender, msg.value - effectiveContribution, 2300 ); } if (contributions[msg.sender] == 0) { contributorIndices[msg.sender] = contributors.length; contributors.push(msg.sender); } contributions[msg.sender] += effectiveContribution; totalRaised += effectiveContribution; emit Contribution(msg.sender, effectiveContribution); if (totalRaised == fundraisingGoal) { goalReached = true; } } function addToWhitelist(address[] calldata addresses) external { require( msg.sender == owner() || msg.sender == protocolAdmin, "Must be owner or protocolAdmin" ); for (uint256 i = 0; i < addresses.length; i++) { require(addresses[i] != address(0), "Invalid address"); if (!whitelist[addresses[i]]) { whitelist[addresses[i]] = true; whitelistIndices[addresses[i]] = whitelistArray.length; whitelistArray.push(addresses[i]); emit AddWhitelist(addresses[i]); } } } function removeFromWhitelist(address removedAddress) external { require( msg.sender == owner() || msg.sender == protocolAdmin, "Must be owner or protocolAdmin" ); require(whitelist[removedAddress], "Address not in whitelist"); // Get index of the address to remove uint256 indexToRemove = whitelistIndices[removedAddress]; uint256 lastIndex = whitelistArray.length - 1; if (indexToRemove != lastIndex) { address lastAddress = whitelistArray[lastIndex]; whitelistArray[indexToRemove] = lastAddress; whitelistIndices[lastAddress] = indexToRemove; } whitelistArray.pop(); delete whitelistIndices[removedAddress]; whitelist[removedAddress] = false; emit RemoveWhitelist(removedAddress); } function setMaxWhitelistAmount(uint256 _maxWhitelistAmount) external { require( msg.sender == owner() || msg.sender == protocolAdmin, "Must be owner or protocolAdmin" ); maxWhitelistAmount = _maxWhitelistAmount; emit MaxWhitelistAmountUpdated(_maxWhitelistAmount); } function setMaxPublicContributionAmount( uint256 _maxPublicContributionAmount ) external { require( msg.sender == owner() || msg.sender == protocolAdmin, "Must be owner or protocolAdmin" ); maxPublicContributionAmount = _maxPublicContributionAmount; emit MaxPublicContributionAmountUpdated(_maxPublicContributionAmount); } function finalizeFundraising( int24 initialTick, int24 upperTick, bytes32 salt ) external onlyOwner nonReentrant returns (uint256 tokenId) { require(goalReached, "Fundraising goal not reached"); require(!fundraisingFinalized, "Fundraising already finalized"); EarningsBayV3Token token = new EarningsBayV3Token{salt: salt}( name, symbol, address(this) ); daoToken = address(token); require(address(token) < WAVAX, "Invalid salt"); token.mint(address(this), SUPPLY_TO_FUNDRAISERS); token.mint(address(this), SUPPLY_TO_LP); token.mint(DQN_TOKENS_ADDRESS, SUPPLY_TO_DQN); token.approve(address(POSITION_MANAGER), SUPPLY_TO_LP); uint160 sqrtPriceX96 = initialTick.getSqrtRatioAtTick(); address pool = CL_FACTORY.createPool( address(token), WAVAX, UNI_V3_FEE, sqrtPriceX96 ); INonfungiblePositionManager.MintParams memory params = INonfungiblePositionManager.MintParams({ token0: address(token), token1: WAVAX, fee: UNI_V3_FEE, tickLower: initialTick, tickUpper: upperTick, amount0Desired: SUPPLY_TO_LP, amount1Desired: 0, amount0Min: 0, amount1Min: 0, recipient: address(this), deadline: block.timestamp, veNFTTokenId: 0 }); (tokenId, , , ) = POSITION_MANAGER.mint(params); address lockerAddress = liquidityLockerFactory.deploy( address(POSITION_MANAGER), owner(), uint64(fundExpiry), tokenId, lpFeesCut, address(this) ); POSITION_MANAGER.safeTransferFrom( address(this), lockerAddress, tokenId ); ILocker(lockerAddress).initializer(tokenId); liquidityLocker = lockerAddress; token.setLiquidityPool(pool); token.renounceOwnership(); emit FundraisingFinalized(true); fundraisingFinalized = true; } function distributeTokensToBatch() external onlyOwner nonReentrant { require(fundraisingFinalized, "Fundraising not finalized"); require(!distributionComplete, "Distribution already complete"); require( nextDistributionIndex < contributors.length, "No more contributors to process" ); EarningsBayV3Token token = EarningsBayV3Token(daoToken); uint256 endIndex = nextDistributionIndex + MAX_BATCH_SIZE; if (endIndex > contributors.length) { endIndex = contributors.length; } for (uint256 i = nextDistributionIndex; i < endIndex; i++) { address contributor = contributors[i]; if (!hasReceivedTokens[contributor]) { uint256 contribution = contributions[contributor]; uint256 tokensToTransfer = (contribution * SUPPLY_TO_FUNDRAISERS) / totalRaised; token.transfer(contributor, tokensToTransfer); hasReceivedTokens[contributor] = true; } } emit TokensDistributed(nextDistributionIndex, endIndex); nextDistributionIndex = endIndex; if (nextDistributionIndex >= contributors.length) { distributionComplete = true; } } function getDistributionProgress() external view returns ( uint256 totalContributors, uint256 processedContributors, bool isComplete ) { return ( contributors.length, nextDistributionIndex, distributionComplete ); } function refund() external nonReentrant { require(!goalReached, "Fundraising goal was reached"); require( block.timestamp >= fundraisingDeadline, "Deadline not reached yet" ); require(contributions[msg.sender] > 0, "No contributions to refund"); uint256 contributedAmount = contributions[msg.sender]; contributions[msg.sender] = 0; totalRaised -= contributedAmount; // Get index of the contributor from mapping uint256 indexToRemove = contributorIndices[msg.sender]; uint256 lastIndex = contributors.length - 1; // If the contributor isn't the last one, move the last one to their position if (indexToRemove != lastIndex) { address lastContributor = contributors[lastIndex]; contributors[indexToRemove] = lastContributor; contributorIndices[lastContributor] = indexToRemove; } // Remove the last element and clear the mapping contributors.pop(); delete contributorIndices[msg.sender]; transferAndWrapIfFail(msg.sender, contributedAmount, 2300); emit Refund(msg.sender, contributedAmount); } function execute( address[] calldata contracts, bytes[] calldata data, uint256[] calldata msgValues ) external onlyOwner { require(fundraisingFinalized, "Fundraising not finalized"); require( contracts.length == data.length && data.length == msgValues.length, "Array lengths mismatch" ); for (uint256 i = 0; i < contracts.length; i++) { require(contracts[i] != address(0), "Invalid contract address"); (bool success, ) = contracts[i].call{value: msgValues[i]}(data[i]); require(success, "Call failed"); } } function extendFundExpiry(uint256 newFundExpiry) external onlyOwner { require(newFundExpiry > fundExpiry, "Must choose later fund expiry"); fundExpiry = newFundExpiry; if (liquidityLocker != address(0)) { ILocker(liquidityLocker).extendFundExpiry(newFundExpiry); } emit FundExpiryExtended(newFundExpiry); } function extendFundraisingDeadline( uint256 newFundraisingDeadline ) external { require( msg.sender == owner() || msg.sender == protocolAdmin, "Must be owner or protocolAdmin" ); require(!goalReached, "Fundraising goal was reached"); require( block.timestamp < fundraisingDeadline, "Cannot extend after deadline passed" ); require( newFundraisingDeadline > fundraisingDeadline, "New deadline must be after current deadline" ); fundraisingDeadline = newFundraisingDeadline; emit FundraisingDeadlineExtended(newFundraisingDeadline); } function emergencyEscape() external { require(msg.sender == protocolAdmin, "Must be protocol admin"); require(!fundraisingFinalized, "Fundraising already finalized"); require(address(this).balance > 0, "No ETH to transfer"); transferAndWrapIfFail(protocolAdmin, address(this).balance, 2300); } receive() external payable { if (!goalReached && block.timestamp < fundraisingDeadline) { contribute(); } } function transferAndWrapIfFail( address to, uint256 amount, uint256 gasLimit ) internal { bool status; assembly { status := call(gasLimit, to, amount, 0, 0, 0, 0) } if (!status) { IWAVAX(WAVAX).deposit{value: amount}(); IWAVAX(WAVAX).transfer(to, amount); } } function onERC721Received( address, address, uint256, bytes calldata ) external pure returns (bytes4) { return IERC721Receiver.onERC721Received.selector; } }
// 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) (interfaces/IERC1363.sol) pragma solidity ^0.8.20; import {IERC20} from "./IERC20.sol"; import {IERC165} from "./IERC165.sol"; /** * @title IERC1363 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363]. * * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction. */ interface IERC1363 is IERC20, IERC165 { /* * Note: the ERC-165 identifier for this interface is 0xb0202a11. * 0xb0202a11 === * bytes4(keccak256('transferAndCall(address,uint256)')) ^ * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^ * bytes4(keccak256('approveAndCall(address,uint256)')) ^ * bytes4(keccak256('approveAndCall(address,uint256,bytes)')) */ /** * @dev Moves a `value` amount of tokens from the caller's account to `to` * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferAndCall(address to, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from the caller's account to `to` * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @param data Additional data with no specified format, sent in call to `to`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param from The address which you want to send tokens from. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferFromAndCall(address from, address to, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param from The address which you want to send tokens from. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @param data Additional data with no specified format, sent in call to `to`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`. * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function approveAndCall(address spender, uint256 value) external returns (bool); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`. * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. * @param data Additional data with no specified format, sent in call to `spender`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../token/ERC20/IERC20.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.2.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.2.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; import {IERC1363} from "../../../interfaces/IERC1363.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC-20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { /** * @dev An operation with an ERC-20 token failed. */ error SafeERC20FailedOperation(address token); /** * @dev Indicates a failed `decreaseAllowance` request. */ error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value))); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value))); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. * * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client" * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); forceApprove(token, spender, oldAllowance + value); } /** * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no * value, non-reverting calls are assumed to be successful. * * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client" * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { unchecked { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < requestedDecrease) { revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); } forceApprove(token, spender, currentAllowance - requestedDecrease); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. * * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being * set here. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); _callOptionalReturn(token, approvalCall); } } /** * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * Reverts if the returned value is other than `true`. */ function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal { if (to.code.length == 0) { safeTransfer(token, to, value); } else if (!token.transferAndCall(to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * Reverts if the returned value is other than `true`. */ function transferFromAndCallRelaxed( IERC1363 token, address from, address to, uint256 value, bytes memory data ) internal { if (to.code.length == 0) { safeTransferFrom(token, from, to, value); } else if (!token.transferFromAndCall(from, to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}. * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall} * once without retrying, and relies on the returned value to be true. * * Reverts if the returned value is other than `true`. */ function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal { if (to.code.length == 0) { forceApprove(token, to, value); } else if (!token.approveAndCall(to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements. */ function _callOptionalReturn(IERC20 token, bytes memory data) private { uint256 returnSize; uint256 returnValue; assembly ("memory-safe") { let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20) // bubble errors if iszero(success) { let ptr := mload(0x40) returndatacopy(ptr, 0, returndatasize()) revert(ptr, returndatasize()) } returnSize := returndatasize() returnValue := mload(0) } if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { bool success; uint256 returnSize; uint256 returnValue; assembly ("memory-safe") { success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20) returnSize := returndatasize() returnValue := mload(0) } return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1); } }
// 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/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.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.0; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract EarningsBayV3Token is ERC20, Ownable { address public constant TREASURY = 0xfE85C993605Dd02FFD2b0B7db041f51071e45cd1; address public liquidityPool; address public dao; uint256 public startTime; uint256 public constant INITIAL_SNIPER_RATE = 900; // 90% uint256 public constant SNIPER_DENOMINATOR = 1000; uint256 public constant SNIPER_DURATION = 180; // 180 seconds uint256 public constant SNIPER_DECREASE_INTERVAL = 2; // 2 seconds uint256 public constant SNIPER_DECREASE_AMOUNT = 10; mapping(address => mapping(uint8 => uint256)) public buys; mapping(address => uint256) public cumulativeBuys; constructor( string memory _name, string memory _symbol, address _dao ) ERC20(_name, _symbol) Ownable(msg.sender) { startTime = block.timestamp; dao = _dao; } function mint(address _to, uint256 _amount) external onlyOwner { _mint(_to, _amount); } function setLiquidityPool(address _liquidityPool) external onlyOwner { require(_liquidityPool != address(0), "Invalid liquidity pool address"); liquidityPool = _liquidityPool; } function tradingActive() public view returns (bool) { return block.timestamp >= startTime; } function maxBuy() public view returns (uint256) { return totalSupply() / 200; } function tradingRestricted() public view returns (bool) { return tradingActive() && block.timestamp < (startTime + SNIPER_DURATION); } function tradingPhase() public view returns (uint256) { if (tradingRestricted()) { return 1; } else { return 2; } } function isContract(address _addr) internal view returns (bool) { uint32 size; assembly { size := extcodesize(_addr) } return size > 0; } function getCurrentTaxRate() public view returns (uint256) { if (!tradingActive()) { return 0; } uint256 timeElapsed = block.timestamp - startTime; if (timeElapsed >= SNIPER_DURATION) { return 0; } uint256 intervals = timeElapsed / SNIPER_DECREASE_INTERVAL; uint256 totalDecrease = intervals * SNIPER_DECREASE_AMOUNT; // Ensure we don't underflow if (totalDecrease >= INITIAL_SNIPER_RATE) { return 0; } return INITIAL_SNIPER_RATE - totalDecrease; } function calculateSniperFee(uint256 amount) public view returns (uint256) { uint256 currentRate = getCurrentTaxRate(); return (amount * currentRate) / SNIPER_DENOMINATOR; } function remainingSniperDuration() public view returns (uint256) { if ( !tradingActive() || block.timestamp >= startTime + SNIPER_DURATION ) { return 0; } return (startTime + SNIPER_DURATION) - block.timestamp; } function _update( address from, address to, uint256 amount ) internal virtual override { if ( from == address(0) || to == liquidityPool || to == dao || from == dao ) { super._update(from, to, amount); return; } uint256 timeElapsed = block.timestamp - startTime; if (timeElapsed < SNIPER_DURATION) { uint256 sniperAmount = calculateSniperFee(amount); uint256 transferAmount = amount - sniperAmount; super._update(from, TREASURY, sniperAmount); super._update(from, to, transferAmount); address buyer = tx.origin; buys[buyer][1] += amount; cumulativeBuys[buyer] += amount; require(cumulativeBuys[buyer] <= maxBuy(), "Amount exceeded"); if (isContract(tx.origin) && isContract(to)) { revert("No contract-to-contract transfers allowed"); } } else { super._update(from, to, amount); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.25; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be * reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; interface IClPoolFactory { function createPool( address tokenA, address tokenB, uint24 fee, uint160 sqrtPriceX96 ) external returns (address pool); function voter() external view returns (address); function votingEscrow() external view returns (address); // Add this function nfpManager() external view returns (address); // Add this function getPool( address tokenA, address tokenB, uint24 fee ) external view returns (address pool); } interface IClPool { function initialize(uint160 sqrtPriceX96) external; function positions( bytes32 key ) external view returns ( uint128 liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1 ); } interface INonfungiblePositionManager { struct MintParams { address token0; address token1; uint24 fee; int24 tickLower; int24 tickUpper; uint256 amount0Desired; uint256 amount1Desired; uint256 amount0Min; uint256 amount1Min; address recipient; uint256 deadline; uint256 veNFTTokenId; } struct CollectParams { uint256 tokenId; address recipient; uint128 amount0Max; uint128 amount1Max; } function mint( MintParams calldata params ) external payable returns ( uint256 tokenId, uint128 liquidity, uint256 amount0, uint256 amount1 ); function collect( CollectParams calldata params ) external payable returns (uint256 amount0, uint256 amount1); function safeTransferFrom( address from, address to, uint256 tokenId ) external; function balanceOf(address owner) external view returns (uint256); function tokenOfOwnerByIndex( address owner, uint256 index ) external view returns (uint256); } interface ILockerFactory { function deploy( address token, address beneficiary, uint256 durationSeconds, uint256 tokenId, uint256 fees, address daoTreasury ) external payable returns (address); } interface ILocker { function initializer(uint256 tokenId) external; function extendFundExpiry(uint256 fundExpiry) external; } struct ExactInputSingleParams { address tokenIn; address tokenOut; uint24 fee; address recipient; uint256 amountIn; uint256 amountOutMinimum; uint160 sqrtPriceLimitX96; } interface ISwapRouter { function exactInputSingle( ExactInputSingleParams calldata params ) external payable returns (uint256 amountOut); }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.0; interface IWAVAX { function deposit() external payable; function transfer(address dst, uint256 wad) external returns (bool); function withdraw(uint256 wad) external; function approve(address spender, uint256 amount) external returns (bool); function allowance( address owner, address spender ) external view returns (uint256); function balanceOf(address owner) external view returns (uint256); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; /// @title Math library for computing sqrt prices from ticks and vice versa /// @notice Computes sqrt price for ticks of size 1.0001, i.e. sqrt(1.0001^tick) as fixed point Q64.96 numbers. Supports /// prices between 2**-128 and 2**128 library TickMath { error T(); error R(); /// @dev The minimum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**-128 int24 internal constant MIN_TICK = -887272; /// @dev The maximum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**128 int24 internal constant MAX_TICK = -MIN_TICK; /// @dev The minimum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MIN_TICK) uint160 internal constant MIN_SQRT_RATIO = 4295128739; /// @dev The maximum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MAX_TICK) uint160 internal constant MAX_SQRT_RATIO = 1461446703485210103287273052203988822378723970342; /// @notice Calculates sqrt(1.0001^tick) * 2^96 /// @dev Throws if |tick| > max tick /// @param tick The input tick for the above formula /// @return sqrtPriceX96 A Fixed point Q64.96 number representing the sqrt of the ratio of the two assets (token1/token0) /// at the given tick function getSqrtRatioAtTick( int24 tick ) internal pure returns (uint160 sqrtPriceX96) { unchecked { uint256 absTick = tick < 0 ? uint256(-int256(tick)) : uint256(int256(tick)); if (absTick > uint256(int256(MAX_TICK))) revert T(); uint256 ratio = absTick & 0x1 != 0 ? 0xfffcb933bd6fad37aa2d162d1a594001 : 0x100000000000000000000000000000000; if (absTick & 0x2 != 0) ratio = (ratio * 0xfff97272373d413259a46990580e213a) >> 128; if (absTick & 0x4 != 0) ratio = (ratio * 0xfff2e50f5f656932ef12357cf3c7fdcc) >> 128; if (absTick & 0x8 != 0) ratio = (ratio * 0xffe5caca7e10e4e61c3624eaa0941cd0) >> 128; if (absTick & 0x10 != 0) ratio = (ratio * 0xffcb9843d60f6159c9db58835c926644) >> 128; if (absTick & 0x20 != 0) ratio = (ratio * 0xff973b41fa98c081472e6896dfb254c0) >> 128; if (absTick & 0x40 != 0) ratio = (ratio * 0xff2ea16466c96a3843ec78b326b52861) >> 128; if (absTick & 0x80 != 0) ratio = (ratio * 0xfe5dee046a99a2a811c461f1969c3053) >> 128; if (absTick & 0x100 != 0) ratio = (ratio * 0xfcbe86c7900a88aedcffc83b479aa3a4) >> 128; if (absTick & 0x200 != 0) ratio = (ratio * 0xf987a7253ac413176f2b074cf7815e54) >> 128; if (absTick & 0x400 != 0) ratio = (ratio * 0xf3392b0822b70005940c7a398e4b70f3) >> 128; if (absTick & 0x800 != 0) ratio = (ratio * 0xe7159475a2c29b7443b29c7fa6e889d9) >> 128; if (absTick & 0x1000 != 0) ratio = (ratio * 0xd097f3bdfd2022b8845ad8f792aa5825) >> 128; if (absTick & 0x2000 != 0) ratio = (ratio * 0xa9f746462d870fdf8a65dc1f90e061e5) >> 128; if (absTick & 0x4000 != 0) ratio = (ratio * 0x70d869a156d2a1b890bb3df62baf32f7) >> 128; if (absTick & 0x8000 != 0) ratio = (ratio * 0x31be135f97d08fd981231505542fcfa6) >> 128; if (absTick & 0x10000 != 0) ratio = (ratio * 0x9aa508b5b7a84e1c677de54f3e99bc9) >> 128; if (absTick & 0x20000 != 0) ratio = (ratio * 0x5d6af8dedb81196699c329225ee604) >> 128; if (absTick & 0x40000 != 0) ratio = (ratio * 0x2216e584f5fa1ea926041bedfe98) >> 128; if (absTick & 0x80000 != 0) ratio = (ratio * 0x48a170391f7dc42444e8fa2) >> 128; if (tick > 0) ratio = type(uint256).max / ratio; // this divides by 1<<32 rounding up to go from a Q128.128 to a Q128.96. // we then downcast because we know the result always fits within 160 bits due to our tick input constraint // we round up in the division so getTickAtSqrtRatio of the output price is always consistent sqrtPriceX96 = uint160( (ratio >> 32) + (ratio % (1 << 32) == 0 ? 0 : 1) ); } } /// @notice Calculates the greatest tick value such that getRatioAtTick(tick) <= ratio /// @dev Throws in case sqrtPriceX96 < MIN_SQRT_RATIO, as MIN_SQRT_RATIO is the lowest value getRatioAtTick may /// ever return. /// @param sqrtPriceX96 The sqrt ratio for which to compute the tick as a Q64.96 /// @return tick The greatest tick for which the ratio is less than or equal to the input ratio function getTickAtSqrtRatio( uint160 sqrtPriceX96 ) internal pure returns (int24 tick) { unchecked { // second inequality must be < because the price can never reach the price at the max tick if ( !(sqrtPriceX96 >= MIN_SQRT_RATIO && sqrtPriceX96 < MAX_SQRT_RATIO) ) revert R(); uint256 ratio = uint256(sqrtPriceX96) << 32; uint256 r = ratio; uint256 msb = 0; assembly { let f := shl(7, gt(r, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)) msb := or(msb, f) r := shr(f, r) } assembly { let f := shl(6, gt(r, 0xFFFFFFFFFFFFFFFF)) msb := or(msb, f) r := shr(f, r) } assembly { let f := shl(5, gt(r, 0xFFFFFFFF)) msb := or(msb, f) r := shr(f, r) } assembly { let f := shl(4, gt(r, 0xFFFF)) msb := or(msb, f) r := shr(f, r) } assembly { let f := shl(3, gt(r, 0xFF)) msb := or(msb, f) r := shr(f, r) } assembly { let f := shl(2, gt(r, 0xF)) msb := or(msb, f) r := shr(f, r) } assembly { let f := shl(1, gt(r, 0x3)) msb := or(msb, f) r := shr(f, r) } assembly { let f := gt(r, 0x1) msb := or(msb, f) } if (msb >= 128) r = ratio >> (msb - 127); else r = ratio << (127 - msb); int256 log_2 = (int256(msb) - 128) << 64; assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(63, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(62, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(61, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(60, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(59, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(58, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(57, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(56, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(55, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(54, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(53, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(52, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(51, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(50, f)) } int256 log_sqrt10001 = log_2 * 255738958999603826347141; // 128.128 number int24 tickLow = int24( (log_sqrt10001 - 3402992956809132418596140100660247210) >> 128 ); int24 tickHi = int24( (log_sqrt10001 + 291339464771989622907027621153398088495) >> 128 ); tick = tickLow == tickHi ? tickLow : getSqrtRatioAtTick(tickHi) <= sqrtPriceX96 ? tickHi : tickLow; } } }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"uint256","name":"_fundraisingGoal","type":"uint256"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint256","name":"_fundraisingDeadline","type":"uint256"},{"internalType":"uint256","name":"_fundExpiry","type":"uint256"},{"internalType":"address","name":"_daoManager","type":"address"},{"internalType":"address","name":"_liquidityLockerFactory","type":"address"},{"internalType":"uint256","name":"_maxWhitelistAmount","type":"uint256"},{"internalType":"address","name":"_protocolAdmin","type":"address"},{"internalType":"uint256","name":"_maxPublicContributionAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[],"name":"T","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"}],"name":"AddWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"contributor","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Contribution","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newExpiry","type":"uint256"}],"name":"FundExpiryExtended","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newDeadline","type":"uint256"}],"name":"FundraisingDeadlineExtended","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"success","type":"bool"}],"name":"FundraisingFinalized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newAmount","type":"uint256"}],"name":"MaxPublicContributionAmountUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newAmount","type":"uint256"}],"name":"MaxWhitelistAmountUpdated","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":true,"internalType":"address","name":"contributor","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Refund","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"}],"name":"RemoveWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"startIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endIndex","type":"uint256"}],"name":"TokensDistributed","type":"event"},{"inputs":[],"name":"CL_FACTORY","outputs":[{"internalType":"contract IClPoolFactory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DQN_TOKENS_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_BATCH_SIZE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_CONTRIBUTORS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_CONTRIBUTION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POSITION_MANAGER","outputs":[{"internalType":"contract INonfungiblePositionManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SUPPLY_TO_DQN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SUPPLY_TO_FUNDRAISERS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SUPPLY_TO_LP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNI_V3_FEE","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WAVAX","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"addToWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contribute","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"contributions","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"contributors","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"daoToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"distributeTokensToBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"distributionComplete","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyEscape","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"contracts","type":"address[]"},{"internalType":"bytes[]","name":"data","type":"bytes[]"},{"internalType":"uint256[]","name":"msgValues","type":"uint256[]"}],"name":"execute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newFundExpiry","type":"uint256"}],"name":"extendFundExpiry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newFundraisingDeadline","type":"uint256"}],"name":"extendFundraisingDeadline","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int24","name":"initialTick","type":"int24"},{"internalType":"int24","name":"upperTick","type":"int24"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"finalizeFundraising","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fundExpiry","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundraisingDeadline","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundraisingFinalized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundraisingGoal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDistributionProgress","outputs":[{"internalType":"uint256","name":"totalContributors","type":"uint256"},{"internalType":"uint256","name":"processedContributors","type":"uint256"},{"internalType":"bool","name":"isComplete","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWhitelistLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"goalReached","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"hasReceivedTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquidityLocker","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquidityLockerFactory","outputs":[{"internalType":"contract ILockerFactory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpFeesCut","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPublicContributionAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxWhitelistAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextDistributionIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"refund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"removedAddress","type":"address"}],"name":"removeFromWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPublicContributionAmount","type":"uint256"}],"name":"setMaxPublicContributionAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxWhitelistAmount","type":"uint256"}],"name":"setMaxWhitelistAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalRaised","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":[{"internalType":"address","name":"","type":"address"}],"name":"whitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"whitelistArray","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6080604052600d805460ff1916603c17905534801561001d57600080fd5b50604051614bb1380380614bb183398101604081905261003c91610398565b846001600160a01b03811661006c57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6100758161026e565b5060018055896100d75760405162461bcd60e51b815260206004820152602760248201527f46756e6472616973696e6720676f616c206d75737420626520677265617465726044820152660207468616e20360cc1b6064820152608401610063565b4287116101395760405162461bcd60e51b815260206004820152602a60248201527f46756e6472616973696e6720646561646c696e65206d75737420626520696e206044820152697468652066757475726560b01b6064820152608401610063565b86861161019f5760405162461bcd60e51b815260206004820152602e60248201527f46756e6420657870697279206d7573742062652061667465722066756e64726160448201526d6973696e6720646561646c696e6560901b6064820152608401610063565b6001600160a01b0382166102035760405162461bcd60e51b815260206004820152602560248201527f50726f746f636f6c2061646d696e2063616e6e6f74206265207a65726f206164604482015264647265737360d81b6064820152608401610063565b600e61020f8a826104eb565b50600f61021c89826104eb565b50600799909955600895909555600993909355600280546001600160a01b03199081166001600160a01b0393841617909155600a93909355600480549093169316929092179055505050600b556105aa565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126102e557600080fd5b81516001600160401b03808211156102ff576102ff6102be565b604051601f8301601f19908116603f01168101908282118183101715610327576103276102be565b816040528381526020925086602085880101111561034457600080fd5b600091505b838210156103665785820183015181830184015290820190610349565b6000602085830101528094505050505092915050565b80516001600160a01b038116811461039357600080fd5b919050565b6000806000806000806000806000806101408b8d0312156103b857600080fd5b8a5160208c0151909a506001600160401b03808211156103d757600080fd5b6103e38e838f016102d4565b9a5060408d01519150808211156103f957600080fd5b506104068d828e016102d4565b98505060608b0151965060808b0151955061042360a08c0161037c565b945061043160c08c0161037c565b935060e08b015192506104476101008c0161037c565b91506101208b015190509295989b9194979a5092959850565b600181811c9082168061047457607f821691505b60208210810361049457634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156104e6576000816000526020600020601f850160051c810160208610156104c35750805b601f850160051c820191505b818110156104e2578281556001016104cf565b5050505b505050565b81516001600160401b03811115610504576105046102be565b610518816105128454610460565b8461049a565b602080601f83116001811461054d57600084156105355750858301515b600019600386901b1c1916600185901b1785556104e2565b600085815260208120601f198616915b8281101561057c5788860151825594840194600190910190840161055d565b508582101561059a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6145f8806105b96000396000f3fe6080604052600436106102e85760003560e01c8063715018a6116101905780639f4bca26116100dc578063cfdbf25411610095578063e2d968271161006f578063e2d9682714610921578063e70dd6cf14610937578063e8c5e8e21461095f578063f2fde38b1461097f57600080fd5b8063cfdbf254146108e4578063d251fefc146108f9578063d7bb99ba1461091957600080fd5b80639f4bca2614610832578063a13202e914610848578063a49ab8c71461085d578063a5f456c31461089a578063c5c4744c146108af578063cc07218d146108c557600080fd5b80638ab1d6811161014957806395d89b411161012357806395d89b41146107b75780639759164a146107cc5780639b19251a146107ec5780639e7b08d51461081c57600080fd5b80638ab1d681146107595780638da5cb5b14610779578063947fe8121461079757600080fd5b8063715018a61461069c57806372e041a0146106b157806373b295c2146106d15780637d3d6522146106f95780637f6497831461071957806384d4875e1461073957600080fd5b80633cb5d1001161024f5780634afcccfe1161020857806357aa0201116101e257806357aa020114610625578063590e1ae314610651578063695bcc7f146106665780636f96953c1461067c57600080fd5b80634afcccfe146105c957806350ba9705146105e857806356e1b2cf1461061057600080fd5b80633cb5d100146104f75780633d9c80431461051757806340650c9114610541578063420f68611461055c57806342e94c901461057c5780634914b030146105a957600080fd5b80631af1a502116102a15780631af1a502146104205780631bea83fe146104405780632109db591461048057806323dbf825146104a057806329d645d6146104c1578063343365f6146104e157600080fd5b806306a9d1a91461031b57806306fdde0314610344578063150b7a0214610366578063166d0c4c146103ab57806317ae867a146103ca5780631a8d949a1461040a57600080fd5b3661031657600d5462010000900460ff16158015610307575060085442105b156103145761031461099f565b005b600080fd5b34801561032757600080fd5b5061033160085481565b6040519081526020015b60405180910390f35b34801561035057600080fd5b50610359610d87565b60405161033b9190612c0e565b34801561037257600080fd5b50610392610381366004612c72565b630a85bd0160e11b95945050505050565b6040516001600160e01b0319909116815260200161033b565b3480156103b757600080fd5b506103316aa56fa5b99019a5c800000081565b3480156103d657600080fd5b506103fa6103e5366004612d11565b60136020526000908152604090205460ff1681565b604051901515815260200161033b565b34801561041657600080fd5b5061033160095481565b34801561042c57600080fd5b5061031461043b366004612d2e565b610e15565b34801561044c57600080fd5b5061046873aaa78e8c4241990b4ce159e105da08129345946a81565b6040516001600160a01b03909116815260200161033b565b34801561048c57600080fd5b5061031461049b366004612d2e565b610f1a565b3480156104ac57600080fd5b50600d546103fa906301000000900460ff1681565b3480156104cd57600080fd5b506103146104dc366004612d2e565b6110a9565b3480156104ed57600080fd5b50610331600a5481565b34801561050357600080fd5b50610468610512366004612d2e565b61111d565b34801561052357600080fd5b5061052d61271081565b60405162ffffff909116815260200161033b565b34801561054d57600080fd5b50610331662386f26fc1000081565b34801561056857600080fd5b50600454610468906001600160a01b031681565b34801561058857600080fd5b50610331610597366004612d11565b60106020526000908152604090205481565b3480156105b557600080fd5b50600554610468906001600160a01b031681565b3480156105d557600080fd5b50600d546103fa90610100900460ff1681565b3480156105f457600080fd5b5061046873332f91766ae8306bd85ad2e1a560bba0cd5c05f681565b34801561061c57600080fd5b50610314611147565b34801561063157600080fd5b50600d5461063f9060ff1681565b60405160ff909116815260200161033b565b34801561065d57600080fd5b50610314611250565b34801561067257600080fd5b50610331600c5481565b34801561068857600080fd5b50600254610468906001600160a01b031681565b3480156106a857600080fd5b506103146114cc565b3480156106bd57600080fd5b506103316106cc366004612d5e565b6114de565b3480156106dd57600080fd5b5061046873b31f66aa3c1e785363f0875a1b74e27b85fd66c781565b34801561070557600080fd5b50600d546103fa9062010000900460ff1681565b34801561072557600080fd5b50610314610734366004612de6565b611ccc565b34801561074557600080fd5b50610314610754366004612d2e565b611f3f565b34801561076557600080fd5b50610314610774366004612d11565b611fb3565b34801561078557600080fd5b506000546001600160a01b0316610468565b3480156107a357600080fd5b506103146107b2366004612e28565b6121a2565b3480156107c357600080fd5b506103596123ea565b3480156107d857600080fd5b50600354610468906001600160a01b031681565b3480156107f857600080fd5b506103fa610807366004612d11565b60116020526000908152604090205460ff1681565b34801561082857600080fd5b5061033160075481565b34801561083e57600080fd5b50610331610bb881565b34801561085457600080fd5b50601554610331565b34801561086957600080fd5b50601654600c54600d546301000000900460ff1660408051938452602084019290925215159082015260600161033b565b3480156108a657600080fd5b506103146123f7565b3480156108bb57600080fd5b5061033160065481565b3480156108d157600080fd5b506103316acecb8f27f4200f3a00000081565b3480156108f057600080fd5b50610331604181565b34801561090557600080fd5b50610468610914366004612d2e565b6126da565b61031461099f565b34801561092d57600080fd5b50610331600b5481565b34801561094357600080fd5b5061046873aaa32926fce6be95ea2c51cb4fcb60836d320c4281565b34801561096b57600080fd5b506103316b033b2e3c9fd0803ce800000081565b34801561098b57600080fd5b5061031461099a366004612d11565b6126ea565b6109a7612728565b600d5462010000900460ff16156109fc5760405162461bcd60e51b815260206004820152601460248201527311dbd85b08185b1c9958591e481c995858da195960621b60448201526064015b60405180910390fd5b6008544210610a3c5760405162461bcd60e51b815260206004820152600c60248201526b111958591b1a5b99481a1a5d60a21b60448201526064016109f3565b662386f26fc10000341015610a935760405162461bcd60e51b815260206004820152601a60248201527f436f6e747269627574696f6e2062656c6f77206d696e696d756d00000000000060448201526064016109f3565b601654610bb811610ae65760405162461bcd60e51b815260206004820152601860248201527f4d617820636f6e7472696275746f72732072656163686564000000000000000060448201526064016109f3565b600a5415610bbe573360009081526011602052604090205460ff16610b4d5760405162461bcd60e51b815260206004820152601760248201527f596f7520617265206e6f742077686974656c697374656400000000000000000060448201526064016109f3565b600a5433600090815260106020526040902054610b6b903490612ed8565b1115610bb95760405162461bcd60e51b815260206004820152601c60248201527f457863656564696e67206d617857686974656c697374416d6f756e740000000060448201526064016109f3565b610c40565b600b5415610c4057600b5433600090815260106020526040902054610be4903490612ed8565b1115610c405760405162461bcd60e51b815260206004820152602560248201527f457863656564696e67206d61785075626c6963436f6e747269627574696f6e416044820152641b5bdd5b9d60da1b60648201526084016109f3565b600754600654349190610c54908390612ed8565b1115610c8257600654600754610c6a9190612ef1565b9050610c8233610c7a8334612ef1565b6108fc612752565b336000908152601060205260408120549003610cec5760168054336000818152601460205260408120839055600183018455929092527fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b51242890180546001600160a01b03191690911790555b3360009081526010602052604081208054839290610d0b908490612ed8565b925050819055508060066000828254610d249190612ed8565b909155505060405181815233907f4d154d4aae216bed6d0926db77c00df2b57c6b5ba4eee05775de20facede3a7b9060200160405180910390a260075460065403610d7b57600d805462ff00001916620100001790555b50610d8560018055565b565b600e8054610d9490612f04565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc090612f04565b8015610e0d5780601f10610de257610100808354040283529160200191610e0d565b820191906000526020600020905b815481529060010190602001808311610df057829003601f168201915b505050505081565b610e1d612861565b6009548111610e6e5760405162461bcd60e51b815260206004820152601d60248201527f4d7573742063686f6f7365206c617465722066756e642065787069727900000060448201526064016109f3565b60098190556003546001600160a01b031615610ee357600354604051630d78d28160e11b8152600481018390526001600160a01b0390911690631af1a50290602401600060405180830381600087803b158015610eca57600080fd5b505af1158015610ede573d6000803e3d6000fd5b505050505b6040518181527f4e5dd36969507fae1e69607cd3b2492dafc0c3ae1bf1c50f921a5642847fa309906020015b60405180910390a150565b6000546001600160a01b0316331480610f3d57506004546001600160a01b031633145b610f595760405162461bcd60e51b81526004016109f390612f3e565b600d5462010000900460ff1615610fb25760405162461bcd60e51b815260206004820152601c60248201527f46756e6472616973696e6720676f616c2077617320726561636865640000000060448201526064016109f3565b600854421061100f5760405162461bcd60e51b815260206004820152602360248201527f43616e6e6f7420657874656e6420616674657220646561646c696e65207061736044820152621cd95960ea1b60648201526084016109f3565b60085481116110745760405162461bcd60e51b815260206004820152602b60248201527f4e657720646561646c696e65206d75737420626520616674657220637572726560448201526a6e7420646561646c696e6560a81b60648201526084016109f3565b60088190556040518181527f27ab8e4ae3319b5e6c4fff32114838b4a506f955312c4b650fd8f4ba29575bdb90602001610f0f565b6000546001600160a01b03163314806110cc57506004546001600160a01b031633145b6110e85760405162461bcd60e51b81526004016109f390612f3e565b600a8190556040518181527fddec2a61d8379d2f92b76519b490096bc32fbe70351482d75e8f2cf62c50523b90602001610f0f565b6016818154811061112d57600080fd5b6000918252602090912001546001600160a01b0316905081565b6004546001600160a01b0316331461119a5760405162461bcd60e51b815260206004820152601660248201527526bab9ba10313290383937ba37b1b7b61030b236b4b760511b60448201526064016109f3565b600d54610100900460ff16156111f25760405162461bcd60e51b815260206004820152601d60248201527f46756e6472616973696e6720616c72656164792066696e616c697a656400000060448201526064016109f3565b600047116112375760405162461bcd60e51b815260206004820152601260248201527127379022aa24103a37903a3930b739b332b960711b60448201526064016109f3565b600454610d85906001600160a01b0316476108fc612752565b611258612728565b600d5462010000900460ff16156112b15760405162461bcd60e51b815260206004820152601c60248201527f46756e6472616973696e6720676f616c2077617320726561636865640000000060448201526064016109f3565b6008544210156113035760405162461bcd60e51b815260206004820152601860248201527f446561646c696e65206e6f74207265616368656420796574000000000000000060448201526064016109f3565b3360009081526010602052604090205461135f5760405162461bcd60e51b815260206004820152601a60248201527f4e6f20636f6e747269627574696f6e7320746f20726566756e6400000000000060448201526064016109f3565b3360009081526010602052604081208054908290556006805491928392611387908490612ef1565b9091555050336000908152601460205260408120546016549091906113ae90600190612ef1565b9050808214611436576000601682815481106113cc576113cc612f75565b600091825260209091200154601680546001600160a01b0390921692508291859081106113fb576113fb612f75565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559290911681526014909152604090208290555b601680548061144757611447612f8b565b60008281526020808220830160001990810180546001600160a01b0319169055909201909255338083526014909152604082209190915561148b90846108fc612752565b60405183815233907fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d9060200160405180910390a2505050610d8560018055565b6114d4612861565b610d85600061288e565b60006114e8612861565b6114f0612728565b600d5462010000900460ff166115485760405162461bcd60e51b815260206004820152601c60248201527f46756e6472616973696e6720676f616c206e6f7420726561636865640000000060448201526064016109f3565b600d54610100900460ff16156115a05760405162461bcd60e51b815260206004820152601d60248201527f46756e6472616973696e6720616c72656164792066696e616c697a656400000060448201526064016109f3565b600082600e600f306040516115b490612c01565b6115c093929190613045565b8190604051809103906000f59050801580156115e0573d6000803e3d6000fd5b50600580546001600160a01b0319166001600160a01b03831690811790915590915073b31f66aa3c1e785363f0875a1b74e27b85fd66c7116116535760405162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081cd85b1d60a21b60448201526064016109f3565b6040516340c10f1960e01b81523060048201526b033b2e3c9fd0803ce800000060248201526001600160a01b038216906340c10f1990604401600060405180830381600087803b1580156116a657600080fd5b505af11580156116ba573d6000803e3d6000fd5b50506040516340c10f1960e01b81523060048201526aa56fa5b99019a5c800000060248201526001600160a01b03841692506340c10f199150604401600060405180830381600087803b15801561171057600080fd5b505af1158015611724573d6000803e3d6000fd5b50506040516340c10f1960e01b815273332f91766ae8306bd85ad2e1a560bba0cd5c05f660048201526acecb8f27f4200f3a00000060248201526001600160a01b03841692506340c10f199150604401600060405180830381600087803b15801561178e57600080fd5b505af11580156117a2573d6000803e3d6000fd5b505060405163095ea7b360e01b815273aaa78e8c4241990b4ce159e105da08129345946a60048201526aa56fa5b99019a5c800000060248201526001600160a01b038416925063095ea7b391506044016020604051808303816000875af1158015611811573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118359190613083565b5060006118448660020b6128de565b604051638e909e5160e01b81526001600160a01b03808516600483015273b31f66aa3c1e785363f0875a1b74e27b85fd66c7602483015261271060448301528216606482015290915060009073aaa32926fce6be95ea2c51cb4fcb60836d320c4290638e909e51906084016020604051808303816000875af11580156118ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f291906130a5565b60408051610180810182526001600160a01b038616815273b31f66aa3c1e785363f0875a1b74e27b85fd66c760208201526127108183015260028a810b606083015289900b60808201526aa56fa5b99019a5c800000060a0820152600060c0820181905260e08201819052610100820181905230610120830152426101408301526101608201529051630e6c620f60e41b81529192509073aaa78e8c4241990b4ce159e105da08129345946a9063e6c620f0906119b39084906004016130c2565b6080604051808303816000875af11580156119d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f69190613194565b50506002549196506000916001600160a01b031690506376b5c47d73aaa78e8c4241990b4ce159e105da08129345946a611a386000546001600160a01b031690565b600954600d5460405160e086901b6001600160e01b03191681526001600160a01b03948516600482015293909216602484015267ffffffffffffffff166044830152606482018a905260ff1660848201523060a482015260c4016020604051808303816000875af1158015611ab1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ad591906130a5565b604051632142170760e11b81523060048201526001600160a01b03821660248201526044810188905290915073aaa78e8c4241990b4ce159e105da08129345946a906342842e0e90606401600060405180830381600087803b158015611b3a57600080fd5b505af1158015611b4e573d6000803e3d6000fd5b50506040516367a4d1c360e01b8152600481018990526001600160a01b03841692506367a4d1c39150602401600060405180830381600087803b158015611b9457600080fd5b505af1158015611ba8573d6000803e3d6000fd5b5050600380546001600160a01b0319166001600160a01b0385811691909117909155604051620c3b8160e51b81528682166004820152908816925063018770209150602401600060405180830381600087803b158015611c0757600080fd5b505af1158015611c1b573d6000803e3d6000fd5b50505050846001600160a01b031663715018a66040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611c5a57600080fd5b505af1158015611c6e573d6000803e3d6000fd5b5050604051600181527fe64f408051437053caebc2ec8b10a45148f5acee3a6922908871b997f80d335d9250602001905060405180910390a15050600d805461ff00191661010017905550611cc5915061285b9050565b9392505050565b6000546001600160a01b0316331480611cef57506004546001600160a01b031633145b611d0b5760405162461bcd60e51b81526004016109f390612f3e565b60005b81811015611f3a576000838383818110611d2a57611d2a612f75565b9050602002016020810190611d3f9190612d11565b6001600160a01b031603611d875760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b60448201526064016109f3565b60116000848484818110611d9d57611d9d612f75565b9050602002016020810190611db29190612d11565b6001600160a01b0316815260208101919091526040016000205460ff16611f3257600160116000858585818110611deb57611deb612f75565b9050602002016020810190611e009190612d11565b6001600160a01b0316815260208101919091526040016000908120805460ff19169215159290921790915560155490601290858585818110611e4457611e44612f75565b9050602002016020810190611e599190612d11565b6001600160a01b031681526020810191909152604001600020556015838383818110611e8757611e87612f75565b9050602002016020810190611e9c9190612d11565b81546001810183556000928352602090922090910180546001600160a01b0319166001600160a01b039092169190911790557fe463fa6bdecb16f96f58191d902152633214e760ea443684105a7eef1ad16b9d838383818110611f0157611f01612f75565b9050602002016020810190611f169190612d11565b6040516001600160a01b03909116815260200160405180910390a15b600101611d0e565b505050565b6000546001600160a01b0316331480611f6257506004546001600160a01b031633145b611f7e5760405162461bcd60e51b81526004016109f390612f3e565b600b8190556040518181527f6050fca8a0abb9413a5b1ed9aa596579bcbef11940b26ff24934fa0d74b7949590602001610f0f565b6000546001600160a01b0316331480611fd657506004546001600160a01b031633145b611ff25760405162461bcd60e51b81526004016109f390612f3e565b6001600160a01b03811660009081526011602052604090205460ff1661205a5760405162461bcd60e51b815260206004820152601860248201527f41646472657373206e6f7420696e2077686974656c697374000000000000000060448201526064016109f3565b6001600160a01b03811660009081526012602052604081205460155490919061208590600190612ef1565b905080821461210d576000601582815481106120a3576120a3612f75565b600091825260209091200154601580546001600160a01b0390921692508291859081106120d2576120d2612f75565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559290911681526012909152604090208290555b601580548061211e5761211e612f8b565b60008281526020808220600019908401810180546001600160a01b03191690559092019092556001600160a01b0385168083526012825260408084208490556011835292839020805460ff1916905591519182527fa6667e187c57c5b0fa4e1122a695ed0754287513bcb4901fa6c1f44ba22c0187910160405180910390a1505050565b6121aa612861565b600d54610100900460ff166121fd5760405162461bcd60e51b8152602060048201526019602482015278119d5b991c985a5cda5b99c81b9bdd08199a5b985b1a5e9959603a1b60448201526064016109f3565b848314801561220b57508281145b6122505760405162461bcd60e51b8152602060048201526016602482015275082e4e4c2f240d8cadccee8d0e640dad2e6dac2e8c6d60531b60448201526064016109f3565b60005b858110156123e157600087878381811061226f5761226f612f75565b90506020020160208101906122849190612d11565b6001600160a01b0316036122da5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420636f6e74726163742061646472657373000000000000000060448201526064016109f3565b60008787838181106122ee576122ee612f75565b90506020020160208101906123039190612d11565b6001600160a01b031684848481811061231e5761231e612f75565b9050602002013587878581811061233757612337612f75565b905060200281019061234991906131e7565b60405161235792919061322e565b60006040518083038185875af1925050503d8060008114612394576040519150601f19603f3d011682016040523d82523d6000602084013e612399565b606091505b50509050806123d85760405162461bcd60e51b815260206004820152600b60248201526a10d85b1b0819985a5b195960aa1b60448201526064016109f3565b50600101612253565b50505050505050565b600f8054610d9490612f04565b6123ff612861565b612407612728565b600d54610100900460ff1661245a5760405162461bcd60e51b8152602060048201526019602482015278119d5b991c985a5cda5b99c81b9bdd08199a5b985b1a5e9959603a1b60448201526064016109f3565b600d546301000000900460ff16156124b45760405162461bcd60e51b815260206004820152601d60248201527f446973747269627574696f6e20616c726561647920636f6d706c65746500000060448201526064016109f3565b601654600c54106125075760405162461bcd60e51b815260206004820152601f60248201527f4e6f206d6f726520636f6e7472696275746f727320746f2070726f636573730060448201526064016109f3565b600554600c546001600160a01b039091169060009061252890604190612ed8565b60165490915081111561253a57506016545b600c545b818110156126705760006016828154811061255b5761255b612f75565b60009182526020808320909101546001600160a01b0316808352601390915260409091205490915060ff16612667576001600160a01b0381166000908152601060205260408120546006549091906125bf6b033b2e3c9fd0803ce80000008461323e565b6125c9919061326b565b60405163a9059cbb60e01b81526001600160a01b038581166004830152602482018390529192509087169063a9059cbb906044016020604051808303816000875af115801561261c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126409190613083565b5050506001600160a01b0381166000908152601360205260409020805460ff191660011790555b5060010161253e565b50600c5460408051918252602082018390527f72f2e17e5286668a3e0be581ddcbc3d5fed31c2072f4e6437566f8fb11164388910160405180910390a1600c81905560165481106126cf57600d805463ff000000191663010000001790555b5050610d8560018055565b6015818154811061112d57600080fd5b6126f2612861565b6001600160a01b03811661271c57604051631e4fbdf760e01b8152600060048201526024016109f3565b6127258161288e565b50565b60026001540361274b57604051633ee5aeb560e01b815260040160405180910390fd5b6002600155565b6000806000806000868887f19050806128555773b31f66aa3c1e785363f0875a1b74e27b85fd66c76001600160a01b031663d0e30db0846040518263ffffffff1660e01b81526004016000604051808303818588803b1580156127b457600080fd5b505af11580156127c8573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b03881660048201526024810187905273b31f66aa3c1e785363f0875a1b74e27b85fd66c7935063a9059cbb925060440190506020604051808303816000875af115801561282f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128539190613083565b505b50505050565b60018055565b6000546001600160a01b03163314610d855760405163118cdaa760e01b81523360048201526024016109f3565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008060008360020b126128f5578260020b6128fd565b8260020b6000035b9050620d89e8811115612923576040516315e4079d60e11b815260040160405180910390fd5b60008160011660000361293a57600160801b61294c565b6ffffcb933bd6fad37aa2d162d1a5940015b70ffffffffffffffffffffffffffffffffff1690506002821615612980576ffff97272373d413259a46990580e213a0260801c5b600482161561299f576ffff2e50f5f656932ef12357cf3c7fdcc0260801c5b60088216156129be576fffe5caca7e10e4e61c3624eaa0941cd00260801c5b60108216156129dd576fffcb9843d60f6159c9db58835c9266440260801c5b60208216156129fc576fff973b41fa98c081472e6896dfb254c00260801c5b6040821615612a1b576fff2ea16466c96a3843ec78b326b528610260801c5b6080821615612a3a576ffe5dee046a99a2a811c461f1969c30530260801c5b610100821615612a5a576ffcbe86c7900a88aedcffc83b479aa3a40260801c5b610200821615612a7a576ff987a7253ac413176f2b074cf7815e540260801c5b610400821615612a9a576ff3392b0822b70005940c7a398e4b70f30260801c5b610800821615612aba576fe7159475a2c29b7443b29c7fa6e889d90260801c5b611000821615612ada576fd097f3bdfd2022b8845ad8f792aa58250260801c5b612000821615612afa576fa9f746462d870fdf8a65dc1f90e061e50260801c5b614000821615612b1a576f70d869a156d2a1b890bb3df62baf32f70260801c5b618000821615612b3a576f31be135f97d08fd981231505542fcfa60260801c5b62010000821615612b5b576f09aa508b5b7a84e1c677de54f3e99bc90260801c5b62020000821615612b7b576e5d6af8dedb81196699c329225ee6040260801c5b62040000821615612b9a576d2216e584f5fa1ea926041bedfe980260801c5b62080000821615612bb7576b048a170391f7dc42444e8fa20260801c5b60008460020b1315612bd8578060001981612bd457612bd4613255565b0490505b640100000000810615612bec576001612bef565b60005b60ff16602082901c0192505050919050565b6113358061328e83390190565b60006020808352835180602085015260005b81811015612c3c57858101830151858201604001528201612c20565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b038116811461272557600080fd5b600080600080600060808688031215612c8a57600080fd5b8535612c9581612c5d565b94506020860135612ca581612c5d565b935060408601359250606086013567ffffffffffffffff80821115612cc957600080fd5b818801915088601f830112612cdd57600080fd5b813581811115612cec57600080fd5b896020828501011115612cfe57600080fd5b9699959850939650602001949392505050565b600060208284031215612d2357600080fd5b8135611cc581612c5d565b600060208284031215612d4057600080fd5b5035919050565b8035600281900b8114612d5957600080fd5b919050565b600080600060608486031215612d7357600080fd5b612d7c84612d47565b9250612d8a60208501612d47565b9150604084013590509250925092565b60008083601f840112612dac57600080fd5b50813567ffffffffffffffff811115612dc457600080fd5b6020830191508360208260051b8501011115612ddf57600080fd5b9250929050565b60008060208385031215612df957600080fd5b823567ffffffffffffffff811115612e1057600080fd5b612e1c85828601612d9a565b90969095509350505050565b60008060008060008060608789031215612e4157600080fd5b863567ffffffffffffffff80821115612e5957600080fd5b612e658a838b01612d9a565b90985096506020890135915080821115612e7e57600080fd5b612e8a8a838b01612d9a565b90965094506040890135915080821115612ea357600080fd5b50612eb089828a01612d9a565b979a9699509497509295939492505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115612eeb57612eeb612ec2565b92915050565b81810381811115612eeb57612eeb612ec2565b600181811c90821680612f1857607f821691505b602082108103612f3857634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601e908201527f4d757374206265206f776e6572206f722070726f746f636f6c41646d696e0000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b8054600090600181811c9080831680612fbb57607f831692505b60208084108203612fdc57634e487b7160e01b600052602260045260246000fd5b83885260208801828015612ff7576001811461300d57613038565b60ff198716825285151560051b82019750613038565b60008981526020902060005b8781101561303257815484820152908601908401613019565b83019850505b5050505050505092915050565b6060815260006130586060830186612fa1565b828103602084015261306a8186612fa1565b91505060018060a01b0383166040830152949350505050565b60006020828403121561309557600080fd5b81518015158114611cc557600080fd5b6000602082840312156130b757600080fd5b8151611cc581612c5d565b81516001600160a01b03168152610180810160208301516130ee60208401826001600160a01b03169052565b506040830151613105604084018262ffffff169052565b50606083015161311a606084018260020b9052565b50608083015161312f608084018260020b9052565b5060a083015160a083015260c083015160c083015260e083015160e083015261010080840151818401525061012080840151613175828501826001600160a01b03169052565b5050610140838101519083015261016092830151929091019190915290565b600080600080608085870312156131aa57600080fd5b8451935060208501516fffffffffffffffffffffffffffffffff811681146131d157600080fd5b6040860151606090960151949790965092505050565b6000808335601e198436030181126131fe57600080fd5b83018035915067ffffffffffffffff82111561321957600080fd5b602001915036819003821315612ddf57600080fd5b8183823760009101908152919050565b8082028115828204841417612eeb57612eeb612ec2565b634e487b7160e01b600052601260045260246000fd5b60008261328857634e487b7160e01b600052601260045260246000fd5b50049056fe608060405234801561001057600080fd5b5060405161133538038061133583398101604081905261002f916101c2565b338383600361003e83826102d2565b50600461004b82826102d2565b5050506001600160a01b03811661007c57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b610085816100b2565b5042600855600780546001600160a01b0319166001600160a01b0392909216919091179055506103919050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261012b57600080fd5b81516001600160401b038082111561014557610145610104565b604051601f8301601f19908116603f0116810190828211818310171561016d5761016d610104565b816040528381526020925086602085880101111561018a57600080fd5b600091505b838210156101ac578582018301518183018401529082019061018f565b6000602085830101528094505050505092915050565b6000806000606084860312156101d757600080fd5b83516001600160401b03808211156101ee57600080fd5b6101fa8783880161011a565b9450602086015191508082111561021057600080fd5b5061021d8682870161011a565b604086015190935090506001600160a01b038116811461023c57600080fd5b809150509250925092565b600181811c9082168061025b57607f821691505b60208210810361027b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156102cd576000816000526020600020601f850160051c810160208610156102aa5750805b601f850160051c820191505b818110156102c9578281556001016102b6565b5050505b505050565b81516001600160401b038111156102eb576102eb610104565b6102ff816102f98454610247565b84610281565b602080601f831160018114610334576000841561031c5750858301515b600019600386901b1c1916600185901b1785556102c9565b600085815260208120601f198616915b8281101561036357888601518255948401946001909101908401610344565b50858210156103815787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b610f95806103a06000396000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c80636acbd39b1161010f578063a9059cbb116100a2578063dd62ed3e11610071578063dd62ed3e146103e7578063e3435eb314610420578063e8dfadcd14610429578063f2fde38b1461044957600080fd5b8063a9059cbb14610396578063b010dc11146103a9578063bbc0c742146103d4578063cab29010146103df57600080fd5b806372aab8d0116100de57806372aab8d01461036c57806378e97925146103745780638da5cb5b1461037d57806395d89b411461038e57600080fd5b80636acbd39b1461032b57806370a082311461033357806370db69d61461035c578063715018a61461036457600080fd5b80632b2d518e116101875780634162169f116101565780634162169f146102f457806364f53f2e1461030757806365b68bf71461030f578063665a11ca1461031857600080fd5b80632b2d518e146102975780632d2c55651461029f578063313ce567146102d257806340c10f19146102e157600080fd5b80631739bf54116101c35780631739bf541461026c57806318160ddd1461027457806323b872dd1461027c57806328d48afc1461028f57600080fd5b806301877020146101f557806306fdde031461020a57806308b4af0014610228578063095ea7b314610249575b600080fd5b610208610203366004610d57565b61045c565b005b6102126104e1565b60405161021f9190610d72565b60405180910390f35b61023b610236366004610dc1565b610573565b60405190815260200161021f565b61025c610257366004610dda565b61059e565b604051901515815260200161021f565b61023b600281565b60025461023b565b61025c61028a366004610e04565b6105b8565b61025c6105dc565b61023b610608565b6102ba73fe85c993605dd02ffd2b0b7db041f51071e45cd181565b6040516001600160a01b03909116815260200161021f565b6040516012815260200161021f565b6102086102ef366004610dda565b610655565b6007546102ba906001600160a01b031681565b61023b61066b565b61023b61038481565b6006546102ba906001600160a01b031681565b61023b6106ea565b61023b610341366004610d57565b6001600160a01b031660009081526020819052604090205490565b61023b610705565b61020861071c565b61023b600a81565b61023b60085481565b6005546001600160a01b03166102ba565b610212610730565b61025c6103a4366004610dda565b61073f565b61023b6103b7366004610e40565b600960209081526000928352604080842090915290825290205481565b60085442101561025c565b61023b60b481565b61023b6103f5366004610e7d565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61023b6103e881565b61023b610437366004610d57565b600a6020526000908152604090205481565b610208610457366004610d57565b61074d565b61046461078b565b6001600160a01b0381166104bf5760405162461bcd60e51b815260206004820152601e60248201527f496e76616c6964206c697175696469747920706f6f6c2061646472657373000060448201526064015b60405180910390fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6060600380546104f090610eb0565b80601f016020809104026020016040519081016040528092919081815260200182805461051c90610eb0565b80156105695780601f1061053e57610100808354040283529160200191610569565b820191906000526020600020905b81548152906001019060200180831161054c57829003601f168201915b5050505050905090565b60008061057e61066b565b90506103e861058d8285610f00565b6105979190610f17565b9392505050565b6000336105ac8185856107b8565b60019150505b92915050565b6000336105c68582856107ca565b6105d1858585610849565b506001949350505050565b60006105ea60085442101590565b8015610603575060b46008546106009190610f39565b42105b905090565b600061061660085442101590565b1580610630575060b460085461062c9190610f39565b4210155b1561063b5750600090565b4260b460085461064b9190610f39565b6106039190610f4c565b61065d61078b565b61066782826108a8565b5050565b600061067960085442101590565b6106835750600090565b6000600854426106939190610f4c565b905060b481106106a557600091505090565b60006106b2600283610f17565b905060006106c1600a83610f00565b905061038481106106d6576000935050505090565b6106e281610384610f4c565b935050505090565b60006106f46105dc565b156106ff5750600190565b50600290565b600060c861071260025490565b6106039190610f17565b61072461078b565b61072e60006108de565b565b6060600480546104f090610eb0565b6000336105ac818585610849565b61075561078b565b6001600160a01b03811661077f57604051631e4fbdf760e01b8152600060048201526024016104b6565b610788816108de565b50565b6005546001600160a01b0316331461072e5760405163118cdaa760e01b81523360048201526024016104b6565b6107c58383836001610930565b505050565b6001600160a01b03838116600090815260016020908152604080832093861683529290522054600019811015610843578181101561083457604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064016104b6565b61084384848484036000610930565b50505050565b6001600160a01b03831661087357604051634b637e8f60e11b8152600060048201526024016104b6565b6001600160a01b03821661089d5760405163ec442f0560e01b8152600060048201526024016104b6565b6107c5838383610a05565b6001600160a01b0382166108d25760405163ec442f0560e01b8152600060048201526024016104b6565b61066760008383610a05565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03841661095a5760405163e602df0560e01b8152600060048201526024016104b6565b6001600160a01b03831661098457604051634a1406b160e11b8152600060048201526024016104b6565b6001600160a01b038085166000908152600160209081526040808320938716835292905220829055801561084357826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516109f791815260200190565b60405180910390a350505050565b6001600160a01b0383161580610a2857506006546001600160a01b038381169116145b80610a4057506007546001600160a01b038381169116145b80610a5857506007546001600160a01b038481169116145b15610a68576107c5838383610c11565b600060085442610a789190610f4c565b905060b4811015610c0a576000610a8e83610573565b90506000610a9c8285610f4c565b9050610abd8673fe85c993605dd02ffd2b0b7db041f51071e45cd184610c11565b610ac8868683610c11565b3260008181526009602090815260408083206001845290915281208054879290610af3908490610f39565b90915550506001600160a01b0381166000908152600a602052604081208054879290610b20908490610f39565b90915550610b2e9050610705565b6001600160a01b0382166000908152600a60205260409020541115610b875760405162461bcd60e51b815260206004820152600f60248201526e105b5bdd5b9d08195e18d959591959608a1b60448201526064016104b6565b323b63ffffffff1615158015610ba35750853b63ffffffff1615155b15610c025760405162461bcd60e51b815260206004820152602960248201527f4e6f20636f6e74726163742d746f2d636f6e7472616374207472616e736665726044820152681cc8185b1b1bddd95960ba1b60648201526084016104b6565b505050610843565b6108438484845b6001600160a01b038316610c3c578060026000828254610c319190610f39565b90915550610cae9050565b6001600160a01b03831660009081526020819052604090205481811015610c8f5760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016104b6565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216610cca57600280548290039055610ce9565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d2e91815260200190565b60405180910390a3505050565b80356001600160a01b0381168114610d5257600080fd5b919050565b600060208284031215610d6957600080fd5b61059782610d3b565b60006020808352835180602085015260005b81811015610da057858101830151858201604001528201610d84565b506000604082860101526040601f19601f8301168501019250505092915050565b600060208284031215610dd357600080fd5b5035919050565b60008060408385031215610ded57600080fd5b610df683610d3b565b946020939093013593505050565b600080600060608486031215610e1957600080fd5b610e2284610d3b565b9250610e3060208501610d3b565b9150604084013590509250925092565b60008060408385031215610e5357600080fd5b610e5c83610d3b565b9150602083013560ff81168114610e7257600080fd5b809150509250929050565b60008060408385031215610e9057600080fd5b610e9983610d3b565b9150610ea760208401610d3b565b90509250929050565b600181811c90821680610ec457607f821691505b602082108103610ee457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176105b2576105b2610eea565b600082610f3457634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156105b2576105b2610eea565b818103818111156105b2576105b2610eea56fea264697066735822122065f011368bc4785aa40152ff6552ed1209bab3b823c4c230a195b12e90f13fd164736f6c63430008190033a26469706673582212203d33d3acb8344812746345a6bf4ceceb114c72eb3e84adf4294f6daf6323d72064736f6c634300081900330000000000000000000000000000000000000000000002f6f10780d22cc00000000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000000000000000000000000067cc804c0000000000000000000000000000000000000000000000000000000069a4794c000000000000000000000000fe85c993605dd02ffd2b0b7db041f51071e45cd10000000000000000000000005ffc94db048f819d22ba24e1b0c14946db59af5e00000000000000000000000000000000000000000000000270801d946c9400000000000000000000000000001d03697f5ffb0fd4486e5a78f0013bfb8edb691d0000000000000000000000000000000000000000000000008ac7230489e800000000000000000000000000000000000000000000000000000000000000000006414920343034000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054552524f52000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106102e85760003560e01c8063715018a6116101905780639f4bca26116100dc578063cfdbf25411610095578063e2d968271161006f578063e2d9682714610921578063e70dd6cf14610937578063e8c5e8e21461095f578063f2fde38b1461097f57600080fd5b8063cfdbf254146108e4578063d251fefc146108f9578063d7bb99ba1461091957600080fd5b80639f4bca2614610832578063a13202e914610848578063a49ab8c71461085d578063a5f456c31461089a578063c5c4744c146108af578063cc07218d146108c557600080fd5b80638ab1d6811161014957806395d89b411161012357806395d89b41146107b75780639759164a146107cc5780639b19251a146107ec5780639e7b08d51461081c57600080fd5b80638ab1d681146107595780638da5cb5b14610779578063947fe8121461079757600080fd5b8063715018a61461069c57806372e041a0146106b157806373b295c2146106d15780637d3d6522146106f95780637f6497831461071957806384d4875e1461073957600080fd5b80633cb5d1001161024f5780634afcccfe1161020857806357aa0201116101e257806357aa020114610625578063590e1ae314610651578063695bcc7f146106665780636f96953c1461067c57600080fd5b80634afcccfe146105c957806350ba9705146105e857806356e1b2cf1461061057600080fd5b80633cb5d100146104f75780633d9c80431461051757806340650c9114610541578063420f68611461055c57806342e94c901461057c5780634914b030146105a957600080fd5b80631af1a502116102a15780631af1a502146104205780631bea83fe146104405780632109db591461048057806323dbf825146104a057806329d645d6146104c1578063343365f6146104e157600080fd5b806306a9d1a91461031b57806306fdde0314610344578063150b7a0214610366578063166d0c4c146103ab57806317ae867a146103ca5780631a8d949a1461040a57600080fd5b3661031657600d5462010000900460ff16158015610307575060085442105b156103145761031461099f565b005b600080fd5b34801561032757600080fd5b5061033160085481565b6040519081526020015b60405180910390f35b34801561035057600080fd5b50610359610d87565b60405161033b9190612c0e565b34801561037257600080fd5b50610392610381366004612c72565b630a85bd0160e11b95945050505050565b6040516001600160e01b0319909116815260200161033b565b3480156103b757600080fd5b506103316aa56fa5b99019a5c800000081565b3480156103d657600080fd5b506103fa6103e5366004612d11565b60136020526000908152604090205460ff1681565b604051901515815260200161033b565b34801561041657600080fd5b5061033160095481565b34801561042c57600080fd5b5061031461043b366004612d2e565b610e15565b34801561044c57600080fd5b5061046873aaa78e8c4241990b4ce159e105da08129345946a81565b6040516001600160a01b03909116815260200161033b565b34801561048c57600080fd5b5061031461049b366004612d2e565b610f1a565b3480156104ac57600080fd5b50600d546103fa906301000000900460ff1681565b3480156104cd57600080fd5b506103146104dc366004612d2e565b6110a9565b3480156104ed57600080fd5b50610331600a5481565b34801561050357600080fd5b50610468610512366004612d2e565b61111d565b34801561052357600080fd5b5061052d61271081565b60405162ffffff909116815260200161033b565b34801561054d57600080fd5b50610331662386f26fc1000081565b34801561056857600080fd5b50600454610468906001600160a01b031681565b34801561058857600080fd5b50610331610597366004612d11565b60106020526000908152604090205481565b3480156105b557600080fd5b50600554610468906001600160a01b031681565b3480156105d557600080fd5b50600d546103fa90610100900460ff1681565b3480156105f457600080fd5b5061046873332f91766ae8306bd85ad2e1a560bba0cd5c05f681565b34801561061c57600080fd5b50610314611147565b34801561063157600080fd5b50600d5461063f9060ff1681565b60405160ff909116815260200161033b565b34801561065d57600080fd5b50610314611250565b34801561067257600080fd5b50610331600c5481565b34801561068857600080fd5b50600254610468906001600160a01b031681565b3480156106a857600080fd5b506103146114cc565b3480156106bd57600080fd5b506103316106cc366004612d5e565b6114de565b3480156106dd57600080fd5b5061046873b31f66aa3c1e785363f0875a1b74e27b85fd66c781565b34801561070557600080fd5b50600d546103fa9062010000900460ff1681565b34801561072557600080fd5b50610314610734366004612de6565b611ccc565b34801561074557600080fd5b50610314610754366004612d2e565b611f3f565b34801561076557600080fd5b50610314610774366004612d11565b611fb3565b34801561078557600080fd5b506000546001600160a01b0316610468565b3480156107a357600080fd5b506103146107b2366004612e28565b6121a2565b3480156107c357600080fd5b506103596123ea565b3480156107d857600080fd5b50600354610468906001600160a01b031681565b3480156107f857600080fd5b506103fa610807366004612d11565b60116020526000908152604090205460ff1681565b34801561082857600080fd5b5061033160075481565b34801561083e57600080fd5b50610331610bb881565b34801561085457600080fd5b50601554610331565b34801561086957600080fd5b50601654600c54600d546301000000900460ff1660408051938452602084019290925215159082015260600161033b565b3480156108a657600080fd5b506103146123f7565b3480156108bb57600080fd5b5061033160065481565b3480156108d157600080fd5b506103316acecb8f27f4200f3a00000081565b3480156108f057600080fd5b50610331604181565b34801561090557600080fd5b50610468610914366004612d2e565b6126da565b61031461099f565b34801561092d57600080fd5b50610331600b5481565b34801561094357600080fd5b5061046873aaa32926fce6be95ea2c51cb4fcb60836d320c4281565b34801561096b57600080fd5b506103316b033b2e3c9fd0803ce800000081565b34801561098b57600080fd5b5061031461099a366004612d11565b6126ea565b6109a7612728565b600d5462010000900460ff16156109fc5760405162461bcd60e51b815260206004820152601460248201527311dbd85b08185b1c9958591e481c995858da195960621b60448201526064015b60405180910390fd5b6008544210610a3c5760405162461bcd60e51b815260206004820152600c60248201526b111958591b1a5b99481a1a5d60a21b60448201526064016109f3565b662386f26fc10000341015610a935760405162461bcd60e51b815260206004820152601a60248201527f436f6e747269627574696f6e2062656c6f77206d696e696d756d00000000000060448201526064016109f3565b601654610bb811610ae65760405162461bcd60e51b815260206004820152601860248201527f4d617820636f6e7472696275746f72732072656163686564000000000000000060448201526064016109f3565b600a5415610bbe573360009081526011602052604090205460ff16610b4d5760405162461bcd60e51b815260206004820152601760248201527f596f7520617265206e6f742077686974656c697374656400000000000000000060448201526064016109f3565b600a5433600090815260106020526040902054610b6b903490612ed8565b1115610bb95760405162461bcd60e51b815260206004820152601c60248201527f457863656564696e67206d617857686974656c697374416d6f756e740000000060448201526064016109f3565b610c40565b600b5415610c4057600b5433600090815260106020526040902054610be4903490612ed8565b1115610c405760405162461bcd60e51b815260206004820152602560248201527f457863656564696e67206d61785075626c6963436f6e747269627574696f6e416044820152641b5bdd5b9d60da1b60648201526084016109f3565b600754600654349190610c54908390612ed8565b1115610c8257600654600754610c6a9190612ef1565b9050610c8233610c7a8334612ef1565b6108fc612752565b336000908152601060205260408120549003610cec5760168054336000818152601460205260408120839055600183018455929092527fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b51242890180546001600160a01b03191690911790555b3360009081526010602052604081208054839290610d0b908490612ed8565b925050819055508060066000828254610d249190612ed8565b909155505060405181815233907f4d154d4aae216bed6d0926db77c00df2b57c6b5ba4eee05775de20facede3a7b9060200160405180910390a260075460065403610d7b57600d805462ff00001916620100001790555b50610d8560018055565b565b600e8054610d9490612f04565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc090612f04565b8015610e0d5780601f10610de257610100808354040283529160200191610e0d565b820191906000526020600020905b815481529060010190602001808311610df057829003601f168201915b505050505081565b610e1d612861565b6009548111610e6e5760405162461bcd60e51b815260206004820152601d60248201527f4d7573742063686f6f7365206c617465722066756e642065787069727900000060448201526064016109f3565b60098190556003546001600160a01b031615610ee357600354604051630d78d28160e11b8152600481018390526001600160a01b0390911690631af1a50290602401600060405180830381600087803b158015610eca57600080fd5b505af1158015610ede573d6000803e3d6000fd5b505050505b6040518181527f4e5dd36969507fae1e69607cd3b2492dafc0c3ae1bf1c50f921a5642847fa309906020015b60405180910390a150565b6000546001600160a01b0316331480610f3d57506004546001600160a01b031633145b610f595760405162461bcd60e51b81526004016109f390612f3e565b600d5462010000900460ff1615610fb25760405162461bcd60e51b815260206004820152601c60248201527f46756e6472616973696e6720676f616c2077617320726561636865640000000060448201526064016109f3565b600854421061100f5760405162461bcd60e51b815260206004820152602360248201527f43616e6e6f7420657874656e6420616674657220646561646c696e65207061736044820152621cd95960ea1b60648201526084016109f3565b60085481116110745760405162461bcd60e51b815260206004820152602b60248201527f4e657720646561646c696e65206d75737420626520616674657220637572726560448201526a6e7420646561646c696e6560a81b60648201526084016109f3565b60088190556040518181527f27ab8e4ae3319b5e6c4fff32114838b4a506f955312c4b650fd8f4ba29575bdb90602001610f0f565b6000546001600160a01b03163314806110cc57506004546001600160a01b031633145b6110e85760405162461bcd60e51b81526004016109f390612f3e565b600a8190556040518181527fddec2a61d8379d2f92b76519b490096bc32fbe70351482d75e8f2cf62c50523b90602001610f0f565b6016818154811061112d57600080fd5b6000918252602090912001546001600160a01b0316905081565b6004546001600160a01b0316331461119a5760405162461bcd60e51b815260206004820152601660248201527526bab9ba10313290383937ba37b1b7b61030b236b4b760511b60448201526064016109f3565b600d54610100900460ff16156111f25760405162461bcd60e51b815260206004820152601d60248201527f46756e6472616973696e6720616c72656164792066696e616c697a656400000060448201526064016109f3565b600047116112375760405162461bcd60e51b815260206004820152601260248201527127379022aa24103a37903a3930b739b332b960711b60448201526064016109f3565b600454610d85906001600160a01b0316476108fc612752565b611258612728565b600d5462010000900460ff16156112b15760405162461bcd60e51b815260206004820152601c60248201527f46756e6472616973696e6720676f616c2077617320726561636865640000000060448201526064016109f3565b6008544210156113035760405162461bcd60e51b815260206004820152601860248201527f446561646c696e65206e6f74207265616368656420796574000000000000000060448201526064016109f3565b3360009081526010602052604090205461135f5760405162461bcd60e51b815260206004820152601a60248201527f4e6f20636f6e747269627574696f6e7320746f20726566756e6400000000000060448201526064016109f3565b3360009081526010602052604081208054908290556006805491928392611387908490612ef1565b9091555050336000908152601460205260408120546016549091906113ae90600190612ef1565b9050808214611436576000601682815481106113cc576113cc612f75565b600091825260209091200154601680546001600160a01b0390921692508291859081106113fb576113fb612f75565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559290911681526014909152604090208290555b601680548061144757611447612f8b565b60008281526020808220830160001990810180546001600160a01b0319169055909201909255338083526014909152604082209190915561148b90846108fc612752565b60405183815233907fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d9060200160405180910390a2505050610d8560018055565b6114d4612861565b610d85600061288e565b60006114e8612861565b6114f0612728565b600d5462010000900460ff166115485760405162461bcd60e51b815260206004820152601c60248201527f46756e6472616973696e6720676f616c206e6f7420726561636865640000000060448201526064016109f3565b600d54610100900460ff16156115a05760405162461bcd60e51b815260206004820152601d60248201527f46756e6472616973696e6720616c72656164792066696e616c697a656400000060448201526064016109f3565b600082600e600f306040516115b490612c01565b6115c093929190613045565b8190604051809103906000f59050801580156115e0573d6000803e3d6000fd5b50600580546001600160a01b0319166001600160a01b03831690811790915590915073b31f66aa3c1e785363f0875a1b74e27b85fd66c7116116535760405162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081cd85b1d60a21b60448201526064016109f3565b6040516340c10f1960e01b81523060048201526b033b2e3c9fd0803ce800000060248201526001600160a01b038216906340c10f1990604401600060405180830381600087803b1580156116a657600080fd5b505af11580156116ba573d6000803e3d6000fd5b50506040516340c10f1960e01b81523060048201526aa56fa5b99019a5c800000060248201526001600160a01b03841692506340c10f199150604401600060405180830381600087803b15801561171057600080fd5b505af1158015611724573d6000803e3d6000fd5b50506040516340c10f1960e01b815273332f91766ae8306bd85ad2e1a560bba0cd5c05f660048201526acecb8f27f4200f3a00000060248201526001600160a01b03841692506340c10f199150604401600060405180830381600087803b15801561178e57600080fd5b505af11580156117a2573d6000803e3d6000fd5b505060405163095ea7b360e01b815273aaa78e8c4241990b4ce159e105da08129345946a60048201526aa56fa5b99019a5c800000060248201526001600160a01b038416925063095ea7b391506044016020604051808303816000875af1158015611811573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118359190613083565b5060006118448660020b6128de565b604051638e909e5160e01b81526001600160a01b03808516600483015273b31f66aa3c1e785363f0875a1b74e27b85fd66c7602483015261271060448301528216606482015290915060009073aaa32926fce6be95ea2c51cb4fcb60836d320c4290638e909e51906084016020604051808303816000875af11580156118ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f291906130a5565b60408051610180810182526001600160a01b038616815273b31f66aa3c1e785363f0875a1b74e27b85fd66c760208201526127108183015260028a810b606083015289900b60808201526aa56fa5b99019a5c800000060a0820152600060c0820181905260e08201819052610100820181905230610120830152426101408301526101608201529051630e6c620f60e41b81529192509073aaa78e8c4241990b4ce159e105da08129345946a9063e6c620f0906119b39084906004016130c2565b6080604051808303816000875af11580156119d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f69190613194565b50506002549196506000916001600160a01b031690506376b5c47d73aaa78e8c4241990b4ce159e105da08129345946a611a386000546001600160a01b031690565b600954600d5460405160e086901b6001600160e01b03191681526001600160a01b03948516600482015293909216602484015267ffffffffffffffff166044830152606482018a905260ff1660848201523060a482015260c4016020604051808303816000875af1158015611ab1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ad591906130a5565b604051632142170760e11b81523060048201526001600160a01b03821660248201526044810188905290915073aaa78e8c4241990b4ce159e105da08129345946a906342842e0e90606401600060405180830381600087803b158015611b3a57600080fd5b505af1158015611b4e573d6000803e3d6000fd5b50506040516367a4d1c360e01b8152600481018990526001600160a01b03841692506367a4d1c39150602401600060405180830381600087803b158015611b9457600080fd5b505af1158015611ba8573d6000803e3d6000fd5b5050600380546001600160a01b0319166001600160a01b0385811691909117909155604051620c3b8160e51b81528682166004820152908816925063018770209150602401600060405180830381600087803b158015611c0757600080fd5b505af1158015611c1b573d6000803e3d6000fd5b50505050846001600160a01b031663715018a66040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611c5a57600080fd5b505af1158015611c6e573d6000803e3d6000fd5b5050604051600181527fe64f408051437053caebc2ec8b10a45148f5acee3a6922908871b997f80d335d9250602001905060405180910390a15050600d805461ff00191661010017905550611cc5915061285b9050565b9392505050565b6000546001600160a01b0316331480611cef57506004546001600160a01b031633145b611d0b5760405162461bcd60e51b81526004016109f390612f3e565b60005b81811015611f3a576000838383818110611d2a57611d2a612f75565b9050602002016020810190611d3f9190612d11565b6001600160a01b031603611d875760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b60448201526064016109f3565b60116000848484818110611d9d57611d9d612f75565b9050602002016020810190611db29190612d11565b6001600160a01b0316815260208101919091526040016000205460ff16611f3257600160116000858585818110611deb57611deb612f75565b9050602002016020810190611e009190612d11565b6001600160a01b0316815260208101919091526040016000908120805460ff19169215159290921790915560155490601290858585818110611e4457611e44612f75565b9050602002016020810190611e599190612d11565b6001600160a01b031681526020810191909152604001600020556015838383818110611e8757611e87612f75565b9050602002016020810190611e9c9190612d11565b81546001810183556000928352602090922090910180546001600160a01b0319166001600160a01b039092169190911790557fe463fa6bdecb16f96f58191d902152633214e760ea443684105a7eef1ad16b9d838383818110611f0157611f01612f75565b9050602002016020810190611f169190612d11565b6040516001600160a01b03909116815260200160405180910390a15b600101611d0e565b505050565b6000546001600160a01b0316331480611f6257506004546001600160a01b031633145b611f7e5760405162461bcd60e51b81526004016109f390612f3e565b600b8190556040518181527f6050fca8a0abb9413a5b1ed9aa596579bcbef11940b26ff24934fa0d74b7949590602001610f0f565b6000546001600160a01b0316331480611fd657506004546001600160a01b031633145b611ff25760405162461bcd60e51b81526004016109f390612f3e565b6001600160a01b03811660009081526011602052604090205460ff1661205a5760405162461bcd60e51b815260206004820152601860248201527f41646472657373206e6f7420696e2077686974656c697374000000000000000060448201526064016109f3565b6001600160a01b03811660009081526012602052604081205460155490919061208590600190612ef1565b905080821461210d576000601582815481106120a3576120a3612f75565b600091825260209091200154601580546001600160a01b0390921692508291859081106120d2576120d2612f75565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559290911681526012909152604090208290555b601580548061211e5761211e612f8b565b60008281526020808220600019908401810180546001600160a01b03191690559092019092556001600160a01b0385168083526012825260408084208490556011835292839020805460ff1916905591519182527fa6667e187c57c5b0fa4e1122a695ed0754287513bcb4901fa6c1f44ba22c0187910160405180910390a1505050565b6121aa612861565b600d54610100900460ff166121fd5760405162461bcd60e51b8152602060048201526019602482015278119d5b991c985a5cda5b99c81b9bdd08199a5b985b1a5e9959603a1b60448201526064016109f3565b848314801561220b57508281145b6122505760405162461bcd60e51b8152602060048201526016602482015275082e4e4c2f240d8cadccee8d0e640dad2e6dac2e8c6d60531b60448201526064016109f3565b60005b858110156123e157600087878381811061226f5761226f612f75565b90506020020160208101906122849190612d11565b6001600160a01b0316036122da5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420636f6e74726163742061646472657373000000000000000060448201526064016109f3565b60008787838181106122ee576122ee612f75565b90506020020160208101906123039190612d11565b6001600160a01b031684848481811061231e5761231e612f75565b9050602002013587878581811061233757612337612f75565b905060200281019061234991906131e7565b60405161235792919061322e565b60006040518083038185875af1925050503d8060008114612394576040519150601f19603f3d011682016040523d82523d6000602084013e612399565b606091505b50509050806123d85760405162461bcd60e51b815260206004820152600b60248201526a10d85b1b0819985a5b195960aa1b60448201526064016109f3565b50600101612253565b50505050505050565b600f8054610d9490612f04565b6123ff612861565b612407612728565b600d54610100900460ff1661245a5760405162461bcd60e51b8152602060048201526019602482015278119d5b991c985a5cda5b99c81b9bdd08199a5b985b1a5e9959603a1b60448201526064016109f3565b600d546301000000900460ff16156124b45760405162461bcd60e51b815260206004820152601d60248201527f446973747269627574696f6e20616c726561647920636f6d706c65746500000060448201526064016109f3565b601654600c54106125075760405162461bcd60e51b815260206004820152601f60248201527f4e6f206d6f726520636f6e7472696275746f727320746f2070726f636573730060448201526064016109f3565b600554600c546001600160a01b039091169060009061252890604190612ed8565b60165490915081111561253a57506016545b600c545b818110156126705760006016828154811061255b5761255b612f75565b60009182526020808320909101546001600160a01b0316808352601390915260409091205490915060ff16612667576001600160a01b0381166000908152601060205260408120546006549091906125bf6b033b2e3c9fd0803ce80000008461323e565b6125c9919061326b565b60405163a9059cbb60e01b81526001600160a01b038581166004830152602482018390529192509087169063a9059cbb906044016020604051808303816000875af115801561261c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126409190613083565b5050506001600160a01b0381166000908152601360205260409020805460ff191660011790555b5060010161253e565b50600c5460408051918252602082018390527f72f2e17e5286668a3e0be581ddcbc3d5fed31c2072f4e6437566f8fb11164388910160405180910390a1600c81905560165481106126cf57600d805463ff000000191663010000001790555b5050610d8560018055565b6015818154811061112d57600080fd5b6126f2612861565b6001600160a01b03811661271c57604051631e4fbdf760e01b8152600060048201526024016109f3565b6127258161288e565b50565b60026001540361274b57604051633ee5aeb560e01b815260040160405180910390fd5b6002600155565b6000806000806000868887f19050806128555773b31f66aa3c1e785363f0875a1b74e27b85fd66c76001600160a01b031663d0e30db0846040518263ffffffff1660e01b81526004016000604051808303818588803b1580156127b457600080fd5b505af11580156127c8573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b03881660048201526024810187905273b31f66aa3c1e785363f0875a1b74e27b85fd66c7935063a9059cbb925060440190506020604051808303816000875af115801561282f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128539190613083565b505b50505050565b60018055565b6000546001600160a01b03163314610d855760405163118cdaa760e01b81523360048201526024016109f3565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008060008360020b126128f5578260020b6128fd565b8260020b6000035b9050620d89e8811115612923576040516315e4079d60e11b815260040160405180910390fd5b60008160011660000361293a57600160801b61294c565b6ffffcb933bd6fad37aa2d162d1a5940015b70ffffffffffffffffffffffffffffffffff1690506002821615612980576ffff97272373d413259a46990580e213a0260801c5b600482161561299f576ffff2e50f5f656932ef12357cf3c7fdcc0260801c5b60088216156129be576fffe5caca7e10e4e61c3624eaa0941cd00260801c5b60108216156129dd576fffcb9843d60f6159c9db58835c9266440260801c5b60208216156129fc576fff973b41fa98c081472e6896dfb254c00260801c5b6040821615612a1b576fff2ea16466c96a3843ec78b326b528610260801c5b6080821615612a3a576ffe5dee046a99a2a811c461f1969c30530260801c5b610100821615612a5a576ffcbe86c7900a88aedcffc83b479aa3a40260801c5b610200821615612a7a576ff987a7253ac413176f2b074cf7815e540260801c5b610400821615612a9a576ff3392b0822b70005940c7a398e4b70f30260801c5b610800821615612aba576fe7159475a2c29b7443b29c7fa6e889d90260801c5b611000821615612ada576fd097f3bdfd2022b8845ad8f792aa58250260801c5b612000821615612afa576fa9f746462d870fdf8a65dc1f90e061e50260801c5b614000821615612b1a576f70d869a156d2a1b890bb3df62baf32f70260801c5b618000821615612b3a576f31be135f97d08fd981231505542fcfa60260801c5b62010000821615612b5b576f09aa508b5b7a84e1c677de54f3e99bc90260801c5b62020000821615612b7b576e5d6af8dedb81196699c329225ee6040260801c5b62040000821615612b9a576d2216e584f5fa1ea926041bedfe980260801c5b62080000821615612bb7576b048a170391f7dc42444e8fa20260801c5b60008460020b1315612bd8578060001981612bd457612bd4613255565b0490505b640100000000810615612bec576001612bef565b60005b60ff16602082901c0192505050919050565b6113358061328e83390190565b60006020808352835180602085015260005b81811015612c3c57858101830151858201604001528201612c20565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b038116811461272557600080fd5b600080600080600060808688031215612c8a57600080fd5b8535612c9581612c5d565b94506020860135612ca581612c5d565b935060408601359250606086013567ffffffffffffffff80821115612cc957600080fd5b818801915088601f830112612cdd57600080fd5b813581811115612cec57600080fd5b896020828501011115612cfe57600080fd5b9699959850939650602001949392505050565b600060208284031215612d2357600080fd5b8135611cc581612c5d565b600060208284031215612d4057600080fd5b5035919050565b8035600281900b8114612d5957600080fd5b919050565b600080600060608486031215612d7357600080fd5b612d7c84612d47565b9250612d8a60208501612d47565b9150604084013590509250925092565b60008083601f840112612dac57600080fd5b50813567ffffffffffffffff811115612dc457600080fd5b6020830191508360208260051b8501011115612ddf57600080fd5b9250929050565b60008060208385031215612df957600080fd5b823567ffffffffffffffff811115612e1057600080fd5b612e1c85828601612d9a565b90969095509350505050565b60008060008060008060608789031215612e4157600080fd5b863567ffffffffffffffff80821115612e5957600080fd5b612e658a838b01612d9a565b90985096506020890135915080821115612e7e57600080fd5b612e8a8a838b01612d9a565b90965094506040890135915080821115612ea357600080fd5b50612eb089828a01612d9a565b979a9699509497509295939492505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115612eeb57612eeb612ec2565b92915050565b81810381811115612eeb57612eeb612ec2565b600181811c90821680612f1857607f821691505b602082108103612f3857634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601e908201527f4d757374206265206f776e6572206f722070726f746f636f6c41646d696e0000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b8054600090600181811c9080831680612fbb57607f831692505b60208084108203612fdc57634e487b7160e01b600052602260045260246000fd5b83885260208801828015612ff7576001811461300d57613038565b60ff198716825285151560051b82019750613038565b60008981526020902060005b8781101561303257815484820152908601908401613019565b83019850505b5050505050505092915050565b6060815260006130586060830186612fa1565b828103602084015261306a8186612fa1565b91505060018060a01b0383166040830152949350505050565b60006020828403121561309557600080fd5b81518015158114611cc557600080fd5b6000602082840312156130b757600080fd5b8151611cc581612c5d565b81516001600160a01b03168152610180810160208301516130ee60208401826001600160a01b03169052565b506040830151613105604084018262ffffff169052565b50606083015161311a606084018260020b9052565b50608083015161312f608084018260020b9052565b5060a083015160a083015260c083015160c083015260e083015160e083015261010080840151818401525061012080840151613175828501826001600160a01b03169052565b5050610140838101519083015261016092830151929091019190915290565b600080600080608085870312156131aa57600080fd5b8451935060208501516fffffffffffffffffffffffffffffffff811681146131d157600080fd5b6040860151606090960151949790965092505050565b6000808335601e198436030181126131fe57600080fd5b83018035915067ffffffffffffffff82111561321957600080fd5b602001915036819003821315612ddf57600080fd5b8183823760009101908152919050565b8082028115828204841417612eeb57612eeb612ec2565b634e487b7160e01b600052601260045260246000fd5b60008261328857634e487b7160e01b600052601260045260246000fd5b50049056fe608060405234801561001057600080fd5b5060405161133538038061133583398101604081905261002f916101c2565b338383600361003e83826102d2565b50600461004b82826102d2565b5050506001600160a01b03811661007c57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b610085816100b2565b5042600855600780546001600160a01b0319166001600160a01b0392909216919091179055506103919050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261012b57600080fd5b81516001600160401b038082111561014557610145610104565b604051601f8301601f19908116603f0116810190828211818310171561016d5761016d610104565b816040528381526020925086602085880101111561018a57600080fd5b600091505b838210156101ac578582018301518183018401529082019061018f565b6000602085830101528094505050505092915050565b6000806000606084860312156101d757600080fd5b83516001600160401b03808211156101ee57600080fd5b6101fa8783880161011a565b9450602086015191508082111561021057600080fd5b5061021d8682870161011a565b604086015190935090506001600160a01b038116811461023c57600080fd5b809150509250925092565b600181811c9082168061025b57607f821691505b60208210810361027b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156102cd576000816000526020600020601f850160051c810160208610156102aa5750805b601f850160051c820191505b818110156102c9578281556001016102b6565b5050505b505050565b81516001600160401b038111156102eb576102eb610104565b6102ff816102f98454610247565b84610281565b602080601f831160018114610334576000841561031c5750858301515b600019600386901b1c1916600185901b1785556102c9565b600085815260208120601f198616915b8281101561036357888601518255948401946001909101908401610344565b50858210156103815787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b610f95806103a06000396000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c80636acbd39b1161010f578063a9059cbb116100a2578063dd62ed3e11610071578063dd62ed3e146103e7578063e3435eb314610420578063e8dfadcd14610429578063f2fde38b1461044957600080fd5b8063a9059cbb14610396578063b010dc11146103a9578063bbc0c742146103d4578063cab29010146103df57600080fd5b806372aab8d0116100de57806372aab8d01461036c57806378e97925146103745780638da5cb5b1461037d57806395d89b411461038e57600080fd5b80636acbd39b1461032b57806370a082311461033357806370db69d61461035c578063715018a61461036457600080fd5b80632b2d518e116101875780634162169f116101565780634162169f146102f457806364f53f2e1461030757806365b68bf71461030f578063665a11ca1461031857600080fd5b80632b2d518e146102975780632d2c55651461029f578063313ce567146102d257806340c10f19146102e157600080fd5b80631739bf54116101c35780631739bf541461026c57806318160ddd1461027457806323b872dd1461027c57806328d48afc1461028f57600080fd5b806301877020146101f557806306fdde031461020a57806308b4af0014610228578063095ea7b314610249575b600080fd5b610208610203366004610d57565b61045c565b005b6102126104e1565b60405161021f9190610d72565b60405180910390f35b61023b610236366004610dc1565b610573565b60405190815260200161021f565b61025c610257366004610dda565b61059e565b604051901515815260200161021f565b61023b600281565b60025461023b565b61025c61028a366004610e04565b6105b8565b61025c6105dc565b61023b610608565b6102ba73fe85c993605dd02ffd2b0b7db041f51071e45cd181565b6040516001600160a01b03909116815260200161021f565b6040516012815260200161021f565b6102086102ef366004610dda565b610655565b6007546102ba906001600160a01b031681565b61023b61066b565b61023b61038481565b6006546102ba906001600160a01b031681565b61023b6106ea565b61023b610341366004610d57565b6001600160a01b031660009081526020819052604090205490565b61023b610705565b61020861071c565b61023b600a81565b61023b60085481565b6005546001600160a01b03166102ba565b610212610730565b61025c6103a4366004610dda565b61073f565b61023b6103b7366004610e40565b600960209081526000928352604080842090915290825290205481565b60085442101561025c565b61023b60b481565b61023b6103f5366004610e7d565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61023b6103e881565b61023b610437366004610d57565b600a6020526000908152604090205481565b610208610457366004610d57565b61074d565b61046461078b565b6001600160a01b0381166104bf5760405162461bcd60e51b815260206004820152601e60248201527f496e76616c6964206c697175696469747920706f6f6c2061646472657373000060448201526064015b60405180910390fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6060600380546104f090610eb0565b80601f016020809104026020016040519081016040528092919081815260200182805461051c90610eb0565b80156105695780601f1061053e57610100808354040283529160200191610569565b820191906000526020600020905b81548152906001019060200180831161054c57829003601f168201915b5050505050905090565b60008061057e61066b565b90506103e861058d8285610f00565b6105979190610f17565b9392505050565b6000336105ac8185856107b8565b60019150505b92915050565b6000336105c68582856107ca565b6105d1858585610849565b506001949350505050565b60006105ea60085442101590565b8015610603575060b46008546106009190610f39565b42105b905090565b600061061660085442101590565b1580610630575060b460085461062c9190610f39565b4210155b1561063b5750600090565b4260b460085461064b9190610f39565b6106039190610f4c565b61065d61078b565b61066782826108a8565b5050565b600061067960085442101590565b6106835750600090565b6000600854426106939190610f4c565b905060b481106106a557600091505090565b60006106b2600283610f17565b905060006106c1600a83610f00565b905061038481106106d6576000935050505090565b6106e281610384610f4c565b935050505090565b60006106f46105dc565b156106ff5750600190565b50600290565b600060c861071260025490565b6106039190610f17565b61072461078b565b61072e60006108de565b565b6060600480546104f090610eb0565b6000336105ac818585610849565b61075561078b565b6001600160a01b03811661077f57604051631e4fbdf760e01b8152600060048201526024016104b6565b610788816108de565b50565b6005546001600160a01b0316331461072e5760405163118cdaa760e01b81523360048201526024016104b6565b6107c58383836001610930565b505050565b6001600160a01b03838116600090815260016020908152604080832093861683529290522054600019811015610843578181101561083457604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064016104b6565b61084384848484036000610930565b50505050565b6001600160a01b03831661087357604051634b637e8f60e11b8152600060048201526024016104b6565b6001600160a01b03821661089d5760405163ec442f0560e01b8152600060048201526024016104b6565b6107c5838383610a05565b6001600160a01b0382166108d25760405163ec442f0560e01b8152600060048201526024016104b6565b61066760008383610a05565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03841661095a5760405163e602df0560e01b8152600060048201526024016104b6565b6001600160a01b03831661098457604051634a1406b160e11b8152600060048201526024016104b6565b6001600160a01b038085166000908152600160209081526040808320938716835292905220829055801561084357826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516109f791815260200190565b60405180910390a350505050565b6001600160a01b0383161580610a2857506006546001600160a01b038381169116145b80610a4057506007546001600160a01b038381169116145b80610a5857506007546001600160a01b038481169116145b15610a68576107c5838383610c11565b600060085442610a789190610f4c565b905060b4811015610c0a576000610a8e83610573565b90506000610a9c8285610f4c565b9050610abd8673fe85c993605dd02ffd2b0b7db041f51071e45cd184610c11565b610ac8868683610c11565b3260008181526009602090815260408083206001845290915281208054879290610af3908490610f39565b90915550506001600160a01b0381166000908152600a602052604081208054879290610b20908490610f39565b90915550610b2e9050610705565b6001600160a01b0382166000908152600a60205260409020541115610b875760405162461bcd60e51b815260206004820152600f60248201526e105b5bdd5b9d08195e18d959591959608a1b60448201526064016104b6565b323b63ffffffff1615158015610ba35750853b63ffffffff1615155b15610c025760405162461bcd60e51b815260206004820152602960248201527f4e6f20636f6e74726163742d746f2d636f6e7472616374207472616e736665726044820152681cc8185b1b1bddd95960ba1b60648201526084016104b6565b505050610843565b6108438484845b6001600160a01b038316610c3c578060026000828254610c319190610f39565b90915550610cae9050565b6001600160a01b03831660009081526020819052604090205481811015610c8f5760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016104b6565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216610cca57600280548290039055610ce9565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d2e91815260200190565b60405180910390a3505050565b80356001600160a01b0381168114610d5257600080fd5b919050565b600060208284031215610d6957600080fd5b61059782610d3b565b60006020808352835180602085015260005b81811015610da057858101830151858201604001528201610d84565b506000604082860101526040601f19601f8301168501019250505092915050565b600060208284031215610dd357600080fd5b5035919050565b60008060408385031215610ded57600080fd5b610df683610d3b565b946020939093013593505050565b600080600060608486031215610e1957600080fd5b610e2284610d3b565b9250610e3060208501610d3b565b9150604084013590509250925092565b60008060408385031215610e5357600080fd5b610e5c83610d3b565b9150602083013560ff81168114610e7257600080fd5b809150509250929050565b60008060408385031215610e9057600080fd5b610e9983610d3b565b9150610ea760208401610d3b565b90509250929050565b600181811c90821680610ec457607f821691505b602082108103610ee457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176105b2576105b2610eea565b600082610f3457634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156105b2576105b2610eea565b818103818111156105b2576105b2610eea56fea264697066735822122065f011368bc4785aa40152ff6552ed1209bab3b823c4c230a195b12e90f13fd164736f6c63430008190033a26469706673582212203d33d3acb8344812746345a6bf4ceceb114c72eb3e84adf4294f6daf6323d72064736f6c63430008190033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000002f6f10780d22cc00000000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000000000000000000000000067cc804c0000000000000000000000000000000000000000000000000000000069a4794c000000000000000000000000fe85c993605dd02ffd2b0b7db041f51071e45cd10000000000000000000000005ffc94db048f819d22ba24e1b0c14946db59af5e00000000000000000000000000000000000000000000000270801d946c9400000000000000000000000000001d03697f5ffb0fd4486e5a78f0013bfb8edb691d0000000000000000000000000000000000000000000000008ac7230489e800000000000000000000000000000000000000000000000000000000000000000006414920343034000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054552524f52000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _fundraisingGoal (uint256): 14000000000000000000000
Arg [1] : _name (string): AI 404
Arg [2] : _symbol (string): ERROR
Arg [3] : _fundraisingDeadline (uint256): 1741455436
Arg [4] : _fundExpiry (uint256): 1772386636
Arg [5] : _daoManager (address): 0xfE85C993605Dd02FFD2b0B7db041f51071e45cd1
Arg [6] : _liquidityLockerFactory (address): 0x5fFC94db048f819d22Ba24E1b0C14946Db59Af5E
Arg [7] : _maxWhitelistAmount (uint256): 45000000000000000000
Arg [8] : _protocolAdmin (address): 0x1D03697F5FFB0FD4486E5a78F0013BFb8edb691d
Arg [9] : _maxPublicContributionAmount (uint256): 10000000000000000000
-----Encoded View---------------
14 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000002f6f10780d22cc00000
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [3] : 0000000000000000000000000000000000000000000000000000000067cc804c
Arg [4] : 0000000000000000000000000000000000000000000000000000000069a4794c
Arg [5] : 000000000000000000000000fe85c993605dd02ffd2b0b7db041f51071e45cd1
Arg [6] : 0000000000000000000000005ffc94db048f819d22ba24e1b0c14946db59af5e
Arg [7] : 00000000000000000000000000000000000000000000000270801d946c940000
Arg [8] : 0000000000000000000000001d03697f5ffb0fd4486e5a78f0013bfb8edb691d
Arg [9] : 0000000000000000000000000000000000000000000000008ac7230489e80000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [11] : 4149203430340000000000000000000000000000000000000000000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [13] : 4552524f52000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
BASE | 100.00% | $1,777.44 | 0.01 | $17.77 |
Loading...
Loading
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.