Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 19564376 | 114 days ago | IN | Create: DriftToken | 0 ETH | 0.10622007 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
DriftToken
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 999999 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/** * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Copyright (c) 2024, DRIFTToken. * * DRIFT is the studio token behind the Drift studio. Drift is a Web3 game studio, which already has a ready-to-play Beta version of its game, Payout Pursuit. * * The DRIFT token has utility for gamers and non-gamers. Gamers that hold DRIFT will be able to customize their gaming experience with NFT skins and other features. * Non-gamers who stake DRIFT receive a percentage of game revenue, and the token also receives Liquidity from a percentage of game revenue. * * The Drift project has been developed by a highly experienced, fully doxxed Web3 team, with multiple successes in the Web3 space. * * Drift: * https://drifttoken.io/ * * Influ3nce: * https://influ3nce.me/ * * Amba$$ador: * https://influ3nce.me/ambassador/ * * Twitter / X: * https://twitter.com/TheDriftToken * * Telegram: * https://t.me/driftportal * */ pragma solidity 0.8.20; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; import {ERC20BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol"; import {ERC20PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PausableUpgradeable.sol"; import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol"; import {SafeMath} from "@openzeppelin/contracts/utils/math/SafeMath.sol"; import {AllowableAddress} from "./utils/AllowableAddressUpgradeable.sol"; // Interface of v2 Decentralized Exchange interface IERC20_EXT { function symbol() external returns(string memory); } interface IDexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IDexRouter { 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 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; } interface IDexPair { function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function sync() external; } // Interface of Presale ICO interface PRESALE_ICO { function amountOfAddressPerType(address _address, uint8 _type) external view returns (uint256); } // Interface for selected addresses willing to move to stake from dynamic tax interface PRESALE_DYNAMIC_TO_STAKE { function isStaker(address _address) external view returns(bool); } // Entry of Drift Token Contract contract DriftToken is ERC20Upgradeable, ERC20BurnableUpgradeable, ERC20PausableUpgradeable, ERC20PermitUpgradeable, AllowableAddress { using SafeMath for uint256; struct PairDetails { string symbol; address token; } /* Variables */ bool public initialized = false; string public version; uint256 public maxSupply = 10_000_000_000 * 10**18; // 10 Billion uint256 public maxHolding = type(uint256).max; uint256 public minHolding = 0; uint256 public maxTxAmount = type(uint256).max; bool public limitedHolding = false; uint256 private buyFee = 0; // Percentage multiplication with 1000. uint256 private sellFee = 0; // Percentage multiplication with 1000. uint256 private _initSellFee = 0; address payable private feeWallet; uint256 private _tradeFeeReduceDays = 0; uint256 private _tradeFeeReducedUntil = 0; uint32 private _feePercentDecimals = 10**5; mapping(address => bool) private isExcludedFromFee; mapping(address => bool) private pairAddress; IDexRouter[] private dexRouters; mapping(address => IDexRouter) private dexRouter; // Mapping Pair address => Router address mapping(IDexRouter => PairDetails[]) private dexPoolPair; // Mapping Router address => array of pair addresses mapping(IDexRouter => bool) private dexRouterExist; // Router address check mapping (address => uint256) private _newUserBuy; bool private tradingOpen = false; bool private feeEnable = false; uint256 private launchedBlock; PRESALE_ICO private presale_ico; PRESALE_DYNAMIC_TO_STAKE private presale_dynamic_to_stake; /* Modifiers */ modifier isSupplyExceed(uint256 _value) { require(totalSupply().add(_value) <= maxSupply, "DRIFT: amount exceeds max supply"); _; } /* Events */ event UpdateLimits(bool limitedHolding, uint256 maxHolding, uint256 minHolding); event UpdateFees(uint256 buyFee, uint256 sellFee); event ExcludeFromFee(address account, bool excluded); event SetPair(address indexed pair, bool indexed value); event TradingEnabled(); event EnableFees(bool enabled); event UpdatedTradeFeeReduceDays(uint256 feeReduceDays); /* Constructor */ /** * @notice Initialize Construction called from proxy initialization * @param _ownerAddress Owner Address * @param _feeWallet Fee Wallet Address * @param _supply Initial Supply to be mint * @param _presale_ico Deployed address of Presale ICO * @param _presale_dynamic_to_stake Depolyed address of presale user willing to move to stake from dynamic */ function initialize( address _ownerAddress, address _feeWallet, uint256 _supply, address _presale_ico, address _presale_dynamic_to_stake ) initializer external { require(!initialized, "Already initialized"); __ERC20_init("Drift Token", "DRIFT"); __ERC20Pausable_init(); __ERC20Permit_init("Drift Token"); __AllowableAddress_init(_ownerAddress); grantMintRole(_ownerAddress); grantBurnRole(_ownerAddress); maxSupply = 10_000_000_000 * 10**18; maxHolding = type(uint256).max; maxTxAmount = type(uint256).max; buyFee = 5 * 1000; sellFee = 5 * 1000; _initSellFee = 25 * 1000; feeWallet = payable(_feeWallet); _feePercentDecimals = 10**5; presale_ico = PRESALE_ICO(_presale_ico); presale_dynamic_to_stake = PRESALE_DYNAMIC_TO_STAKE(_presale_dynamic_to_stake); setExcludeFromFees(_ownerAddress, true); setExcludeFromFees(_feeWallet, true); setExcludeFromFees(address(this), true); _mint(_ownerAddress, _supply); version = "1"; initialized = true; } /* * @notice fallback functions */ receive() external payable {} fallback() external payable {} /** * @notice Enable or disable fees. * @notice Accessable to only owner * @param _enable If enable passing true, false otherwise. */ function setEnableFees(bool _enable) external onlyOwner { _setEnableFees(_enable); } /** * @notice Launch pair with any other token that not already exist * @notice Accessable to only owner * @param _dexRouter Dex router address * @param _otherTokenForPair Other token address for pair * @param _tradeOpen true if open trading, false otherwise. This argument is used only once, becoming useless if the trade is open. */ function launchPair(address _dexRouter, address _otherTokenForPair, bool _tradeOpen) external onlyOwner { require(_dexRouter != address(0) && _otherTokenForPair != address(0), "DRIFT: router or other token is zero address"); IDexRouter routerAddress = IDexRouter(_dexRouter); _createPair(routerAddress, _otherTokenForPair); if(_tradeOpen && tradingOpen == false) { openTrading(); } if(feeEnable == false) { _setEnableFees(true); } } /** * @notice Add liquidity directly from contract per pair * @notice Accessable to only owner * @param _dexRouter Dex router address * @param _otherTokenOfPair Other token address of pair that exist * @param _amountThis Amount of this tokens * @param _amountOther Amount of other pair tokens */ function addLiquidityToPool(IDexRouter _dexRouter, address _otherTokenOfPair, uint256 _amountThis, uint256 _amountOther) external payable onlyOwner { require(getPairAddress(address(this), _otherTokenOfPair) != address(0), "DRIFT: pair not exists"); _transfer(_msgSender(), address(this), _amountThis); _approve(address(this), address(_dexRouter), type(uint256).max); if(_otherTokenOfPair == _dexRouter.WETH()) { require(msg.value >= _amountOther, "DRIFT: native amount less than amountOther"); _dexRouter.addLiquidityETH{value: _amountOther}( address(this), _amountThis, 0, 0, owner(), block.timestamp ); return; } IERC20(_otherTokenOfPair).transferFrom(_msgSender(), address(this), _amountOther); IERC20(_otherTokenOfPair).approve(address(_dexRouter), type(uint256).max); _dexRouter.addLiquidity( address(this), _otherTokenOfPair, _amountThis, _amountOther, 0, 0, owner(), block.timestamp ); } /** * @notice Change days for initial high sell fees. * @notice Default 1st week after launch, and then applied normal sale fees after that. * @notice Accessable to only owner * @param _days Days/weeks/months in days */ function changeDays(uint256 _days) external onlyOwner { _changeDays(_days); } /** * @param _dexRouter Address of router * @return {array of PairDetails tuple} */ function getDexPoolPair(address _dexRouter) external view returns (PairDetails[] memory) { return dexPoolPair[IDexRouter(_dexRouter)]; } /** * @param _pairAddress Address of pair * @return {address of router} */ function getDexRouter(address _pairAddress) external view returns (address) { return address(dexRouter[_pairAddress]); } /** * @notice Mint new tokens * @notice Accessable to only selected minter * @param to Recipient address. * @param amount Amount of tokens to mint and add to supply */ function mint(address to, uint256 amount) public onlyMinter isSupplyExceed(amount) { _mint(to, amount); } /** * @notice Override function of burn tokens from supply * @notice Accessable to only selected burner * @param value Amount of tokens to burn and remove from supply */ function burn(uint256 value) public override onlyBurner { super.burn(value); } /** * @notice Override function of burn tokens from supply * @notice Accessable to only selected burner * @param account Address of user * @param value Amount to burn */ function burnFrom(address account, uint256 value) public override onlyBurner { super.burnFrom(account, value); } /** * @notice Pause to freeze all transfers * @notice Accessable to only owner */ function pause() public onlyOwner { _pause(); } /** * @notice Unpause to unfreeze all transfers * @notice Accessable to only owner */ function unpause() public onlyOwner { _unpause(); } /** * @notice Override function of transfer tokens * @param to Recipient address * @param value Amount of tokens */ function transfer(address to, uint256 value) public virtual override blacklistCheck(_msgSender(), to) returns (bool) { uint256 _value = _beforeTransfer(_msgSender(), to, value); return super.transfer(to, _value); } /** * @notice Override function of transfer tokens * @param from Sender address * @param to Recipient address * @param value Amount of tokens */ function transferFrom( address from, address to, uint256 value ) public virtual override blacklistCheck(from, to) returns (bool) { uint256 _value = _beforeTransfer(from, to, value); return super.transferFrom(from, to, _value); } /** * @notice Exclude addresses from fees that applied during buy/sell swap. * @notice Accessable to only owner * @param _address Address of user to add or remove from exclude. * @param _isExclude If exclude passing true, false otherwise. */ function setExcludeFromFees(address _address, bool _isExclude) public onlyOwner { isExcludedFromFee[_address] = _isExclude; emit ExcludeFromFee(_address, _isExclude); } /** * @notice Update limits and enable or disable feature that users hold (max / min) this tokens * @notice This feature is disabled by default; Setted values, min = 0; max = 2**256 * @notice Accessable to only owner * @param _limitedHolding if enable, passing true, false otherwise. * @param _maxHolding Amount of token user max hold. * @param _minHolding Amount of token user min hold. */ function updateLimits( bool _limitedHolding, uint256 _maxHolding, uint256 _minHolding ) public onlyOwner { limitedHolding = _limitedHolding; maxHolding = _maxHolding; minHolding = _minHolding; emit UpdateLimits(_limitedHolding, _maxHolding, _minHolding); } /** * @notice Update fees applied during buy/sell from swap. * @notice Accessable to only owner * @param _buyFees Value in percentage multiplication with 1000. * @param _sellFees Value in percentage multiplication with 1000. */ function updateFees( uint256 _buyFees, uint256 _sellFees ) public onlyOwner { buyFee = _buyFees; sellFee = _sellFees; emit UpdateFees(_buyFees, _sellFees); } /** * @notice Swap tokens directly from contract. * @notice Accessable to only owner * @param _tokenAmount Amount of tokens * @param _dexRouter Dex router address * @param _otherToken Other token address of pair */ function swapThisTokens(uint256 _tokenAmount, address _dexRouter, address _otherToken) public onlyOwner { require(_dexRouter != address(0) && _otherToken != address(0), "DRIFT: router or other token is a zero address"); address[] memory path = new address[](2); path[0] = address(this); path[1] = _otherToken; _approve(address(this), _dexRouter, _tokenAmount); if(_otherToken != IDexRouter(_dexRouter).WETH()) { swapTokensForToken(_tokenAmount, _dexRouter, path); } else { swapTokensForEth(_tokenAmount, _dexRouter, path); } } /** * @notice Open trading for tokens if minimum one liquidity is created * @notice Accessable to only owner */ function openTrading() public onlyOwner { require(dexRouters.length > 0, "DRIFT: no trading pair found"); tradingOpen = true; if(_tradeFeeReducedUntil == 0) { _changeDays(7); // Sell fees reduction from 25% to 5% in 1 week. Set value only first time when this function called; } emit TradingEnabled(); } /** * @notice Set pair contract address of dex; i.e (pair of tokenA/tokenB) * @notice Accessable to only owner * @param _dexRouter Router address of dex * @param _pair Pair address of dex */ function setDexPoolPair(address _dexRouter, address _pair) public onlyOwner { require(_dexRouter != address(0) && _pair != address(0), "DRIFT: the router or pair is a zero address"); require(!isUniswapPool(_pair), "DRIFT: the pair already exist"); (address _token0, address _token1) = getPair(_pair); require(_token0 == address(this), "DRIFT: the pair is not associated with this token"); IDexRouter routerAddress = IDexRouter(_dexRouter); pairAddress[_pair] = true; dexPoolPair[routerAddress].push(PairDetails({ symbol: IERC20_EXT(_token1).symbol(), token: _token1 })); dexRouter[_pair] = routerAddress; if(!dexRouterExist[routerAddress]) { dexRouters.push(routerAddress); dexRouterExist[routerAddress] = true; } IERC20(_pair).approve(_dexRouter, type(uint256).max); setExcludeFromFees(_dexRouter, true); emit SetPair(_pair, true); } /** * @notice Withdraw from contract. * @notice Accessable to only owner * @param _tokenAddress Token address */ function withdrawFunds(address _tokenAddress) public onlyOwner { if (_tokenAddress == address(0) && address(this).balance > 0) { (bool os, ) = payable(feeWallet).call{value: address(this).balance}(""); require(os); } else if(_tokenAddress == address(this) && balanceOf(address(this)) > 0) { transfer(feeWallet, balanceOf(address(this))); } else if (IERC20(_tokenAddress).balanceOf(address(this)) > 0) { IERC20(_tokenAddress).transfer(feeWallet, IERC20(_tokenAddress).balanceOf(address(this))); } else { revert("DRIFT: no funds"); } } /** * @return _buyFee Buy Fees * @return _sellFee Sell Fees * @return _feeWallet Address of fee wallet where fees collected * @return _feeEnable true if enabled, false otherwise */ function feeInfo() public view returns (uint256 _buyFee, uint256 _sellFee, address _feeWallet, bool _feeEnable) { _buyFee = buyFee; _sellFee = getSellFee(); _feeWallet = feeWallet; _feeEnable = feeEnable; } /** * @return {All router addresses where liquidity added} */ function allRouters() public view returns (IDexRouter[] memory) { return dexRouters; } /** * @param _dexRouter Address of router * @param _otherTokenOfPair Address of other token of pair * @return {address of pair of (this token and other token)} */ function getPairAddress(address _dexRouter, address _otherTokenOfPair) public view returns(address) { address _factory = IDexRouter(_dexRouter).factory(); return IDexFactory(_factory).getPair(address(this), _otherTokenOfPair); } /** * @param _pairAddress Address of pair * @return _token0 This token address * @return _token1 Other token address of pair */ function getPair(address _pairAddress) public view returns (address _token0, address _token1) { _token0 = IDexPair(_pairAddress).token0(); _token1 = IDexPair(_pairAddress).token1(); if(_token1 == address(this)) { return (_token1, _token0); } } /** * @notice Internal callable function set feeEnable {true or false} * @notice Accessable to only owner * @param _enable If enable passing true, false otherwise. */ function _setEnableFees(bool _enable) internal { feeEnable = _enable; emit EnableFees(_enable); } /** * @notice Internally called when transfer executed. * @notice Checks and apply fees if applicable * @param from Sender address * @param to Recipient address * @param value Amount of tokens */ function _beforeTransfer( address from, address to, uint256 value ) internal returns (uint256) { if ( from != owner() && to != owner() && to != address(0) ) { if (!tradingOpen) { require( isExcludedFromFee[from] || isExcludedFromFee[to], "DRIFT: Trading is not active." ); } } if ((isExcludedFromFee[to] || isExcludedFromFee[from]) || !feeEnable || value == 0) { return value; } if ((isBuy(from) && !dexRouterExist[IDexRouter(to)]) || (isSell(to) && !dexRouterExist[IDexRouter(from)])) { require(value <= maxTxAmount, "DRIFT: exceeds the max tx amount"); } if (launchedBlock + 2 > block.number && !dexRouterExist[IDexRouter(from)]) { bool isSnipe = false; if(isBuy(from)) { blacklistAddress[to] = true; isSnipe = true; } else if(isSell(to)) { blacklistAddress[from] = true; isSnipe = true; } if(isSnipe) { return value.sub(value.mul(99 * 1000).div(_feePercentDecimals)); // Anti Snipe, deduct 99 percent amount } } uint256 feeAmount = 0; if (isBuy(from)) { feeAmount = value.mul(buyFee).div(_feePercentDecimals); if(_getDays(block.timestamp, _tradeFeeReducedUntil) > 0 && _newUserBuy[to] == 0) { _newUserBuy[to] = block.timestamp + 15 minutes; // 15 Mins } } if (isSell(to) && from != address(this)) { if(isDynamicTaxUser(from) || _newUserBuy[from] >= block.timestamp) { feeAmount = value.mul(getSellFee()).div(_feePercentDecimals); } else { feeAmount = value.mul(sellFee).div(_feePercentDecimals); } } if (feeAmount > 0) { _transfer(from, address(this), feeAmount); } return value.sub(feeAmount); } /** * @notice Override internal function called when transfer executed. * @notice If limited holding enabled, it checks if the address hold not more or less than the limits * @param from Sender address * @param to Recipient address * @param value Amount of tokens */ function _update( address from, address to, uint256 value ) internal override(ERC20Upgradeable, ERC20PausableUpgradeable) { if (limitedHolding && !isSell(to) && !isExcludedFromFee[to]) { uint256 toBalance = balanceOf(to); require( toBalance.add(value) <= maxHolding && toBalance.add(value) >= minHolding, "DRIFT: invalid value, not matched holding limit" ); } super._update(from, to, value); } /** * @notice Internally callable function when launch new pair * @param _dexRouter Dex router address * @param _otherTokenForPair Other token address for pair */ function _createPair(IDexRouter _dexRouter, address _otherTokenForPair) internal { require(getPairAddress(address(this), _otherTokenForPair) == address(0), "DRIFT: pair already exists"); address _pair = IDexFactory(_dexRouter.factory()).createPair( address(this), _otherTokenForPair ); setDexPoolPair(address(_dexRouter), _pair); } /** * @notice Internally callable function set _tradeFeeReducedUntil * @param _days Days/weeks/months in days */ function _changeDays(uint256 _days) internal { _tradeFeeReducedUntil = block.timestamp + (_days * 1 days); _tradeFeeReduceDays = _days; emit UpdatedTradeFeeReduceDays(_tradeFeeReducedUntil); } /** * @notice Internally called when transfer executed and checks if user is presale holder and dynamic tax enabled. * @param _address User address * @return {true or false} */ function isDynamicTaxUser(address _address) public view returns(bool) { return (address(presale_dynamic_to_stake) != address(0) ? presale_dynamic_to_stake.isStaker(_address) == false : true) && presale_ico.amountOfAddressPerType(_address, 0) > 0; } /** * @notice Internally called when transfer executed and checks if address is dex pair. * @param _addressToCheck Any address (user or contract) * @return {true or false} */ function isUniswapPool(address _addressToCheck) internal view returns (bool) { if (pairAddress[_addressToCheck]) { return true; } return false; } /** * @notice Internally called when transfer executed and checks if address is dex pair and is this buy. * @param _from Any address (user or contract) * @return {true or false} */ function isBuy(address _from) internal view returns (bool) { return isUniswapPool(_from); } /** * @notice Internally called when transfer executed and checks if address is dex pair and is this sell. * @param _to Any address (user or contract) * @return {true or false} */ function isSell(address _to) internal view returns (bool) { return isUniswapPool(_to); } /** * @notice Helper function to find the minimum of two values. * @param a Number 1 * @param b Number 2 * @return {Minimum number} */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @notice Returns Days with timestamp. * @param _timestampBefore Date in timestamp (Low value) * @param _timestampAfter Date in timestamp (High value) * @return {Days} */ function _getDays(uint256 _timestampBefore, uint256 _timestampAfter) internal pure returns (uint256) { if (_timestampBefore >= _timestampAfter || _timestampBefore == 0 || _timestampAfter == 0) { return 0; } uint256 timestamp = _timestampAfter - _timestampBefore; uint256 timestampDays = timestamp.div(60).div(60).div(24) + 1; return timestampDays; } /** * @notice Private function callable when swap tokens directly from contract. * @notice swap with pair of other token other than native * @param _tokenAmount Amount of tokens * @param _dexRouter Dex router address * @param _path Array of token addresses; [from, to] */ function swapTokensForToken(uint256 _tokenAmount, address _dexRouter, address[] memory _path) private { uint256 _maxSlippage = _tokenAmount.mul(getSellFee()).div(_feePercentDecimals); IDexRouter(_dexRouter).swapExactTokensForTokensSupportingFeeOnTransferTokens( _tokenAmount, _tokenAmount.sub(_maxSlippage), // Maximum slippage, _path, feeWallet, block.timestamp ); } /** * @notice Private function callable when swap tokens directly from contract. * @notice swap with pair of native token * @param _tokenAmount Amount of tokens * @param _dexRouter Dex router address * @param _path Array of token addresses; [from, to] */ function swapTokensForEth(uint256 _tokenAmount, address _dexRouter, address[] memory _path) private { uint256 _maxSlippage = _tokenAmount.mul(getSellFee()).div(_feePercentDecimals); IDexRouter(_dexRouter).swapExactTokensForETHSupportingFeeOnTransferTokens( _tokenAmount, _tokenAmount.sub(_maxSlippage), // Maximum slippage, _path, feeWallet, block.timestamp ); } /** * @notice Private function callable when transfer tokens and transfer is sell. * @return fees */ function getSellFee() private view returns (uint256) { uint256 diff = (_initSellFee - sellFee); uint256 fees = diff.div(_tradeFeeReduceDays).mul(_getDays(block.timestamp, _tradeFeeReducedUntil)).add(sellFee); return fees; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; contract AllowableAddress is OwnableUpgradeable { using EnumerableSet for EnumerableSet.AddressSet; // @dev the allowed minter addresses EnumerableSet.AddressSet internal s_minters; // @dev the allowed burner addresses EnumerableSet.AddressSet internal s_burners; /******* Variables *******/ // blacklist address => bool mapping(address => bool) internal blacklistAddress; /******* Modifiers *******/ modifier blacklistCheck(address _from, address _to) { require(!blacklistAddress[_from] && !blacklistAddress[_to], "Address is blacklisted"); _; } modifier onlyMinter() { if (!isMinter(msg.sender)) revert SenderNotMinter(msg.sender); _; } modifier onlyBurner() { if (!isBurner(msg.sender)) revert SenderNotBurner(msg.sender); _; } /******* Events *******/ error SenderNotMinter(address sender); error SenderNotBurner(address sender); error MaxSupplyExceeded(uint256 supplyAfterMint); event MintAccessGranted(address indexed minter); event BurnAccessGranted(address indexed burner); event MintAccessRevoked(address indexed minter); event BurnAccessRevoked(address indexed burner); event BlacklistUpdated(bool status); /******* Constructor *******/ function __AllowableAddress_init(address _ownerAddress) internal { __Ownable_init(_ownerAddress); } /* * @notice Manage blacklisting to restrict addresses * @param addresses Array of addresses * @param status If blacklist passing true, false otherwise. */ function manageBlacklist(address[] calldata addresses, bool status) external virtual onlyOwner { for (uint256 i; i < addresses.length; ++i) { blacklistAddress[addresses[i]] = status; } emit BlacklistUpdated(status); } /* * @notice grants both mint and burn roles to `burnAndMinter`. * @notice Accessable to only owner. * @param burnAndMinter Any address for mint and burn access */ function grantMintAndBurnRoles(address burnAndMinter) external onlyOwner { grantMintRole(burnAndMinter); grantBurnRole(burnAndMinter); } /* * @notice Grants mint role to the given address. * @notice Accessable to only owner. * @param minter Any address for mint access */ function grantMintRole(address minter) public onlyOwner { if (s_minters.add(minter)) { emit MintAccessGranted(minter); } } /* * @notice Grants burn role to the given address. * @notice Accessable to only owner. * @param burner Any address for burn access */ function grantBurnRole(address burner) public onlyOwner { if (s_burners.add(burner)) { emit BurnAccessGranted(burner); } } /* * @notice Revokes mint role for the given address. * @notice Accessable to only owner. * @param minter Any address for remove mint access */ function revokeMintRole(address minter) public onlyOwner { if (s_minters.remove(minter)) { emit MintAccessRevoked(minter); } } /* * @notice Revokes burn role from the given address. * @notice Accessable to only owner * @param burner Any address for remove burn access */ function revokeBurnRole(address burner) public onlyOwner { if (s_burners.remove(burner)) { emit BurnAccessRevoked(burner); } } /* * @param _address Any address * @return {the address is blacklisted or not}. */ function isBlacklisted(address _address) public view returns (bool) { return blacklistAddress[_address]; } /* * @return {all permissioned minters} */ function getMinters() public view returns (address[] memory) { return s_minters.values(); } /* * @return {all permissioned burners} */ function getBurners() public view returns (address[] memory) { return s_burners.values(); } /* * @notice Checks whether a given address is a minter for this token. * @return {true if the address is allowed to mint}. */ function isMinter(address minter) public view returns (bool) { return s_minters.contains(minter); } /* * @notice Checks whether a given address is a burner for this token. * @return {true if the address is allowed to burn}. */ function isBurner(address burner) public view returns (bool) { return s_burners.contains(burner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Permit.sol) pragma solidity ^0.8.20; import {IERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol"; import {ERC20Upgradeable} from "../ERC20Upgradeable.sol"; import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import {EIP712Upgradeable} from "../../../utils/cryptography/EIP712Upgradeable.sol"; import {NoncesUpgradeable} from "../../../utils/NoncesUpgradeable.sol"; import {Initializable} from "../../../proxy/utils/Initializable.sol"; /** * @dev Implementation 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. */ abstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20Permit, EIP712Upgradeable, NoncesUpgradeable { bytes32 private constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); /** * @dev Permit deadline has expired. */ error ERC2612ExpiredSignature(uint256 deadline); /** * @dev Mismatched signature. */ error ERC2612InvalidSigner(address signer, address owner); /** * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`. * * It's a good idea to use the same `name` that is defined as the ERC20 token name. */ function __ERC20Permit_init(string memory name) internal onlyInitializing { __EIP712_init_unchained(name, "1"); } function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {} /** * @inheritdoc IERC20Permit */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual { if (block.timestamp > deadline) { revert ERC2612ExpiredSignature(deadline); } bytes32 structHash = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline)); bytes32 hash = _hashTypedDataV4(structHash); address signer = ECDSA.recover(hash, v, r, s); if (signer != owner) { revert ERC2612InvalidSigner(signer, owner); } _approve(owner, spender, value); } /** * @inheritdoc IERC20Permit */ function nonces(address owner) public view virtual override(IERC20Permit, NoncesUpgradeable) returns (uint256) { return super.nonces(owner); } /** * @inheritdoc IERC20Permit */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view virtual returns (bytes32) { return _domainSeparatorV4(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Pausable.sol) pragma solidity ^0.8.20; import {ERC20Upgradeable} from "../ERC20Upgradeable.sol"; import {PausableUpgradeable} from "../../../utils/PausableUpgradeable.sol"; import {Initializable} from "../../../proxy/utils/Initializable.sol"; /** * @dev ERC20 token with pausable token transfers, minting and burning. * * Useful for scenarios such as preventing trades until the end of an evaluation * period, or having an emergency switch for freezing all token transfers in the * event of a large bug. * * IMPORTANT: This contract does not include public pause and unpause functions. In * addition to inheriting this contract, you must define both functions, invoking the * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will * make the contract pause mechanism of the contract unreachable, and thus unusable. */ abstract contract ERC20PausableUpgradeable is Initializable, ERC20Upgradeable, PausableUpgradeable { function __ERC20Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __ERC20Pausable_init_unchained() internal onlyInitializing { } /** * @dev See {ERC20-_update}. * * Requirements: * * - the contract must not be paused. */ function _update(address from, address to, uint256 value) internal virtual override whenNotPaused { super._update(from, to, value); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Burnable.sol) pragma solidity ^0.8.20; import {ERC20Upgradeable} from "../ERC20Upgradeable.sol"; import {ContextUpgradeable} from "../../../utils/ContextUpgradeable.sol"; import {Initializable} from "../../../proxy/utils/Initializable.sol"; /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20BurnableUpgradeable is Initializable, ContextUpgradeable, ERC20Upgradeable { function __ERC20Burnable_init() internal onlyInitializing { } function __ERC20Burnable_init_unchained() internal onlyInitializing { } /** * @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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import {ContextUpgradeable} from "../../utils/ContextUpgradeable.sol"; import {IERC20Errors} from "@openzeppelin/contracts/interfaces/draft-IERC6093.sol"; import {Initializable} from "../../proxy/utils/Initializable.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 ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20, IERC20Metadata, IERC20Errors { /// @custom:storage-location erc7201:openzeppelin.storage.ERC20 struct ERC20Storage { mapping(address account => uint256) _balances; mapping(address account => mapping(address spender => uint256)) _allowances; uint256 _totalSupply; string _name; string _symbol; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC20")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant ERC20StorageLocation = 0x52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00; function _getERC20Storage() private pure returns (ERC20Storage storage $) { assembly { $.slot := ERC20StorageLocation } } /** * @dev Sets the values for {name} and {symbol}. * * All two of these values are immutable: they can only be set once during * construction. */ function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing { __ERC20_init_unchained(name_, symbol_); } function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { ERC20Storage storage $ = _getERC20Storage(); $._name = name_; $._symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { ERC20Storage storage $ = _getERC20Storage(); return $._name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { ERC20Storage storage $ = _getERC20Storage(); 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) { ERC20Storage storage $ = _getERC20Storage(); return $._totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual returns (uint256) { ERC20Storage storage $ = _getERC20Storage(); 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) { ERC20Storage storage $ = _getERC20Storage(); 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 { ERC20Storage storage $ = _getERC20Storage(); 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 { ERC20Storage storage $ = _getERC20Storage(); 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/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) (access/Ownable.sol) pragma solidity ^0.8.20; import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { /// @custom:storage-location erc7201:openzeppelin.storage.Ownable struct OwnableStorage { address _owner; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300; function _getOwnableStorage() private pure returns (OwnableStorage storage $) { assembly { $.slot := OwnableStorageLocation } } /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ function __Ownable_init(address initialOwner) internal onlyInitializing { __Ownable_init_unchained(initialOwner); } function __Ownable_init_unchained(address initialOwner) internal onlyInitializing { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { OwnableStorage storage $ = _getOwnableStorage(); return $._owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { OwnableStorage storage $ = _getOwnableStorage(); address oldOwner = $._owner; $._owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// 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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.20; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Storage of the initializable contract. * * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions * when using with upgradeable contracts. * * @custom:storage-location erc7201:openzeppelin.storage.Initializable */ struct InitializableStorage { /** * @dev Indicates that the contract has been initialized. */ uint64 _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool _initializing; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00; /** * @dev The contract is already initialized. */ error InvalidInitialization(); /** * @dev The contract is not initializing. */ error NotInitializing(); /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint64 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in * production. * * Emits an {Initialized} event. */ modifier initializer() { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); // Cache values to avoid duplicated sloads bool isTopLevelCall = !$._initializing; uint64 initialized = $._initialized; // Allowed calls: // - initialSetup: the contract is not in the initializing state and no previous version was // initialized // - construction: the contract is initialized at version 1 (no reininitialization) and the // current contract is just being deployed bool initialSetup = initialized == 0 && isTopLevelCall; bool construction = initialized == 1 && address(this).code.length == 0; if (!initialSetup && !construction) { revert InvalidInitialization(); } $._initialized = 1; if (isTopLevelCall) { $._initializing = true; } _; if (isTopLevelCall) { $._initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint64 version) { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing || $._initialized >= version) { revert InvalidInitialization(); } $._initialized = version; $._initializing = true; _; $._initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { _checkInitializing(); _; } /** * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}. */ function _checkInitializing() internal view virtual { if (!_isInitializing()) { revert NotInitializing(); } } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing) { revert InvalidInitialization(); } if ($._initialized != type(uint64).max) { $._initialized = type(uint64).max; emit Initialized(type(uint64).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint64) { return _getInitializableStorage()._initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _getInitializableStorage()._initializing; } /** * @dev Returns a pointer to the storage namespace. */ // solhint-disable-next-line var-name-mixedcase function _getInitializableStorage() private pure returns (InitializableStorage storage $) { assembly { $.slot := INITIALIZABLE_STORAGE } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Nonces.sol) pragma solidity ^0.8.20; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Provides tracking nonces for addresses. Nonces will only increment. */ abstract contract NoncesUpgradeable is Initializable { /** * @dev The nonce used for an `account` is not the expected current nonce. */ error InvalidAccountNonce(address account, uint256 currentNonce); /// @custom:storage-location erc7201:openzeppelin.storage.Nonces struct NoncesStorage { mapping(address account => uint256) _nonces; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Nonces")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant NoncesStorageLocation = 0x5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb00; function _getNoncesStorage() private pure returns (NoncesStorage storage $) { assembly { $.slot := NoncesStorageLocation } } function __Nonces_init() internal onlyInitializing { } function __Nonces_init_unchained() internal onlyInitializing { } /** * @dev Returns the next unused nonce for an address. */ function nonces(address owner) public view virtual returns (uint256) { NoncesStorage storage $ = _getNoncesStorage(); return $._nonces[owner]; } /** * @dev Consumes a nonce. * * Returns the current value and increments nonce. */ function _useNonce(address owner) internal virtual returns (uint256) { NoncesStorage storage $ = _getNoncesStorage(); // For each account, the nonce has an initial value of 0, can only be incremented by one, and cannot be // decremented or reset. This guarantees that the nonce never overflows. unchecked { // It is important to do x++ and not ++x here. return $._nonces[owner]++; } } /** * @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`. */ function _useCheckedNonce(address owner, uint256 nonce) internal virtual { uint256 current = _useNonce(owner); if (nonce != current) { revert InvalidAccountNonce(owner, current); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/EIP712.sol) pragma solidity ^0.8.20; import {MessageHashUtils} from "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; import {IERC5267} from "@openzeppelin/contracts/interfaces/IERC5267.sol"; import {Initializable} from "../../proxy/utils/Initializable.sol"; /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the * separator from the immutable values, which is cheaper than accessing a cached version in cold storage. */ abstract contract EIP712Upgradeable is Initializable, IERC5267 { bytes32 private constant TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); /// @custom:storage-location erc7201:openzeppelin.storage.EIP712 struct EIP712Storage { /// @custom:oz-renamed-from _HASHED_NAME bytes32 _hashedName; /// @custom:oz-renamed-from _HASHED_VERSION bytes32 _hashedVersion; string _name; string _version; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.EIP712")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant EIP712StorageLocation = 0xa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100; function _getEIP712Storage() private pure returns (EIP712Storage storage $) { assembly { $.slot := EIP712StorageLocation } } /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ function __EIP712_init(string memory name, string memory version) internal onlyInitializing { __EIP712_init_unchained(name, version); } function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing { EIP712Storage storage $ = _getEIP712Storage(); $._name = name; $._version = version; // Reset prior values in storage if upgrading $._hashedName = 0; $._hashedVersion = 0; } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { return _buildDomainSeparator(); } function _buildDomainSeparator() private view returns (bytes32) { return keccak256(abi.encode(TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash); } /** * @dev See {IERC-5267}. */ function eip712Domain() public view virtual returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ) { EIP712Storage storage $ = _getEIP712Storage(); // If the hashed name and version in storage are non-zero, the contract hasn't been properly initialized // and the EIP712 domain is not reliable, as it will be missing name and version. require($._hashedName == 0 && $._hashedVersion == 0, "EIP712: Uninitialized"); return ( hex"0f", // 01111 _EIP712Name(), _EIP712Version(), block.chainid, address(this), bytes32(0), new uint256[](0) ); } /** * @dev The name parameter for the EIP712 domain. * * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs * are a concern. */ function _EIP712Name() internal view virtual returns (string memory) { EIP712Storage storage $ = _getEIP712Storage(); return $._name; } /** * @dev The version parameter for the EIP712 domain. * * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs * are a concern. */ function _EIP712Version() internal view virtual returns (string memory) { EIP712Storage storage $ = _getEIP712Storage(); return $._version; } /** * @dev The hash of the name parameter for the EIP712 domain. * * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Name` instead. */ function _EIP712NameHash() internal view returns (bytes32) { EIP712Storage storage $ = _getEIP712Storage(); string memory name = _EIP712Name(); if (bytes(name).length > 0) { return keccak256(bytes(name)); } else { // If the name is empty, the contract may have been upgraded without initializing the new storage. // We return the name hash in storage if non-zero, otherwise we assume the name is empty by design. bytes32 hashedName = $._hashedName; if (hashedName != 0) { return hashedName; } else { return keccak256(""); } } } /** * @dev The hash of the version parameter for the EIP712 domain. * * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Version` instead. */ function _EIP712VersionHash() internal view returns (bytes32) { EIP712Storage storage $ = _getEIP712Storage(); string memory version = _EIP712Version(); if (bytes(version).length > 0) { return keccak256(bytes(version)); } else { // If the version is empty, the contract may have been upgraded without initializing the new storage. // We return the version hash in storage if non-zero, otherwise we assume the version is empty by design. bytes32 hashedVersion = $._hashedVersion; if (hashedVersion != 0) { return hashedVersion; } else { return keccak256(""); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.20; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS } /** * @dev The signature derives the `address(0)`. */ error ECDSAInvalidSignature(); /** * @dev The signature has an invalid length. */ error ECDSAInvalidSignatureLength(uint256 length); /** * @dev The signature has an S value that is in the upper half order. */ error ECDSAInvalidSignatureS(bytes32 s); /** * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not * return address(0) without also returning an error description. Errors are documented using an enum (error type) * and a bytes32 providing additional information about the error. * * If no error is returned, then the address can be used for verification purposes. * * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length)); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature); _throwError(error, errorArg); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] */ function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) { unchecked { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); // We do not check for an overflow here since the shift operation results in 0 or 1. uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. */ function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs); _throwError(error, errorArg); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError, bytes32) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS, s); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature, bytes32(0)); } return (signer, RecoverError.NoError, bytes32(0)); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s); _throwError(error, errorArg); return recovered; } /** * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided. */ function _throwError(RecoverError error, bytes32 errorArg) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert ECDSAInvalidSignature(); } else if (error == RecoverError.InvalidSignatureLength) { revert ECDSAInvalidSignatureLength(uint256(errorArg)); } else if (error == RecoverError.InvalidSignatureS) { revert ECDSAInvalidSignatureS(errorArg); } } }
// 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) (utils/Pausable.sol) pragma solidity ^0.8.20; import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /// @custom:storage-location erc7201:openzeppelin.storage.Pausable struct PausableStorage { bool _paused; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Pausable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant PausableStorageLocation = 0xcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300; function _getPausableStorage() private pure returns (PausableStorage storage $) { assembly { $.slot := PausableStorageLocation } } /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); /** * @dev The operation failed because the contract is paused. */ error EnforcedPause(); /** * @dev The operation failed because the contract is not paused. */ error ExpectedPause(); /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { PausableStorage storage $ = _getPausableStorage(); $._paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { PausableStorage storage $ = _getPausableStorage(); return $._paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { if (paused()) { revert EnforcedPause(); } } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { if (!paused()) { revert ExpectedPause(); } } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { PausableStorage storage $ = _getPausableStorage(); $._paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { PausableStorage storage $ = _getPausableStorage(); $._paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } 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) (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/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) (interfaces/IERC5267.sol) pragma solidity ^0.8.20; interface IERC5267 { /** * @dev MAY be emitted to signal that the domain could have changed. */ event EIP712DomainChanged(); /** * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712 * signature. */ function eip712Domain() external view returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol) pragma solidity ^0.8.20; import {Strings} from "../Strings.sol"; /** * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing. * * The library provides methods for generating a hash of a message that conforms to the * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712] * specifications. */ library MessageHashUtils { /** * @dev Returns the keccak256 digest of an EIP-191 signed data with version * `0x45` (`personal_sign` messages). * * The digest is calculated by prefixing a bytes32 `messageHash` with * `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method. * * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with * keccak256, although any bytes32 value can be safely used because the final digest will * be re-hashed. * * See {ECDSA-recover}. */ function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) { /// @solidity memory-safe-assembly assembly { mstore(0x00, "\x19Ethereum Signed Message:\n32") // 32 is the bytes-length of messageHash mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20) } } /** * @dev Returns the keccak256 digest of an EIP-191 signed data with version * `0x45` (`personal_sign` messages). * * The digest is calculated by prefixing an arbitrary `message` with * `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method. * * See {ECDSA-recover}. */ function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) { return keccak256(bytes.concat("\x19Ethereum Signed Message:\n", bytes(Strings.toString(message.length)), message)); } /** * @dev Returns the keccak256 digest of an EIP-191 signed data with version * `0x00` (data with intended validator). * * The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended * `validator` address. Then hashing the result. * * See {ECDSA-recover}. */ function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { return keccak256(abi.encodePacked(hex"19_00", validator, data)); } /** * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`). * * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with * `\x19\x01` and hashing the result. It corresponds to the hash signed by the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712. * * See {ECDSA-recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(ptr, hex"19_01") mstore(add(ptr, 0x02), domainSeparator) mstore(add(ptr, 0x22), structHash) digest := keccak256(ptr, 0x42) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol) pragma solidity ^0.8.20; import {Math} from "./math/Math.sol"; import {SignedMath} from "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant HEX_DIGITS = "0123456789abcdef"; uint8 private constant ADDRESS_LENGTH = 20; /** * @dev The `value` string doesn't fit in the specified `length`. */ error StringsInsufficientHexLength(uint256 value, uint256 length); /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), HEX_DIGITS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toStringSigned(int256 value) internal pure returns (string memory) { return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { uint256 localValue = value; bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = HEX_DIGITS[localValue & 0xf]; localValue >>= 4; } if (localValue != 0) { revert StringsInsufficientHexLength(value, length); } return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal * representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.20; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol) pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Muldiv operation overflow. */ error MathOverflowedMulDiv(); enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an overflow flag. */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. return a / b; } // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or * denominator == 0. * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by * Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (denominator <= prod1) { revert MathOverflowedMulDiv(); } /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. uint256 twos = denominator & (0 - denominator); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also // works in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded * towards zero. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } }
{ "optimizer": { "enabled": true, "runs": 999999 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"ERC2612ExpiredSignature","type":"error"},{"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC2612InvalidSigner","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"currentNonce","type":"uint256"}],"name":"InvalidAccountNonce","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[{"internalType":"uint256","name":"supplyAfterMint","type":"uint256"}],"name":"MaxSupplyExceeded","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"SenderNotBurner","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"SenderNotMinter","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":"bool","name":"status","type":"bool"}],"name":"BlacklistUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"burner","type":"address"}],"name":"BurnAccessGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"burner","type":"address"}],"name":"BurnAccessRevoked","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"EnableFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"excluded","type":"bool"}],"name":"ExcludeFromFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"minter","type":"address"}],"name":"MintAccessGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"minter","type":"address"}],"name":"MintAccessRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pair","type":"address"},{"indexed":true,"internalType":"bool","name":"value","type":"bool"}],"name":"SetPair","type":"event"},{"anonymous":false,"inputs":[],"name":"TradingEnabled","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":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"buyFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sellFee","type":"uint256"}],"name":"UpdateFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"limitedHolding","type":"bool"},{"indexed":false,"internalType":"uint256","name":"maxHolding","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"minHolding","type":"uint256"}],"name":"UpdateLimits","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"feeReduceDays","type":"uint256"}],"name":"UpdatedTradeFeeReduceDays","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IDexRouter","name":"_dexRouter","type":"address"},{"internalType":"address","name":"_otherTokenOfPair","type":"address"},{"internalType":"uint256","name":"_amountThis","type":"uint256"},{"internalType":"uint256","name":"_amountOther","type":"uint256"}],"name":"addLiquidityToPool","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"allRouters","outputs":[{"internalType":"contract IDexRouter[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"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":[{"internalType":"uint256","name":"_days","type":"uint256"}],"name":"changeDays","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeInfo","outputs":[{"internalType":"uint256","name":"_buyFee","type":"uint256"},{"internalType":"uint256","name":"_sellFee","type":"uint256"},{"internalType":"address","name":"_feeWallet","type":"address"},{"internalType":"bool","name":"_feeEnable","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBurners","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_dexRouter","type":"address"}],"name":"getDexPoolPair","outputs":[{"components":[{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"token","type":"address"}],"internalType":"struct DriftToken.PairDetails[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_pairAddress","type":"address"}],"name":"getDexRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMinters","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_pairAddress","type":"address"}],"name":"getPair","outputs":[{"internalType":"address","name":"_token0","type":"address"},{"internalType":"address","name":"_token1","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_dexRouter","type":"address"},{"internalType":"address","name":"_otherTokenOfPair","type":"address"}],"name":"getPairAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"burner","type":"address"}],"name":"grantBurnRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"burnAndMinter","type":"address"}],"name":"grantMintAndBurnRoles","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"grantMintRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_ownerAddress","type":"address"},{"internalType":"address","name":"_feeWallet","type":"address"},{"internalType":"uint256","name":"_supply","type":"uint256"},{"internalType":"address","name":"_presale_ico","type":"address"},{"internalType":"address","name":"_presale_dynamic_to_stake","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"isBlacklisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"burner","type":"address"}],"name":"isBurner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"isDynamicTaxUser","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"isMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_dexRouter","type":"address"},{"internalType":"address","name":"_otherTokenForPair","type":"address"},{"internalType":"bool","name":"_tradeOpen","type":"bool"}],"name":"launchPair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"limitedHolding","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"bool","name":"status","type":"bool"}],"name":"manageBlacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxHolding","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTxAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minHolding","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"openTrading","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"burner","type":"address"}],"name":"revokeBurnRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"revokeMintRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_dexRouter","type":"address"},{"internalType":"address","name":"_pair","type":"address"}],"name":"setDexPoolPair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_enable","type":"bool"}],"name":"setEnableFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bool","name":"_isExclude","type":"bool"}],"name":"setExcludeFromFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenAmount","type":"uint256"},{"internalType":"address","name":"_dexRouter","type":"address"},{"internalType":"address","name":"_otherToken","type":"address"}],"name":"swapThisTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_buyFees","type":"uint256"},{"internalType":"uint256","name":"_sellFees","type":"uint256"}],"name":"updateFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_limitedHolding","type":"bool"},{"internalType":"uint256","name":"_maxHolding","type":"uint256"},{"internalType":"uint256","name":"_minHolding","type":"uint256"}],"name":"updateLimits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"}],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040526005805460ff199081169091556b204fce5e3e250261100000006007555f1960088190555f6009819055600a91909155600b8054909216909155600c819055600d819055600e81905560108190556011556012805463ffffffff1916620186a0179055601a805461ffff1916905534801561007d575f80fd5b50615bf3806200008c5f395ff3fe60806040526004361061035f575f3560e01c80637ecebe00116101c3578063b67db89d116100f5578063d5abeb0111610099578063f2fde38b1161006b578063f2fde38b14610aff578063f81094f314610b1e578063fb2f349214610b3d578063fe575a8714610b5c57005b8063d5abeb0114610a2f578063d63cad2214610a44578063dd62ed3e14610a63578063ef77790e14610ad357005b8063c630948d116100d2578063c630948d146109be578063c64d0ebc146109dd578063c9567bf9146109fc578063d505accf14610a1057005b8063b67db89d1461096b578063bbed0e841461098a578063c2e3273d1461099f57005b806394efa85211610167578063aa271e1a11610139578063aa271e1a146108ed578063aaf37c391461090c578063ae6be5671461092b578063b4f69a2f1461094c57005b806394efa8521461082457806395d89b4114610868578063995b5aae1461087c578063a9059cbb146108ce57005b806386fe8b43116101a057806386fe8b43146107725780638c0b5e22146107865780638da5cb5b1461079b57806394e831fe1461080557005b80637ecebe00146107185780638456cb591461073757806384b0196e1461074b57005b80633f4ba83a1161029c5780635c975abb1161024057806370a082311161021257806370a08231146106a7578063715018a6146106c6578063788a6694146106da57806379cc6790146106f957005b80635c975abb1461061257806368742da6146106485780636b32810b146106675780636db794371461068857005b80634334614a116102795780634334614a146105a15780634b3209ef146105c05780634f5632f8146105df57806354fd4d50146105fe57005b80633f4ba83a1461054f57806340c10f191461056357806342966c681461058257005b80631a788a0211610303578063313ce567116102e0578063313ce567146104ec578063333e6f061461050757806333e1a2231461051c5780633644e5151461053b57005b80631a788a02146104625780631ede8708146104ae57806323b872dd146104cd57005b80631301fa911161033c5780631301fa91146103d4578063158ef93e146103f357806317f02b931461040c57806318160ddd1461042557005b806306fdde0314610368578063095ea7b3146103925780630e3c32ef146103c157005b3661036657005b005b348015610373575f80fd5b5061037c610ba0565b604051610389919061513a565b60405180910390f35b34801561039d575f80fd5b506103b16103ac36600461516d565b610c58565b6040519015158152602001610389565b6103666103cf366004615197565b610c71565b3480156103df575f80fd5b506103666103ee3660046151e7565b611216565b3480156103fe575f80fd5b506005546103b19060ff1681565b348015610417575f80fd5b50600b546103b19060ff1681565b348015610430575f80fd5b507f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace02545b604051908152602001610389565b34801561046d575f80fd5b5061048161047c366004615202565b61122a565b6040805173ffffffffffffffffffffffffffffffffffffffff938416815292909116602083015201610389565b3480156104b9575f80fd5b506103666104c836600461521d565b611332565b3480156104d8575f80fd5b506103b16104e736600461525c565b611580565b3480156104f7575f80fd5b5060405160128152602001610389565b348015610512575f80fd5b5061045460085481565b348015610527575f80fd5b5061036661053636600461529a565b611668565b348015610546575f80fd5b50610454611a94565b34801561055a575f80fd5b50610366611aa2565b34801561056e575f80fd5b5061036661057d36600461516d565b611ab4565b34801561058d575f80fd5b5061036661059c3660046152fe565b611ba2565b3480156105ac575f80fd5b506103b16105bb366004615202565b611bec565b3480156105cb575f80fd5b506103b16105da366004615202565b611bf8565b3480156105ea575f80fd5b506103666105f9366004615202565b611d59565b348015610609575f80fd5b5061037c611db4565b34801561061d575f80fd5b507fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff166103b1565b348015610653575f80fd5b50610366610662366004615202565b611e40565b348015610672575f80fd5b5061067b612156565b6040516103899190615364565b348015610693575f80fd5b506103666106a2366004615376565b612161565b3480156106b2575f80fd5b506104546106c1366004615202565b6121b1565b3480156106d1575f80fd5b50610366612201565b3480156106e5575f80fd5b506103666106f43660046152fe565b612212565b348015610704575f80fd5b5061036661071336600461516d565b612223565b348015610723575f80fd5b50610454610732366004615202565b61226e565b348015610742575f80fd5b50610366612278565b348015610756575f80fd5b5061075f612288565b6040516103899796959493929190615396565b34801561077d575f80fd5b5061067b612382565b348015610791575f80fd5b50610454600a5481565b3480156107a6575f80fd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610389565b348015610810575f80fd5b5061036661081f366004615453565b61238e565b34801561082f575f80fd5b506107e061083e366004615202565b73ffffffffffffffffffffffffffffffffffffffff9081165f908152601660205260409020541690565b348015610873575f80fd5b5061037c6124a1565b348015610887575f80fd5b506108906124f2565b6040516103899493929190938452602084019290925273ffffffffffffffffffffffffffffffffffffffff1660408301521515606082015260800190565b3480156108d9575f80fd5b506103b16108e836600461516d565b612532565b3480156108f8575f80fd5b506103b1610907366004615202565b612603565b348015610917575f80fd5b50610366610926366004615490565b61260e565b348015610936575f80fd5b5061093f612695565b60405161038991906154c2565b348015610957575f80fd5b506107e061096636600461550f565b612702565b348015610976575f80fd5b5061036661098536600461550f565b612811565b348015610995575f80fd5b5061045460095481565b3480156109aa575f80fd5b506103666109b9366004615202565b612d72565b3480156109c9575f80fd5b506103666109d8366004615202565b612dcc565b3480156109e8575f80fd5b506103666109f7366004615202565b612de2565b348015610a07575f80fd5b50610366612e3d565b348015610a1b575f80fd5b50610366610a2a366004615546565b612f16565b348015610a3a575f80fd5b5061045460075481565b348015610a4f575f80fd5b50610366610a5e3660046155b7565b6130d2565b348015610a6e575f80fd5b50610454610a7d36600461550f565b73ffffffffffffffffffffffffffffffffffffffff9182165f9081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020908152604080832093909416825291909152205490565b348015610ade575f80fd5b50610af2610aed366004615202565b613160565b60405161038991906155e3565b348015610b0a575f80fd5b50610366610b19366004615202565b61328e565b348015610b29575f80fd5b50610366610b38366004615202565b6132ee565b348015610b48575f80fd5b50610366610b5736600461568b565b613348565b348015610b67575f80fd5b506103b1610b76366004615202565b73ffffffffffffffffffffffffffffffffffffffff165f9081526004602052604090205460ff1690565b60605f7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace005b9050806003018054610bd6906156ff565b80601f0160208091040260200160405190810160405280929190818152602001828054610c02906156ff565b8015610c4d5780601f10610c2457610100808354040283529160200191610c4d565b820191905f5260205f20905b815481529060010190602001808311610c3057829003601f168201915b505050505091505090565b5f33610c6581858561341a565b60019150505b92915050565b610c79613427565b5f610c843085612702565b73ffffffffffffffffffffffffffffffffffffffff1603610d06576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f44524946543a2070616972206e6f74206578697374730000000000000000000060448201526064015b60405180910390fd5b610d113330846134b5565b610d3c30857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61341a565b8373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d85573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610da99190615750565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610f825780341015610e6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f44524946543a206e617469766520616d6f756e74206c657373207468616e206160448201527f6d6f756e744f74686572000000000000000000000000000000000000000000006064820152608401610cfd565b8373ffffffffffffffffffffffffffffffffffffffff1663f305d7198230855f80610eca7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005473ffffffffffffffffffffffffffffffffffffffff1690565b60405160e088901b7fffffffff0000000000000000000000000000000000000000000000000000000016815273ffffffffffffffffffffffffffffffffffffffff958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610f55573d5f803e3d5ffd5b50505050506040513d601f19601f82011682018060405250810190610f7a919061576b565b505050611210565b73ffffffffffffffffffffffffffffffffffffffff83166323b872dd336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152306024820152604481018490526064016020604051808303815f875af1158015611014573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110389190615796565b506040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602483015284169063095ea7b3906044016020604051808303815f875af11580156110ca573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110ee9190615796565b508373ffffffffffffffffffffffffffffffffffffffff1663e8e33700308585855f8061114f7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005473ffffffffffffffffffffffffffffffffffffffff1690565b60405160e089901b7fffffffff0000000000000000000000000000000000000000000000000000000016815273ffffffffffffffffffffffffffffffffffffffff9788166004820152958716602487015260448601949094526064850192909252608484015260a483015290911660c48201524260e4820152610104016060604051808303815f875af11580156111e8573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061120c919061576b565b5050505b50505050565b61121e613427565b6112278161355e565b50565b5f808273ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611275573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112999190615750565b91508273ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156112e4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113089190615750565b90503073ffffffffffffffffffffffffffffffffffffffff82160361132d5792909150565b915091565b61133a613427565b73ffffffffffffffffffffffffffffffffffffffff821615801590611374575073ffffffffffffffffffffffffffffffffffffffff811615155b611400576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f44524946543a20726f75746572206f72206f7468657220746f6b656e2069732060448201527f61207a65726f20616464726573730000000000000000000000000000000000006064820152608401610cfd565b6040805160028082526060820183525f9260208301908036833701905050905030815f81518110611433576114336157de565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508181600181518110611481576114816157de565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506114c630848661341a565b8273ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561150f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115339190615750565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611575576115708484836135cf565b611210565b6112108484836136ac565b73ffffffffffffffffffffffffffffffffffffffff83165f908152600460205260408120548490849060ff161580156115de575073ffffffffffffffffffffffffffffffffffffffff81165f9081526004602052604090205460ff16155b611644576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4164647265737320697320626c61636b6c6973746564000000000000000000006044820152606401610cfd565b5f6116508787876136ef565b905061165d878783613cc2565b979650505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff165f811580156116b25750825b90505f8267ffffffffffffffff1660011480156116ce5750303b155b9050811580156116dc575080155b15611713576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000016600117855583156117745784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b60055460ff16156117e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f416c726561647920696e697469616c697a6564000000000000000000000000006044820152606401610cfd565b6118556040518060400160405280600b81526020017f447269667420546f6b656e0000000000000000000000000000000000000000008152506040518060400160405280600581526020017f4452494654000000000000000000000000000000000000000000000000000000815250613ce5565b61185d613cf7565b61189b6040518060400160405280600b81526020017f447269667420546f6b656e000000000000000000000000000000000000000000815250613d07565b6118a48a613d4e565b6118ad8a612d72565b6118b68a612de2565b6b204fce5e3e250261100000006007557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6008819055600a55611388600c819055600d556161a8600e55600f805473ffffffffffffffffffffffffffffffffffffffff808c167fffffffffffffffffffffffff000000000000000000000000000000000000000092831617909255601280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000016620186a0179055601c80548a8416908316179055601d80549289169290911691909117905561199a8a60016130d2565b6119a58960016130d2565b6119b03060016130d2565b6119ba8a89613d57565b60408051808201909152600181527f310000000000000000000000000000000000000000000000000000000000000060208201526006906119fb9082615858565b50600580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558315611a885784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050505050565b5f611a9d613db1565b905090565b611aaa613427565b611ab2613dba565b565b611abd33612603565b611af5576040517fe2c8c9d5000000000000000000000000000000000000000000000000000000008152336004820152602401610cfd565b80600754611b2b82611b257f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace025490565b90613e51565b1115611b93576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f44524946543a20616d6f756e742065786365656473206d617820737570706c796044820152606401610cfd565b611b9d8383613d57565b505050565b611bab33611bec565b611be3576040517fc820b10b000000000000000000000000000000000000000000000000000000008152336004820152602401610cfd565b61122781613e5c565b5f610c6b600283613e66565b601d545f9073ffffffffffffffffffffffffffffffffffffffff16611c1e576001611cb2565b601d546040517f6f1e853300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015290911690636f1e853390602401602060405180830381865afa158015611c8c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611cb09190615796565b155b8015610c6b5750601c546040517f703db4e000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301525f6024830181905292169063703db4e090604401602060405180830381865afa158015611d2e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d529190615970565b1192915050565b611d61613427565b611d6c600282613e94565b156112275760405173ffffffffffffffffffffffffffffffffffffffff8216907f0a675452746933cefe3d74182e78db7afe57ba60eaa4234b5d85e9aa41b0610c905f90a250565b60068054611dc1906156ff565b80601f0160208091040260200160405190810160405280929190818152602001828054611ded906156ff565b8015611e385780601f10611e0f57610100808354040283529160200191611e38565b820191905f5260205f20905b815481529060010190602001808311611e1b57829003601f168201915b505050505081565b611e48613427565b73ffffffffffffffffffffffffffffffffffffffff8116158015611e6b57505f47115b15611edd57600f546040515f9173ffffffffffffffffffffffffffffffffffffffff169047908381818185875af1925050503d805f8114611ec7576040519150601f19603f3d011682016040523d82523d5f602084013e611ecc565b606091505b5050905080611ed9575f80fd5b5050565b73ffffffffffffffffffffffffffffffffffffffff811630148015611f0957505f611f07306121b1565b115b15611f3457600f54611ed99073ffffffffffffffffffffffffffffffffffffffff166108e8306121b1565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f9073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa158015611f9e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fc29190615970565b11156120f457600f546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8381169263a9059cbb9291169083906370a0823190602401602060405180830381865afa15801561203f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120639190615970565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303815f875af11580156120d0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ed99190615796565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f44524946543a206e6f2066756e647300000000000000000000000000000000006044820152606401610cfd565b6060611a9d5f613eb5565b612169613427565b600c829055600d81905560408051838152602081018390527f53482196ef67ac615caab1c3eca2c270acbfdcd75e57c5f24c1b98b10c8e6e0491015b60405180910390a15050565b5f807f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace005b73ffffffffffffffffffffffffffffffffffffffff9093165f9081526020939093525050604090205490565b612209613427565b611ab25f613ec1565b61221a613427565b61122781613f56565b61222c33611bec565b612264576040517fc820b10b000000000000000000000000000000000000000000000000000000008152336004820152602401610cfd565b611ed98282613fa7565b5f610c6b82613fbc565b612280613427565b611ab2613fe4565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10080549091501580156122c657506001810154155b61232c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a656400000000000000000000006044820152606401610cfd565b61233461405d565b61233c6140ae565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6060611a9d6002613eb5565b612396613427565b73ffffffffffffffffffffffffffffffffffffffff8316158015906123d0575073ffffffffffffffffffffffffffffffffffffffff821615155b61245c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f44524946543a20726f75746572206f72206f7468657220746f6b656e2069732060448201527f7a65726f206164647265737300000000000000000000000000000000000000006064820152608401610cfd565b8261246781846140d7565b8180156124775750601a5460ff16155b1561248457612484612e3d565b601a54610100900460ff1615155f0361121057611210600161355e565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0480546060917f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0091610bd6906156ff565b600c545f8080612500614270565b600f54601a549596919573ffffffffffffffffffffffffffffffffffffffff9091169450610100900460ff1692509050565b335f81815260046020526040812054909190849060ff1615801561257b575073ffffffffffffffffffffffffffffffffffffffff81165f9081526004602052604090205460ff16155b6125e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4164647265737320697320626c61636b6c6973746564000000000000000000006044820152606401610cfd565b5f6125ed3387876136ef565b90506125f986826142ae565b9695505050505050565b5f610c6b8183613e66565b612616613427565b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001684151590811790915560088390556009829055604080519182526020820184905281018290527f2d957fa64be5a49e40c541b8f8bc25b8846d073b4a89515a2230653a295b93c0906060015b60405180910390a1505050565b606060158054806020026020016040519081016040528092919081815260200182805480156126f857602002820191905f5260205f20905b815473ffffffffffffffffffffffffffffffffffffffff1681526001909101906020018083116126cd575b5050505050905090565b5f808373ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561274d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127719190615750565b6040517fe6a4390500000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff85811660248301529192509082169063e6a4390590604401602060405180830381865afa1580156127e5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906128099190615750565b949350505050565b612819613427565b73ffffffffffffffffffffffffffffffffffffffff821615801590612853575073ffffffffffffffffffffffffffffffffffffffff811615155b6128df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f44524946543a2074686520726f75746572206f7220706169722069732061207a60448201527f65726f20616464726573730000000000000000000000000000000000000000006064820152608401610cfd565b6128e8816142bb565b1561294f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f44524946543a20746865207061697220616c72656164792065786973740000006044820152606401610cfd565b5f8061295a8361122a565b909250905073ffffffffffffffffffffffffffffffffffffffff82163014612a04576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f44524946543a207468652070616972206973206e6f74206173736f636961746560448201527f642077697468207468697320746f6b656e0000000000000000000000000000006064820152608401610cfd565b73ffffffffffffffffffffffffffffffffffffffff8084165f90815260146020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558388168352601790915280822081518083018084527f95d89b4100000000000000000000000000000000000000000000000000000000905291518894919383928716916395d89b419160448086019290818703018183875af1158015612abd573d5f803e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052612b029190810190615987565b815273ffffffffffffffffffffffffffffffffffffffff851660209182015282546001810184555f93845292208151919260020201908190612b449082615858565b506020918201516001909101805473ffffffffffffffffffffffffffffffffffffffff9283167fffffffffffffffffffffffff0000000000000000000000000000000000000000918216179091558682165f90815260168452604080822080549487169490931684179092559182526018909252205460ff16612c67576015805460018082019092557f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec4750180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091555f90815260186020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690911790555b6040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602483015285169063095ea7b3906044016020604051808303815f875af1158015612cf8573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612d1c9190615796565b50612d288560016130d2565b60405160019073ffffffffffffffffffffffffffffffffffffffff8616907ff40a563af144a84735f7f6c7c3029794b0ac17713e5f048d3fd00ed85aa4ca7a905f90a35050505050565b612d7a613427565b612d845f826142f7565b156112275760405173ffffffffffffffffffffffffffffffffffffffff8216907fe46fef8bbff1389d9010703cf8ebb363fb3daf5bf56edc27080b67bc8d9251ea905f90a250565b612dd4613427565b612ddd81612d72565b611227815b612dea613427565b612df56002826142f7565b156112275760405173ffffffffffffffffffffffffffffffffffffffff8216907f92308bb7573b2a3d17ddb868b39d8ebec433f3194421abc22d084f89658c9bad905f90a250565b612e45613427565b601554612eae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f44524946543a206e6f2074726164696e67207061697220666f756e64000000006044820152606401610cfd565b601a80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556011545f03612eec57612eec6007613f56565b6040517f799663458a5ef2936f7fa0c99b3336c69c25890f82974f04e811e5bb359186c7905f90a1565b83421115612f53576040517f6279130200000000000000000000000000000000000000000000000000000000815260048101859052602401610cfd565b5f7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888612fca8c73ffffffffffffffffffffffffffffffffffffffff165f9081527f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb006020526040902080546001810190915590565b60408051602081019690965273ffffffffffffffffffffffffffffffffffffffff94851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090505f61303182614318565b90505f6130408287878761435f565b90508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146130c7576040517f4b800e4600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff80831660048301528b166024820152604401610cfd565b611a888a8a8a61341a565b6130da613427565b73ffffffffffffffffffffffffffffffffffffffff82165f8181526013602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168515159081179091558251938452908301527fd5144d2a6c8ff9b87b7a40852df5102cab2ce561c06b56cc6fe7ccf1fa7f8c2d91016121a5565b73ffffffffffffffffffffffffffffffffffffffff81165f908152601760209081526040808320805482518185028101850190935280835260609492939192909184015b82821015613283578382905f5260205f2090600202016040518060400160405290815f820180546131d4906156ff565b80601f0160208091040260200160405190810160405280929190818152602001828054613200906156ff565b801561324b5780601f106132225761010080835404028352916020019161324b565b820191905f5260205f20905b81548152906001019060200180831161322e57829003601f168201915b505050918352505060019182015473ffffffffffffffffffffffffffffffffffffffff166020918201529183529290920191016131a4565b505050509050919050565b613296613427565b73ffffffffffffffffffffffffffffffffffffffff81166132e5576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f6004820152602401610cfd565b61122781613ec1565b6132f6613427565b6133005f82613e94565b156112275760405173ffffffffffffffffffffffffffffffffffffffff8216907fed998b960f6340d045f620c119730f7aa7995e7425c2401d3a5b64ff998a59e9905f90a250565b613350613427565b5f5b828110156133e7578160045f868685818110613370576133706157de565b90506020020160208101906133859190615202565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f2080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790556133e081615a6f565b9050613352565b5060405181151581527f7dc357bd865f9219c544a8b0b14cb1583b26e3ffe765b3396ef2051d81a8de5690602001612688565b611b9d838383600161438b565b336134667f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614611ab2576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610cfd565b73ffffffffffffffffffffffffffffffffffffffff8316613504576040517f96c6fd1e0000000000000000000000000000000000000000000000000000000081525f6004820152602401610cfd565b73ffffffffffffffffffffffffffffffffffffffff8216613553576040517fec442f050000000000000000000000000000000000000000000000000000000081525f6004820152602401610cfd565b611b9d8383836144f5565b601a8054821515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff9091161790556040517fbe9e7a475b5e837d3520eb528f8f8b34ce6f9fd8edff27d7b2117015df627cf2906135c490831515815260200190565b60405180910390a150565b6012545f906135f69063ffffffff166135f06135e9614270565b879061460f565b9061461a565b905073ffffffffffffffffffffffffffffffffffffffff8316635c11d7958561361f8185614625565b600f546040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b168152613679939291889173ffffffffffffffffffffffffffffffffffffffff909116904290600401615aa6565b5f604051808303815f87803b158015613690575f80fd5b505af11580156136a2573d5f803e3d5ffd5b5050505050505050565b6012545f906136c69063ffffffff166135f06135e9614270565b905073ffffffffffffffffffffffffffffffffffffffff831663791ac9478561361f8185614625565b5f61372e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141580156137a357507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005473ffffffffffffffffffffffffffffffffffffffff848116911614155b80156137c4575073ffffffffffffffffffffffffffffffffffffffff831615155b1561389057601a5460ff166138905773ffffffffffffffffffffffffffffffffffffffff84165f9081526013602052604090205460ff168061382a575073ffffffffffffffffffffffffffffffffffffffff83165f9081526013602052604090205460ff165b613890576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f44524946543a2054726164696e67206973206e6f74206163746976652e0000006044820152606401610cfd565b73ffffffffffffffffffffffffffffffffffffffff83165f9081526013602052604090205460ff16806138e7575073ffffffffffffffffffffffffffffffffffffffff84165f9081526013602052604090205460ff165b806138fa5750601a54610100900460ff16155b80613903575081155b1561390f575080613cbb565b61391884614630565b8015613949575073ffffffffffffffffffffffffffffffffffffffff83165f9081526018602052604090205460ff16155b80613989575061395883614630565b8015613989575073ffffffffffffffffffffffffffffffffffffffff84165f9081526018602052604090205460ff16155b156139fa57600a548211156139fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f44524946543a206578636565647320746865206d617820747820616d6f756e746044820152606401610cfd565b43601b546002613a0a9190615aee565b118015613a3c575073ffffffffffffffffffffffffffffffffffffffff84165f9081526018602052604090205460ff16155b15613b42575f613a4b85614630565b15613aa6575073ffffffffffffffffffffffffffffffffffffffff83165f90815260046020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155613b06565b613aaf84614630565b15613b06575073ffffffffffffffffffffffffffffffffffffffff84165f90815260046020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091555b8015613b4057601254613b3890613b319063ffffffff908116906135f0908790620182b89061460f16565b8490614625565b915050613cbb565b505b5f613b4c85614630565b15613be657601254600c54613b719163ffffffff908116916135f09187919061460f16565b90505f613b804260115461463a565b118015613baf575073ffffffffffffffffffffffffffffffffffffffff84165f90815260196020526040902054155b15613be657613bc042610384615aee565b73ffffffffffffffffffffffffffffffffffffffff85165f908152601960205260409020555b613bef84614630565b8015613c11575073ffffffffffffffffffffffffffffffffffffffff85163014155b15613c9c57613c1f85611bf8565b80613c4e575073ffffffffffffffffffffffffffffffffffffffff85165f908152601960205260409020544211155b15613c7957601254613c729063ffffffff166135f0613c6b614270565b869061460f565b9050613c9c565b601254600d54613c999163ffffffff908116916135f09187919061460f16565b90505b8015613cad57613cad8530836134b5565b613cb78382614625565b9150505b9392505050565b5f33613ccf858285614691565b613cda8585856134b5565b506001949350505050565b613ced614777565b611ed982826147de565b613cff614777565b611ab2614841565b613d0f614777565b611227816040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250614892565b61122781614904565b73ffffffffffffffffffffffffffffffffffffffff8216613da6576040517fec442f050000000000000000000000000000000000000000000000000000000081525f6004820152602401610cfd565b611ed95f83836144f5565b5f611a9d614915565b613dc2614988565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001681557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016135c4565b5f613cbb8284615aee565b61122733826149e3565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526001830160205260408120541515613cbb565b5f613cbb8373ffffffffffffffffffffffffffffffffffffffff8416614a3d565b60605f613cbb83614b20565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080547fffffffffffffffffffffffff0000000000000000000000000000000000000000811673ffffffffffffffffffffffffffffffffffffffff848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b613f638162015180615b01565b613f6d9042615aee565b601181905560108290556040519081527f3b771000357cf1fcb5c8f4d4bc3025e2fa2d8494dd7494b66062149ddab5dc2d906020016135c4565b613fb2823383614691565b611ed982826149e3565b5f807f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb006121d5565b613fec614b79565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833613e2c565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610bd6906156ff565b60605f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100610bc5565b5f6140e23083612702565b73ffffffffffffffffffffffffffffffffffffffff161461415f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f44524946543a207061697220616c7265616479206578697374730000000000006044820152606401610cfd565b5f8273ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156141a9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906141cd9190615750565b6040517fc9c6539600000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8481166024830152919091169063c9c65396906044016020604051808303815f875af1158015614240573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906142649190615750565b9050611b9d8382612811565b5f80600d54600e546142829190615b18565b90505f613cbb600d54611b2561429a4260115461463a565b6010546142a890879061461a565b9061460f565b5f33610c658185856134b5565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526014602052604081205460ff16156142f057506001919050565b505f919050565b5f613cbb8373ffffffffffffffffffffffffffffffffffffffff8416614bd5565b5f610c6b614324613db1565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f805f8061436f88888888614c21565b92509250925061437f8282614d14565b50909695505050505050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0073ffffffffffffffffffffffffffffffffffffffff85166143fb576040517fe602df050000000000000000000000000000000000000000000000000000000081525f6004820152602401610cfd565b73ffffffffffffffffffffffffffffffffffffffff841661444a576040517f94280d620000000000000000000000000000000000000000000000000000000081525f6004820152602401610cfd565b73ffffffffffffffffffffffffffffffffffffffff8086165f908152600183016020908152604080832093881683529290522083905581156144ee578373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040516144e591815260200190565b60405180910390a35b5050505050565b600b5460ff16801561450d575061450b82614630565b155b801561453e575073ffffffffffffffffffffffffffffffffffffffff82165f9081526013602052604090205460ff16155b15614604575f61454d836121b1565b60085490915061455d8284613e51565b1115801561457657506009546145738284613e51565b10155b614602576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f44524946543a20696e76616c69642076616c75652c206e6f74206d617463686560448201527f6420686f6c64696e67206c696d697400000000000000000000000000000000006064820152608401610cfd565b505b611b9d838383614e17565b5f613cbb8284615b01565b5f613cbb8284615b2b565b5f613cbb8284615b18565b5f610c6b826142bb565b5f8183101580614648575082155b80614651575081155b1561465d57505f610c6b565b5f6146688484615b18565b90505f61467d60186135f0603c81868261461a565b614688906001615aee565b95945050505050565b73ffffffffffffffffffffffffffffffffffffffff8381165f9081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146112105781811015614769576040517ffb8f41b200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024810182905260448101839052606401610cfd565b61121084848484035f61438b565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff16611ab2576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6147e6614777565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace007f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace036148328482615858565b50600481016112108382615858565b614849614777565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b61489a614777565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1026148e68482615858565b50600381016148f58382615858565b505f8082556001909101555050565b61490c614777565b61122781614e2a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61493f614e32565b614947614ead565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff16611ab2576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216614a32576040517f96c6fd1e0000000000000000000000000000000000000000000000000000000081525f6004820152602401610cfd565b611ed9825f836144f5565b5f8181526001830160205260408120548015614b17575f614a5f600183615b18565b85549091505f90614a7290600190615b18565b9050808214614ad1575f865f018281548110614a9057614a906157de565b905f5260205f200154905080875f018481548110614ab057614ab06157de565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080614ae257614ae2615b63565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050610c6b565b5f915050610c6b565b6060815f01805480602002602001604051908101604052809291908181526020018280548015614b6d57602002820191905f5260205f20905b815481526020019060010190808311614b59575b50505050509050919050565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff1615611ab2576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f818152600183016020526040812054614c1a57508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155610c6b565b505f610c6b565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115614c5a57505f91506003905082614d0a565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015614cab573d5f803e3d5ffd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116614d0157505f925060019150829050614d0a565b92505f91508190505b9450945094915050565b5f826003811115614d2757614d27615b90565b03614d30575050565b6001826003811115614d4457614d44615b90565b03614d7b576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115614d8f57614d8f615b90565b03614dc9576040517ffce698f700000000000000000000000000000000000000000000000000000000815260048101829052602401610cfd565b6003826003811115614ddd57614ddd615b90565b03611ed9576040517fd78bce0c00000000000000000000000000000000000000000000000000000000815260048101829052602401610cfd565b614e1f614b79565b611b9d838383614f02565b613296614777565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081614e5d61405d565b805190915015614e7557805160209091012092915050565b81548015614e84579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081614ed86140ae565b805190915015614ef057805160209091012092915050565b60018201548015614e84579392505050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0073ffffffffffffffffffffffffffffffffffffffff8416614f5c5781816002015f828254614f519190615aee565b9091555061500c9050565b73ffffffffffffffffffffffffffffffffffffffff84165f9081526020829052604090205482811015614fe1576040517fe450d38c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff861660048201526024810182905260448101849052606401610cfd565b73ffffffffffffffffffffffffffffffffffffffff85165f9081526020839052604090209083900390555b73ffffffffffffffffffffffffffffffffffffffff8316615037576002810180548390039055615062565b73ffffffffffffffffffffffffffffffffffffffff83165f9081526020829052604090208054830190555b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516150c191815260200190565b60405180910390a350505050565b5f5b838110156150e95781810151838201526020016150d1565b50505f910152565b5f81518084526151088160208601602086016150cf565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081525f613cbb60208301846150f1565b73ffffffffffffffffffffffffffffffffffffffff81168114611227575f80fd5b5f806040838503121561517e575f80fd5b82356151898161514c565b946020939093013593505050565b5f805f80608085870312156151aa575f80fd5b84356151b58161514c565b935060208501356151c58161514c565b93969395505050506040820135916060013590565b8015158114611227575f80fd5b5f602082840312156151f7575f80fd5b8135613cbb816151da565b5f60208284031215615212575f80fd5b8135613cbb8161514c565b5f805f6060848603121561522f575f80fd5b8335925060208401356152418161514c565b915060408401356152518161514c565b809150509250925092565b5f805f6060848603121561526e575f80fd5b83356152798161514c565b925060208401356152898161514c565b929592945050506040919091013590565b5f805f805f60a086880312156152ae575f80fd5b85356152b98161514c565b945060208601356152c98161514c565b93506040860135925060608601356152e08161514c565b915060808601356152f08161514c565b809150509295509295909350565b5f6020828403121561530e575f80fd5b5035919050565b5f8151808452602080850194508084015f5b8381101561535957815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101615327565b509495945050505050565b602081525f613cbb6020830184615315565b5f8060408385031215615387575f80fd5b50508035926020909101359150565b7fff00000000000000000000000000000000000000000000000000000000000000881681525f602060e0818401526153d160e084018a6150f1565b83810360408501526153e3818a6150f1565b6060850189905273ffffffffffffffffffffffffffffffffffffffff8816608086015260a0850187905284810360c086015285518082528387019250908301905f5b8181101561544157835183529284019291840191600101615425565b50909c9b505050505050505050505050565b5f805f60608486031215615465575f80fd5b83356154708161514c565b925060208401356154808161514c565b91506040840135615251816151da565b5f805f606084860312156154a2575f80fd5b83356154ad816151da565b95602085013595506040909401359392505050565b602080825282518282018190525f9190848201906040850190845b8181101561437f57835173ffffffffffffffffffffffffffffffffffffffff16835292840192918401916001016154dd565b5f8060408385031215615520575f80fd5b823561552b8161514c565b9150602083013561553b8161514c565b809150509250929050565b5f805f805f805f60e0888a03121561555c575f80fd5b87356155678161514c565b965060208801356155778161514c565b95506040880135945060608801359350608088013560ff8116811461559a575f80fd5b9699959850939692959460a0840135945060c09093013592915050565b5f80604083850312156155c8575f80fd5b82356155d38161514c565b9150602083013561553b816151da565b5f6020808301818452808551808352604092508286019150828160051b8701018488015f5b8381101561567d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08984030185528151805187855261564a888601826150f1565b9189015173ffffffffffffffffffffffffffffffffffffffff169489019490945294870194925090860190600101615608565b509098975050505050505050565b5f805f6040848603121561569d575f80fd5b833567ffffffffffffffff808211156156b4575f80fd5b818601915086601f8301126156c7575f80fd5b8135818111156156d5575f80fd5b8760208260051b85010111156156e9575f80fd5b60209283019550935050840135615251816151da565b600181811c9082168061571357607f821691505b60208210810361574a577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b5f60208284031215615760575f80fd5b8151613cbb8161514c565b5f805f6060848603121561577d575f80fd5b8351925060208401519150604084015190509250925092565b5f602082840312156157a6575f80fd5b8151613cbb816151da565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b601f821115611b9d575f81815260208120601f850160051c810160208610156158315750805b601f850160051c820191505b818110156158505782815560010161583d565b505050505050565b815167ffffffffffffffff811115615872576158726157b1565b6158868161588084546156ff565b8461580b565b602080601f8311600181146158d8575f84156158a25750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555615850565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561592457888601518255948401946001909101908401615905565b508582101561596057878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b5f60208284031215615980575f80fd5b5051919050565b5f60208284031215615997575f80fd5b815167ffffffffffffffff808211156159ae575f80fd5b818401915084601f8301126159c1575f80fd5b8151818111156159d3576159d36157b1565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715615a1957615a196157b1565b81604052828152876020848701011115615a31575f80fd5b61165d8360208301602088016150cf565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615a9f57615a9f615a42565b5060010190565b85815284602082015260a060408201525f615ac460a0830186615315565b73ffffffffffffffffffffffffffffffffffffffff94909416606083015250608001529392505050565b80820180821115610c6b57610c6b615a42565b8082028115828204841417610c6b57610c6b615a42565b81810381811115610c6b57610c6b615a42565b5f82615b5e577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffdfea26469706673582212202ff2fb812d27839e6d2bd74526334eecbbcaf2377381f552a64fc1acd71935cd64736f6c63430008140033
Deployed Bytecode
0x60806040526004361061035f575f3560e01c80637ecebe00116101c3578063b67db89d116100f5578063d5abeb0111610099578063f2fde38b1161006b578063f2fde38b14610aff578063f81094f314610b1e578063fb2f349214610b3d578063fe575a8714610b5c57005b8063d5abeb0114610a2f578063d63cad2214610a44578063dd62ed3e14610a63578063ef77790e14610ad357005b8063c630948d116100d2578063c630948d146109be578063c64d0ebc146109dd578063c9567bf9146109fc578063d505accf14610a1057005b8063b67db89d1461096b578063bbed0e841461098a578063c2e3273d1461099f57005b806394efa85211610167578063aa271e1a11610139578063aa271e1a146108ed578063aaf37c391461090c578063ae6be5671461092b578063b4f69a2f1461094c57005b806394efa8521461082457806395d89b4114610868578063995b5aae1461087c578063a9059cbb146108ce57005b806386fe8b43116101a057806386fe8b43146107725780638c0b5e22146107865780638da5cb5b1461079b57806394e831fe1461080557005b80637ecebe00146107185780638456cb591461073757806384b0196e1461074b57005b80633f4ba83a1161029c5780635c975abb1161024057806370a082311161021257806370a08231146106a7578063715018a6146106c6578063788a6694146106da57806379cc6790146106f957005b80635c975abb1461061257806368742da6146106485780636b32810b146106675780636db794371461068857005b80634334614a116102795780634334614a146105a15780634b3209ef146105c05780634f5632f8146105df57806354fd4d50146105fe57005b80633f4ba83a1461054f57806340c10f191461056357806342966c681461058257005b80631a788a0211610303578063313ce567116102e0578063313ce567146104ec578063333e6f061461050757806333e1a2231461051c5780633644e5151461053b57005b80631a788a02146104625780631ede8708146104ae57806323b872dd146104cd57005b80631301fa911161033c5780631301fa91146103d4578063158ef93e146103f357806317f02b931461040c57806318160ddd1461042557005b806306fdde0314610368578063095ea7b3146103925780630e3c32ef146103c157005b3661036657005b005b348015610373575f80fd5b5061037c610ba0565b604051610389919061513a565b60405180910390f35b34801561039d575f80fd5b506103b16103ac36600461516d565b610c58565b6040519015158152602001610389565b6103666103cf366004615197565b610c71565b3480156103df575f80fd5b506103666103ee3660046151e7565b611216565b3480156103fe575f80fd5b506005546103b19060ff1681565b348015610417575f80fd5b50600b546103b19060ff1681565b348015610430575f80fd5b507f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace02545b604051908152602001610389565b34801561046d575f80fd5b5061048161047c366004615202565b61122a565b6040805173ffffffffffffffffffffffffffffffffffffffff938416815292909116602083015201610389565b3480156104b9575f80fd5b506103666104c836600461521d565b611332565b3480156104d8575f80fd5b506103b16104e736600461525c565b611580565b3480156104f7575f80fd5b5060405160128152602001610389565b348015610512575f80fd5b5061045460085481565b348015610527575f80fd5b5061036661053636600461529a565b611668565b348015610546575f80fd5b50610454611a94565b34801561055a575f80fd5b50610366611aa2565b34801561056e575f80fd5b5061036661057d36600461516d565b611ab4565b34801561058d575f80fd5b5061036661059c3660046152fe565b611ba2565b3480156105ac575f80fd5b506103b16105bb366004615202565b611bec565b3480156105cb575f80fd5b506103b16105da366004615202565b611bf8565b3480156105ea575f80fd5b506103666105f9366004615202565b611d59565b348015610609575f80fd5b5061037c611db4565b34801561061d575f80fd5b507fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff166103b1565b348015610653575f80fd5b50610366610662366004615202565b611e40565b348015610672575f80fd5b5061067b612156565b6040516103899190615364565b348015610693575f80fd5b506103666106a2366004615376565b612161565b3480156106b2575f80fd5b506104546106c1366004615202565b6121b1565b3480156106d1575f80fd5b50610366612201565b3480156106e5575f80fd5b506103666106f43660046152fe565b612212565b348015610704575f80fd5b5061036661071336600461516d565b612223565b348015610723575f80fd5b50610454610732366004615202565b61226e565b348015610742575f80fd5b50610366612278565b348015610756575f80fd5b5061075f612288565b6040516103899796959493929190615396565b34801561077d575f80fd5b5061067b612382565b348015610791575f80fd5b50610454600a5481565b3480156107a6575f80fd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610389565b348015610810575f80fd5b5061036661081f366004615453565b61238e565b34801561082f575f80fd5b506107e061083e366004615202565b73ffffffffffffffffffffffffffffffffffffffff9081165f908152601660205260409020541690565b348015610873575f80fd5b5061037c6124a1565b348015610887575f80fd5b506108906124f2565b6040516103899493929190938452602084019290925273ffffffffffffffffffffffffffffffffffffffff1660408301521515606082015260800190565b3480156108d9575f80fd5b506103b16108e836600461516d565b612532565b3480156108f8575f80fd5b506103b1610907366004615202565b612603565b348015610917575f80fd5b50610366610926366004615490565b61260e565b348015610936575f80fd5b5061093f612695565b60405161038991906154c2565b348015610957575f80fd5b506107e061096636600461550f565b612702565b348015610976575f80fd5b5061036661098536600461550f565b612811565b348015610995575f80fd5b5061045460095481565b3480156109aa575f80fd5b506103666109b9366004615202565b612d72565b3480156109c9575f80fd5b506103666109d8366004615202565b612dcc565b3480156109e8575f80fd5b506103666109f7366004615202565b612de2565b348015610a07575f80fd5b50610366612e3d565b348015610a1b575f80fd5b50610366610a2a366004615546565b612f16565b348015610a3a575f80fd5b5061045460075481565b348015610a4f575f80fd5b50610366610a5e3660046155b7565b6130d2565b348015610a6e575f80fd5b50610454610a7d36600461550f565b73ffffffffffffffffffffffffffffffffffffffff9182165f9081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020908152604080832093909416825291909152205490565b348015610ade575f80fd5b50610af2610aed366004615202565b613160565b60405161038991906155e3565b348015610b0a575f80fd5b50610366610b19366004615202565b61328e565b348015610b29575f80fd5b50610366610b38366004615202565b6132ee565b348015610b48575f80fd5b50610366610b5736600461568b565b613348565b348015610b67575f80fd5b506103b1610b76366004615202565b73ffffffffffffffffffffffffffffffffffffffff165f9081526004602052604090205460ff1690565b60605f7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace005b9050806003018054610bd6906156ff565b80601f0160208091040260200160405190810160405280929190818152602001828054610c02906156ff565b8015610c4d5780601f10610c2457610100808354040283529160200191610c4d565b820191905f5260205f20905b815481529060010190602001808311610c3057829003601f168201915b505050505091505090565b5f33610c6581858561341a565b60019150505b92915050565b610c79613427565b5f610c843085612702565b73ffffffffffffffffffffffffffffffffffffffff1603610d06576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f44524946543a2070616972206e6f74206578697374730000000000000000000060448201526064015b60405180910390fd5b610d113330846134b5565b610d3c30857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61341a565b8373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d85573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610da99190615750565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610f825780341015610e6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f44524946543a206e617469766520616d6f756e74206c657373207468616e206160448201527f6d6f756e744f74686572000000000000000000000000000000000000000000006064820152608401610cfd565b8373ffffffffffffffffffffffffffffffffffffffff1663f305d7198230855f80610eca7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005473ffffffffffffffffffffffffffffffffffffffff1690565b60405160e088901b7fffffffff0000000000000000000000000000000000000000000000000000000016815273ffffffffffffffffffffffffffffffffffffffff958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610f55573d5f803e3d5ffd5b50505050506040513d601f19601f82011682018060405250810190610f7a919061576b565b505050611210565b73ffffffffffffffffffffffffffffffffffffffff83166323b872dd336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152306024820152604481018490526064016020604051808303815f875af1158015611014573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110389190615796565b506040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602483015284169063095ea7b3906044016020604051808303815f875af11580156110ca573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110ee9190615796565b508373ffffffffffffffffffffffffffffffffffffffff1663e8e33700308585855f8061114f7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005473ffffffffffffffffffffffffffffffffffffffff1690565b60405160e089901b7fffffffff0000000000000000000000000000000000000000000000000000000016815273ffffffffffffffffffffffffffffffffffffffff9788166004820152958716602487015260448601949094526064850192909252608484015260a483015290911660c48201524260e4820152610104016060604051808303815f875af11580156111e8573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061120c919061576b565b5050505b50505050565b61121e613427565b6112278161355e565b50565b5f808273ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611275573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112999190615750565b91508273ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156112e4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113089190615750565b90503073ffffffffffffffffffffffffffffffffffffffff82160361132d5792909150565b915091565b61133a613427565b73ffffffffffffffffffffffffffffffffffffffff821615801590611374575073ffffffffffffffffffffffffffffffffffffffff811615155b611400576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f44524946543a20726f75746572206f72206f7468657220746f6b656e2069732060448201527f61207a65726f20616464726573730000000000000000000000000000000000006064820152608401610cfd565b6040805160028082526060820183525f9260208301908036833701905050905030815f81518110611433576114336157de565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508181600181518110611481576114816157de565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506114c630848661341a565b8273ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561150f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115339190615750565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611575576115708484836135cf565b611210565b6112108484836136ac565b73ffffffffffffffffffffffffffffffffffffffff83165f908152600460205260408120548490849060ff161580156115de575073ffffffffffffffffffffffffffffffffffffffff81165f9081526004602052604090205460ff16155b611644576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4164647265737320697320626c61636b6c6973746564000000000000000000006044820152606401610cfd565b5f6116508787876136ef565b905061165d878783613cc2565b979650505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff165f811580156116b25750825b90505f8267ffffffffffffffff1660011480156116ce5750303b155b9050811580156116dc575080155b15611713576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000016600117855583156117745784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b60055460ff16156117e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f416c726561647920696e697469616c697a6564000000000000000000000000006044820152606401610cfd565b6118556040518060400160405280600b81526020017f447269667420546f6b656e0000000000000000000000000000000000000000008152506040518060400160405280600581526020017f4452494654000000000000000000000000000000000000000000000000000000815250613ce5565b61185d613cf7565b61189b6040518060400160405280600b81526020017f447269667420546f6b656e000000000000000000000000000000000000000000815250613d07565b6118a48a613d4e565b6118ad8a612d72565b6118b68a612de2565b6b204fce5e3e250261100000006007557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6008819055600a55611388600c819055600d556161a8600e55600f805473ffffffffffffffffffffffffffffffffffffffff808c167fffffffffffffffffffffffff000000000000000000000000000000000000000092831617909255601280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000016620186a0179055601c80548a8416908316179055601d80549289169290911691909117905561199a8a60016130d2565b6119a58960016130d2565b6119b03060016130d2565b6119ba8a89613d57565b60408051808201909152600181527f310000000000000000000000000000000000000000000000000000000000000060208201526006906119fb9082615858565b50600580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558315611a885784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050505050565b5f611a9d613db1565b905090565b611aaa613427565b611ab2613dba565b565b611abd33612603565b611af5576040517fe2c8c9d5000000000000000000000000000000000000000000000000000000008152336004820152602401610cfd565b80600754611b2b82611b257f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace025490565b90613e51565b1115611b93576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f44524946543a20616d6f756e742065786365656473206d617820737570706c796044820152606401610cfd565b611b9d8383613d57565b505050565b611bab33611bec565b611be3576040517fc820b10b000000000000000000000000000000000000000000000000000000008152336004820152602401610cfd565b61122781613e5c565b5f610c6b600283613e66565b601d545f9073ffffffffffffffffffffffffffffffffffffffff16611c1e576001611cb2565b601d546040517f6f1e853300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015290911690636f1e853390602401602060405180830381865afa158015611c8c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611cb09190615796565b155b8015610c6b5750601c546040517f703db4e000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301525f6024830181905292169063703db4e090604401602060405180830381865afa158015611d2e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d529190615970565b1192915050565b611d61613427565b611d6c600282613e94565b156112275760405173ffffffffffffffffffffffffffffffffffffffff8216907f0a675452746933cefe3d74182e78db7afe57ba60eaa4234b5d85e9aa41b0610c905f90a250565b60068054611dc1906156ff565b80601f0160208091040260200160405190810160405280929190818152602001828054611ded906156ff565b8015611e385780601f10611e0f57610100808354040283529160200191611e38565b820191905f5260205f20905b815481529060010190602001808311611e1b57829003601f168201915b505050505081565b611e48613427565b73ffffffffffffffffffffffffffffffffffffffff8116158015611e6b57505f47115b15611edd57600f546040515f9173ffffffffffffffffffffffffffffffffffffffff169047908381818185875af1925050503d805f8114611ec7576040519150601f19603f3d011682016040523d82523d5f602084013e611ecc565b606091505b5050905080611ed9575f80fd5b5050565b73ffffffffffffffffffffffffffffffffffffffff811630148015611f0957505f611f07306121b1565b115b15611f3457600f54611ed99073ffffffffffffffffffffffffffffffffffffffff166108e8306121b1565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f9073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa158015611f9e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fc29190615970565b11156120f457600f546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8381169263a9059cbb9291169083906370a0823190602401602060405180830381865afa15801561203f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120639190615970565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303815f875af11580156120d0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ed99190615796565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f44524946543a206e6f2066756e647300000000000000000000000000000000006044820152606401610cfd565b6060611a9d5f613eb5565b612169613427565b600c829055600d81905560408051838152602081018390527f53482196ef67ac615caab1c3eca2c270acbfdcd75e57c5f24c1b98b10c8e6e0491015b60405180910390a15050565b5f807f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace005b73ffffffffffffffffffffffffffffffffffffffff9093165f9081526020939093525050604090205490565b612209613427565b611ab25f613ec1565b61221a613427565b61122781613f56565b61222c33611bec565b612264576040517fc820b10b000000000000000000000000000000000000000000000000000000008152336004820152602401610cfd565b611ed98282613fa7565b5f610c6b82613fbc565b612280613427565b611ab2613fe4565b5f60608082808083817fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10080549091501580156122c657506001810154155b61232c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4549503731323a20556e696e697469616c697a656400000000000000000000006044820152606401610cfd565b61233461405d565b61233c6140ae565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009c939b5091995046985030975095509350915050565b6060611a9d6002613eb5565b612396613427565b73ffffffffffffffffffffffffffffffffffffffff8316158015906123d0575073ffffffffffffffffffffffffffffffffffffffff821615155b61245c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f44524946543a20726f75746572206f72206f7468657220746f6b656e2069732060448201527f7a65726f206164647265737300000000000000000000000000000000000000006064820152608401610cfd565b8261246781846140d7565b8180156124775750601a5460ff16155b1561248457612484612e3d565b601a54610100900460ff1615155f0361121057611210600161355e565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0480546060917f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0091610bd6906156ff565b600c545f8080612500614270565b600f54601a549596919573ffffffffffffffffffffffffffffffffffffffff9091169450610100900460ff1692509050565b335f81815260046020526040812054909190849060ff1615801561257b575073ffffffffffffffffffffffffffffffffffffffff81165f9081526004602052604090205460ff16155b6125e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4164647265737320697320626c61636b6c6973746564000000000000000000006044820152606401610cfd565b5f6125ed3387876136ef565b90506125f986826142ae565b9695505050505050565b5f610c6b8183613e66565b612616613427565b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001684151590811790915560088390556009829055604080519182526020820184905281018290527f2d957fa64be5a49e40c541b8f8bc25b8846d073b4a89515a2230653a295b93c0906060015b60405180910390a1505050565b606060158054806020026020016040519081016040528092919081815260200182805480156126f857602002820191905f5260205f20905b815473ffffffffffffffffffffffffffffffffffffffff1681526001909101906020018083116126cd575b5050505050905090565b5f808373ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561274d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127719190615750565b6040517fe6a4390500000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff85811660248301529192509082169063e6a4390590604401602060405180830381865afa1580156127e5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906128099190615750565b949350505050565b612819613427565b73ffffffffffffffffffffffffffffffffffffffff821615801590612853575073ffffffffffffffffffffffffffffffffffffffff811615155b6128df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f44524946543a2074686520726f75746572206f7220706169722069732061207a60448201527f65726f20616464726573730000000000000000000000000000000000000000006064820152608401610cfd565b6128e8816142bb565b1561294f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f44524946543a20746865207061697220616c72656164792065786973740000006044820152606401610cfd565b5f8061295a8361122a565b909250905073ffffffffffffffffffffffffffffffffffffffff82163014612a04576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f44524946543a207468652070616972206973206e6f74206173736f636961746560448201527f642077697468207468697320746f6b656e0000000000000000000000000000006064820152608401610cfd565b73ffffffffffffffffffffffffffffffffffffffff8084165f90815260146020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558388168352601790915280822081518083018084527f95d89b4100000000000000000000000000000000000000000000000000000000905291518894919383928716916395d89b419160448086019290818703018183875af1158015612abd573d5f803e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052612b029190810190615987565b815273ffffffffffffffffffffffffffffffffffffffff851660209182015282546001810184555f93845292208151919260020201908190612b449082615858565b506020918201516001909101805473ffffffffffffffffffffffffffffffffffffffff9283167fffffffffffffffffffffffff0000000000000000000000000000000000000000918216179091558682165f90815260168452604080822080549487169490931684179092559182526018909252205460ff16612c67576015805460018082019092557f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec4750180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091555f90815260186020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690911790555b6040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602483015285169063095ea7b3906044016020604051808303815f875af1158015612cf8573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612d1c9190615796565b50612d288560016130d2565b60405160019073ffffffffffffffffffffffffffffffffffffffff8616907ff40a563af144a84735f7f6c7c3029794b0ac17713e5f048d3fd00ed85aa4ca7a905f90a35050505050565b612d7a613427565b612d845f826142f7565b156112275760405173ffffffffffffffffffffffffffffffffffffffff8216907fe46fef8bbff1389d9010703cf8ebb363fb3daf5bf56edc27080b67bc8d9251ea905f90a250565b612dd4613427565b612ddd81612d72565b611227815b612dea613427565b612df56002826142f7565b156112275760405173ffffffffffffffffffffffffffffffffffffffff8216907f92308bb7573b2a3d17ddb868b39d8ebec433f3194421abc22d084f89658c9bad905f90a250565b612e45613427565b601554612eae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f44524946543a206e6f2074726164696e67207061697220666f756e64000000006044820152606401610cfd565b601a80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556011545f03612eec57612eec6007613f56565b6040517f799663458a5ef2936f7fa0c99b3336c69c25890f82974f04e811e5bb359186c7905f90a1565b83421115612f53576040517f6279130200000000000000000000000000000000000000000000000000000000815260048101859052602401610cfd565b5f7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888612fca8c73ffffffffffffffffffffffffffffffffffffffff165f9081527f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb006020526040902080546001810190915590565b60408051602081019690965273ffffffffffffffffffffffffffffffffffffffff94851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090505f61303182614318565b90505f6130408287878761435f565b90508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146130c7576040517f4b800e4600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff80831660048301528b166024820152604401610cfd565b611a888a8a8a61341a565b6130da613427565b73ffffffffffffffffffffffffffffffffffffffff82165f8181526013602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168515159081179091558251938452908301527fd5144d2a6c8ff9b87b7a40852df5102cab2ce561c06b56cc6fe7ccf1fa7f8c2d91016121a5565b73ffffffffffffffffffffffffffffffffffffffff81165f908152601760209081526040808320805482518185028101850190935280835260609492939192909184015b82821015613283578382905f5260205f2090600202016040518060400160405290815f820180546131d4906156ff565b80601f0160208091040260200160405190810160405280929190818152602001828054613200906156ff565b801561324b5780601f106132225761010080835404028352916020019161324b565b820191905f5260205f20905b81548152906001019060200180831161322e57829003601f168201915b505050918352505060019182015473ffffffffffffffffffffffffffffffffffffffff166020918201529183529290920191016131a4565b505050509050919050565b613296613427565b73ffffffffffffffffffffffffffffffffffffffff81166132e5576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f6004820152602401610cfd565b61122781613ec1565b6132f6613427565b6133005f82613e94565b156112275760405173ffffffffffffffffffffffffffffffffffffffff8216907fed998b960f6340d045f620c119730f7aa7995e7425c2401d3a5b64ff998a59e9905f90a250565b613350613427565b5f5b828110156133e7578160045f868685818110613370576133706157de565b90506020020160208101906133859190615202565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f2080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790556133e081615a6f565b9050613352565b5060405181151581527f7dc357bd865f9219c544a8b0b14cb1583b26e3ffe765b3396ef2051d81a8de5690602001612688565b611b9d838383600161438b565b336134667f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614611ab2576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610cfd565b73ffffffffffffffffffffffffffffffffffffffff8316613504576040517f96c6fd1e0000000000000000000000000000000000000000000000000000000081525f6004820152602401610cfd565b73ffffffffffffffffffffffffffffffffffffffff8216613553576040517fec442f050000000000000000000000000000000000000000000000000000000081525f6004820152602401610cfd565b611b9d8383836144f5565b601a8054821515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff9091161790556040517fbe9e7a475b5e837d3520eb528f8f8b34ce6f9fd8edff27d7b2117015df627cf2906135c490831515815260200190565b60405180910390a150565b6012545f906135f69063ffffffff166135f06135e9614270565b879061460f565b9061461a565b905073ffffffffffffffffffffffffffffffffffffffff8316635c11d7958561361f8185614625565b600f546040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b168152613679939291889173ffffffffffffffffffffffffffffffffffffffff909116904290600401615aa6565b5f604051808303815f87803b158015613690575f80fd5b505af11580156136a2573d5f803e3d5ffd5b5050505050505050565b6012545f906136c69063ffffffff166135f06135e9614270565b905073ffffffffffffffffffffffffffffffffffffffff831663791ac9478561361f8185614625565b5f61372e7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141580156137a357507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005473ffffffffffffffffffffffffffffffffffffffff848116911614155b80156137c4575073ffffffffffffffffffffffffffffffffffffffff831615155b1561389057601a5460ff166138905773ffffffffffffffffffffffffffffffffffffffff84165f9081526013602052604090205460ff168061382a575073ffffffffffffffffffffffffffffffffffffffff83165f9081526013602052604090205460ff165b613890576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f44524946543a2054726164696e67206973206e6f74206163746976652e0000006044820152606401610cfd565b73ffffffffffffffffffffffffffffffffffffffff83165f9081526013602052604090205460ff16806138e7575073ffffffffffffffffffffffffffffffffffffffff84165f9081526013602052604090205460ff165b806138fa5750601a54610100900460ff16155b80613903575081155b1561390f575080613cbb565b61391884614630565b8015613949575073ffffffffffffffffffffffffffffffffffffffff83165f9081526018602052604090205460ff16155b80613989575061395883614630565b8015613989575073ffffffffffffffffffffffffffffffffffffffff84165f9081526018602052604090205460ff16155b156139fa57600a548211156139fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f44524946543a206578636565647320746865206d617820747820616d6f756e746044820152606401610cfd565b43601b546002613a0a9190615aee565b118015613a3c575073ffffffffffffffffffffffffffffffffffffffff84165f9081526018602052604090205460ff16155b15613b42575f613a4b85614630565b15613aa6575073ffffffffffffffffffffffffffffffffffffffff83165f90815260046020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155613b06565b613aaf84614630565b15613b06575073ffffffffffffffffffffffffffffffffffffffff84165f90815260046020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091555b8015613b4057601254613b3890613b319063ffffffff908116906135f0908790620182b89061460f16565b8490614625565b915050613cbb565b505b5f613b4c85614630565b15613be657601254600c54613b719163ffffffff908116916135f09187919061460f16565b90505f613b804260115461463a565b118015613baf575073ffffffffffffffffffffffffffffffffffffffff84165f90815260196020526040902054155b15613be657613bc042610384615aee565b73ffffffffffffffffffffffffffffffffffffffff85165f908152601960205260409020555b613bef84614630565b8015613c11575073ffffffffffffffffffffffffffffffffffffffff85163014155b15613c9c57613c1f85611bf8565b80613c4e575073ffffffffffffffffffffffffffffffffffffffff85165f908152601960205260409020544211155b15613c7957601254613c729063ffffffff166135f0613c6b614270565b869061460f565b9050613c9c565b601254600d54613c999163ffffffff908116916135f09187919061460f16565b90505b8015613cad57613cad8530836134b5565b613cb78382614625565b9150505b9392505050565b5f33613ccf858285614691565b613cda8585856134b5565b506001949350505050565b613ced614777565b611ed982826147de565b613cff614777565b611ab2614841565b613d0f614777565b611227816040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250614892565b61122781614904565b73ffffffffffffffffffffffffffffffffffffffff8216613da6576040517fec442f050000000000000000000000000000000000000000000000000000000081525f6004820152602401610cfd565b611ed95f83836144f5565b5f611a9d614915565b613dc2614988565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001681557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016135c4565b5f613cbb8284615aee565b61122733826149e3565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526001830160205260408120541515613cbb565b5f613cbb8373ffffffffffffffffffffffffffffffffffffffff8416614a3d565b60605f613cbb83614b20565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080547fffffffffffffffffffffffff0000000000000000000000000000000000000000811673ffffffffffffffffffffffffffffffffffffffff848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b613f638162015180615b01565b613f6d9042615aee565b601181905560108290556040519081527f3b771000357cf1fcb5c8f4d4bc3025e2fa2d8494dd7494b66062149ddab5dc2d906020016135c4565b613fb2823383614691565b611ed982826149e3565b5f807f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb006121d5565b613fec614b79565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833613e2c565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10091610bd6906156ff565b60605f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100610bc5565b5f6140e23083612702565b73ffffffffffffffffffffffffffffffffffffffff161461415f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f44524946543a207061697220616c7265616479206578697374730000000000006044820152606401610cfd565b5f8273ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156141a9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906141cd9190615750565b6040517fc9c6539600000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8481166024830152919091169063c9c65396906044016020604051808303815f875af1158015614240573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906142649190615750565b9050611b9d8382612811565b5f80600d54600e546142829190615b18565b90505f613cbb600d54611b2561429a4260115461463a565b6010546142a890879061461a565b9061460f565b5f33610c658185856134b5565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526014602052604081205460ff16156142f057506001919050565b505f919050565b5f613cbb8373ffffffffffffffffffffffffffffffffffffffff8416614bd5565b5f610c6b614324613db1565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f805f8061436f88888888614c21565b92509250925061437f8282614d14565b50909695505050505050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0073ffffffffffffffffffffffffffffffffffffffff85166143fb576040517fe602df050000000000000000000000000000000000000000000000000000000081525f6004820152602401610cfd565b73ffffffffffffffffffffffffffffffffffffffff841661444a576040517f94280d620000000000000000000000000000000000000000000000000000000081525f6004820152602401610cfd565b73ffffffffffffffffffffffffffffffffffffffff8086165f908152600183016020908152604080832093881683529290522083905581156144ee578373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040516144e591815260200190565b60405180910390a35b5050505050565b600b5460ff16801561450d575061450b82614630565b155b801561453e575073ffffffffffffffffffffffffffffffffffffffff82165f9081526013602052604090205460ff16155b15614604575f61454d836121b1565b60085490915061455d8284613e51565b1115801561457657506009546145738284613e51565b10155b614602576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f44524946543a20696e76616c69642076616c75652c206e6f74206d617463686560448201527f6420686f6c64696e67206c696d697400000000000000000000000000000000006064820152608401610cfd565b505b611b9d838383614e17565b5f613cbb8284615b01565b5f613cbb8284615b2b565b5f613cbb8284615b18565b5f610c6b826142bb565b5f8183101580614648575082155b80614651575081155b1561465d57505f610c6b565b5f6146688484615b18565b90505f61467d60186135f0603c81868261461a565b614688906001615aee565b95945050505050565b73ffffffffffffffffffffffffffffffffffffffff8381165f9081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146112105781811015614769576040517ffb8f41b200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024810182905260448101839052606401610cfd565b61121084848484035f61438b565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff16611ab2576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6147e6614777565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace007f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace036148328482615858565b50600481016112108382615858565b614849614777565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b61489a614777565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1026148e68482615858565b50600381016148f58382615858565b505f8082556001909101555050565b61490c614777565b61122781614e2a565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61493f614e32565b614947614ead565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff16611ab2576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216614a32576040517f96c6fd1e0000000000000000000000000000000000000000000000000000000081525f6004820152602401610cfd565b611ed9825f836144f5565b5f8181526001830160205260408120548015614b17575f614a5f600183615b18565b85549091505f90614a7290600190615b18565b9050808214614ad1575f865f018281548110614a9057614a906157de565b905f5260205f200154905080875f018481548110614ab057614ab06157de565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080614ae257614ae2615b63565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050610c6b565b5f915050610c6b565b6060815f01805480602002602001604051908101604052809291908181526020018280548015614b6d57602002820191905f5260205f20905b815481526020019060010190808311614b59575b50505050509050919050565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff1615611ab2576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f818152600183016020526040812054614c1a57508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155610c6b565b505f610c6b565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115614c5a57505f91506003905082614d0a565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015614cab573d5f803e3d5ffd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116614d0157505f925060019150829050614d0a565b92505f91508190505b9450945094915050565b5f826003811115614d2757614d27615b90565b03614d30575050565b6001826003811115614d4457614d44615b90565b03614d7b576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115614d8f57614d8f615b90565b03614dc9576040517ffce698f700000000000000000000000000000000000000000000000000000000815260048101829052602401610cfd565b6003826003811115614ddd57614ddd615b90565b03611ed9576040517fd78bce0c00000000000000000000000000000000000000000000000000000000815260048101829052602401610cfd565b614e1f614b79565b611b9d838383614f02565b613296614777565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081614e5d61405d565b805190915015614e7557805160209091012092915050565b81548015614e84579392505050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470935050505090565b5f7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10081614ed86140ae565b805190915015614ef057805160209091012092915050565b60018201548015614e84579392505050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0073ffffffffffffffffffffffffffffffffffffffff8416614f5c5781816002015f828254614f519190615aee565b9091555061500c9050565b73ffffffffffffffffffffffffffffffffffffffff84165f9081526020829052604090205482811015614fe1576040517fe450d38c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff861660048201526024810182905260448101849052606401610cfd565b73ffffffffffffffffffffffffffffffffffffffff85165f9081526020839052604090209083900390555b73ffffffffffffffffffffffffffffffffffffffff8316615037576002810180548390039055615062565b73ffffffffffffffffffffffffffffffffffffffff83165f9081526020829052604090208054830190555b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516150c191815260200190565b60405180910390a350505050565b5f5b838110156150e95781810151838201526020016150d1565b50505f910152565b5f81518084526151088160208601602086016150cf565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081525f613cbb60208301846150f1565b73ffffffffffffffffffffffffffffffffffffffff81168114611227575f80fd5b5f806040838503121561517e575f80fd5b82356151898161514c565b946020939093013593505050565b5f805f80608085870312156151aa575f80fd5b84356151b58161514c565b935060208501356151c58161514c565b93969395505050506040820135916060013590565b8015158114611227575f80fd5b5f602082840312156151f7575f80fd5b8135613cbb816151da565b5f60208284031215615212575f80fd5b8135613cbb8161514c565b5f805f6060848603121561522f575f80fd5b8335925060208401356152418161514c565b915060408401356152518161514c565b809150509250925092565b5f805f6060848603121561526e575f80fd5b83356152798161514c565b925060208401356152898161514c565b929592945050506040919091013590565b5f805f805f60a086880312156152ae575f80fd5b85356152b98161514c565b945060208601356152c98161514c565b93506040860135925060608601356152e08161514c565b915060808601356152f08161514c565b809150509295509295909350565b5f6020828403121561530e575f80fd5b5035919050565b5f8151808452602080850194508084015f5b8381101561535957815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101615327565b509495945050505050565b602081525f613cbb6020830184615315565b5f8060408385031215615387575f80fd5b50508035926020909101359150565b7fff00000000000000000000000000000000000000000000000000000000000000881681525f602060e0818401526153d160e084018a6150f1565b83810360408501526153e3818a6150f1565b6060850189905273ffffffffffffffffffffffffffffffffffffffff8816608086015260a0850187905284810360c086015285518082528387019250908301905f5b8181101561544157835183529284019291840191600101615425565b50909c9b505050505050505050505050565b5f805f60608486031215615465575f80fd5b83356154708161514c565b925060208401356154808161514c565b91506040840135615251816151da565b5f805f606084860312156154a2575f80fd5b83356154ad816151da565b95602085013595506040909401359392505050565b602080825282518282018190525f9190848201906040850190845b8181101561437f57835173ffffffffffffffffffffffffffffffffffffffff16835292840192918401916001016154dd565b5f8060408385031215615520575f80fd5b823561552b8161514c565b9150602083013561553b8161514c565b809150509250929050565b5f805f805f805f60e0888a03121561555c575f80fd5b87356155678161514c565b965060208801356155778161514c565b95506040880135945060608801359350608088013560ff8116811461559a575f80fd5b9699959850939692959460a0840135945060c09093013592915050565b5f80604083850312156155c8575f80fd5b82356155d38161514c565b9150602083013561553b816151da565b5f6020808301818452808551808352604092508286019150828160051b8701018488015f5b8381101561567d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08984030185528151805187855261564a888601826150f1565b9189015173ffffffffffffffffffffffffffffffffffffffff169489019490945294870194925090860190600101615608565b509098975050505050505050565b5f805f6040848603121561569d575f80fd5b833567ffffffffffffffff808211156156b4575f80fd5b818601915086601f8301126156c7575f80fd5b8135818111156156d5575f80fd5b8760208260051b85010111156156e9575f80fd5b60209283019550935050840135615251816151da565b600181811c9082168061571357607f821691505b60208210810361574a577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b5f60208284031215615760575f80fd5b8151613cbb8161514c565b5f805f6060848603121561577d575f80fd5b8351925060208401519150604084015190509250925092565b5f602082840312156157a6575f80fd5b8151613cbb816151da565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b601f821115611b9d575f81815260208120601f850160051c810160208610156158315750805b601f850160051c820191505b818110156158505782815560010161583d565b505050505050565b815167ffffffffffffffff811115615872576158726157b1565b6158868161588084546156ff565b8461580b565b602080601f8311600181146158d8575f84156158a25750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555615850565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561592457888601518255948401946001909101908401615905565b508582101561596057878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b5f60208284031215615980575f80fd5b5051919050565b5f60208284031215615997575f80fd5b815167ffffffffffffffff808211156159ae575f80fd5b818401915084601f8301126159c1575f80fd5b8151818111156159d3576159d36157b1565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715615a1957615a196157b1565b81604052828152876020848701011115615a31575f80fd5b61165d8360208301602088016150cf565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615a9f57615a9f615a42565b5060010190565b85815284602082015260a060408201525f615ac460a0830186615315565b73ffffffffffffffffffffffffffffffffffffffff94909416606083015250608001529392505050565b80820180821115610c6b57610c6b615a42565b8082028115828204841417610c6b57610c6b615a42565b81810381811115610c6b57610c6b615a42565b5f82615b5e577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffdfea26469706673582212202ff2fb812d27839e6d2bd74526334eecbbcaf2377381f552a64fc1acd71935cd64736f6c63430008140033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ 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.