More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
18819553 | 384 days ago | 0.001 ETH |
Loading...
Loading
Contract Name:
UEFNToken
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
No with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.21; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "./SafeERC20.sol"; import "./IERC20Custom.sol"; import "./IUniswapV2Locker.sol"; import "./IUniswapV2Router02.sol"; import "./IUniswapV2Factory.sol"; import "./IWETH.sol"; import "./Ownable2Step.sol"; contract UEFNToken is Context, IERC20Custom, Ownable2Step { using EnumerableSet for EnumerableSet.AddressSet; using EnumerableSet for EnumerableSet.Bytes32Set; using SafeERC20 for IERC20; uint256 internal constant BP_DENOM = 10000; uint256 internal constant ROUND_DEC = 100000000000; uint256 internal constant CALL_GAS_LIMIT = 50000; uint256 internal constant MAX_SWAP_THRESHOLD_MULTIPLE = 20; uint256 public immutable lpSupply; uint256 public immutable projectSupply; uint256 public immutable botProtectionDurationInSeconds; address public immutable uniswapV2Pair; address public immutable driPool; address public immutable lpOwner; address public immutable projectSupplyRecipient; bool internal immutable _tokenHasTax; IUniswapV2Locker internal immutable _tokenVault; IUniswapV2Router02 internal immutable _uniswapRouter; uint128 private _totalSupply; uint32 public fundedDate; uint16 public projectBuyTaxBasisPoints; uint16 public projectSellTaxBasisPoints; uint16 public swapThresholdBasisPoints; /** @dev {_autoSwapInProgress} We start with {_autoSwapInProgress} ON, as we don't want to * call autoswap when processing initial liquidity from this address. We turn this OFF when * liquidity has been loaded, and use this bool to control processing during auto-swaps * from that point onwards. */ bool private _autoSwapInProgress = true; /** @dev {Storage Slot 2} Vars read as part of transfers packed to a single * slot for warm reads. * Slot 1: * 128 * 128 * ------ * 256 * ------ */ uint128 public maxTokensPerTransaction; uint128 public maxTokensPerWallet; /** @dev {Storage Slot 3} Not read / written in transfers (unless autoswap taking place): * 160 * 88 * 8 * ------ * 256 * ------ */ address public projectTaxRecipient; uint88 public lpLockupInDays; bool public burnLPTokens; /** @dev {Storage Slot 4} Potentially written in transfers: * Slot 3: * 128 * ------ * 128 * ------ */ uint128 public projectTaxPendingSwap; /** @dev {Storage Slot 5 to n} Not read as part of transfers etc. */ string private _name; string private _symbol; /** @dev {_balances} Addresses balances */ mapping(address => uint256) private _balances; /** @dev {_allowances} Addresses allocance details */ mapping(address => mapping(address => uint256)) private _allowances; /** @dev {_validCallerCodeHashes} Code hashes of callers we consider valid */ EnumerableSet.Bytes32Set private _validCallerCodeHashes; /** @dev {_liquidityPools} Enumerable set for liquidity pool addresses */ EnumerableSet.AddressSet private _liquidityPools; /** @dev {_unlimited} Enumerable set for addresses where limits do not apply */ EnumerableSet.AddressSet private _unlimited; /** * @dev {constructor} * * @param integrationAddresses_ The project owner, uniswap router, unicrypt vault, and pool template. * @param baseParams_ configuration of this ERC20. * param supplyParams_ Supply configuration of this ERC20. * param taxParams_ Tax configuration of this ERC20 * param taxParams_ Launch pool configuration of this ERC20 */ constructor( address[4] memory integrationAddresses_, bytes memory baseParams_, bytes memory supplyParams_, bytes memory taxParams_, bytes memory poolParams_ ) { _decodeBaseParams(integrationAddresses_[0], baseParams_); _uniswapRouter = IUniswapV2Router02(integrationAddresses_[1]); _tokenVault = IUniswapV2Locker(integrationAddresses_[2]); ERC20SupplyParameters memory supplyParams = abi.decode( supplyParams_, (ERC20SupplyParameters) ); ERC20TaxParameters memory taxParams = abi.decode( taxParams_, (ERC20TaxParameters) ); driPool = integrationAddresses_[3]; ERC20PoolParameters memory poolParams; if (integrationAddresses_[3] != address(0)) { poolParams = abi.decode(poolParams_, (ERC20PoolParameters)); } _processSupplyParams(supplyParams, poolParams); projectSupplyRecipient = supplyParams.projectSupplyRecipient; lpSupply = supplyParams.lpSupply * (10 ** decimals()); projectSupply = supplyParams.projectSupply * (10 ** decimals()); maxTokensPerWallet = uint128( supplyParams.maxTokensPerWallet * (10 ** decimals()) ); maxTokensPerTransaction = uint128( supplyParams.maxTokensPerTxn * (10 ** decimals()) ); lpLockupInDays = uint88(supplyParams.lpLockupInDays); botProtectionDurationInSeconds = supplyParams .botProtectionDurationInSeconds; lpOwner = supplyParams.projectLPOwner; burnLPTokens = supplyParams.burnLPTokens; _tokenHasTax = _processTaxParams(taxParams); swapThresholdBasisPoints = uint16(taxParams.taxSwapThresholdBasisPoints); projectTaxRecipient = taxParams.projectTaxRecipient; _mintBalances( lpSupply, projectSupply, poolParams.poolSupply * (10 ** decimals()) ); uniswapV2Pair = _createPair(); } /** * @dev {onlyOwnerFactoryOrPool} * * Throws if called by any account other than the owner, factory or pool. */ modifier onlyOwnerFactoryOrPool() { if ( owner() != _msgSender() && driPool != _msgSender() ) { _revert(CallerIsNotFactoryProjectOwnerOrPool.selector); } _; } /** * @dev function {_decodeBaseParams} * * Decode NFT Parameters * * @param projectOwner_ The owner of this contract * @param encodedBaseParams_ The base params encoded into a bytes array */ function _decodeBaseParams( address projectOwner_, bytes memory encodedBaseParams_ ) internal { _transferOwnership(projectOwner_); (_name, _symbol) = abi.decode(encodedBaseParams_, (string, string)); } /** * @dev function {_processSupplyParams} * * Process provided supply params * * @param erc20SupplyParameters_ The supply params * @param erc20PoolParameters_ The pool params */ function _processSupplyParams( ERC20SupplyParameters memory erc20SupplyParameters_, ERC20PoolParameters memory erc20PoolParameters_ ) internal { if ( erc20SupplyParameters_.maxSupply != (erc20SupplyParameters_.lpSupply + erc20SupplyParameters_.projectSupply + erc20PoolParameters_.poolSupply) ) { _revert(SupplyTotalMismatch.selector); } if (erc20SupplyParameters_.maxSupply > type(uint128).max) { _revert(MaxSupplyTooHigh.selector); } if (erc20SupplyParameters_.lpLockupInDays > type(uint88).max) { _revert(LPLockUpMustFitUint88.selector); } _unlimited.add(erc20SupplyParameters_.projectSupplyRecipient); _unlimited.add(address(this)); _unlimited.add(address(0)); } /** * @dev function {_processTaxParams} * * Process provided tax params * * @param erc20TaxParameters_ The tax params */ function _processTaxParams( ERC20TaxParameters memory erc20TaxParameters_ ) internal returns (bool tokenHasTax_) { /** * @dev We use the immutable var {_tokenHasTax} to avoid unneccesary storage writes and reads. If this * token does NOT have tax applied then there is no need to store or read these parameters, and we can * avoid this simply by checking the immutable var. Pass back the value for this var from this method. */ if ( erc20TaxParameters_.projectBuyTaxBasisPoints == 0 && erc20TaxParameters_.projectSellTaxBasisPoints == 0 ) { return false; } else { projectBuyTaxBasisPoints = uint16( erc20TaxParameters_.projectBuyTaxBasisPoints ); projectSellTaxBasisPoints = uint16( erc20TaxParameters_.projectSellTaxBasisPoints ); return true; } } /** * @dev function {_mintBalances} * * Mint initial balances * * @param lpMint_ The number of tokens for liquidity * @param projectMint_ The number of tokens for the project treasury * @param poolMint_ The number of tokens for the launch pool */ function _mintBalances( uint256 lpMint_, uint256 projectMint_, uint256 poolMint_ ) internal { if (lpMint_ > 0) { _mint(address(this), lpMint_); } if (projectMint_ > 0) { _mint(projectSupplyRecipient, projectMint_); } if (poolMint_ > 0) { _mint(driPool, poolMint_); } } /** * @dev function {_createPair} * * Create the uniswap pair * * @return uniswapV2Pair_ The pair address */ function _createPair() internal returns (address uniswapV2Pair_) { if (_totalSupply > 0) { uniswapV2Pair_ = IUniswapV2Factory(_uniswapRouter.factory()).createPair( address(this), _uniswapRouter.WETH() ); _liquidityPools.add(uniswapV2Pair_); emit LiquidityPoolCreated(uniswapV2Pair_); } _unlimited.add(address(_uniswapRouter)); _unlimited.add(uniswapV2Pair_); return (uniswapV2Pair_); } /** * @dev function {addInitialLiquidity} * * Add initial liquidity to the uniswap pair * * @param lpLockupInDaysOverride_ The number of days to lock liquidity NOTE you can pass 0 to use the stored value. * This value is an override, and will override a stored value which is LOWER that it. If the value you are passing is * LOWER than the stored value the stored value will not be reduced. * * Example usage 1: When creating the coin the lpLockupInDays is set to 0. This means that on this call the * user can set the lockup to any value they like, as all integer values greater than zero will be used to override * that set in storage. * * Example usage 2: When using a DRI Pool the lockup period is set on this contract and the pool need not know anything * about this setting. The pool can pass back a 0 on this call and know that the existing value stored on this contract * will be used. * @param burnLPTokensOverride_ If the LP tokens should be burned (otherwise they are locked). This is an override field * that can ONLY be used to override a held value of FALSE with a new value of TRUE. * * Example usage 1: When creating the coin the user didn't add liquidity, or specify that the LP tokens were to be burned. * So burnLPTokens is held as FALSE. When they add liquidity they want to lock tokens, so they pass this in as FALSE again, * and it remains FALSE. * * Example usage 2: As above, but when later adding liquidity the user wants to burn the LP. So the stored value is FALSE * and the user passes TRUE into this method. The TRUE overrides the held value of FALSE and the tokens are burned. * * Example uusage 3: The user is using a DRI pool and they have specified on the coin creation that the LP tokens are to * be burned. This contract therefore holds TRUE for burnLPTokens. The DRI pool does not need to know what the user has * selected. It can safely pass back FALSE to this method call and the stored value of TRUE will remain, resulting in the * LP tokens being burned. */ function addInitialLiquidity( uint256 lpLockupInDaysOverride_, bool burnLPTokensOverride_ ) external payable onlyOwnerFactoryOrPool { uint256 ethForLiquidity; if ((burnLPTokens == false) && (burnLPTokensOverride_ == true)) { burnLPTokens = true; } if (burnLPTokens && msg.value == 0) { _revert(NoETHForLiquidityPair.selector); } ethForLiquidity = msg.value; if (lpLockupInDaysOverride_ > lpLockupInDays) { lpLockupInDays = uint88(lpLockupInDaysOverride_); } _addInitialLiquidity(ethForLiquidity); } /** * @dev function {_addInitialLiquidity} * * Add initial liquidity to the uniswap pair (internal function that does processing) * * @param ethAmount_ The amount of ETH passed into the call */ function _addInitialLiquidity( uint256 ethAmount_ ) internal { // Funded date is the date of first funding. We can only add initial liquidity once. If this date is set, // we cannot proceed if (fundedDate != 0) { _revert(InitialLiquidityAlreadyAdded.selector); } fundedDate = uint32(block.timestamp); // Can only do this if this contract holds tokens: if (balanceOf(address(this)) == 0) { _revert(NoTokenForLiquidityPair.selector); } // Approve the uniswap router for an inifinite amount (max uint256) // This means that we don't need to worry about later incrememtal // approvals on tax swaps, as the uniswap router allowance will never // be decreased (see code in decreaseAllowance for reference) _approve(address(this), address(_uniswapRouter), type(uint256).max); // Add the liquidity: (uint256 amountA, uint256 amountB, uint256 lpTokens) = _uniswapRouter .addLiquidityETH{value: ethAmount_}( address(this), balanceOf(address(this)), 0, 0, address(this), block.timestamp ); emit InitialLiquidityAdded(amountA, amountB, lpTokens); // We now set this to false so that future transactions can be eligibile for autoswaps _autoSwapInProgress = false; // Are we locking, or burning? if (burnLPTokens) { _burnLiquidity(lpTokens); } else { // Send the LP tokens to lpOwner IERC20(uniswapV2Pair).transfer(lpOwner, lpTokens); } } /** * @dev function {_addLiquidityToVault} * * Lock initial liquidity on vault contract * * @param vaultFee_ The vault fee in wei. This must match the required fee from the external vault contract. * @param lpTokens_ The amount of LP tokens to be locked */ function _addLiquidityToVault(uint256 vaultFee_, uint256 lpTokens_) internal { IERC20(uniswapV2Pair).approve(address(_tokenVault), lpTokens_); _tokenVault.lockLPToken{value: vaultFee_}( uniswapV2Pair, IERC20(uniswapV2Pair).balanceOf(address(this)), block.timestamp + (lpLockupInDays * 1 days), payable(address(0)), true, payable(lpOwner) ); emit LiquidityLocked(lpTokens_, lpLockupInDays); } /** * @dev function {_burnLiquidity} * * Burn LP tokens * * @param lpTokens_ The amount of LP tokens to be locked */ function _burnLiquidity(uint256 lpTokens_) internal { IERC20(uniswapV2Pair).transfer(address(0), lpTokens_); emit LiquidityBurned(lpTokens_); } /** * @dev function {isLiquidityPool} * * Return if an address is a liquidity pool * * @param queryAddress_ The address being queried * @return bool The address is / isn't a liquidity pool */ function isLiquidityPool(address queryAddress_) public view returns (bool) { /** @dev We check the uniswapV2Pair address first as this is an immutable variable and therefore does not need * to be fetched from storage, saving gas if this address IS the uniswapV2Pool. We also add this address * to the enumerated set for ease of reference (for example it is returned in the getter), and it does * not add gas to any other calls, that still complete in 0(1) time. */ return (queryAddress_ == uniswapV2Pair || _liquidityPools.contains(queryAddress_)); } /** * @dev function {liquidityPools} * * Returns a list of all liquidity pools * * @return liquidityPools_ a list of all liquidity pools */ function liquidityPools() external view returns (address[] memory liquidityPools_) { return (_liquidityPools.values()); } /** * @dev function {addLiquidityPool} onlyOwner * * Allows the manager to add a liquidity pool to the pool enumerable set * * @param newLiquidityPool_ The address of the new liquidity pool */ function addLiquidityPool(address newLiquidityPool_) public onlyOwner { // Don't allow calls that didn't pass an address: if (newLiquidityPool_ == address(0)) { _revert(LiquidityPoolCannotBeAddressZero.selector); } // Only allow smart contract addresses to be added, as only these can be pools: if (newLiquidityPool_.code.length == 0) { _revert(LiquidityPoolMustBeAContractAddress.selector); } // Add this to the enumerated list: _liquidityPools.add(newLiquidityPool_); emit LiquidityPoolAdded(newLiquidityPool_); } /** * @dev function {removeLiquidityPool} onlyOwner * * Allows the manager to remove a liquidity pool * * @param removedLiquidityPool_ The address of the old removed liquidity pool */ function removeLiquidityPool( address removedLiquidityPool_ ) external onlyOwner { // Remove this from the enumerated list: _liquidityPools.remove(removedLiquidityPool_); emit LiquidityPoolRemoved(removedLiquidityPool_); } /** * @dev function {isUnlimited} * * Return if an address is unlimited (is not subject to per txn and per wallet limits) * * @param queryAddress_ The address being queried * @return bool The address is / isn't unlimited */ function isUnlimited(address queryAddress_) public view returns (bool) { return (_unlimited.contains(queryAddress_)); } /** * @dev function {unlimitedAddresses} * * Returns a list of all unlimited addresses * * @return unlimitedAddresses_ a list of all unlimited addresses */ function unlimitedAddresses() external view returns (address[] memory unlimitedAddresses_) { return (_unlimited.values()); } /** * @dev function {addUnlimited} onlyOwner * * Allows the manager to add an unlimited address * * @param newUnlimited_ The address of the new unlimited address */ function addUnlimited(address newUnlimited_) external onlyOwner { // Add this to the enumerated list: _unlimited.add(newUnlimited_); emit UnlimitedAddressAdded(newUnlimited_); } /** * @dev function {removeUnlimited} onlyOwner * * Allows the manager to remove an unlimited address * * @param removedUnlimited_ The address of the old removed unlimited address */ function removeUnlimited(address removedUnlimited_) external onlyOwner { // Remove this from the enumerated list: _unlimited.remove(removedUnlimited_); emit UnlimitedAddressRemoved(removedUnlimited_); } /** * @dev function {isValidCaller} * * Return if an address is a valid caller * * @param queryHash_ The code hash being queried * @return bool The address is / isn't a valid caller */ function isValidCaller(bytes32 queryHash_) public view returns (bool) { return (_validCallerCodeHashes.contains(queryHash_)); } /** * @dev function {validCallers} * * Returns a list of all valid caller code hashes * * @return validCallerHashes_ a list of all valid caller code hashes */ function validCallers() external view returns (bytes32[] memory validCallerHashes_) { return (_validCallerCodeHashes.values()); } /** * @dev function {addValidCaller} onlyOwner * * Allows the owner to add the hash of a valid caller * * @param newValidCallerHash_ The hash of the new valid caller */ function addValidCaller(bytes32 newValidCallerHash_) external onlyOwner { _validCallerCodeHashes.add(newValidCallerHash_); emit ValidCallerAdded(newValidCallerHash_); } /** * @dev function {removeValidCaller} onlyOwner * * Allows the owner to remove a valid caller * * @param removedValidCallerHash_ The hash of the old removed valid caller */ function removeValidCaller( bytes32 removedValidCallerHash_ ) external onlyOwner { // Remove this from the enumerated list: _validCallerCodeHashes.remove(removedValidCallerHash_); emit ValidCallerRemoved(removedValidCallerHash_); } /** * @dev function {setProjectTaxRecipient} onlyOwner * * Allows the manager to set the project tax recipient address * * @param projectTaxRecipient_ New recipient address */ function setProjectTaxRecipient( address projectTaxRecipient_ ) external onlyOwner { projectTaxRecipient = projectTaxRecipient_; emit ProjectTaxRecipientUpdated(projectTaxRecipient_); } /** * @dev function {setSwapThresholdBasisPoints} onlyOwner * * Allows the manager to set the autoswap threshold * * @param swapThresholdBasisPoints_ New swap threshold in basis points */ function setSwapThresholdBasisPoints( uint16 swapThresholdBasisPoints_ ) external onlyOwner { uint256 oldswapThresholdBasisPoints = swapThresholdBasisPoints; swapThresholdBasisPoints = swapThresholdBasisPoints_; emit AutoSwapThresholdUpdated( oldswapThresholdBasisPoints, swapThresholdBasisPoints_ ); } /** * @dev function {setProjectTaxRates} onlyOwner * * Change the tax rates, subject to only ever decreasing * * @param newProjectBuyTaxBasisPoints_ The new buy tax rate * @param newProjectSellTaxBasisPoints_ The new sell tax rate */ function setProjectTaxRates( uint16 newProjectBuyTaxBasisPoints_, uint16 newProjectSellTaxBasisPoints_ ) external onlyOwner { uint16 oldBuyTaxBasisPoints = projectBuyTaxBasisPoints; uint16 oldSellTaxBasisPoints = projectSellTaxBasisPoints; projectBuyTaxBasisPoints = newProjectBuyTaxBasisPoints_; projectSellTaxBasisPoints = newProjectSellTaxBasisPoints_; emit ProjectTaxBasisPointsChanged( oldBuyTaxBasisPoints, newProjectBuyTaxBasisPoints_, oldSellTaxBasisPoints, newProjectSellTaxBasisPoints_ ); } /** * @dev function {setLimits} onlyOwner * * Change the limits on transactions and holdings * * @param newMaxTokensPerTransaction_ The new per txn limit * @param newMaxTokensPerWallet_ The new tokens per wallet limit */ function setLimits( uint256 newMaxTokensPerTransaction_, uint256 newMaxTokensPerWallet_ ) external onlyOwner { uint256 oldMaxTokensPerTransaction = maxTokensPerTransaction; uint256 oldMaxTokensPerWallet = maxTokensPerWallet; // Limit can only be increased: if ( (oldMaxTokensPerTransaction == 0 && newMaxTokensPerTransaction_ != 0) || (oldMaxTokensPerWallet == 0 && newMaxTokensPerWallet_ != 0) ) { _revert(LimitsCanOnlyBeRaised.selector); } if ( ((newMaxTokensPerTransaction_ != 0) && newMaxTokensPerTransaction_ < oldMaxTokensPerTransaction) || ((newMaxTokensPerWallet_ != 0) && newMaxTokensPerWallet_ < oldMaxTokensPerWallet) ) { _revert(LimitsCanOnlyBeRaised.selector); } maxTokensPerTransaction = uint128(newMaxTokensPerTransaction_); maxTokensPerWallet = uint128(newMaxTokensPerWallet_); emit LimitsUpdated( oldMaxTokensPerTransaction, newMaxTokensPerTransaction_, oldMaxTokensPerWallet, newMaxTokensPerWallet_ ); } /** * @dev function {limitsEnforced} * * Return if limits are enforced on this contract * * @return bool : they are / aren't */ function limitsEnforced() public view returns (bool) { // Limits are not enforced if // this is renounced AND after then protection end date // OR prior to LP funding: // The second clause of 'fundedDate == 0' isn't strictly needed, since with a funded // date of 0 we would always expect the block.timestamp to be less than 0 plus // the botProtectionDurationInSeconds. But, to cover the miniscule chance of a user // selecting a truly enormous bot protection period, such that when added to 0 it // is more than the current block.timestamp, we have included this second clause. There // is no permanent gas overhead (the logic will be returning from the first clause after // the bot protection period has expired). During the bot protection period there is a minor // gas overhead from evaluating the fundedDate == 0 (which will be false), but this is minimal. if ( (owner() == address(0) && block.timestamp > fundedDate + botProtectionDurationInSeconds) || fundedDate == 0 ) { return false; } else { // LP has been funded AND we are within the protection period: return true; } } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the 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 override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev totalBuyTaxBasisPoints * * Provide easy to view tax total: */ function totalBuyTaxBasisPoints() public view returns (uint256) { return projectBuyTaxBasisPoints; } /** * @dev totalSellTaxBasisPoints * * Provide easy to view tax total: */ function totalSellTaxBasisPoints() public view returns (uint256) { return projectSellTaxBasisPoints; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf( address account ) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer( address to, uint256 amount ) public virtual override(IERC20) returns (bool) { address owner = _msgSender(); _transfer( owner, to, amount, (isLiquidityPool(owner) || isLiquidityPool(to)) ); return true; } /** * @dev See {IERC20-allowance}. */ function allowance( address owner, address spender ) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve( address spender, uint256 amount ) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount, (isLiquidityPool(from) || isLiquidityPool(to))); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance( address spender, uint256 addedValue ) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance( address spender, uint256 subtractedValue ) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); if (currentAllowance < subtractedValue) { _revert(AllowanceDecreasedBelowZero.selector); } unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount, bool applyTax ) internal virtual { _beforeTokenTransfer(from, to, amount); // Perform pre-tax validation (e.g. amount doesn't exceed balance, max txn amount) uint256 fromBalance = _pretaxValidationAndLimits(from, to, amount); // Perform autoswap if eligible _autoSwap(from, to); // Process taxes uint256 amountMinusTax = _taxProcessing(applyTax, to, from, amount); // Perform post-tax validation (e.g. total balance after post-tax amount applied) _posttaxValidationAndLimits(from, to, amountMinusTax); _balances[from] = fromBalance - amount; _balances[to] += amountMinusTax; emit Transfer(from, to, amountMinusTax); _afterTokenTransfer(from, to, amount); } /** * @dev function {_pretaxValidationAndLimits} * * Perform validation on pre-tax amounts * * @param from_ From address for the transaction * @param to_ To address for the transaction * @param amount_ Amount of the transaction */ function _pretaxValidationAndLimits( address from_, address to_, uint256 amount_ ) internal view returns (uint256 fromBalance_) { // This can't be a transfer to the liquidity pool before the funding date // UNLESS the from address is this contract. This ensures that the initial // LP funding transaction is from this contract using the supply of tokens // designated for the LP pool, and therefore the initial price in the pool // is being set as expected. // // This protects from, for example, tokens from a team minted supply being // paired with ETH and added to the pool, setting the initial price, BEFORE // the initial liquidity is added through this contract. if (to_ == uniswapV2Pair && from_ != address(this) && fundedDate == 0) { _revert(InitialLiquidityNotYetAdded.selector); } if (from_ == address(0)) { _revert(TransferFromZeroAddress.selector); } if (to_ == address(0)) { _revert(TransferToZeroAddress.selector); } fromBalance_ = _balances[from_]; if (fromBalance_ < amount_) { _revert(TransferAmountExceedsBalance.selector); } if ( limitsEnforced() && (maxTokensPerTransaction != 0) && ((isLiquidityPool(from_) && !isUnlimited(to_)) || (isLiquidityPool(to_) && !isUnlimited(from_))) ) { // Liquidity pools aren't always going to round cleanly. This can (and does) // mean that a limit of 5,000 tokens (for example) will trigger on a transfer // of 5,000 tokens, as the transfer is actually for 5,000.00000000000000213. // While 4,999 will work fine, it isn't hugely user friendly. So we buffer // the limit with rounding decimals, which in all cases are considerably less // than one whole token: uint256 roundedLimited; unchecked { roundedLimited = maxTokensPerTransaction + ROUND_DEC; } if (amount_ > roundedLimited) { _revert(MaxTokensPerTxnExceeded.selector); } } return (fromBalance_); } /** * @dev function {_posttaxValidationAndLimits} * * Perform validation on post-tax amounts * * @param to_ To address for the transaction * @param amount_ Amount of the transaction */ function _posttaxValidationAndLimits( address from_, address to_, uint256 amount_ ) internal view { if ( limitsEnforced() && (maxTokensPerWallet != 0) && !isUnlimited(to_) && // If this is a buy (from a liquidity pool), we apply if the to_ // address isn't noted as unlimited: (isLiquidityPool(from_) && !isUnlimited(to_)) ) { // Liquidity pools aren't always going to round cleanly. This can (and does) // mean that a limit of 5,000 tokens (for example) will trigger on a max holding // of 5,000 tokens, as the transfer to achieve that is actually for // 5,000.00000000000000213. While 4,999 will work fine, it isn't hugely user friendly. // So we buffer the limit with rounding decimals, which in all cases are considerably // less than one whole token: uint256 roundedLimited; unchecked { roundedLimited = maxTokensPerWallet + ROUND_DEC; } if ((amount_ + balanceOf(to_) > roundedLimited)) { _revert(MaxTokensPerWalletExceeded.selector); } } } /** * @dev function {_taxProcessing} * * Perform tax processing * * @param applyTax_ Do we apply tax to this transaction? * @param to_ The reciever of the token * @param from_ The sender of the token * @param sentAmount_ The amount being send * @return amountLessTax_ The amount that will be recieved, i.e. the send amount minus tax */ function _taxProcessing( bool applyTax_, address to_, address from_, uint256 sentAmount_ ) internal returns (uint256 amountLessTax_) { amountLessTax_ = sentAmount_; unchecked { if (_tokenHasTax && applyTax_ && !_autoSwapInProgress) { uint256 tax; // on sell if (isLiquidityPool(to_) && totalSellTaxBasisPoints() > 0) { if (projectSellTaxBasisPoints > 0) { uint256 projectTax = ((sentAmount_ * projectSellTaxBasisPoints) / BP_DENOM); projectTaxPendingSwap += uint128(projectTax); tax += projectTax; } } // on buy else if (isLiquidityPool(from_) && totalBuyTaxBasisPoints() > 0) { if (projectBuyTaxBasisPoints > 0) { uint256 projectTax = ((sentAmount_ * projectBuyTaxBasisPoints) / BP_DENOM); projectTaxPendingSwap += uint128(projectTax); tax += projectTax; } } if (tax > 0) { _balances[address(this)] += tax; emit Transfer(from_, address(this), tax); amountLessTax_ -= tax; } } } return (amountLessTax_); } /** * @dev function {_autoSwap} * * Automate the swap of accumulated tax fees to native token * * @param from_ The sender of the token * @param to_ The recipient of the token */ function _autoSwap(address from_, address to_) internal { if (_tokenHasTax) { uint256 contractBalance = balanceOf(address(this)); uint256 swapBalance = contractBalance; uint256 swapThresholdInTokens = (_totalSupply * swapThresholdBasisPoints) / BP_DENOM; if (_eligibleForSwap(from_, to_, swapBalance, swapThresholdInTokens)) { // Store that a swap back is in progress: _autoSwapInProgress = true; // Check if we need to reduce the amount of tokens for this swap: if (swapBalance > swapThresholdInTokens * MAX_SWAP_THRESHOLD_MULTIPLE) { swapBalance = swapThresholdInTokens * MAX_SWAP_THRESHOLD_MULTIPLE; } // Perform the auto swap to native token: _swapTaxForNative(swapBalance, contractBalance); // Flag that the autoswap is complete: _autoSwapInProgress = false; } } } /** * @dev function {_eligibleForSwap} * * Is the current transfer eligible for autoswap * * @param from_ The sender of the token * @param to_ The recipient of the token * @param taxBalance_ The current accumulated tax balance * @param swapThresholdInTokens_ The swap threshold as a token amount */ function _eligibleForSwap( address from_, address to_, uint256 taxBalance_, uint256 swapThresholdInTokens_ ) internal view returns (bool) { return (taxBalance_ >= swapThresholdInTokens_ && !_autoSwapInProgress && !isLiquidityPool(from_) && from_ != address(_uniswapRouter) && to_ != address(_uniswapRouter)); } /** * @dev function {_swapTaxForNative} * * Swap tokens taken as tax for native token * * @param swapBalance_ The current accumulated tax balance to swap * @param contractBalance_ The current accumulated total tax balance */ function _swapTaxForNative( uint256 swapBalance_, uint256 contractBalance_ ) internal { uint256 preSwapBalance = address(this).balance; address[] memory path = new address[](2); path[0] = address(this); path[1] = _uniswapRouter.WETH(); // Wrap external calls in try / catch to handle errors try _uniswapRouter.swapExactTokensForETHSupportingFeeOnTransferTokens( swapBalance_, 0, path, address(this), block.timestamp + 600 ) { uint256 postSwapBalance = address(this).balance; uint256 balanceToDistribute = postSwapBalance - preSwapBalance; uint256 totalPendingSwap = projectTaxPendingSwap; uint256 projectBalanceToDistribute = (balanceToDistribute * projectTaxPendingSwap) / totalPendingSwap; // We will not have swapped all tax tokens IF the amount was greater than the max auto swap. // We therefore cannot just set the pending swap counters to 0. Instead, in this scenario, // we must reduce them in proportion to the swap amount vs the remaining balance + swap // amount. // // For example: // * swap Balance is 250 // * contract balance is 385. // * projectTaxPendingSwap is 300 // // The new total for the projectTaxPendingSwap is: // = 300 - ((300 * 250) / 385) // = 300 - 194 // = 106 if (swapBalance_ < contractBalance_) { projectTaxPendingSwap -= uint128( (projectTaxPendingSwap * swapBalance_) / contractBalance_ ); } else { projectTaxPendingSwap = 0; } // Distribute to treasuries: bool success; address weth; uint256 gas; if (projectBalanceToDistribute > 0) { // If no gas limit was provided or provided gas limit greater than gas left, just use the remaining gas. gas = (CALL_GAS_LIMIT == 0 || CALL_GAS_LIMIT > gasleft()) ? gasleft() : CALL_GAS_LIMIT; // We limit the gas passed so that a called address cannot cause a block out of gas error: (success, ) = projectTaxRecipient.call{ value: projectBalanceToDistribute, gas: gas }(""); // If the ETH transfer fails, wrap the ETH and send it as WETH. We do this so that a called // address cannot cause this transfer to fail, either intentionally or by mistake: if (!success) { if (weth == address(0)) { weth = _uniswapRouter.WETH(); } try IWETH(weth).deposit{value: projectBalanceToDistribute}() { try IERC20(address(weth)).transfer( projectTaxRecipient, projectBalanceToDistribute ) {} catch { // Dont allow a failed external call (in this case to WETH) to stop a transfer. // Emit that this has occured and continue. emit ExternalCallError(1); } } catch { // Dont allow a failed external call (in this case to WETH) to stop a transfer. // Emit that this has occured and continue. emit ExternalCallError(2); } } } } catch { // Dont allow a failed external call (in this case to uniswap) to stop a transfer. // Emit that this has occured and continue. emit ExternalCallError(5); } } /** * @dev distributeTaxTokens * * Allows the distribution of tax tokens to the designated recipient(s) * * As part of standard processing the tax token balance being above the threshold * will trigger an autoswap to ETH and distribution of this ETH to the designated * recipients. This is automatic and there is no need for user involvement. * * As part of this swap there are a number of calculations performed, particularly * if the tax balance is above MAX_SWAP_THRESHOLD_MULTIPLE. * * Testing indicates that these calculations are safe. But given the data / code * interactions it remains possible that some edge case set of scenarios may cause * an issue with these calculations. * * This method is therefore provided as a 'fallback' option to safely distribute * accumulated taxes from the contract, with a direct transfer of the ERC20 tokens * themselves. */ function distributeTaxTokens() external { if (projectTaxPendingSwap > 0) { uint256 projectDistribution = projectTaxPendingSwap; projectTaxPendingSwap = 0; _transfer(address(this), projectTaxRecipient, projectDistribution, false); } } /** * @dev function {withdrawETH} onlyOwner * * A withdraw function to allow ETH to be withdrawn by the manager * * This contract should never hold ETH. The only envisaged scenario where * it might hold ETH is a failed autoswap where the uniswap swap has completed, * the recipient of ETH reverts, the contract then wraps to WETH and the * wrap to WETH fails. * * This feels unlikely. But, for safety, we include this method. * * @param amount_ The amount to withdraw */ function withdrawETH(uint256 amount_) external onlyOwner { (bool success, ) = _msgSender().call{value: amount_}(""); if (!success) { _revert(TransferFailed.selector); } } /** * @dev function {withdrawERC20} onlyOwner * * A withdraw function to allow ERC20s (except address(this)) to be withdrawn. * * This contract should never hold ERC20s other than tax tokens. The only envisaged * scenario where it might hold an ERC20 is a failed autoswap where the uniswap swap * has completed, the recipient of ETH reverts, the contract then wraps to WETH, the * wrap to WETH succeeds, BUT then the transfer of WETH fails. * * This feels even less likely than the scenario where ETH is held on the contract. * But, for safety, we include this method. * * @param token_ The ERC20 contract * @param amount_ The amount to withdraw */ function withdrawERC20(address token_, uint256 amount_) external onlyOwner { if (token_ == address(this)) { _revert(CannotWithdrawThisToken.selector); } IERC20(token_).safeTransfer(_msgSender(), amount_); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { if (account == address(0)) { _revert(MintToZeroAddress.selector); } _beforeTokenTransfer(address(0), account, amount); _totalSupply += uint128(amount); unchecked { // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. _balances[account] += amount; } emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { if (account == address(0)) { _revert(BurnFromTheZeroAddress.selector); } _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; if (accountBalance < amount) { _revert(BurnExceedsBalance.selector); } unchecked { _balances[account] = accountBalance - amount; // Overflow not possible: amount <= accountBalance <= totalSupply. _totalSupply -= uint128(amount); } emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { if (owner == address(0)) { _revert(ApproveFromTheZeroAddress.selector); } if (spender == address(0)) { _revert(ApproveToTheZeroAddress.selector); } _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { if (currentAllowance < amount) { _revert(InsufficientAllowance.selector); } unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Destroys a `value` amount of tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 value) public virtual { _burn(_msgSender(), value); } /** * @dev Destroys a `value` amount of tokens from `account`, deducting from * the caller's allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `value`. */ function burnFrom(address account, uint256 value) public virtual { _spendAllowance(account, _msgSender(), value); _burn(account, value); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} receive() external payable {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "./IERC20.sol"; import {IERC20Metadata} from "./extensions/IERC20Metadata.sol"; import {Context} from "../../utils/Context.sol"; import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. */ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { mapping(address account => uint256) private _balances; mapping(address account => mapping(address spender => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the default value returned by this function, unless * it's overridden. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `value`. */ function transfer(address to, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _transfer(owner, to, value); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, value); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `value`. * - the caller must have allowance for ``from``'s tokens of at least * `value`. */ function transferFrom(address from, address to, uint256 value) public virtual returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, value); _transfer(from, to, value); return true; } /** * @dev Moves a `value` amount of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _transfer(address from, address to, uint256 value) internal { if (from == address(0)) { revert ERC20InvalidSender(address(0)); } if (to == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(from, to, value); } /** * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding * this function. * * Emits a {Transfer} event. */ function _update(address from, address to, uint256 value) internal virtual { if (from == address(0)) { // Overflow check required: The rest of the code assumes that totalSupply never overflows _totalSupply += value; } else { uint256 fromBalance = _balances[from]; if (fromBalance < value) { revert ERC20InsufficientBalance(from, fromBalance, value); } unchecked { // Overflow not possible: value <= fromBalance <= totalSupply. _balances[from] = fromBalance - value; } } if (to == address(0)) { unchecked { // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply. _totalSupply -= value; } } else { unchecked { // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256. _balances[to] += value; } } emit Transfer(from, to, value); } /** * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0). * Relies on the `_update` mechanism * * Emits a {Transfer} event with `from` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _mint(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(address(0), account, value); } /** * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply. * Relies on the `_update` mechanism. * * Emits a {Transfer} event with `to` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead */ function _burn(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidSender(address(0)); } _update(account, address(0), value); } /** * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address owner, address spender, uint256 value) internal { _approve(owner, spender, value, true); } /** * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event. * * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any * `Approval` event during `transferFrom` operations. * * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to * true using the following override: * ``` * function _approve(address owner, address spender, uint256 value, bool) internal virtual override { * super._approve(owner, spender, value, true); * } * ``` * * Requirements are the same as {_approve}. */ function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual { if (owner == address(0)) { revert ERC20InvalidApprover(address(0)); } if (spender == address(0)) { revert ERC20InvalidSpender(address(0)); } _allowances[owner][spender] = value; if (emitEvent) { emit Approval(owner, spender, value); } } /** * @dev Updates `owner` s allowance for `spender` based on spent `value`. * * Does not update the allowance value in case of infinite allowance. * Revert if not enough allowance is available. * * Does not emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 value) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { if (currentAllowance < value) { revert ERC20InsufficientAllowance(spender, currentAllowance, value); } unchecked { _approve(owner, spender, currentAllowance - value, false); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol) pragma solidity ^0.8.20; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error AddressInsufficientBalance(address account); /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedInnerCall(); /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert AddressInsufficientBalance(address(this)); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert FailedInnerCall(); } } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {FailedInnerCall} error. * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert AddressInsufficientBalance(address(this)); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an * unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {FailedInnerCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}. */ function _revert(bytes memory returndata) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert FailedInnerCall(); } } }
// 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.0.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.20; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ```solidity * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position is the index of the value in the `values` array plus 1. // Position 0 is used to mean a value is not in the set. mapping(bytes32 value => uint256) _positions; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._positions[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We cache the value's position to prevent multiple reads from the same storage slot uint256 position = set._positions[value]; if (position != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 valueIndex = position - 1; uint256 lastIndex = set._values.length - 1; if (valueIndex != lastIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the lastValue to the index where the value to delete is set._values[valueIndex] = lastValue; // Update the tracked position of the lastValue (that was just moved) set._positions[lastValue] = position; } // Delete the slot where the moved value was stored set._values.pop(); // Delete the tracked position for the deleted slot delete set._positions[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._positions[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
pragma solidity ^0.8.21; interface IConfigStructures { enum DropStatus { approved, deployed, cancelled } enum TemplateStatus { live, terminated } // The current status of the mint: // - notEnabled: This type of mint is not part of this drop // - notYetOpen: This type of mint is part of the drop, but it hasn't started yet // - open: it's ready for ya, get in there. // - finished: been and gone. // - unknown: theoretically impossible. enum MintStatus { notEnabled, notYetOpen, open, finished, unknown } struct SubListConfig { uint256 start; uint256 end; uint256 phaseMaxSupply; } struct PrimarySaleModuleInstance { address instanceAddress; string instanceDescription; } struct NFTModuleConfig { uint256 templateId; bytes configData; bytes vestingData; } struct PrimarySaleModuleConfig { uint256 templateId; bytes configData; } struct ProjectBeneficiary { address payable payeeAddress; uint256 payeeShares; } struct VestingConfig { uint256 start; uint256 projectUpFrontShare; uint256 projectVestedShare; uint256 vestingPeriodInDays; uint256 vestingCliff; ProjectBeneficiary[] projectPayees; } struct RoyaltySplitterModuleConfig { uint256 templateId; bytes configData; } struct InLifeModuleConfig { uint256 templateId; bytes configData; } struct InLifeModules { InLifeModuleConfig[] modules; } struct NFTConfig { uint256 supply; string name; string symbol; bytes32 positionProof; bool includePriorPhasesInMintTracking; bool singleMetadataCollection; uint256 reservedAllocation; uint256 assistanceRequestWindowInSeconds; } struct Template { TemplateStatus status; uint16 templateNumber; uint32 loadedDate; address payable templateAddress; string templateDescription; } struct RoyaltyDetails { address newRoyaltyPaymentSplitterInstance; uint96 royaltyFromSalesInBasisPoints; } struct SignedDropMessageDetails { uint256 messageTimeStamp; bytes32 messageHash; bytes messageSignature; } }
pragma solidity ^0.8.21; interface IERC20Config { struct ERC20Config { bytes baseParameters; bytes supplyParameters; bytes taxParameters; bytes poolParameters; } struct ERC20BaseParameters { string name; string symbol; bool addLiquidityOnCreate; bool usesDRIPool; } struct ERC20SupplyParameters { uint256 maxSupply; uint256 lpSupply; uint256 projectSupply; uint256 maxTokensPerWallet; uint256 maxTokensPerTxn; uint256 lpLockupInDays; uint256 botProtectionDurationInSeconds; address projectSupplyRecipient; address projectLPOwner; bool burnLPTokens; } struct ERC20TaxParameters { uint256 projectBuyTaxBasisPoints; uint256 projectSellTaxBasisPoints; uint256 taxSwapThresholdBasisPoints; address projectTaxRecipient; } struct ERC20PoolParameters { uint256 poolSupply; uint256 poolStartDate; uint256 poolEndDate; uint256 poolVestingInDays; uint256 poolMaxETH; uint256 poolPerAddressMaxETH; uint256 poolMinETH; uint256 poolPerTransactionMinETH; } }
pragma solidity ^0.8.21; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./IERC20Config.sol"; import "./IConfigStructures.sol"; interface IERC20Custom is IConfigStructures, IERC20, IERC20Config, IERC20Metadata { event AutoSwapThresholdUpdated(uint256 oldThreshold, uint256 newThreshold); event ExternalCallError(uint256 identifier); event InitialLiquidityAdded(uint256 tokenA, uint256 tokenB, uint256 lpToken); event LimitsUpdated( uint256 oldMaxTokensPerTransaction, uint256 newMaxTokensPerTransaction, uint256 oldMaxTokensPerWallet, uint256 newMaxTokensPerWallet ); event LiquidityLocked(uint256 lpTokens, uint256 lpLockupInDays); event LiquidityBurned(uint256 lpTokens); event LiquidityPoolCreated(address addedPool); event LiquidityPoolAdded(address addedPool); event LiquidityPoolRemoved(address removedPool); event ProjectTaxBasisPointsChanged( uint256 oldBuyBasisPoints, uint256 newBuyBasisPoints, uint256 oldSellBasisPoints, uint256 newSellBasisPoints ); event RevenueAutoSwap(); event ProjectTaxRecipientUpdated(address treasury); event UnlimitedAddressAdded(address addedUnlimted); event UnlimitedAddressRemoved(address removedUnlimted); event ValidCallerAdded(bytes32 addedValidCaller); event ValidCallerRemoved(bytes32 removedValidCaller); /** * @dev function {addInitialLiquidity} * * Add initial liquidity to the uniswap pair * * @param lpLockupInDaysOverride_ The number of days to lock liquidity NOTE you can pass 0 to use the stored value. * This value is an override, and will override a stored value which is LOWER that it. If the value you are passing is * LOWER than the stored value the stored value will not be reduced. * * Example usage 1: When creating the coin the lpLockupInDays is set to 0. This means that on this call the * user can set the lockup to any value they like, as all integer values greater than zero will be used to override * that set in storage. * * Example usage 2: When using a DRI Pool the lockup period is set on this contract and the pool need not know anything * about this setting. The pool can pass back a 0 on this call and know that the existing value stored on this contract * will be used. * @param burnLPTokensOverride_ If the LP tokens should be burned (otherwise they are locked). This is an override field * that can ONLY be used to override a held value of FALSE with a new value of TRUE. * * Example usage 1: When creating the coin the user didn't add liquidity, or specify that the LP tokens were to be burned. * So burnLPTokens is held as FALSE. When they add liquidity they want to lock tokens, so they pass this in as FALSE again, * and it remains FALSE. * * Example usage 2: As above, but when later adding liquidity the user wants to burn the LP. So the stored value is FALSE * and the user passes TRUE into this method. The TRUE overrides the held value of FALSE and the tokens are burned. * * Example uusage 3: The user is using a DRI pool and they have specified on the coin creation that the LP tokens are to * be burned. This contract therefore holds TRUE for burnLPTokens. The DRI pool does not need to know what the user has * selected. It can safely pass back FALSE to this method call and the stored value of TRUE will remain, resulting in the * LP tokens being burned. */ function addInitialLiquidity( uint256 lpLockupInDaysOverride_, bool burnLPTokensOverride_ ) external payable; /** * @dev function {isLiquidityPool} * * Return if an address is a liquidity pool * * @param queryAddress_ The address being queried * @return bool The address is / isn't a liquidity pool */ function isLiquidityPool(address queryAddress_) external view returns (bool); /** * @dev function {liquidityPools} * * Returns a list of all liquidity pools * * @return liquidityPools_ a list of all liquidity pools */ function liquidityPools() external view returns (address[] memory liquidityPools_); /** * @dev function {addLiquidityPool} onlyOwner * * Allows the manager to add a liquidity pool to the pool enumerable set * * @param newLiquidityPool_ The address of the new liquidity pool */ function addLiquidityPool(address newLiquidityPool_) external; /** * @dev function {removeLiquidityPool} onlyOwner * * Allows the manager to remove a liquidity pool * * @param removedLiquidityPool_ The address of the old removed liquidity pool */ function removeLiquidityPool(address removedLiquidityPool_) external; /** * @dev function {isUnlimited} * * Return if an address is unlimited (is not subject to per txn and per wallet limits) * * @param queryAddress_ The address being queried * @return bool The address is / isn't unlimited */ function isUnlimited(address queryAddress_) external view returns (bool); /** * @dev function {unlimitedAddresses} * * Returns a list of all unlimited addresses * * @return unlimitedAddresses_ a list of all unlimited addresses */ function unlimitedAddresses() external view returns (address[] memory unlimitedAddresses_); /** * @dev function {addUnlimited} onlyOwner * * Allows the manager to add an unlimited address * * @param newUnlimited_ The address of the new unlimited address */ function addUnlimited(address newUnlimited_) external; /** * @dev function {removeUnlimited} onlyOwner * * Allows the manager to remove an unlimited address * * @param removedUnlimited_ The address of the old removed unlimited address */ function removeUnlimited(address removedUnlimited_) external; /** * @dev function {isValidCaller} * * Return if an address is a valid caller * * @param queryHash_ The code hash being queried * @return bool The address is / isn't a valid caller */ function isValidCaller(bytes32 queryHash_) external view returns (bool); /** * @dev function {validCallers} * * Returns a list of all valid caller code hashes * * @return validCallerHashes_ a list of all valid caller code hashes */ function validCallers() external view returns (bytes32[] memory validCallerHashes_); /** * @dev function {addValidCaller} onlyOwner * * Allows the owner to add the hash of a valid caller * * @param newValidCallerHash_ The hash of the new valid caller */ function addValidCaller(bytes32 newValidCallerHash_) external; /** * @dev function {removeValidCaller} onlyOwner * * Allows the owner to remove a valid caller * * @param removedValidCallerHash_ The hash of the old removed valid caller */ function removeValidCaller(bytes32 removedValidCallerHash_) external; /** * @dev function {setProjectTaxRecipient} onlyOwner * * Allows the manager to set the project tax recipient address * * @param projectTaxRecipient_ New recipient address */ function setProjectTaxRecipient(address projectTaxRecipient_) external; /** * @dev function {setSwapThresholdBasisPoints} onlyOwner * * Allows the manager to set the autoswap threshold * * @param swapThresholdBasisPoints_ New swap threshold in basis points */ function setSwapThresholdBasisPoints( uint16 swapThresholdBasisPoints_ ) external; /** * @dev function {setProjectTaxRates} onlyOwner * * Change the tax rates, subject to only ever decreasing * * @param newProjectBuyTaxBasisPoints_ The new buy tax rate * @param newProjectSellTaxBasisPoints_ The new sell tax rate */ function setProjectTaxRates( uint16 newProjectBuyTaxBasisPoints_, uint16 newProjectSellTaxBasisPoints_ ) external; /** * @dev function {setLimits} onlyOwner * * Change the limits on transactions and holdings * * @param newMaxTokensPerTransaction_ The new per txn limit * @param newMaxTokensPerWallet_ The new tokens per wallet limit */ function setLimits( uint256 newMaxTokensPerTransaction_, uint256 newMaxTokensPerWallet_ ) external; /** * @dev function {limitsEnforced} * * Return if limits are enforced on this contract * * @return bool : they are / aren't */ function limitsEnforced() external view returns (bool); /** * @dev totalBuyTaxBasisPoints * * Provide easy to view tax total: */ function totalBuyTaxBasisPoints() external view returns (uint256); /** * @dev totalSellTaxBasisPoints * * Provide easy to view tax total: */ function totalSellTaxBasisPoints() external view returns (uint256); /** * @dev distributeTaxTokens * * Allows the distribution of tax tokens to the designated recipient(s) * * As part of standard processing the tax token balance being above the threshold * will trigger an autoswap to ETH and distribution of this ETH to the designated * recipients. This is automatic and there is no need for user involvement. * * As part of this swap there are a number of calculations performed, particularly * if the tax balance is above MAX_SWAP_THRESHOLD_MULTIPLE. * * Testing indicates that these calculations are safe. But given the data / code * interactions it remains possible that some edge case set of scenarios may cause * an issue with these calculations. * * This method is therefore provided as a 'fallback' option to safely distribute * accumulated taxes from the contract, with a direct transfer of the ERC20 tokens * themselves. */ function distributeTaxTokens() external; /** * @dev function {withdrawETH} onlyOwner * * A withdraw function to allow ETH to be withdrawn by the manager * * This contract should never hold ETH. The only envisaged scenario where * it might hold ETH is a failed autoswap where the uniswap swap has completed, * the recipient of ETH reverts, the contract then wraps to WETH and the * wrap to WETH fails. * * This feels unlikely. But, for safety, we include this method. * * @param amount_ The amount to withdraw */ function withdrawETH(uint256 amount_) external; /** * @dev function {withdrawERC20} onlyOwner * * A withdraw function to allow ERC20s (except address(this)) to be withdrawn. * * This contract should never hold ERC20s other than tax tokens. The only envisaged * scenario where it might hold an ERC20 is a failed autoswap where the uniswap swap * has completed, the recipient of ETH reverts, the contract then wraps to WETH, the * wrap to WETH succeeds, BUT then the transfer of WETH fails. * * This feels even less likely than the scenario where ETH is held on the contract. * But, for safety, we include this method. * * @param token_ The ERC20 contract * @param amount_ The amount to withdraw */ function withdrawERC20(address token_, uint256 amount_) external; /** * @dev Destroys a `value` amount of tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 value) external; /** * @dev Destroys a `value` amount of tokens from `account`, deducting from * the caller's allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `value`. */ function burnFrom(address account, uint256 value) external; }
pragma solidity ^0.8.21; interface IErrors { enum BondingCurveErrorType { OK, // No error INVALID_NUMITEMS, // The numItem value is 0 SPOT_PRICE_OVERFLOW // The updated spot price doesn't fit into 128 bits } error AdapterParamsMustBeEmpty(); // The adapter parameters on this LZ call must be empty. error AdditionToPoolIsBelowPerTransactionMinimum(); // The contribution amount is less than the minimum. error AdditionToPoolWouldExceedPoolCap(); // This addition to the pool would exceed the pool cap. error AdditionToPoolWouldExceedPerAddressCap(); // This addition to the pool would exceed the per address cap. error AddressAlreadySet(); // The address being set can only be set once, and is already non-0. error AllowanceDecreasedBelowZero(); // You cannot decrease the allowance below zero. error AlreadyInitialised(); // The contract is already initialised: it cannot be initialised twice! error ApprovalCallerNotOwnerNorApproved(); // The caller must own the token or be an approved operator. error ApproveFromTheZeroAddress(); // Approval cannot be called from the zero address (indeed, how have you??). error ApproveToTheZeroAddress(); // Approval cannot be given to the zero address. error ApprovalQueryForNonexistentToken(); // The token does not exist. error AuctionStatusIsNotEnded(); // Throw if the action required the auction to be closed, and it isn't. error AuctionStatusIsNotOpen(); // Throw if the action requires the auction to be open, and it isn't. error AuxCallFailed( address[] modules, uint256 value, bytes data, uint256 txGas ); // An auxilliary call from the drop factory failed. error BalanceMismatch(); // An error when comparing balance amounts. error BalanceQueryForZeroAddress(); // Cannot query the balance for the zero address. error BidMustBeBelowTheFloorWhenReducingQuantity(); // Only bids that are below the floor can reduce the quantity of the bid. error BidMustBeBelowTheFloorForRefundDuringAuction(); // Only bids that are below the floor can be refunded during the auction. error BondingCurveError(BondingCurveErrorType error); // An error of the type specified has occured in bonding curve processing. error BurnExceedsBalance(); // The amount you have selected to burn exceeds the addresses balance. error BurnFromTheZeroAddress(); // Tokens cannot be burned from the zero address. (Also, how have you called this!?!) error CallerIsNotDepositBoxOwner(); // The caller is not the owner of the deposit box. error CallerIsNotFactory(); // The caller of this function must match the factory address in storage. error CallerIsNotFactoryOrProjectOwner(); // The caller of this function must match the factory address OR project owner address. error CallerIsNotFactoryProjectOwnerOrPool(); // The caller of this function must match the factory address, project owner or pool address. error CallerIsNotTheOwner(); // The caller is not the owner of this contract. error CallerIsNotTheManager(); // The caller is not the manager of this contract. error CallerMustBeLzApp(); // The caller must be an LZ application. error CallerIsNotPlatformAdmin(address caller); // The caller of this function must be part of the platformAdmin group. error CallerIsNotSuperAdmin(address caller); // The caller of this function must match the superAdmin address in storage. error CannotAddLiquidityOnCreateAndUseDRIPool(); // Cannot use both liquidity added on create and a DRIPool in the same token. error CannotSetNewOwnerToTheZeroAddress(); // You can't set the owner of this contract to the zero address (address(0)). error CannotSetToZeroAddress(); // The corresponding address cannot be set to the zero address (address(0)). error CannotSetNewManagerToTheZeroAddress(); // Cannot transfer the manager to the zero address (address(0)). error CannotWithdrawThisToken(); // Cannot withdraw the specified token. error CanOnlyReduce(); // The given operation can only reduce the value specified. error CollectionAlreadyRevealed(); // The collection is already revealed; you cannot call reveal again. error ContractIsDecommissioned(); // This contract is decommissioned! error ContractIsPaused(); // The call requires the contract to be unpaused, and it is paused. error ContractIsNotPaused(); // The call required the contract to be paused, and it is NOT paused. error DecreasedAllowanceBelowZero(); // The request would decrease the allowance below zero, and that is not allowed. error DestinationIsNotTrustedSource(); // The destination that is being called through LZ has not been set as trusted. error DeployerOnly(); // This method can only be called by the deployer address. error DeploymentError(); // Error on deployment. error DepositBoxIsNotOpen(); // This action cannot complete as the deposit box is not open. error DriPoolAddressCannotBeAddressZero(); // The Dri Pool address cannot be the zero address. error GasLimitIsTooLow(); // The gas limit for the LayerZero call is too low. error IncorrectConfirmationValue(); // You need to enter the right confirmation value to call this funtion (usually 69420). error IncorrectPayment(); // The function call did not include passing the correct payment. error InitialLiquidityAlreadyAdded(); // Initial liquidity has already been added. You can't do it again. error InitialLiquidityNotYetAdded(); // Initial liquidity needs to have been added for this to succedd. error InsufficientAllowance(); // There is not a high enough allowance for this operation. error InvalidAdapterParams(); // The current adapter params for LayerZero on this contract won't work :(. error InvalidAddress(); // An address being processed in the function is not valid. error InvalidEndpointCaller(); // The calling address is not a valid LZ endpoint. The LZ endpoint was set at contract creation // and cannot be altered after. Check the address LZ endpoint address on the contract. error InvalidMinGas(); // The minimum gas setting for LZ in invalid. error InvalidOracleSignature(); // The signature provided with the contract call is not valid, either in format or signer. error InvalidPayload(); // The LZ payload is invalid error InvalidReceiver(); // The address used as a target for funds is not valid. error InvalidSourceSendingContract(); // The LZ message is being related from a source contract on another chain that is NOT trusted. error InvalidTotalShares(); // Total shares must equal 100 percent in basis points. error LimitsCanOnlyBeRaised(); // Limits are UP ONLY. error ListLengthMismatch(); // Two or more lists were compared and they did not match length. error LiquidityPoolMustBeAContractAddress(); // Cannot add a non-contract as a liquidity pool. error LiquidityPoolCannotBeAddressZero(); // Cannot add a liquidity pool from the zero address. error LPLockUpMustFitUint88(); // LP lockup is held in a uint88, so must fit. error NoTrustedPathRecord(); // LZ needs a trusted path record for this to work. What's that, you ask? error MachineAddressCannotBeAddressZero(); // Cannot set the machine address to the zero address. error ManagerUnauthorizedAccount(); // The caller is not the pending manager. error MaxBidQuantityIs255(); // Validation: as we use a uint8 array to track bid positions the max bid quantity is 255. error MaxPublicMintAllowanceExceeded( uint256 requested, uint256 alreadyMinted, uint256 maxAllowance ); // The calling address has requested a quantity that would exceed the max allowance. error MaxSupplyTooHigh(); // Max supply must fit in a uint128. error MaxTokensPerWalletExceeded(); // The transfer would exceed the max tokens per wallet limit. error MaxTokensPerTxnExceeded(); // The transfer would exceed the max tokens per transaction limit. error MetadataIsLocked(); // The metadata on this contract is locked; it cannot be altered! error MinGasLimitNotSet(); // The minimum gas limit for LayerZero has not been set. error MintERC2309QuantityExceedsLimit(); // The `quantity` minted with ERC2309 exceeds the safety limit. error MintingIsClosedForever(); // Minting is, as the error suggests, so over (and locked forever). error MintToZeroAddress(); // Cannot mint to the zero address. error MintZeroQuantity(); // The quantity of tokens minted must be more than zero. error NewBuyTaxBasisPointsExceedsMaximum(); // Project owner trying to set the tax rate too high. error NewSellTaxBasisPointsExceedsMaximum(); // Project owner trying to set the tax rate too high. error NoETHForLiquidityPair(); // No ETH has been provided for the liquidity pair. error TaxPeriodStillInForce(); // The minimum tax period has not yet expired. error NoPaymentDue(); // No payment is due for this address. error NoRefundForCaller(); // Error thrown when the calling address has no refund owed. error NoStoredMessage(); // There is no stored message matching the passed parameters. error NothingToClaim(); // The calling address has nothing to claim. error NoTokenForLiquidityPair(); // There is no token to add to the LP. error OperationDidNotSucceed(); // The operation failed (vague much?). error OracleSignatureHasExpired(); // A signature has been provided but it is too old. error OwnableUnauthorizedAccount(); // The caller is not the pending owner. error OwnershipNotInitializedForExtraData(); // The `extraData` cannot be set on an uninitialized ownership slot. error OwnerQueryForNonexistentToken(); // The token does not exist. error ParametersDoNotMatchSignedMessage(); // The parameters passed with the signed message do not match the message itself. error ParamTooLargeStartDate(); // The passed parameter exceeds the var type max. error ParamTooLargeEndDate(); // The passed parameter exceeds the var type max. error ParamTooLargeMinETH(); // The passed parameter exceeds the var type max. error ParamTooLargePerAddressMax(); // The passed parameter exceeds the var type max. error ParamTooLargeVestingDays(); // The passed parameter exceeds the var type max. error ParamTooLargePoolSupply(); // The passed parameter exceeds the var type max. error ParamTooLargePoolPerTxnMinETH(); // The passed parameter exceeds the var type max. error PassedConfigDoesNotMatchApproved(); // The config provided on the call does not match the approved config. error PauseCutOffHasPassed(); // The time period in which we can pause has passed; this contract can no longer be paused. error PaymentMustCoverPerMintFee(); // The payment passed must at least cover the per mint fee for the quantity requested. error PermitDidNotSucceed(); // The safeERC20 permit failed. error PlatformAdminCannotBeAddressZero(); // We cannot use the zero address (address(0)) as a platformAdmin. error PlatformTreasuryCannotBeAddressZero(); // The treasury address cannot be set to the zero address. error PoolIsAboveMinimum(); // You required the pool to be below the minimum, and it is not error PoolIsBelowMinimum(); // You required the pool to be above the minimum, and it is not error PoolPhaseIsClosed(); // The block.timestamp is either before the pool is open or after it is closed. error PoolPhaseIsNotAfter(); // The block.timestamp is either before or during the pool open phase. error PoolVestingNotYetComplete(); // Tokens in the pool are not yet vested. error ProjectOwnerCannotBeAddressZero(); // The project owner has to be a non zero address. error ProofInvalid(); // The provided proof is not valid with the provided arguments. error QuantityExceedsRemainingCollectionSupply(); // The requested quantity would breach the collection supply. error QuantityExceedsRemainingPhaseSupply(); // The requested quantity would breach the phase supply. error QuantityExceedsMaxPossibleCollectionSupply(); // The requested quantity would breach the maximum trackable supply error ReferralIdAlreadyUsed(); // This referral ID has already been used; they are one use only. error RequestingMoreThanAvailableBalance(); // The request exceeds the available balance. error RequestingMoreThanRemainingAllocation( uint256 previouslyMinted, uint256 requested, uint256 remainingAllocation ); // Number of tokens requested for this mint exceeds the remaining allocation (taking the // original allocation from the list and deducting minted tokens). error RoyaltyFeeWillExceedSalePrice(); // The ERC2981 royalty specified will exceed the sale price. error ShareTotalCannotBeZero(); // The total of all the shares cannot be nothing. error SliceOutOfBounds(); // The bytes slice operation was out of bounds. error SliceOverflow(); // The bytes slice operation overlowed. error SuperAdminCannotBeAddressZero(); // The superAdmin cannot be the sero address (address(0)). error SupplyTotalMismatch(); // The sum of the team supply and lp supply does not match. error SupportWindowIsNotOpen(); // The project owner has not requested support within the support request expiry window. error TaxFreeAddressCannotBeAddressZero(); // A tax free address cannot be address(0) error TemplateCannotBeAddressZero(); // The address for a template cannot be address zero (address(0)). error TemplateNotFound(); // There is no template that matches the passed template Id. error ThisMintIsClosed(); // It's over (well, this mint is, anyway). error TotalSharesMustMatchDenominator(); // The total of all shares must equal the denominator value. error TransferAmountExceedsBalance(); // The transfer amount exceeds the accounts available balance. error TransferCallerNotOwnerNorApproved(); // The caller must own the token or be an approved operator. error TransferFailed(); // The transfer has failed. error TransferFromIncorrectOwner(); // The token must be owned by `from`. error TransferToNonERC721ReceiverImplementer(); // Cannot safely transfer to a contract that does not implement the ERC721Receiver interface. error TransferFromZeroAddress(); // Cannot transfer from the zero address. Indeed, this surely is impossible, and likely a waste to check?? error TransferToZeroAddress(); // Cannot transfer to the zero address. error UnrecognisedVRFMode(); // Currently supported VRF modes are 0: chainlink and 1: arrng error URIQueryForNonexistentToken(); // The token does not exist. error ValueExceedsMaximum(); // The value sent exceeds the maximum allowed (super useful explanation huh?). error VRFCoordinatorCannotBeAddressZero(); // The VRF coordinator cannot be the zero address (address(0)). }
pragma solidity >=0.5.0; interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; }
pragma solidity 0.8.21; // SPDX-License-Identifier: MIT import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; interface IERCBurn { function burn(uint256 _amount) external; function approve(address spender, uint256 amount) external returns (bool); function allowance(address owner, address spender) external returns (uint256); function balanceOf(address account) external view returns (uint256); } interface IMigrator { function migrate( address lpToken, uint256 amount, uint256 unlockDate, address owner ) external returns (bool); } interface IUniswapV2Locker { struct UserInfo { EnumerableSet.AddressSet lockedTokens; // records all tokens the user has locked mapping(address => uint256[]) locksForToken; // map erc20 address to lock id for that token } struct TokenLock { uint256 lockDate; // the date the token was locked uint256 amount; // the amount of tokens still locked (initialAmount minus withdrawls) uint256 initialAmount; // the initial lock amount uint256 unlockDate; // the date the token can be withdrawn uint256 lockID; // lockID nonce per uni pair address owner; } struct FeeStruct { uint256 ethFee; // Small eth fee to prevent spam on the platform IERCBurn secondaryFeeToken; // UNCX or UNCL uint256 secondaryTokenFee; // optional, UNCX or UNCL uint256 secondaryTokenDiscount; // discount on liquidity fee for burning secondaryToken uint256 liquidityFee; // fee on univ2 liquidity tokens uint256 referralPercent; // fee for referrals IERCBurn referralToken; // token the refferer must hold to qualify as a referrer uint256 referralHold; // balance the referrer must hold to qualify as a referrer uint256 referralDiscount; // discount on flatrate fees for using a valid referral address } function setDev(address payable _devaddr) external; /** * @notice set the migrator contract which allows locked lp tokens to be migrated to uniswap v3 */ function setMigrator(IMigrator _migrator) external; function setSecondaryFeeToken(address _secondaryFeeToken) external; /** * @notice referrers need to hold the specified token and hold amount to be elegible for referral fees */ function setReferralTokenAndHold( IERCBurn _referralToken, uint256 _hold ) external; function setFees( uint256 _referralPercent, uint256 _referralDiscount, uint256 _ethFee, uint256 _secondaryTokenFee, uint256 _secondaryTokenDiscount, uint256 _liquidityFee ) external; /** * @notice whitelisted accounts dont pay flatrate fees on locking */ function whitelistFeeAccount(address _user, bool _add) external; /** * @notice Creates a new lock * @param _lpToken the univ2 token address * @param _amount amount of LP tokens to lock * @param _unlock_date the unix timestamp (in seconds) until unlock * @param _referral the referrer address if any or address(0) for none * @param _fee_in_eth fees can be paid in eth or in a secondary token such as UNCX with a discount on univ2 tokens * @param _withdrawer the user who can withdraw liquidity once the lock expires. */ function lockLPToken( address _lpToken, uint256 _amount, uint256 _unlock_date, address payable _referral, bool _fee_in_eth, address payable _withdrawer ) external payable; /** * @notice extend a lock with a new unlock date, _index and _lockID ensure the correct lock is changed * this prevents errors when a user performs multiple tx per block possibly with varying gas prices */ function relock( address _lpToken, uint256 _index, uint256 _lockID, uint256 _unlock_date ) external; /** * @notice withdraw a specified amount from a lock. _index and _lockID ensure the correct lock is changed * this prevents errors when a user performs multiple tx per block possibly with varying gas prices */ function withdraw( address _lpToken, uint256 _index, uint256 _lockID, uint256 _amount ) external; /** * @notice increase the amount of tokens per a specific lock, this is preferable to creating a new lock, less fees, and faster loading on our live block explorer */ function incrementLock( address _lpToken, uint256 _index, uint256 _lockID, uint256 _amount ) external; /** * @notice split a lock into two seperate locks, useful when a lock is about to expire and youd like to relock a portion * and withdraw a smaller portion */ function splitLock( address _lpToken, uint256 _index, uint256 _lockID, uint256 _amount ) external payable; /** * @notice transfer a lock to a new owner, e.g. presale project -> project owner */ function transferLockOwnership( address _lpToken, uint256 _index, uint256 _lockID, address payable _newOwner ) external; /** * @notice migrates liquidity to uniswap v3 */ function migrate( address _lpToken, uint256 _index, uint256 _lockID, uint256 _amount ) external; function getNumLocksForToken( address _lpToken ) external view returns (uint256); function getNumLockedTokens() external view returns (uint256); function getLockedTokenAtIndex( uint256 _index ) external view returns (address); // user functions function getUserNumLockedTokens( address _user ) external view returns (uint256); function getUserLockedTokenAtIndex( address _user, uint256 _index ) external view returns (address); function getUserNumLocksForToken( address _user, address _lpToken ) external view returns (uint256); function getUserLockForTokenAtIndex( address _user, address _lpToken, uint256 _index ) external view returns (uint256, uint256, uint256, uint256, uint256, address); // whitelist function getWhitelistedUsersLength() external view returns (uint256); function getWhitelistedUserAtIndex( uint256 _index ) external view returns (address); function getUserWhitelistStatus(address _user) external view returns (bool); }
pragma solidity >=0.6.2; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); }
pragma solidity >=0.6.2; import "./IUniswapV2Router01.sol"; interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; }
pragma solidity 0.8.21; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IWETH is IERC20 { function deposit() external payable; function withdraw(uint256 wad) external; }
pragma solidity 0.8.21; import "@openzeppelin/contracts/utils/Context.sol"; import "./IErrors.sol"; import "./Revert.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. * * By default, the owner account will be the one that deploys the contract. 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 IErrors, Revert, Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @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(CallerIsNotTheOwner.selector); } } /** * @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(CannotSetNewOwnerToTheZeroAddress.selector); } _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); } }
pragma solidity 0.8.21; import "./Ownable.sol"; /** * @dev Contract module which provides access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is specified at deployment time in the constructor for `Ownable`. This * can later be changed with {transferOwnership} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions * from parent (Ownable). */ abstract contract Ownable2Step is Ownable { address private _pendingOwner; event OwnershipTransferStarted( address indexed previousOwner, address indexed newOwner ); /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { return _pendingOwner; } /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. */ function transferOwnership( address newOwner ) public virtual override onlyOwner { _pendingOwner = newOwner; emit OwnershipTransferStarted(owner(), newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual override { delete _pendingOwner; super._transferOwnership(newOwner); } /** * @dev The new owner accepts the ownership transfer. */ function acceptOwnership() public virtual { address sender = _msgSender(); if (pendingOwner() != sender) { _revert(OwnableUnauthorizedAccount.selector); } _transferOwnership(sender); } }
pragma solidity 0.8.21; abstract contract Revert { /** * @dev For more efficient reverts. */ function _revert(bytes4 errorSelector) internal pure { assembly { mstore(0x00, errorSelector) revert(0x00, 0x04) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.21; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol"; import {Address} from "@openzeppelin/contracts/utils/Address.sol"; import "./IErrors.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 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 { using Address for address; /** * @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. */ 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 `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); if (oldAllowance < value) { revert IErrors.DecreasedAllowanceBelowZero(); } forceApprove(token, spender, oldAllowance - value); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to * 0 before setting it to a non-zero value. */ 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 Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); if (nonceAfter != (nonceBefore + 1)) { revert IErrors.PermitDidNotSucceed(); } } /** * @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). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall( data ); if ((returndata.length != 0) && !abi.decode(returndata, (bool))) { revert IErrors.OperationDidNotSucceed(); } } /** * @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 silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0; } }
{ "evmVersion": "paris", "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address[4]","name":"integrationAddresses_","type":"address[4]"},{"internalType":"bytes","name":"baseParams_","type":"bytes"},{"internalType":"bytes","name":"supplyParams_","type":"bytes"},{"internalType":"bytes","name":"taxParams_","type":"bytes"},{"internalType":"bytes","name":"poolParams_","type":"bytes"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AdapterParamsMustBeEmpty","type":"error"},{"inputs":[],"name":"AdditionToPoolIsBelowPerTransactionMinimum","type":"error"},{"inputs":[],"name":"AdditionToPoolWouldExceedPerAddressCap","type":"error"},{"inputs":[],"name":"AdditionToPoolWouldExceedPoolCap","type":"error"},{"inputs":[],"name":"AddressAlreadySet","type":"error"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"AllowanceDecreasedBelowZero","type":"error"},{"inputs":[],"name":"AlreadyInitialised","type":"error"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApproveFromTheZeroAddress","type":"error"},{"inputs":[],"name":"ApproveToTheZeroAddress","type":"error"},{"inputs":[],"name":"AuctionStatusIsNotEnded","type":"error"},{"inputs":[],"name":"AuctionStatusIsNotOpen","type":"error"},{"inputs":[{"internalType":"address[]","name":"modules","type":"address[]"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"txGas","type":"uint256"}],"name":"AuxCallFailed","type":"error"},{"inputs":[],"name":"BalanceMismatch","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"BidMustBeBelowTheFloorForRefundDuringAuction","type":"error"},{"inputs":[],"name":"BidMustBeBelowTheFloorWhenReducingQuantity","type":"error"},{"inputs":[{"internalType":"enum IErrors.BondingCurveErrorType","name":"error","type":"uint8"}],"name":"BondingCurveError","type":"error"},{"inputs":[],"name":"BurnExceedsBalance","type":"error"},{"inputs":[],"name":"BurnFromTheZeroAddress","type":"error"},{"inputs":[],"name":"CallerIsNotDepositBoxOwner","type":"error"},{"inputs":[],"name":"CallerIsNotFactory","type":"error"},{"inputs":[],"name":"CallerIsNotFactoryOrProjectOwner","type":"error"},{"inputs":[],"name":"CallerIsNotFactoryProjectOwnerOrPool","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"CallerIsNotPlatformAdmin","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"CallerIsNotSuperAdmin","type":"error"},{"inputs":[],"name":"CallerIsNotTheManager","type":"error"},{"inputs":[],"name":"CallerIsNotTheOwner","type":"error"},{"inputs":[],"name":"CallerMustBeLzApp","type":"error"},{"inputs":[],"name":"CanOnlyReduce","type":"error"},{"inputs":[],"name":"CannotAddLiquidityOnCreateAndUseDRIPool","type":"error"},{"inputs":[],"name":"CannotSetNewManagerToTheZeroAddress","type":"error"},{"inputs":[],"name":"CannotSetNewOwnerToTheZeroAddress","type":"error"},{"inputs":[],"name":"CannotSetToZeroAddress","type":"error"},{"inputs":[],"name":"CannotWithdrawThisToken","type":"error"},{"inputs":[],"name":"CollectionAlreadyRevealed","type":"error"},{"inputs":[],"name":"ContractIsDecommissioned","type":"error"},{"inputs":[],"name":"ContractIsNotPaused","type":"error"},{"inputs":[],"name":"ContractIsPaused","type":"error"},{"inputs":[],"name":"DecreasedAllowanceBelowZero","type":"error"},{"inputs":[],"name":"DeployerOnly","type":"error"},{"inputs":[],"name":"DeploymentError","type":"error"},{"inputs":[],"name":"DepositBoxIsNotOpen","type":"error"},{"inputs":[],"name":"DestinationIsNotTrustedSource","type":"error"},{"inputs":[],"name":"DriPoolAddressCannotBeAddressZero","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"GasLimitIsTooLow","type":"error"},{"inputs":[],"name":"IncorrectConfirmationValue","type":"error"},{"inputs":[],"name":"IncorrectPayment","type":"error"},{"inputs":[],"name":"InitialLiquidityAlreadyAdded","type":"error"},{"inputs":[],"name":"InitialLiquidityNotYetAdded","type":"error"},{"inputs":[],"name":"InsufficientAllowance","type":"error"},{"inputs":[],"name":"InvalidAdapterParams","type":"error"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[],"name":"InvalidEndpointCaller","type":"error"},{"inputs":[],"name":"InvalidMinGas","type":"error"},{"inputs":[],"name":"InvalidOracleSignature","type":"error"},{"inputs":[],"name":"InvalidPayload","type":"error"},{"inputs":[],"name":"InvalidReceiver","type":"error"},{"inputs":[],"name":"InvalidSourceSendingContract","type":"error"},{"inputs":[],"name":"InvalidTotalShares","type":"error"},{"inputs":[],"name":"LPLockUpMustFitUint88","type":"error"},{"inputs":[],"name":"LimitsCanOnlyBeRaised","type":"error"},{"inputs":[],"name":"LiquidityPoolCannotBeAddressZero","type":"error"},{"inputs":[],"name":"LiquidityPoolMustBeAContractAddress","type":"error"},{"inputs":[],"name":"ListLengthMismatch","type":"error"},{"inputs":[],"name":"MachineAddressCannotBeAddressZero","type":"error"},{"inputs":[],"name":"ManagerUnauthorizedAccount","type":"error"},{"inputs":[],"name":"MaxBidQuantityIs255","type":"error"},{"inputs":[{"internalType":"uint256","name":"requested","type":"uint256"},{"internalType":"uint256","name":"alreadyMinted","type":"uint256"},{"internalType":"uint256","name":"maxAllowance","type":"uint256"}],"name":"MaxPublicMintAllowanceExceeded","type":"error"},{"inputs":[],"name":"MaxSupplyTooHigh","type":"error"},{"inputs":[],"name":"MaxTokensPerTxnExceeded","type":"error"},{"inputs":[],"name":"MaxTokensPerWalletExceeded","type":"error"},{"inputs":[],"name":"MetadataIsLocked","type":"error"},{"inputs":[],"name":"MinGasLimitNotSet","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"MintingIsClosedForever","type":"error"},{"inputs":[],"name":"NewBuyTaxBasisPointsExceedsMaximum","type":"error"},{"inputs":[],"name":"NewSellTaxBasisPointsExceedsMaximum","type":"error"},{"inputs":[],"name":"NoETHForLiquidityPair","type":"error"},{"inputs":[],"name":"NoPaymentDue","type":"error"},{"inputs":[],"name":"NoRefundForCaller","type":"error"},{"inputs":[],"name":"NoStoredMessage","type":"error"},{"inputs":[],"name":"NoTokenForLiquidityPair","type":"error"},{"inputs":[],"name":"NoTrustedPathRecord","type":"error"},{"inputs":[],"name":"NothingToClaim","type":"error"},{"inputs":[],"name":"OperationDidNotSucceed","type":"error"},{"inputs":[],"name":"OracleSignatureHasExpired","type":"error"},{"inputs":[],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"ParamTooLargeEndDate","type":"error"},{"inputs":[],"name":"ParamTooLargeMinETH","type":"error"},{"inputs":[],"name":"ParamTooLargePerAddressMax","type":"error"},{"inputs":[],"name":"ParamTooLargePoolPerTxnMinETH","type":"error"},{"inputs":[],"name":"ParamTooLargePoolSupply","type":"error"},{"inputs":[],"name":"ParamTooLargeStartDate","type":"error"},{"inputs":[],"name":"ParamTooLargeVestingDays","type":"error"},{"inputs":[],"name":"ParametersDoNotMatchSignedMessage","type":"error"},{"inputs":[],"name":"PassedConfigDoesNotMatchApproved","type":"error"},{"inputs":[],"name":"PauseCutOffHasPassed","type":"error"},{"inputs":[],"name":"PaymentMustCoverPerMintFee","type":"error"},{"inputs":[],"name":"PermitDidNotSucceed","type":"error"},{"inputs":[],"name":"PlatformAdminCannotBeAddressZero","type":"error"},{"inputs":[],"name":"PlatformTreasuryCannotBeAddressZero","type":"error"},{"inputs":[],"name":"PoolIsAboveMinimum","type":"error"},{"inputs":[],"name":"PoolIsBelowMinimum","type":"error"},{"inputs":[],"name":"PoolPhaseIsClosed","type":"error"},{"inputs":[],"name":"PoolPhaseIsNotAfter","type":"error"},{"inputs":[],"name":"PoolVestingNotYetComplete","type":"error"},{"inputs":[],"name":"ProjectOwnerCannotBeAddressZero","type":"error"},{"inputs":[],"name":"ProofInvalid","type":"error"},{"inputs":[],"name":"QuantityExceedsMaxPossibleCollectionSupply","type":"error"},{"inputs":[],"name":"QuantityExceedsRemainingCollectionSupply","type":"error"},{"inputs":[],"name":"QuantityExceedsRemainingPhaseSupply","type":"error"},{"inputs":[],"name":"ReferralIdAlreadyUsed","type":"error"},{"inputs":[],"name":"RequestingMoreThanAvailableBalance","type":"error"},{"inputs":[{"internalType":"uint256","name":"previouslyMinted","type":"uint256"},{"internalType":"uint256","name":"requested","type":"uint256"},{"internalType":"uint256","name":"remainingAllocation","type":"uint256"}],"name":"RequestingMoreThanRemainingAllocation","type":"error"},{"inputs":[],"name":"RoyaltyFeeWillExceedSalePrice","type":"error"},{"inputs":[],"name":"ShareTotalCannotBeZero","type":"error"},{"inputs":[],"name":"SliceOutOfBounds","type":"error"},{"inputs":[],"name":"SliceOverflow","type":"error"},{"inputs":[],"name":"SuperAdminCannotBeAddressZero","type":"error"},{"inputs":[],"name":"SupplyTotalMismatch","type":"error"},{"inputs":[],"name":"SupportWindowIsNotOpen","type":"error"},{"inputs":[],"name":"TaxFreeAddressCannotBeAddressZero","type":"error"},{"inputs":[],"name":"TaxPeriodStillInForce","type":"error"},{"inputs":[],"name":"TemplateCannotBeAddressZero","type":"error"},{"inputs":[],"name":"TemplateNotFound","type":"error"},{"inputs":[],"name":"ThisMintIsClosed","type":"error"},{"inputs":[],"name":"TotalSharesMustMatchDenominator","type":"error"},{"inputs":[],"name":"TransferAmountExceedsBalance","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferFromZeroAddress","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"UnrecognisedVRFMode","type":"error"},{"inputs":[],"name":"VRFCoordinatorCannotBeAddressZero","type":"error"},{"inputs":[],"name":"ValueExceedsMaximum","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldThreshold","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newThreshold","type":"uint256"}],"name":"AutoSwapThresholdUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"identifier","type":"uint256"}],"name":"ExternalCallError","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenA","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenB","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lpToken","type":"uint256"}],"name":"InitialLiquidityAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldMaxTokensPerTransaction","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMaxTokensPerTransaction","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oldMaxTokensPerWallet","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMaxTokensPerWallet","type":"uint256"}],"name":"LimitsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lpTokens","type":"uint256"}],"name":"LiquidityBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lpTokens","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lpLockupInDays","type":"uint256"}],"name":"LiquidityLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addedPool","type":"address"}],"name":"LiquidityPoolAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addedPool","type":"address"}],"name":"LiquidityPoolCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"removedPool","type":"address"}],"name":"LiquidityPoolRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldBuyBasisPoints","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBuyBasisPoints","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oldSellBasisPoints","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newSellBasisPoints","type":"uint256"}],"name":"ProjectTaxBasisPointsChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"treasury","type":"address"}],"name":"ProjectTaxRecipientUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"RevenueAutoSwap","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addedUnlimted","type":"address"}],"name":"UnlimitedAddressAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"removedUnlimted","type":"address"}],"name":"UnlimitedAddressRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"addedValidCaller","type":"bytes32"}],"name":"ValidCallerAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"removedValidCaller","type":"bytes32"}],"name":"ValidCallerRemoved","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"lpLockupInDaysOverride_","type":"uint256"},{"internalType":"bool","name":"burnLPTokensOverride_","type":"bool"}],"name":"addInitialLiquidity","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newLiquidityPool_","type":"address"}],"name":"addLiquidityPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newUnlimited_","type":"address"}],"name":"addUnlimited","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newValidCallerHash_","type":"bytes32"}],"name":"addValidCaller","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"botProtectionDurationInSeconds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burnLPTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"distributeTaxTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"driPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundedDate","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"queryAddress_","type":"address"}],"name":"isLiquidityPool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"queryAddress_","type":"address"}],"name":"isUnlimited","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"queryHash_","type":"bytes32"}],"name":"isValidCaller","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"limitsEnforced","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquidityPools","outputs":[{"internalType":"address[]","name":"liquidityPools_","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpLockupInDays","outputs":[{"internalType":"uint88","name":"","type":"uint88"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTokensPerTransaction","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTokensPerWallet","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"projectBuyTaxBasisPoints","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"projectSellTaxBasisPoints","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"projectSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"projectSupplyRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"projectTaxPendingSwap","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"projectTaxRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"removedLiquidityPool_","type":"address"}],"name":"removeLiquidityPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"removedUnlimited_","type":"address"}],"name":"removeUnlimited","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"removedValidCallerHash_","type":"bytes32"}],"name":"removeValidCaller","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxTokensPerTransaction_","type":"uint256"},{"internalType":"uint256","name":"newMaxTokensPerWallet_","type":"uint256"}],"name":"setLimits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"newProjectBuyTaxBasisPoints_","type":"uint16"},{"internalType":"uint16","name":"newProjectSellTaxBasisPoints_","type":"uint16"}],"name":"setProjectTaxRates","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"projectTaxRecipient_","type":"address"}],"name":"setProjectTaxRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"swapThresholdBasisPoints_","type":"uint16"}],"name":"setSwapThresholdBasisPoints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapThresholdBasisPoints","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBuyTaxBasisPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSellTaxBasisPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapV2Pair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlimitedAddresses","outputs":[{"internalType":"address[]","name":"unlimitedAddresses_","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"validCallers","outputs":[{"internalType":"bytes32[]","name":"validCallerHashes_","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6101c060405260016002601a6101000a81548160ff0219169083151502179055503480156200002d57600080fd5b5060405162006c2f38038062006c2f833981810160405281019062000053919062001062565b62000073620000676200056d60201b60201c565b6200057560201b60201c565b620000a0856000600481106200008e576200008d62001167565b5b602002015185620005ae60201b60201c565b84600160048110620000b757620000b662001167565b5b602002015173ffffffffffffffffffffffffffffffffffffffff166101a08173ffffffffffffffffffffffffffffffffffffffff16815250508460026004811062000107576200010662001167565b5b602002015173ffffffffffffffffffffffffffffffffffffffff166101808173ffffffffffffffffffffffffffffffffffffffff168152505060008380602001905181019062000158919062001322565b9050600083806020019051810190620001729190620013da565b9050866003600481106200018b576200018a62001167565b5b602002015173ffffffffffffffffffffffffffffffffffffffff166101008173ffffffffffffffffffffffffffffffffffffffff1681525050620001ce62000d5c565b600073ffffffffffffffffffffffffffffffffffffffff1688600360048110620001fd57620001fc62001167565b5b602002015173ffffffffffffffffffffffffffffffffffffffff1614620002375783806020019051810190620002349190620014eb565b90505b6200024983826200060960201b60201c565b8260e0015173ffffffffffffffffffffffffffffffffffffffff166101408173ffffffffffffffffffffffffffffffffffffffff1681525050620002926200070d60201b60201c565b600a620002a09190620016ae565b8360200151620002b19190620016ff565b60808181525050620002c86200070d60201b60201c565b600a620002d69190620016ae565b8360400151620002e79190620016ff565b60a08181525050620002fe6200070d60201b60201c565b600a6200030c9190620016ae565b83606001516200031d9190620016ff565b600360106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550620003656200070d60201b60201c565b600a620003739190620016ae565b8360800151620003849190620016ff565b600360006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508260a00151600460146101000a8154816affffffffffffffffffffff02191690836affffffffffffffffffffff1602179055508260c0015160c0818152505082610100015173ffffffffffffffffffffffffffffffffffffffff166101208173ffffffffffffffffffffffffffffffffffffffff16815250508261012001516004601f6101000a81548160ff02191690831515021790555062000465826200071660201b60201c565b1515610160811515815250508160400151600260186101000a81548161ffff021916908361ffff1602179055508160600151600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506200051c60805160a051620004f16200070d60201b60201c565b600a620004ff9190620016ae565b8460000151620005109190620016ff565b6200078c60201b60201c565b6200052c620007ee60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff1660e08173ffffffffffffffffffffffffffffffffffffffff1681525050505050505050505062001d08565b600033905090565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055620005ab8162000a1b60201b60201c565b50565b620005bf826200057560201b60201c565b80806020019051810190620005d59190620017fe565b6006600060076000849190509081620005ef919062001ac4565b5083919050908162000602919062001ac4565b5050505050565b80600001518260400151836020015162000624919062001bab565b62000630919062001bab565b8260000151146200065457620006536361cf53d560e01b62000adf60201b60201c565b5b6fffffffffffffffffffffffffffffffff8016826000015111156200068c576200068b63fe8ee41e60e01b62000adf60201b60201c565b5b6affffffffffffffffffffff80168260a001511115620006bf57620006be63d1db63ab60e01b62000adf60201b60201c565b5b620006d98260e00151600e62000ae960201b90919060201c565b50620006f030600e62000ae960201b90919060201c565b50620007086000600e62000ae960201b90919060201c565b505050565b60006012905090565b600080826000015114801562000730575060008260200151145b1562000740576000905062000787565b8160000151600260146101000a81548161ffff021916908361ffff1602179055508160200151600260166101000a81548161ffff021916908361ffff160217905550600190505b919050565b6000831115620007a957620007a8308462000b2160201b60201c565b5b6000821115620007c957620007c8610140518362000b2160201b60201c565b5b6000811115620007e957620007e8610100518262000b2160201b60201c565b5b505050565b600080600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff161115620009e7576101a05173ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000878573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200089e919062001be6565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396306101a05173ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000909573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200092f919062001be6565b6040518363ffffffff1660e01b81526004016200094e92919062001c29565b6020604051808303816000875af11580156200096e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000994919062001be6565b9050620009ac81600c62000ae960201b90919060201c565b507f969ffc8569f9af3993220e04ac05164e5db4e3d9f8b1a47f64e7de9a04b8ea2f81604051620009de919062001c56565b60405180910390a15b62000a006101a051600e62000ae960201b90919060201c565b5062000a1781600e62000ae960201b90919060201c565b5090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8060005260046000fd5b600062000b19836000018373ffffffffffffffffffffffffffffffffffffffff1660001b62000cb560201b60201c565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160362000b6f5762000b6e632e07630060e01b62000adf60201b60201c565b5b62000b836000838362000d2f60201b60201c565b80600260008282829054906101000a90046fffffffffffffffffffffffffffffffff1662000bb2919062001c8f565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555080600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405162000c95919062001ceb565b60405180910390a362000cb16000838362000d3460201b60201c565b5050565b600062000cc9838362000d3960201b60201c565b62000d2457826000018290806001815401808255809150506001900390600052602060002001600090919091909150558260000180549050836001016000848152602001908152602001600020819055506001905062000d29565b600090505b92915050565b505050565b505050565b600080836001016000848152602001908152602001600020541415905092915050565b60405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b62000e058262000dba565b810181811067ffffffffffffffff8211171562000e275762000e2662000dcb565b5b80604052505050565b600062000e3c62000da1565b905062000e4a828262000dfa565b919050565b600067ffffffffffffffff82111562000e6d5762000e6c62000dcb565b5b602082029050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000eaa8262000e7d565b9050919050565b62000ebc8162000e9d565b811462000ec857600080fd5b50565b60008151905062000edc8162000eb1565b92915050565b600062000ef962000ef38462000e4f565b62000e30565b9050806020840283018581111562000f165762000f1562000e78565b5b835b8181101562000f43578062000f2e888262000ecb565b84526020840193505060208101905062000f18565b5050509392505050565b600082601f83011262000f655762000f6462000db5565b5b600462000f7484828562000ee2565b91505092915050565b600080fd5b600067ffffffffffffffff82111562000fa05762000f9f62000dcb565b5b62000fab8262000dba565b9050602081019050919050565b60005b8381101562000fd857808201518184015260208101905062000fbb565b60008484015250505050565b600062000ffb62000ff58462000f82565b62000e30565b9050828152602081018484840111156200101a576200101962000f7d565b5b6200102784828562000fb8565b509392505050565b600082601f83011262001047576200104662000db5565b5b81516200105984826020860162000fe4565b91505092915050565b6000806000806000610100868803121562001082576200108162000dab565b5b6000620010928882890162000f4d565b955050608086015167ffffffffffffffff811115620010b657620010b562000db0565b5b620010c4888289016200102f565b94505060a086015167ffffffffffffffff811115620010e857620010e762000db0565b5b620010f6888289016200102f565b93505060c086015167ffffffffffffffff8111156200111a576200111962000db0565b5b62001128888289016200102f565b92505060e086015167ffffffffffffffff8111156200114c576200114b62000db0565b5b6200115a888289016200102f565b9150509295509295909350565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b6000819050919050565b620011b0816200119b565b8114620011bc57600080fd5b50565b600081519050620011d081620011a5565b92915050565b60008115159050919050565b620011ed81620011d6565b8114620011f957600080fd5b50565b6000815190506200120d81620011e2565b92915050565b600061014082840312156200122d576200122c62001196565b5b6200123a61014062000e30565b905060006200124c84828501620011bf565b60008301525060206200126284828501620011bf565b60208301525060406200127884828501620011bf565b60408301525060606200128e84828501620011bf565b6060830152506080620012a484828501620011bf565b60808301525060a0620012ba84828501620011bf565b60a08301525060c0620012d084828501620011bf565b60c08301525060e0620012e68482850162000ecb565b60e083015250610100620012fd8482850162000ecb565b610100830152506101206200131584828501620011fc565b6101208301525092915050565b600061014082840312156200133c576200133b62000dab565b5b60006200134c8482850162001213565b91505092915050565b6000608082840312156200136e576200136d62001196565b5b6200137a608062000e30565b905060006200138c84828501620011bf565b6000830152506020620013a284828501620011bf565b6020830152506040620013b884828501620011bf565b6040830152506060620013ce8482850162000ecb565b60608301525092915050565b600060808284031215620013f357620013f262000dab565b5b6000620014038482850162001355565b91505092915050565b6000610100828403121562001426576200142562001196565b5b6200143361010062000e30565b905060006200144584828501620011bf565b60008301525060206200145b84828501620011bf565b60208301525060406200147184828501620011bf565b60408301525060606200148784828501620011bf565b60608301525060806200149d84828501620011bf565b60808301525060a0620014b384828501620011bf565b60a08301525060c0620014c984828501620011bf565b60c08301525060e0620014df84828501620011bf565b60e08301525092915050565b6000610100828403121562001505576200150462000dab565b5b600062001515848285016200140c565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008160011c9050919050565b6000808291508390505b6001851115620015ac578086048111156200158457620015836200151e565b5b6001851615620015945780820291505b8081029050620015a4856200154d565b945062001564565b94509492505050565b600082620015c757600190506200169a565b81620015d757600090506200169a565b8160018114620015f05760028114620015fb5762001631565b60019150506200169a565b60ff84111562001610576200160f6200151e565b5b8360020a9150848211156200162a57620016296200151e565b5b506200169a565b5060208310610133831016604e8410600b84101617156200166b5782820a9050838111156200166557620016646200151e565b5b6200169a565b6200167a84848460016200155a565b925090508184048111156200169457620016936200151e565b5b81810290505b9392505050565b600060ff82169050919050565b6000620016bb826200119b565b9150620016c883620016a1565b9250620016f77fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484620015b5565b905092915050565b60006200170c826200119b565b915062001719836200119b565b925082820262001729816200119b565b915082820484148315176200174357620017426200151e565b5b5092915050565b600067ffffffffffffffff82111562001768576200176762000dcb565b5b620017738262000dba565b9050602081019050919050565b60006200179762001791846200174a565b62000e30565b905082815260208101848484011115620017b657620017b562000f7d565b5b620017c384828562000fb8565b509392505050565b600082601f830112620017e357620017e262000db5565b5b8151620017f584826020860162001780565b91505092915050565b6000806040838503121562001818576200181762000dab565b5b600083015167ffffffffffffffff81111562001839576200183862000db0565b5b6200184785828601620017cb565b925050602083015167ffffffffffffffff8111156200186b576200186a62000db0565b5b6200187985828601620017cb565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620018d657607f821691505b602082108103620018ec57620018eb6200188e565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620019567fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262001917565b62001962868362001917565b95508019841693508086168417925050509392505050565b6000819050919050565b6000620019a56200199f62001999846200119b565b6200197a565b6200119b565b9050919050565b6000819050919050565b620019c18362001984565b620019d9620019d082620019ac565b84845462001924565b825550505050565b600090565b620019f0620019e1565b620019fd818484620019b6565b505050565b5b8181101562001a255762001a19600082620019e6565b60018101905062001a03565b5050565b601f82111562001a745762001a3e81620018f2565b62001a498462001907565b8101602085101562001a59578190505b62001a7162001a688562001907565b83018262001a02565b50505b505050565b600082821c905092915050565b600062001a996000198460080262001a79565b1980831691505092915050565b600062001ab4838362001a86565b9150826002028217905092915050565b62001acf8262001883565b67ffffffffffffffff81111562001aeb5762001aea62000dcb565b5b62001af78254620018bd565b62001b0482828562001a29565b600060209050601f83116001811462001b3c576000841562001b27578287015190505b62001b33858262001aa6565b86555062001ba3565b601f19841662001b4c86620018f2565b60005b8281101562001b765784890151825560018201915060208501945060208101905062001b4f565b8683101562001b96578489015162001b92601f89168262001a86565b8355505b6001600288020188555050505b505050505050565b600062001bb8826200119b565b915062001bc5836200119b565b925082820190508082111562001be05762001bdf6200151e565b5b92915050565b60006020828403121562001bff5762001bfe62000dab565b5b600062001c0f8482850162000ecb565b91505092915050565b62001c238162000e9d565b82525050565b600060408201905062001c40600083018562001c18565b62001c4f602083018462001c18565b9392505050565b600060208201905062001c6d600083018462001c18565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b600062001c9c8262001c73565b915062001ca98362001c73565b925082820190506fffffffffffffffffffffffffffffffff81111562001cd45762001cd36200151e565b5b92915050565b62001ce5816200119b565b82525050565b600060208201905062001d02600083018462001cda565b92915050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a051614e4c62001de360003960008181612754015281816127a001528181613585015281816135dd015281816136da015281816137b70152613b1101526000505060008181612c5d0152612d7901526000611f6b015260008181611f25015261290b0152600081816112e6015261181f0152600081816111b201528181611c47015281816128cf015281816129ca0152613473015260008181610f42015261126501526000611241015260006111580152614e4c6000f3fe6080604052600436106103855760003560e01c8063a1db9782116101d1578063d6efd7c311610102578063ee6a934c116100a0578063f444324b1161006f578063f444324b14610cf0578063f85aff9414610d1b578063fdd8840e14610d46578063ff0d7b9314610d715761038c565b8063ee6a934c14610c4a578063eeae0f9714610c73578063f14210a614610c9e578063f2fde38b14610cc75761038c565b8063e37d9e95116100dc578063e37d9e9514610b8e578063e85455d714610bb7578063ea8b242414610bf4578063eb95ca7014610c1f5761038c565b8063d6efd7c314610afb578063dd62ed3e14610b26578063e30c397814610b635761038c565b8063b0d750971161016f578063b6585dc611610149578063b6585dc614610a4e578063bb88603c14610a6a578063bfe3098f14610a95578063c4590d3f14610ad25761038c565b8063b0d75097146109cd578063b2c5c9eb146109f8578063b498d39f14610a235761038c565b8063a45cae02116101ab578063a45cae0214610911578063a8c2fb8e1461093c578063a9059cbb14610967578063ae22107f146109a45761038c565b8063a1db97821461086e578063a35b4cef14610897578063a457c2d7146108d45761038c565b806349bd5a5e116102b657806376abde00116102545780638da5cb5b116102235780638da5cb5b146107c6578063936b2934146107f157806395d89b411461081a5780639808751d146108455761038c565b806376abde001461073257806379ba50971461075d57806379cc6790146107745780638589287a1461079d5761038c565b806352d0b3851161029057806352d0b3851461068857806363a9c1f2146106b357806370a08231146106de578063715018a61461071b5761038c565b806349bd5a5e146106095780634bed5ad2146106345780634fadc7831461065f5761038c565b80632ead09551161032357806339509351116102fd578063395093511461054d5780633b22fc031461058a57806342966c68146105b5578063469132ce146105de5761038c565b80632ead0955146104e2578063313ce567146104f9578063326b3b8b146105245761038c565b806310b828c91161035f57806310b828c91461042457806318160ddd1461044f57806323b872dd1461047a57806329c6b348146104b75761038c565b8063038272b61461039157806306fdde03146103bc578063095ea7b3146103e75761038c565b3661038c57005b600080fd5b34801561039d57600080fd5b506103a6610d9a565b6040516103b39190613ef9565b60405180910390f35b3480156103c857600080fd5b506103d1610db6565b6040516103de9190613fa4565b60405180910390f35b3480156103f357600080fd5b5061040e60048036038101906104099190614055565b610e48565b60405161041b91906140b0565b60405180910390f35b34801561043057600080fd5b50610439610e6b565b60405161044691906140ea565b60405180910390f35b34801561045b57600080fd5b50610464610e81565b6040516104719190613ef9565b60405180910390f35b34801561048657600080fd5b506104a1600480360381019061049c9190614105565b610eb9565b6040516104ae91906140b0565b60405180910390f35b3480156104c357600080fd5b506104cc610f01565b6040516104d991906140b0565b60405180910390f35b3480156104ee57600080fd5b506104f7610fc0565b005b34801561050557600080fd5b5061050e61109b565b60405161051b9190614174565b60405180910390f35b34801561053057600080fd5b5061054b600480360381019061054691906141c9565b6110a4565b005b34801561055957600080fd5b50610574600480360381019061056f9190614055565b61111f565b60405161058191906140b0565b60405180910390f35b34801561059657600080fd5b5061059f611156565b6040516105ac9190613ef9565b60405180910390f35b3480156105c157600080fd5b506105dc60048036038101906105d791906141f6565b61117a565b005b3480156105ea57600080fd5b506105f361118e565b604051610600919061424e565b60405180910390f35b34801561061557600080fd5b5061061e6111b0565b60405161062b9190614278565b60405180910390f35b34801561064057600080fd5b506106496111d4565b60405161065691906142a2565b60405180910390f35b34801561066b57600080fd5b50610686600480360381019061068191906142bd565b6111e8565b005b34801561069457600080fd5b5061069d61123f565b6040516106aa9190613ef9565b60405180910390f35b3480156106bf57600080fd5b506106c8611263565b6040516106d59190613ef9565b60405180910390f35b3480156106ea57600080fd5b50610705600480360381019061070091906142bd565b611287565b6040516107129190613ef9565b60405180910390f35b34801561072757600080fd5b506107306112d0565b005b34801561073e57600080fd5b506107476112e4565b6040516107549190614278565b60405180910390f35b34801561076957600080fd5b50610772611308565b005b34801561078057600080fd5b5061079b60048036038101906107969190614055565b61136b565b005b3480156107a957600080fd5b506107c460048036038101906107bf9190614320565b61138b565b005b3480156107d257600080fd5b506107db6113e2565b6040516107e89190614278565b60405180910390f35b3480156107fd57600080fd5b506108186004803603810190610813919061434d565b61140b565b005b34801561082657600080fd5b5061082f6114ba565b60405161083c9190613fa4565b60405180910390f35b34801561085157600080fd5b5061086c600480360381019061086791906142bd565b61154c565b005b34801561087a57600080fd5b5061089560048036038101906108909190614055565b6115cf565b005b3480156108a357600080fd5b506108be60048036038101906108b991906142bd565b611651565b6040516108cb91906140b0565b60405180910390f35b3480156108e057600080fd5b506108fb60048036038101906108f69190614055565b61166e565b60405161090891906140b0565b60405180910390f35b34801561091d57600080fd5b506109266116bb565b60405161093391906142a2565b60405180910390f35b34801561094857600080fd5b506109516116cf565b60405161095e919061444b565b60405180910390f35b34801561097357600080fd5b5061098e60048036038101906109899190614055565b6116e0565b60405161099b91906140b0565b60405180910390f35b3480156109b057600080fd5b506109cb60048036038101906109c691906142bd565b61171c565b005b3480156109d957600080fd5b506109e2611773565b6040516109ef919061424e565b60405180910390f35b348015610a0457600080fd5b50610a0d611795565b604051610a1a91906142a2565b60405180910390f35b348015610a2f57600080fd5b50610a386117a9565b604051610a45919061452b565b60405180910390f35b610a686004803603810190610a639190614579565b6117ba565b005b348015610a7657600080fd5b50610a7f611957565b604051610a8c91906140b0565b60405180910390f35b348015610aa157600080fd5b50610abc6004803603810190610ab79190614320565b61196a565b604051610ac991906140b0565b60405180910390f35b348015610ade57600080fd5b50610af96004803603810190610af491906145b9565b611987565b005b348015610b0757600080fd5b50610b10611b2a565b604051610b1d919061444b565b60405180910390f35b348015610b3257600080fd5b50610b4d6004803603810190610b4891906145f9565b611b3b565b604051610b5a9190613ef9565b60405180910390f35b348015610b6f57600080fd5b50610b78611bc2565b604051610b859190614278565b60405180910390f35b348015610b9a57600080fd5b50610bb56004803603810190610bb09190614320565b611bec565b005b348015610bc357600080fd5b50610bde6004803603810190610bd991906142bd565b611c43565b604051610beb91906140b0565b60405180910390f35b348015610c0057600080fd5b50610c09611cb6565b604051610c169190614278565b60405180910390f35b348015610c2b57600080fd5b50610c34611cdc565b604051610c41919061465f565b60405180910390f35b348015610c5657600080fd5b50610c716004803603810190610c6c91906142bd565b611cf9565b005b348015610c7f57600080fd5b50610c88611dc5565b604051610c959190613ef9565b60405180910390f35b348015610caa57600080fd5b50610cc56004803603810190610cc091906141f6565b611de1565b005b348015610cd357600080fd5b50610cee6004803603810190610ce991906142bd565b611e76565b005b348015610cfc57600080fd5b50610d05611f23565b604051610d129190614278565b60405180910390f35b348015610d2757600080fd5b50610d30611f47565b604051610d3d919061424e565b60405180910390f35b348015610d5257600080fd5b50610d5b611f69565b604051610d689190614278565b60405180910390f35b348015610d7d57600080fd5b50610d986004803603810190610d9391906142bd565b611f8d565b005b6000600260169054906101000a900461ffff1661ffff16905090565b606060068054610dc5906146a9565b80601f0160208091040260200160405190810160405280929190818152602001828054610df1906146a9565b8015610e3e5780601f10610e1357610100808354040283529160200191610e3e565b820191906000526020600020905b815481529060010190602001808311610e2157829003601f168201915b5050505050905090565b600080610e53611fe4565b9050610e60818585611fec565b600191505092915050565b600260109054906101000a900463ffffffff1681565b6000600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16905090565b600080610ec4611fe4565b9050610ed1858285612161565b610ef5858585610ee089611c43565b80610ef05750610eef88611c43565b5b6121c3565b60019150509392505050565b60008073ffffffffffffffffffffffffffffffffffffffff16610f226113e2565b73ffffffffffffffffffffffffffffffffffffffff16148015610f8757507f0000000000000000000000000000000000000000000000000000000000000000600260109054906101000a900463ffffffff1663ffffffff16610f849190614709565b42115b80610faa57506000600260109054906101000a900463ffffffff1663ffffffff16145b15610fb85760009050610fbd565b600190505b90565b6000600560009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff161115611099576000600560009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1690506000600560006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555061109730600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360006121c3565b505b565b60006012905090565b6110ac61231f565b6000600260189054906101000a900461ffff1661ffff16905081600260186101000a81548161ffff021916908361ffff1602179055507fe4351c45b53ffb7ebad0b66cc0f1a3dfe2963c099421eeaded141104df39206a8183604051611113929190614778565b60405180910390a15050565b60008061112a611fe4565b905061114b81858561113c8589611b3b565b6111469190614709565b611fec565b600191505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b61118b611185611fe4565b82612373565b50565b600360109054906101000a90046fffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b600260189054906101000a900461ffff1681565b6111f061231f565b61120481600e61253890919063ffffffff16565b507f59129d668a515d00b1370a4f7946e33e4e37ba79d4a0c38d68053f136f6f40fd816040516112349190614278565b60405180910390a150565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6112d861231f565b6112e26000612568565b565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000611312611fe4565b90508073ffffffffffffffffffffffffffffffffffffffff16611333611bc2565b73ffffffffffffffffffffffffffffffffffffffff161461135f5761135e6312b0c50060e01b612599565b5b61136881612568565b50565b61137d82611377611fe4565b83612161565b6113878282612373565b5050565b61139361231f565b6113a781600a6125a390919063ffffffff16565b507fdd5aeaec2032ed464aed048b9014721d48de827cef3d77f78f0a76f1f0136dd4816040516113d791906147b0565b60405180910390a150565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61141361231f565b6000600260149054906101000a900461ffff1690506000600260169054906101000a900461ffff16905083600260146101000a81548161ffff021916908361ffff16021790555082600260166101000a81548161ffff021916908361ffff1602179055507f8da1f77a22734510b762a9625e69e737d7c0cc48984e810e5802fb341eb80a3e828583866040516114ac94939291906147cb565b60405180910390a150505050565b6060600780546114c9906146a9565b80601f01602080910402602001604051908101604052809291908181526020018280546114f5906146a9565b80156115425780601f1061151757610100808354040283529160200191611542565b820191906000526020600020905b81548152906001019060200180831161152557829003601f168201915b5050505050905090565b61155461231f565b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fa4eea51cd2f21eac6612ba054a363ae2fd59698fc258ab414313cd73f69f2b85816040516115c49190614278565b60405180910390a150565b6115d761231f565b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361161b5761161a63992501b360e01b612599565b5b61164d611626611fe4565b828473ffffffffffffffffffffffffffffffffffffffff166125ba9092919063ffffffff16565b5050565b600061166782600e61263990919063ffffffff16565b9050919050565b600080611679611fe4565b905060006116878286611b3b565b9050838110156116a2576116a163f6ab236a60e01b612599565b5b6116af8286868403611fec565b60019250505092915050565b600260149054906101000a900461ffff1681565b60606116db600e612669565b905090565b6000806116eb611fe4565b90506117118185856116fc85611c43565b8061170c575061170b88611c43565b5b6121c3565b600191505092915050565b61172461231f565b61173881600c61268a90919063ffffffff16565b507f59c3fbcae88f30e9b0e35c132a7f68c53231dffa4722f197c7ecb0ee013eee60816040516117689190614278565b60405180910390a150565b600560009054906101000a90046fffffffffffffffffffffffffffffffff1681565b600260169054906101000a900461ffff1681565b60606117b5600a6126ba565b905090565b6117c2611fe4565b73ffffffffffffffffffffffffffffffffffffffff166117e06113e2565b73ffffffffffffffffffffffffffffffffffffffff16141580156118575750611807611fe4565b73ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614155b1561186d5761186c63a1c4bd5060e01b612599565b5b60008015156004601f9054906101000a900460ff161515148015611895575060011515821515145b156118b65760016004601f6101000a81548160ff0219169083151502179055505b6004601f9054906101000a900460ff1680156118d25750600034145b156118e8576118e763796017ae60e01b612599565b5b349050600460149054906101000a90046affffffffffffffffffffff166affffffffffffffffffffff168311156119495782600460146101000a8154816affffffffffffffffffffff02191690836affffffffffffffffffffff1602179055505b611952816126db565b505050565b6004601f9054906101000a900460ff1681565b600061198082600a61299390919063ffffffff16565b9050919050565b61198f61231f565b6000600360009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1690506000600360109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff169050600082148015611a0a575060008414155b80611a225750600081148015611a21575060008314155b5b15611a3857611a3763533ce78660e01b612599565b5b60008414158015611a4857508184105b80611a5f575060008314158015611a5e57508083105b5b15611a7557611a7463533ce78660e01b612599565b5b83600360006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555082600360106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055507fe3eb5d4eccdae2d96efa105f65c8db865f9fc72984f2b879a27448fed50d181582858386604051611b1c9493929190614810565b60405180910390a150505050565b6060611b36600c612669565b905090565b6000600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611bf461231f565b611c0881600a6129aa90919063ffffffff16565b507ff7d7abaf8b0e82705f2ef671054dd11a306d870da0bbb8be1ff24bd0096de7ba81604051611c3891906147b0565b60405180910390a150565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480611caf5750611cae82600c61263990919063ffffffff16565b5b9050919050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460149054906101000a90046affffffffffffffffffffff1681565b611d0161231f565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611d4657611d4563b47cdee560e01b612599565b5b60008173ffffffffffffffffffffffffffffffffffffffff163b03611d7657611d7563f9da0c7060e01b612599565b5b611d8a81600c61253890919063ffffffff16565b507fb893f883ef734b712208a877459424ee509832c57e0461fb1ac99ed4d42f2d8981604051611dba9190614278565b60405180910390a150565b6000600260149054906101000a900461ffff1661ffff16905090565b611de961231f565b6000611df3611fe4565b73ffffffffffffffffffffffffffffffffffffffff1682604051611e1690614886565b60006040518083038185875af1925050503d8060008114611e53576040519150601f19603f3d011682016040523d82523d6000602084013e611e58565b606091505b5050905080611e7257611e716390b8ec1860e01b612599565b5b5050565b611e7e61231f565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16611ede6113e2565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b7f000000000000000000000000000000000000000000000000000000000000000081565b600360009054906101000a90046fffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b611f9561231f565b611fa981600e61268a90919063ffffffff16565b507fb2ed7b6d5164de63737cc48d793bf899607480780433a1a2eb2b7b99dec2732081604051611fd99190614278565b60405180910390a150565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036120315761203063adfb5cca60e01b612599565b5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036120765761207563b2fa1ef360e01b612599565b5b80600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516121549190613ef9565b60405180910390a3505050565b600061216d8484611b3b565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146121bd57818110156121af576121ae6313be252b60e01b612599565b5b6121bc8484848403611fec565b5b50505050565b6121ce8484846129c1565b60006121db8585856129c6565b90506121e78585612c5b565b60006121f583868887612d72565b905061220286868361302b565b838261220e919061489b565b600860008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546122a09190614709565b925050819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516123049190613ef9565b60405180910390a3612317868686613119565b505050505050565b612327611fe4565b73ffffffffffffffffffffffffffffffffffffffff166123456113e2565b73ffffffffffffffffffffffffffffffffffffffff161461237157612370633e8be92f60e01b612599565b5b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036123b8576123b7634fca6bd060e01b612599565b5b6123c4826000836129c1565b6000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156124215761242063588569f760e01b612599565b5b818103600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600260008282829054906101000a90046fffffffffffffffffffffffffffffffff160392506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161251f9190613ef9565b60405180910390a361253383600084613119565b505050565b6000612560836000018373ffffffffffffffffffffffffffffffffffffffff1660001b61311e565b905092915050565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556125968161318e565b50565b8060005260046000fd5b60006125b28360000183613252565b905092915050565b612634838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040516024016125ed9291906148cf565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613366565b505050565b6000612661836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6133f2565b905092915050565b6060600061267983600001613415565b905060608190508092505050919050565b60006126b2836000018373ffffffffffffffffffffffffffffffffffffffff1660001b613252565b905092915050565b606060006126ca83600001613415565b905060608190508092505050919050565b6000600260109054906101000a900463ffffffff1663ffffffff161461270c5761270b63b1f3376760e01b612599565b5b42600260106101000a81548163ffffffff021916908363ffffffff160217905550600061273830611287565b0361274e5761274d6361b0df6260e01b612599565b5b612799307f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff611fec565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f305d71985306127e530611287565b60008030426040518863ffffffff1660e01b815260040161280b96959493929190614933565b60606040518083038185885af1158015612829573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061284e91906149a9565b9250925092507fbf59dda00152e02f20e18cab7307c8afe0714e7f69cf24a1377cbbddcb40f9bb838383604051612887939291906149fc565b60405180910390a160006002601a6101000a81548160ff0219169083151502179055506004601f9054906101000a900460ff16156128cd576128c881613471565b61298d565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb7f0000000000000000000000000000000000000000000000000000000000000000836040518363ffffffff1660e01b81526004016129489291906148cf565b6020604051808303816000875af1158015612967573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061298b9190614a48565b505b50505050565b60006129a283600001836133f2565b905092915050565b60006129b9836000018361311e565b905092915050565b505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015612a4f57503073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015612a7357506000600260109054906101000a900463ffffffff1663ffffffff16145b15612a8957612a8863365c2d1460e01b612599565b5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603612ace57612acd63160fca8a60e01b612599565b5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612b1357612b1263ea553b3460e01b612599565b5b600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015612b6e57612b6d635dd58b8b60e01b612599565b5b612b76610f01565b8015612bb357506000600360009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1614155b8015612bf85750612bc384611c43565b8015612bd55750612bd383611651565b155b80612bf75750612be483611c43565b8015612bf65750612bf484611651565b155b5b5b15612c5457600064174876e800600360009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1601905080831115612c5257612c5163bd73d7ce60e01b612599565b5b505b9392505050565b7f000000000000000000000000000000000000000000000000000000000000000015612d6e576000612c8c30611287565b905060008190506000612710600260189054906101000a900461ffff1661ffff16600260009054906101000a90046fffffffffffffffffffffffffffffffff16612cd69190614a75565b6fffffffffffffffffffffffffffffffff16612cf29190614ae1565b9050612d008585848461354b565b15612d6a5760016002601a6101000a81548160ff021916908315150217905550601481612d2d9190614b12565b821115612d4457601481612d419190614b12565b91505b612d4e8284613636565b60006002601a6101000a81548160ff0219169083151502179055505b5050505b5050565b60008190507f00000000000000000000000000000000000000000000000000000000000000008015612da15750845b8015612dba57506002601a9054906101000a900460ff16155b15613023576000612dca85611c43565b8015612ddd57506000612ddb610d9a565b115b15612e92576000600260169054906101000a900461ffff1661ffff161115612e8d576000612710600260169054906101000a900461ffff1661ffff16850281612e2957612e28614ab2565b5b04905080600560008282829054906101000a90046fffffffffffffffffffffffffffffffff160192506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508082019150505b612f60565b612e9b84611c43565b8015612eae57506000612eac611dc5565b115b15612f5f576000600260149054906101000a900461ffff1661ffff161115612f5e576000612710600260149054906101000a900461ffff1661ffff16850281612efa57612ef9614ab2565b5b04905080600560008282829054906101000a90046fffffffffffffffffffffffffffffffff160192506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508082019150505b5b5b60008111156130215780600860003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055503073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516130139190613ef9565b60405180910390a380820391505b505b949350505050565b613033610f01565b801561307057506000600360109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1614155b8015613082575061308082611651565b155b80156130a5575061309283611c43565b80156130a457506130a282611651565b155b5b1561311457600064174876e800600360109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16019050806130f084611287565b836130fb9190614709565b111561311257613111637602d4da60e01b612599565b5b505b505050565b505050565b600061312a83836133f2565b613183578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050613188565b600090505b92915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808360010160008481526020019081526020016000205490506000811461335a576000600182613284919061489b565b905060006001866000018054905061329c919061489b565b905080821461330b5760008660000182815481106132bd576132bc614b54565b5b90600052602060002001549050808760000184815481106132e1576132e0614b54565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b8560000180548061331f5761331e614b83565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050613360565b60009150505b92915050565b6000613391828473ffffffffffffffffffffffffffffffffffffffff16613d2990919063ffffffff16565b905060008151141580156133b65750808060200190518101906133b49190614a48565b155b156133ed576040517f08575cad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b600080836001016000848152602001908152602001600020541415905092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561346557602002820191906000526020600020905b815481526020019060010190808311613451575b50505050509050919050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000836040518363ffffffff1660e01b81526004016134cd9291906148cf565b6020604051808303816000875af11580156134ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135109190614a48565b507f781a9d251db551fc7922f7facbbe49bc3fd61d3e236a8dafa34afd0539ebfa72816040516135409190613ef9565b60405180910390a150565b600081831015801561356a57506002601a9054906101000a900460ff16155b801561357c575061357a85611c43565b155b80156135d457507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b801561362c57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b9050949350505050565b60004790506000600267ffffffffffffffff81111561365857613657614bb2565b5b6040519080825280602002602001820160405280156136865781602001602082028036833780820191505090505b509050308160008151811061369e5761369d614b54565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015613743573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137679190614bf6565b8160018151811061377b5761377a614b54565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663791ac9478560008430610258426138049190614709565b6040518663ffffffff1660e01b8152600401613824959493929190614c23565b600060405180830381600087803b15801561383e57600080fd5b505af192505050801561384f575060015b613890577f60dc41faad9fe4f70f304dcef26d96d71e98ec8e21e4a340921d94dfe46307dc60056040516138839190614cb8565b60405180910390a1613d23565b6000479050600083826138a3919061489b565b90506000600560009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff169050600081600560009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16846139199190614b12565b6139239190614ae1565b9050868810156139db578688600560009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1661396a9190614b12565b6139749190614ae1565b600560008282829054906101000a90046fffffffffffffffffffffffffffffffff166139a09190614cd3565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550613a16565b6000600560006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055505b600080600080841115613d1b57600061c3501480613a3557505a61c350115b613a415761c350613a43565b5a5b9050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16848290604051613a8d90614886565b600060405180830381858888f193505050503d8060008114613acb576040519150601f19603f3d011682016040523d82523d6000602084013e613ad0565b606091505b50508093505082613d1a57600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603613ba1577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015613b7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b9e9190614bf6565b91505b8173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b158015613be957600080fd5b505af193505050508015613bfb575060015b613c3c577f60dc41faad9fe4f70f304dcef26d96d71e98ec8e21e4a340921d94dfe46307dc6002604051613c2f9190614d52565b60405180910390a1613d19565b8173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16866040518363ffffffff1660e01b8152600401613c999291906148cf565b6020604051808303816000875af1925050508015613cd557506040513d601f19601f82011682018060405250810190613cd29190614a48565b60015b613d16577f60dc41faad9fe4f70f304dcef26d96d71e98ec8e21e4a340921d94dfe46307dc6001604051613d099190614da8565b60405180910390a1613d18565b505b5b5b5b505050505050505b50505050565b6060613d3783836000613d3f565b905092915050565b606081471015613d8657306040517fcd786059000000000000000000000000000000000000000000000000000000008152600401613d7d9190614278565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff168486604051613daf9190614dff565b60006040518083038185875af1925050503d8060008114613dec576040519150601f19603f3d011682016040523d82523d6000602084013e613df1565b606091505b5091509150613e01868383613e0c565b925050509392505050565b606082613e2157613e1c82613e9b565b613e93565b60008251148015613e49575060008473ffffffffffffffffffffffffffffffffffffffff163b145b15613e8b57836040517f9996b315000000000000000000000000000000000000000000000000000000008152600401613e829190614278565b60405180910390fd5b819050613e94565b5b9392505050565b600081511115613eae5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000819050919050565b613ef381613ee0565b82525050565b6000602082019050613f0e6000830184613eea565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613f4e578082015181840152602081019050613f33565b60008484015250505050565b6000601f19601f8301169050919050565b6000613f7682613f14565b613f808185613f1f565b9350613f90818560208601613f30565b613f9981613f5a565b840191505092915050565b60006020820190508181036000830152613fbe8184613f6b565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613ff682613fcb565b9050919050565b61400681613feb565b811461401157600080fd5b50565b60008135905061402381613ffd565b92915050565b61403281613ee0565b811461403d57600080fd5b50565b60008135905061404f81614029565b92915050565b6000806040838503121561406c5761406b613fc6565b5b600061407a85828601614014565b925050602061408b85828601614040565b9150509250929050565b60008115159050919050565b6140aa81614095565b82525050565b60006020820190506140c560008301846140a1565b92915050565b600063ffffffff82169050919050565b6140e4816140cb565b82525050565b60006020820190506140ff60008301846140db565b92915050565b60008060006060848603121561411e5761411d613fc6565b5b600061412c86828701614014565b935050602061413d86828701614014565b925050604061414e86828701614040565b9150509250925092565b600060ff82169050919050565b61416e81614158565b82525050565b60006020820190506141896000830184614165565b92915050565b600061ffff82169050919050565b6141a68161418f565b81146141b157600080fd5b50565b6000813590506141c38161419d565b92915050565b6000602082840312156141df576141de613fc6565b5b60006141ed848285016141b4565b91505092915050565b60006020828403121561420c5761420b613fc6565b5b600061421a84828501614040565b91505092915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61424881614223565b82525050565b6000602082019050614263600083018461423f565b92915050565b61427281613feb565b82525050565b600060208201905061428d6000830184614269565b92915050565b61429c8161418f565b82525050565b60006020820190506142b76000830184614293565b92915050565b6000602082840312156142d3576142d2613fc6565b5b60006142e184828501614014565b91505092915050565b6000819050919050565b6142fd816142ea565b811461430857600080fd5b50565b60008135905061431a816142f4565b92915050565b60006020828403121561433657614335613fc6565b5b60006143448482850161430b565b91505092915050565b6000806040838503121561436457614363613fc6565b5b6000614372858286016141b4565b9250506020614383858286016141b4565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6143c281613feb565b82525050565b60006143d483836143b9565b60208301905092915050565b6000602082019050919050565b60006143f88261438d565b6144028185614398565b935061440d836143a9565b8060005b8381101561443e57815161442588826143c8565b9750614430836143e0565b925050600181019050614411565b5085935050505092915050565b6000602082019050818103600083015261446581846143ed565b905092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6144a2816142ea565b82525050565b60006144b48383614499565b60208301905092915050565b6000602082019050919050565b60006144d88261446d565b6144e28185614478565b93506144ed83614489565b8060005b8381101561451e57815161450588826144a8565b9750614510836144c0565b9250506001810190506144f1565b5085935050505092915050565b6000602082019050818103600083015261454581846144cd565b905092915050565b61455681614095565b811461456157600080fd5b50565b6000813590506145738161454d565b92915050565b600080604083850312156145905761458f613fc6565b5b600061459e85828601614040565b92505060206145af85828601614564565b9150509250929050565b600080604083850312156145d0576145cf613fc6565b5b60006145de85828601614040565b92505060206145ef85828601614040565b9150509250929050565b600080604083850312156146105761460f613fc6565b5b600061461e85828601614014565b925050602061462f85828601614014565b9150509250929050565b60006affffffffffffffffffffff82169050919050565b61465981614639565b82525050565b60006020820190506146746000830184614650565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806146c157607f821691505b6020821081036146d4576146d361467a565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061471482613ee0565b915061471f83613ee0565b9250828201905080821115614737576147366146da565b5b92915050565b6000819050919050565b600061476261475d6147588461418f565b61473d565b613ee0565b9050919050565b61477281614747565b82525050565b600060408201905061478d6000830185613eea565b61479a6020830184614769565b9392505050565b6147aa816142ea565b82525050565b60006020820190506147c560008301846147a1565b92915050565b60006080820190506147e06000830187614769565b6147ed6020830186614769565b6147fa6040830185614769565b6148076060830184614769565b95945050505050565b60006080820190506148256000830187613eea565b6148326020830186613eea565b61483f6040830185613eea565b61484c6060830184613eea565b95945050505050565b600081905092915050565b50565b6000614870600083614855565b915061487b82614860565b600082019050919050565b600061489182614863565b9150819050919050565b60006148a682613ee0565b91506148b183613ee0565b92508282039050818111156148c9576148c86146da565b5b92915050565b60006040820190506148e46000830185614269565b6148f16020830184613eea565b9392505050565b6000819050919050565b600061491d614918614913846148f8565b61473d565b613ee0565b9050919050565b61492d81614902565b82525050565b600060c0820190506149486000830189614269565b6149556020830188613eea565b6149626040830187614924565b61496f6060830186614924565b61497c6080830185614269565b61498960a0830184613eea565b979650505050505050565b6000815190506149a381614029565b92915050565b6000806000606084860312156149c2576149c1613fc6565b5b60006149d086828701614994565b93505060206149e186828701614994565b92505060406149f286828701614994565b9150509250925092565b6000606082019050614a116000830186613eea565b614a1e6020830185613eea565b614a2b6040830184613eea565b949350505050565b600081519050614a428161454d565b92915050565b600060208284031215614a5e57614a5d613fc6565b5b6000614a6c84828501614a33565b91505092915050565b6000614a8082614223565b9150614a8b83614223565b9250828202614a9981614223565b9150808214614aab57614aaa6146da565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000614aec82613ee0565b9150614af783613ee0565b925082614b0757614b06614ab2565b5b828204905092915050565b6000614b1d82613ee0565b9150614b2883613ee0565b9250828202614b3681613ee0565b91508282048414831517614b4d57614b4c6146da565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600081519050614bf081613ffd565b92915050565b600060208284031215614c0c57614c0b613fc6565b5b6000614c1a84828501614be1565b91505092915050565b600060a082019050614c386000830188613eea565b614c456020830187614924565b8181036040830152614c5781866143ed565b9050614c666060830185614269565b614c736080830184613eea565b9695505050505050565b6000819050919050565b6000614ca2614c9d614c9884614c7d565b61473d565b613ee0565b9050919050565b614cb281614c87565b82525050565b6000602082019050614ccd6000830184614ca9565b92915050565b6000614cde82614223565b9150614ce983614223565b925082820390506fffffffffffffffffffffffffffffffff811115614d1157614d106146da565b5b92915050565b6000819050919050565b6000614d3c614d37614d3284614d17565b61473d565b613ee0565b9050919050565b614d4c81614d21565b82525050565b6000602082019050614d676000830184614d43565b92915050565b6000819050919050565b6000614d92614d8d614d8884614d6d565b61473d565b613ee0565b9050919050565b614da281614d77565b82525050565b6000602082019050614dbd6000830184614d99565b92915050565b600081519050919050565b6000614dd982614dc3565b614de38185614855565b9350614df3818560208601613f30565b80840191505092915050565b6000614e0b8284614dce565b91508190509291505056fea2646970667358221220c3eed59fb286e38967af167e7b8a36f73873db6a09aaf644e2e04c0f7220b9ff64736f6c63430008150033000000000000000000000000d00ddeb3b1a1504aefeca8bdcd3b1a4f8f1ab2220000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003e000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000045949504900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000459495049000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000003b9aca00000000000000000000000000000000000000000000000000000000002faf0800000000000000000000000000000000000000000000000000000000000bebc20000000000000000000000000000000000000000000000000000000000000f42400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bbf81e00000000000000000000000000d00ddeb3b1a1504aefeca8bdcd3b1a4f8f1ab222000000000000000000000000d00ddeb3b1a1504aefeca8bdcd3b1a4f8f1ab2220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001f400000000000000000000000000000000000000000000000000000000000001f40000000000000000000000000000000000000000000000000000000000000005000000000000000000000000d00ddeb3b1a1504aefeca8bdcd3b1a4f8f1ab222000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106103855760003560e01c8063a1db9782116101d1578063d6efd7c311610102578063ee6a934c116100a0578063f444324b1161006f578063f444324b14610cf0578063f85aff9414610d1b578063fdd8840e14610d46578063ff0d7b9314610d715761038c565b8063ee6a934c14610c4a578063eeae0f9714610c73578063f14210a614610c9e578063f2fde38b14610cc75761038c565b8063e37d9e95116100dc578063e37d9e9514610b8e578063e85455d714610bb7578063ea8b242414610bf4578063eb95ca7014610c1f5761038c565b8063d6efd7c314610afb578063dd62ed3e14610b26578063e30c397814610b635761038c565b8063b0d750971161016f578063b6585dc611610149578063b6585dc614610a4e578063bb88603c14610a6a578063bfe3098f14610a95578063c4590d3f14610ad25761038c565b8063b0d75097146109cd578063b2c5c9eb146109f8578063b498d39f14610a235761038c565b8063a45cae02116101ab578063a45cae0214610911578063a8c2fb8e1461093c578063a9059cbb14610967578063ae22107f146109a45761038c565b8063a1db97821461086e578063a35b4cef14610897578063a457c2d7146108d45761038c565b806349bd5a5e116102b657806376abde00116102545780638da5cb5b116102235780638da5cb5b146107c6578063936b2934146107f157806395d89b411461081a5780639808751d146108455761038c565b806376abde001461073257806379ba50971461075d57806379cc6790146107745780638589287a1461079d5761038c565b806352d0b3851161029057806352d0b3851461068857806363a9c1f2146106b357806370a08231146106de578063715018a61461071b5761038c565b806349bd5a5e146106095780634bed5ad2146106345780634fadc7831461065f5761038c565b80632ead09551161032357806339509351116102fd578063395093511461054d5780633b22fc031461058a57806342966c68146105b5578063469132ce146105de5761038c565b80632ead0955146104e2578063313ce567146104f9578063326b3b8b146105245761038c565b806310b828c91161035f57806310b828c91461042457806318160ddd1461044f57806323b872dd1461047a57806329c6b348146104b75761038c565b8063038272b61461039157806306fdde03146103bc578063095ea7b3146103e75761038c565b3661038c57005b600080fd5b34801561039d57600080fd5b506103a6610d9a565b6040516103b39190613ef9565b60405180910390f35b3480156103c857600080fd5b506103d1610db6565b6040516103de9190613fa4565b60405180910390f35b3480156103f357600080fd5b5061040e60048036038101906104099190614055565b610e48565b60405161041b91906140b0565b60405180910390f35b34801561043057600080fd5b50610439610e6b565b60405161044691906140ea565b60405180910390f35b34801561045b57600080fd5b50610464610e81565b6040516104719190613ef9565b60405180910390f35b34801561048657600080fd5b506104a1600480360381019061049c9190614105565b610eb9565b6040516104ae91906140b0565b60405180910390f35b3480156104c357600080fd5b506104cc610f01565b6040516104d991906140b0565b60405180910390f35b3480156104ee57600080fd5b506104f7610fc0565b005b34801561050557600080fd5b5061050e61109b565b60405161051b9190614174565b60405180910390f35b34801561053057600080fd5b5061054b600480360381019061054691906141c9565b6110a4565b005b34801561055957600080fd5b50610574600480360381019061056f9190614055565b61111f565b60405161058191906140b0565b60405180910390f35b34801561059657600080fd5b5061059f611156565b6040516105ac9190613ef9565b60405180910390f35b3480156105c157600080fd5b506105dc60048036038101906105d791906141f6565b61117a565b005b3480156105ea57600080fd5b506105f361118e565b604051610600919061424e565b60405180910390f35b34801561061557600080fd5b5061061e6111b0565b60405161062b9190614278565b60405180910390f35b34801561064057600080fd5b506106496111d4565b60405161065691906142a2565b60405180910390f35b34801561066b57600080fd5b50610686600480360381019061068191906142bd565b6111e8565b005b34801561069457600080fd5b5061069d61123f565b6040516106aa9190613ef9565b60405180910390f35b3480156106bf57600080fd5b506106c8611263565b6040516106d59190613ef9565b60405180910390f35b3480156106ea57600080fd5b50610705600480360381019061070091906142bd565b611287565b6040516107129190613ef9565b60405180910390f35b34801561072757600080fd5b506107306112d0565b005b34801561073e57600080fd5b506107476112e4565b6040516107549190614278565b60405180910390f35b34801561076957600080fd5b50610772611308565b005b34801561078057600080fd5b5061079b60048036038101906107969190614055565b61136b565b005b3480156107a957600080fd5b506107c460048036038101906107bf9190614320565b61138b565b005b3480156107d257600080fd5b506107db6113e2565b6040516107e89190614278565b60405180910390f35b3480156107fd57600080fd5b506108186004803603810190610813919061434d565b61140b565b005b34801561082657600080fd5b5061082f6114ba565b60405161083c9190613fa4565b60405180910390f35b34801561085157600080fd5b5061086c600480360381019061086791906142bd565b61154c565b005b34801561087a57600080fd5b5061089560048036038101906108909190614055565b6115cf565b005b3480156108a357600080fd5b506108be60048036038101906108b991906142bd565b611651565b6040516108cb91906140b0565b60405180910390f35b3480156108e057600080fd5b506108fb60048036038101906108f69190614055565b61166e565b60405161090891906140b0565b60405180910390f35b34801561091d57600080fd5b506109266116bb565b60405161093391906142a2565b60405180910390f35b34801561094857600080fd5b506109516116cf565b60405161095e919061444b565b60405180910390f35b34801561097357600080fd5b5061098e60048036038101906109899190614055565b6116e0565b60405161099b91906140b0565b60405180910390f35b3480156109b057600080fd5b506109cb60048036038101906109c691906142bd565b61171c565b005b3480156109d957600080fd5b506109e2611773565b6040516109ef919061424e565b60405180910390f35b348015610a0457600080fd5b50610a0d611795565b604051610a1a91906142a2565b60405180910390f35b348015610a2f57600080fd5b50610a386117a9565b604051610a45919061452b565b60405180910390f35b610a686004803603810190610a639190614579565b6117ba565b005b348015610a7657600080fd5b50610a7f611957565b604051610a8c91906140b0565b60405180910390f35b348015610aa157600080fd5b50610abc6004803603810190610ab79190614320565b61196a565b604051610ac991906140b0565b60405180910390f35b348015610ade57600080fd5b50610af96004803603810190610af491906145b9565b611987565b005b348015610b0757600080fd5b50610b10611b2a565b604051610b1d919061444b565b60405180910390f35b348015610b3257600080fd5b50610b4d6004803603810190610b4891906145f9565b611b3b565b604051610b5a9190613ef9565b60405180910390f35b348015610b6f57600080fd5b50610b78611bc2565b604051610b859190614278565b60405180910390f35b348015610b9a57600080fd5b50610bb56004803603810190610bb09190614320565b611bec565b005b348015610bc357600080fd5b50610bde6004803603810190610bd991906142bd565b611c43565b604051610beb91906140b0565b60405180910390f35b348015610c0057600080fd5b50610c09611cb6565b604051610c169190614278565b60405180910390f35b348015610c2b57600080fd5b50610c34611cdc565b604051610c41919061465f565b60405180910390f35b348015610c5657600080fd5b50610c716004803603810190610c6c91906142bd565b611cf9565b005b348015610c7f57600080fd5b50610c88611dc5565b604051610c959190613ef9565b60405180910390f35b348015610caa57600080fd5b50610cc56004803603810190610cc091906141f6565b611de1565b005b348015610cd357600080fd5b50610cee6004803603810190610ce991906142bd565b611e76565b005b348015610cfc57600080fd5b50610d05611f23565b604051610d129190614278565b60405180910390f35b348015610d2757600080fd5b50610d30611f47565b604051610d3d919061424e565b60405180910390f35b348015610d5257600080fd5b50610d5b611f69565b604051610d689190614278565b60405180910390f35b348015610d7d57600080fd5b50610d986004803603810190610d9391906142bd565b611f8d565b005b6000600260169054906101000a900461ffff1661ffff16905090565b606060068054610dc5906146a9565b80601f0160208091040260200160405190810160405280929190818152602001828054610df1906146a9565b8015610e3e5780601f10610e1357610100808354040283529160200191610e3e565b820191906000526020600020905b815481529060010190602001808311610e2157829003601f168201915b5050505050905090565b600080610e53611fe4565b9050610e60818585611fec565b600191505092915050565b600260109054906101000a900463ffffffff1681565b6000600260009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16905090565b600080610ec4611fe4565b9050610ed1858285612161565b610ef5858585610ee089611c43565b80610ef05750610eef88611c43565b5b6121c3565b60019150509392505050565b60008073ffffffffffffffffffffffffffffffffffffffff16610f226113e2565b73ffffffffffffffffffffffffffffffffffffffff16148015610f8757507f00000000000000000000000000000000000000000000000000000000bbf81e00600260109054906101000a900463ffffffff1663ffffffff16610f849190614709565b42115b80610faa57506000600260109054906101000a900463ffffffff1663ffffffff16145b15610fb85760009050610fbd565b600190505b90565b6000600560009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff161115611099576000600560009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1690506000600560006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555061109730600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360006121c3565b505b565b60006012905090565b6110ac61231f565b6000600260189054906101000a900461ffff1661ffff16905081600260186101000a81548161ffff021916908361ffff1602179055507fe4351c45b53ffb7ebad0b66cc0f1a3dfe2963c099421eeaded141104df39206a8183604051611113929190614778565b60405180910390a15050565b60008061112a611fe4565b905061114b81858561113c8589611b3b565b6111469190614709565b611fec565b600191505092915050565b7f00000000000000000000000000000000000000000295be96e64066972000000081565b61118b611185611fe4565b82612373565b50565b600360109054906101000a90046fffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000abf4f4f5f9d1a41d04f2f8caac2fa778bc16c39b81565b600260189054906101000a900461ffff1681565b6111f061231f565b61120481600e61253890919063ffffffff16565b507f59129d668a515d00b1370a4f7946e33e4e37ba79d4a0c38d68053f136f6f40fd816040516112349190614278565b60405180910390a150565b7f000000000000000000000000000000000000000000a56fa5b99019a5c800000081565b7f00000000000000000000000000000000000000000000000000000000bbf81e0081565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6112d861231f565b6112e26000612568565b565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000611312611fe4565b90508073ffffffffffffffffffffffffffffffffffffffff16611333611bc2565b73ffffffffffffffffffffffffffffffffffffffff161461135f5761135e6312b0c50060e01b612599565b5b61136881612568565b50565b61137d82611377611fe4565b83612161565b6113878282612373565b5050565b61139361231f565b6113a781600a6125a390919063ffffffff16565b507fdd5aeaec2032ed464aed048b9014721d48de827cef3d77f78f0a76f1f0136dd4816040516113d791906147b0565b60405180910390a150565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61141361231f565b6000600260149054906101000a900461ffff1690506000600260169054906101000a900461ffff16905083600260146101000a81548161ffff021916908361ffff16021790555082600260166101000a81548161ffff021916908361ffff1602179055507f8da1f77a22734510b762a9625e69e737d7c0cc48984e810e5802fb341eb80a3e828583866040516114ac94939291906147cb565b60405180910390a150505050565b6060600780546114c9906146a9565b80601f01602080910402602001604051908101604052809291908181526020018280546114f5906146a9565b80156115425780601f1061151757610100808354040283529160200191611542565b820191906000526020600020905b81548152906001019060200180831161152557829003601f168201915b5050505050905090565b61155461231f565b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fa4eea51cd2f21eac6612ba054a363ae2fd59698fc258ab414313cd73f69f2b85816040516115c49190614278565b60405180910390a150565b6115d761231f565b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361161b5761161a63992501b360e01b612599565b5b61164d611626611fe4565b828473ffffffffffffffffffffffffffffffffffffffff166125ba9092919063ffffffff16565b5050565b600061166782600e61263990919063ffffffff16565b9050919050565b600080611679611fe4565b905060006116878286611b3b565b9050838110156116a2576116a163f6ab236a60e01b612599565b5b6116af8286868403611fec565b60019250505092915050565b600260149054906101000a900461ffff1681565b60606116db600e612669565b905090565b6000806116eb611fe4565b90506117118185856116fc85611c43565b8061170c575061170b88611c43565b5b6121c3565b600191505092915050565b61172461231f565b61173881600c61268a90919063ffffffff16565b507f59c3fbcae88f30e9b0e35c132a7f68c53231dffa4722f197c7ecb0ee013eee60816040516117689190614278565b60405180910390a150565b600560009054906101000a90046fffffffffffffffffffffffffffffffff1681565b600260169054906101000a900461ffff1681565b60606117b5600a6126ba565b905090565b6117c2611fe4565b73ffffffffffffffffffffffffffffffffffffffff166117e06113e2565b73ffffffffffffffffffffffffffffffffffffffff16141580156118575750611807611fe4565b73ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614155b1561186d5761186c63a1c4bd5060e01b612599565b5b60008015156004601f9054906101000a900460ff161515148015611895575060011515821515145b156118b65760016004601f6101000a81548160ff0219169083151502179055505b6004601f9054906101000a900460ff1680156118d25750600034145b156118e8576118e763796017ae60e01b612599565b5b349050600460149054906101000a90046affffffffffffffffffffff166affffffffffffffffffffff168311156119495782600460146101000a8154816affffffffffffffffffffff02191690836affffffffffffffffffffff1602179055505b611952816126db565b505050565b6004601f9054906101000a900460ff1681565b600061198082600a61299390919063ffffffff16565b9050919050565b61198f61231f565b6000600360009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1690506000600360109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff169050600082148015611a0a575060008414155b80611a225750600081148015611a21575060008314155b5b15611a3857611a3763533ce78660e01b612599565b5b60008414158015611a4857508184105b80611a5f575060008314158015611a5e57508083105b5b15611a7557611a7463533ce78660e01b612599565b5b83600360006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555082600360106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055507fe3eb5d4eccdae2d96efa105f65c8db865f9fc72984f2b879a27448fed50d181582858386604051611b1c9493929190614810565b60405180910390a150505050565b6060611b36600c612669565b905090565b6000600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611bf461231f565b611c0881600a6129aa90919063ffffffff16565b507ff7d7abaf8b0e82705f2ef671054dd11a306d870da0bbb8be1ff24bd0096de7ba81604051611c3891906147b0565b60405180910390a150565b60007f000000000000000000000000abf4f4f5f9d1a41d04f2f8caac2fa778bc16c39b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480611caf5750611cae82600c61263990919063ffffffff16565b5b9050919050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460149054906101000a90046affffffffffffffffffffff1681565b611d0161231f565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611d4657611d4563b47cdee560e01b612599565b5b60008173ffffffffffffffffffffffffffffffffffffffff163b03611d7657611d7563f9da0c7060e01b612599565b5b611d8a81600c61253890919063ffffffff16565b507fb893f883ef734b712208a877459424ee509832c57e0461fb1ac99ed4d42f2d8981604051611dba9190614278565b60405180910390a150565b6000600260149054906101000a900461ffff1661ffff16905090565b611de961231f565b6000611df3611fe4565b73ffffffffffffffffffffffffffffffffffffffff1682604051611e1690614886565b60006040518083038185875af1925050503d8060008114611e53576040519150601f19603f3d011682016040523d82523d6000602084013e611e58565b606091505b5050905080611e7257611e716390b8ec1860e01b612599565b5b5050565b611e7e61231f565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16611ede6113e2565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b7f000000000000000000000000d00ddeb3b1a1504aefeca8bdcd3b1a4f8f1ab22281565b600360009054906101000a90046fffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000d00ddeb3b1a1504aefeca8bdcd3b1a4f8f1ab22281565b611f9561231f565b611fa981600e61268a90919063ffffffff16565b507fb2ed7b6d5164de63737cc48d793bf899607480780433a1a2eb2b7b99dec2732081604051611fd99190614278565b60405180910390a150565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036120315761203063adfb5cca60e01b612599565b5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036120765761207563b2fa1ef360e01b612599565b5b80600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516121549190613ef9565b60405180910390a3505050565b600061216d8484611b3b565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146121bd57818110156121af576121ae6313be252b60e01b612599565b5b6121bc8484848403611fec565b5b50505050565b6121ce8484846129c1565b60006121db8585856129c6565b90506121e78585612c5b565b60006121f583868887612d72565b905061220286868361302b565b838261220e919061489b565b600860008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546122a09190614709565b925050819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516123049190613ef9565b60405180910390a3612317868686613119565b505050505050565b612327611fe4565b73ffffffffffffffffffffffffffffffffffffffff166123456113e2565b73ffffffffffffffffffffffffffffffffffffffff161461237157612370633e8be92f60e01b612599565b5b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036123b8576123b7634fca6bd060e01b612599565b5b6123c4826000836129c1565b6000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156124215761242063588569f760e01b612599565b5b818103600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600260008282829054906101000a90046fffffffffffffffffffffffffffffffff160392506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161251f9190613ef9565b60405180910390a361253383600084613119565b505050565b6000612560836000018373ffffffffffffffffffffffffffffffffffffffff1660001b61311e565b905092915050565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556125968161318e565b50565b8060005260046000fd5b60006125b28360000183613252565b905092915050565b612634838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040516024016125ed9291906148cf565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613366565b505050565b6000612661836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6133f2565b905092915050565b6060600061267983600001613415565b905060608190508092505050919050565b60006126b2836000018373ffffffffffffffffffffffffffffffffffffffff1660001b613252565b905092915050565b606060006126ca83600001613415565b905060608190508092505050919050565b6000600260109054906101000a900463ffffffff1663ffffffff161461270c5761270b63b1f3376760e01b612599565b5b42600260106101000a81548163ffffffff021916908363ffffffff160217905550600061273830611287565b0361274e5761274d6361b0df6260e01b612599565b5b612799307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff611fec565b60008060007f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff1663f305d71985306127e530611287565b60008030426040518863ffffffff1660e01b815260040161280b96959493929190614933565b60606040518083038185885af1158015612829573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061284e91906149a9565b9250925092507fbf59dda00152e02f20e18cab7307c8afe0714e7f69cf24a1377cbbddcb40f9bb838383604051612887939291906149fc565b60405180910390a160006002601a6101000a81548160ff0219169083151502179055506004601f9054906101000a900460ff16156128cd576128c881613471565b61298d565b7f000000000000000000000000abf4f4f5f9d1a41d04f2f8caac2fa778bc16c39b73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb7f000000000000000000000000d00ddeb3b1a1504aefeca8bdcd3b1a4f8f1ab222836040518363ffffffff1660e01b81526004016129489291906148cf565b6020604051808303816000875af1158015612967573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061298b9190614a48565b505b50505050565b60006129a283600001836133f2565b905092915050565b60006129b9836000018361311e565b905092915050565b505050565b60007f000000000000000000000000abf4f4f5f9d1a41d04f2f8caac2fa778bc16c39b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015612a4f57503073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015612a7357506000600260109054906101000a900463ffffffff1663ffffffff16145b15612a8957612a8863365c2d1460e01b612599565b5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603612ace57612acd63160fca8a60e01b612599565b5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612b1357612b1263ea553b3460e01b612599565b5b600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015612b6e57612b6d635dd58b8b60e01b612599565b5b612b76610f01565b8015612bb357506000600360009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1614155b8015612bf85750612bc384611c43565b8015612bd55750612bd383611651565b155b80612bf75750612be483611c43565b8015612bf65750612bf484611651565b155b5b5b15612c5457600064174876e800600360009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1601905080831115612c5257612c5163bd73d7ce60e01b612599565b5b505b9392505050565b7f000000000000000000000000000000000000000000000000000000000000000115612d6e576000612c8c30611287565b905060008190506000612710600260189054906101000a900461ffff1661ffff16600260009054906101000a90046fffffffffffffffffffffffffffffffff16612cd69190614a75565b6fffffffffffffffffffffffffffffffff16612cf29190614ae1565b9050612d008585848461354b565b15612d6a5760016002601a6101000a81548160ff021916908315150217905550601481612d2d9190614b12565b821115612d4457601481612d419190614b12565b91505b612d4e8284613636565b60006002601a6101000a81548160ff0219169083151502179055505b5050505b5050565b60008190507f00000000000000000000000000000000000000000000000000000000000000018015612da15750845b8015612dba57506002601a9054906101000a900460ff16155b15613023576000612dca85611c43565b8015612ddd57506000612ddb610d9a565b115b15612e92576000600260169054906101000a900461ffff1661ffff161115612e8d576000612710600260169054906101000a900461ffff1661ffff16850281612e2957612e28614ab2565b5b04905080600560008282829054906101000a90046fffffffffffffffffffffffffffffffff160192506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508082019150505b612f60565b612e9b84611c43565b8015612eae57506000612eac611dc5565b115b15612f5f576000600260149054906101000a900461ffff1661ffff161115612f5e576000612710600260149054906101000a900461ffff1661ffff16850281612efa57612ef9614ab2565b5b04905080600560008282829054906101000a90046fffffffffffffffffffffffffffffffff160192506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508082019150505b5b5b60008111156130215780600860003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055503073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516130139190613ef9565b60405180910390a380820391505b505b949350505050565b613033610f01565b801561307057506000600360109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1614155b8015613082575061308082611651565b155b80156130a5575061309283611c43565b80156130a457506130a282611651565b155b5b1561311457600064174876e800600360109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16019050806130f084611287565b836130fb9190614709565b111561311257613111637602d4da60e01b612599565b5b505b505050565b505050565b600061312a83836133f2565b613183578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050613188565b600090505b92915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808360010160008481526020019081526020016000205490506000811461335a576000600182613284919061489b565b905060006001866000018054905061329c919061489b565b905080821461330b5760008660000182815481106132bd576132bc614b54565b5b90600052602060002001549050808760000184815481106132e1576132e0614b54565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b8560000180548061331f5761331e614b83565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050613360565b60009150505b92915050565b6000613391828473ffffffffffffffffffffffffffffffffffffffff16613d2990919063ffffffff16565b905060008151141580156133b65750808060200190518101906133b49190614a48565b155b156133ed576040517f08575cad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b600080836001016000848152602001908152602001600020541415905092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561346557602002820191906000526020600020905b815481526020019060010190808311613451575b50505050509050919050565b7f000000000000000000000000abf4f4f5f9d1a41d04f2f8caac2fa778bc16c39b73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000836040518363ffffffff1660e01b81526004016134cd9291906148cf565b6020604051808303816000875af11580156134ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135109190614a48565b507f781a9d251db551fc7922f7facbbe49bc3fd61d3e236a8dafa34afd0539ebfa72816040516135409190613ef9565b60405180910390a150565b600081831015801561356a57506002601a9054906101000a900460ff16155b801561357c575061357a85611c43565b155b80156135d457507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b801561362c57507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b9050949350505050565b60004790506000600267ffffffffffffffff81111561365857613657614bb2565b5b6040519080825280602002602001820160405280156136865781602001602082028036833780820191505090505b509050308160008151811061369e5761369d614b54565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015613743573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137679190614bf6565b8160018151811061377b5761377a614b54565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff1663791ac9478560008430610258426138049190614709565b6040518663ffffffff1660e01b8152600401613824959493929190614c23565b600060405180830381600087803b15801561383e57600080fd5b505af192505050801561384f575060015b613890577f60dc41faad9fe4f70f304dcef26d96d71e98ec8e21e4a340921d94dfe46307dc60056040516138839190614cb8565b60405180910390a1613d23565b6000479050600083826138a3919061489b565b90506000600560009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff169050600081600560009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16846139199190614b12565b6139239190614ae1565b9050868810156139db578688600560009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1661396a9190614b12565b6139749190614ae1565b600560008282829054906101000a90046fffffffffffffffffffffffffffffffff166139a09190614cd3565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550613a16565b6000600560006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055505b600080600080841115613d1b57600061c3501480613a3557505a61c350115b613a415761c350613a43565b5a5b9050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16848290604051613a8d90614886565b600060405180830381858888f193505050503d8060008114613acb576040519150601f19603f3d011682016040523d82523d6000602084013e613ad0565b606091505b50508093505082613d1a57600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603613ba1577f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015613b7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b9e9190614bf6565b91505b8173ffffffffffffffffffffffffffffffffffffffff1663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b158015613be957600080fd5b505af193505050508015613bfb575060015b613c3c577f60dc41faad9fe4f70f304dcef26d96d71e98ec8e21e4a340921d94dfe46307dc6002604051613c2f9190614d52565b60405180910390a1613d19565b8173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16866040518363ffffffff1660e01b8152600401613c999291906148cf565b6020604051808303816000875af1925050508015613cd557506040513d601f19601f82011682018060405250810190613cd29190614a48565b60015b613d16577f60dc41faad9fe4f70f304dcef26d96d71e98ec8e21e4a340921d94dfe46307dc6001604051613d099190614da8565b60405180910390a1613d18565b505b5b5b5b505050505050505b50505050565b6060613d3783836000613d3f565b905092915050565b606081471015613d8657306040517fcd786059000000000000000000000000000000000000000000000000000000008152600401613d7d9190614278565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff168486604051613daf9190614dff565b60006040518083038185875af1925050503d8060008114613dec576040519150601f19603f3d011682016040523d82523d6000602084013e613df1565b606091505b5091509150613e01868383613e0c565b925050509392505050565b606082613e2157613e1c82613e9b565b613e93565b60008251148015613e49575060008473ffffffffffffffffffffffffffffffffffffffff163b145b15613e8b57836040517f9996b315000000000000000000000000000000000000000000000000000000008152600401613e829190614278565b60405180910390fd5b819050613e94565b5b9392505050565b600081511115613eae5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000819050919050565b613ef381613ee0565b82525050565b6000602082019050613f0e6000830184613eea565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613f4e578082015181840152602081019050613f33565b60008484015250505050565b6000601f19601f8301169050919050565b6000613f7682613f14565b613f808185613f1f565b9350613f90818560208601613f30565b613f9981613f5a565b840191505092915050565b60006020820190508181036000830152613fbe8184613f6b565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613ff682613fcb565b9050919050565b61400681613feb565b811461401157600080fd5b50565b60008135905061402381613ffd565b92915050565b61403281613ee0565b811461403d57600080fd5b50565b60008135905061404f81614029565b92915050565b6000806040838503121561406c5761406b613fc6565b5b600061407a85828601614014565b925050602061408b85828601614040565b9150509250929050565b60008115159050919050565b6140aa81614095565b82525050565b60006020820190506140c560008301846140a1565b92915050565b600063ffffffff82169050919050565b6140e4816140cb565b82525050565b60006020820190506140ff60008301846140db565b92915050565b60008060006060848603121561411e5761411d613fc6565b5b600061412c86828701614014565b935050602061413d86828701614014565b925050604061414e86828701614040565b9150509250925092565b600060ff82169050919050565b61416e81614158565b82525050565b60006020820190506141896000830184614165565b92915050565b600061ffff82169050919050565b6141a68161418f565b81146141b157600080fd5b50565b6000813590506141c38161419d565b92915050565b6000602082840312156141df576141de613fc6565b5b60006141ed848285016141b4565b91505092915050565b60006020828403121561420c5761420b613fc6565b5b600061421a84828501614040565b91505092915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61424881614223565b82525050565b6000602082019050614263600083018461423f565b92915050565b61427281613feb565b82525050565b600060208201905061428d6000830184614269565b92915050565b61429c8161418f565b82525050565b60006020820190506142b76000830184614293565b92915050565b6000602082840312156142d3576142d2613fc6565b5b60006142e184828501614014565b91505092915050565b6000819050919050565b6142fd816142ea565b811461430857600080fd5b50565b60008135905061431a816142f4565b92915050565b60006020828403121561433657614335613fc6565b5b60006143448482850161430b565b91505092915050565b6000806040838503121561436457614363613fc6565b5b6000614372858286016141b4565b9250506020614383858286016141b4565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6143c281613feb565b82525050565b60006143d483836143b9565b60208301905092915050565b6000602082019050919050565b60006143f88261438d565b6144028185614398565b935061440d836143a9565b8060005b8381101561443e57815161442588826143c8565b9750614430836143e0565b925050600181019050614411565b5085935050505092915050565b6000602082019050818103600083015261446581846143ed565b905092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6144a2816142ea565b82525050565b60006144b48383614499565b60208301905092915050565b6000602082019050919050565b60006144d88261446d565b6144e28185614478565b93506144ed83614489565b8060005b8381101561451e57815161450588826144a8565b9750614510836144c0565b9250506001810190506144f1565b5085935050505092915050565b6000602082019050818103600083015261454581846144cd565b905092915050565b61455681614095565b811461456157600080fd5b50565b6000813590506145738161454d565b92915050565b600080604083850312156145905761458f613fc6565b5b600061459e85828601614040565b92505060206145af85828601614564565b9150509250929050565b600080604083850312156145d0576145cf613fc6565b5b60006145de85828601614040565b92505060206145ef85828601614040565b9150509250929050565b600080604083850312156146105761460f613fc6565b5b600061461e85828601614014565b925050602061462f85828601614014565b9150509250929050565b60006affffffffffffffffffffff82169050919050565b61465981614639565b82525050565b60006020820190506146746000830184614650565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806146c157607f821691505b6020821081036146d4576146d361467a565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061471482613ee0565b915061471f83613ee0565b9250828201905080821115614737576147366146da565b5b92915050565b6000819050919050565b600061476261475d6147588461418f565b61473d565b613ee0565b9050919050565b61477281614747565b82525050565b600060408201905061478d6000830185613eea565b61479a6020830184614769565b9392505050565b6147aa816142ea565b82525050565b60006020820190506147c560008301846147a1565b92915050565b60006080820190506147e06000830187614769565b6147ed6020830186614769565b6147fa6040830185614769565b6148076060830184614769565b95945050505050565b60006080820190506148256000830187613eea565b6148326020830186613eea565b61483f6040830185613eea565b61484c6060830184613eea565b95945050505050565b600081905092915050565b50565b6000614870600083614855565b915061487b82614860565b600082019050919050565b600061489182614863565b9150819050919050565b60006148a682613ee0565b91506148b183613ee0565b92508282039050818111156148c9576148c86146da565b5b92915050565b60006040820190506148e46000830185614269565b6148f16020830184613eea565b9392505050565b6000819050919050565b600061491d614918614913846148f8565b61473d565b613ee0565b9050919050565b61492d81614902565b82525050565b600060c0820190506149486000830189614269565b6149556020830188613eea565b6149626040830187614924565b61496f6060830186614924565b61497c6080830185614269565b61498960a0830184613eea565b979650505050505050565b6000815190506149a381614029565b92915050565b6000806000606084860312156149c2576149c1613fc6565b5b60006149d086828701614994565b93505060206149e186828701614994565b92505060406149f286828701614994565b9150509250925092565b6000606082019050614a116000830186613eea565b614a1e6020830185613eea565b614a2b6040830184613eea565b949350505050565b600081519050614a428161454d565b92915050565b600060208284031215614a5e57614a5d613fc6565b5b6000614a6c84828501614a33565b91505092915050565b6000614a8082614223565b9150614a8b83614223565b9250828202614a9981614223565b9150808214614aab57614aaa6146da565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000614aec82613ee0565b9150614af783613ee0565b925082614b0757614b06614ab2565b5b828204905092915050565b6000614b1d82613ee0565b9150614b2883613ee0565b9250828202614b3681613ee0565b91508282048414831517614b4d57614b4c6146da565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600081519050614bf081613ffd565b92915050565b600060208284031215614c0c57614c0b613fc6565b5b6000614c1a84828501614be1565b91505092915050565b600060a082019050614c386000830188613eea565b614c456020830187614924565b8181036040830152614c5781866143ed565b9050614c666060830185614269565b614c736080830184613eea565b9695505050505050565b6000819050919050565b6000614ca2614c9d614c9884614c7d565b61473d565b613ee0565b9050919050565b614cb281614c87565b82525050565b6000602082019050614ccd6000830184614ca9565b92915050565b6000614cde82614223565b9150614ce983614223565b925082820390506fffffffffffffffffffffffffffffffff811115614d1157614d106146da565b5b92915050565b6000819050919050565b6000614d3c614d37614d3284614d17565b61473d565b613ee0565b9050919050565b614d4c81614d21565b82525050565b6000602082019050614d676000830184614d43565b92915050565b6000819050919050565b6000614d92614d8d614d8884614d6d565b61473d565b613ee0565b9050919050565b614da281614d77565b82525050565b6000602082019050614dbd6000830184614d99565b92915050565b600081519050919050565b6000614dd982614dc3565b614de38185614855565b9350614df3818560208601613f30565b80840191505092915050565b6000614e0b8284614dce565b91508190509291505056fea2646970667358221220c3eed59fb286e38967af167e7b8a36f73873db6a09aaf644e2e04c0f7220b9ff64736f6c63430008150033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000d00ddeb3b1a1504aefeca8bdcd3b1a4f8f1ab2220000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003e000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000045949504900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000459495049000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000003b9aca00000000000000000000000000000000000000000000000000000000002faf0800000000000000000000000000000000000000000000000000000000000bebc20000000000000000000000000000000000000000000000000000000000000f42400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bbf81e00000000000000000000000000d00ddeb3b1a1504aefeca8bdcd3b1a4f8f1ab222000000000000000000000000d00ddeb3b1a1504aefeca8bdcd3b1a4f8f1ab2220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001f400000000000000000000000000000000000000000000000000000000000001f40000000000000000000000000000000000000000000000000000000000000005000000000000000000000000d00ddeb3b1a1504aefeca8bdcd3b1a4f8f1ab222000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : integrationAddresses_ (address[4]): 0xd00ddEb3B1a1504aEFEcA8BDcD3B1A4f8f1ab222,0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D,0x0000000000000000000000000000000000000000,0x0000000000000000000000000000000000000000
Arg [1] : baseParams_ (bytes): 0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000004594950490000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045949504900000000000000000000000000000000000000000000000000000000
Arg [2] : supplyParams_ (bytes): 0x000000000000000000000000000000000000000000000000000000003b9aca00000000000000000000000000000000000000000000000000000000002faf0800000000000000000000000000000000000000000000000000000000000bebc20000000000000000000000000000000000000000000000000000000000000f42400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bbf81e00000000000000000000000000d00ddeb3b1a1504aefeca8bdcd3b1a4f8f1ab222000000000000000000000000d00ddeb3b1a1504aefeca8bdcd3b1a4f8f1ab2220000000000000000000000000000000000000000000000000000000000000000
Arg [3] : taxParams_ (bytes): 0x00000000000000000000000000000000000000000000000000000000000001f400000000000000000000000000000000000000000000000000000000000001f40000000000000000000000000000000000000000000000000000000000000005000000000000000000000000d00ddeb3b1a1504aefeca8bdcd3b1a4f8f1ab222
Arg [4] : poolParams_ (bytes): 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-----Encoded View---------------
40 Constructor Arguments found :
Arg [0] : 000000000000000000000000d00ddeb3b1a1504aefeca8bdcd3b1a4f8f1ab222
Arg [1] : 0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [5] : 00000000000000000000000000000000000000000000000000000000000001e0
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000340
Arg [7] : 00000000000000000000000000000000000000000000000000000000000003e0
Arg [8] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [12] : 5949504900000000000000000000000000000000000000000000000000000000
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [14] : 5949504900000000000000000000000000000000000000000000000000000000
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [16] : 000000000000000000000000000000000000000000000000000000003b9aca00
Arg [17] : 000000000000000000000000000000000000000000000000000000002faf0800
Arg [18] : 000000000000000000000000000000000000000000000000000000000bebc200
Arg [19] : 00000000000000000000000000000000000000000000000000000000000f4240
Arg [20] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [21] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [22] : 00000000000000000000000000000000000000000000000000000000bbf81e00
Arg [23] : 000000000000000000000000d00ddeb3b1a1504aefeca8bdcd3b1a4f8f1ab222
Arg [24] : 000000000000000000000000d00ddeb3b1a1504aefeca8bdcd3b1a4f8f1ab222
Arg [25] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [26] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [27] : 00000000000000000000000000000000000000000000000000000000000001f4
Arg [28] : 00000000000000000000000000000000000000000000000000000000000001f4
Arg [29] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [30] : 000000000000000000000000d00ddeb3b1a1504aefeca8bdcd3b1a4f8f1ab222
Arg [31] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [32] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [33] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [34] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [35] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [36] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [37] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [38] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [39] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.