Feature Tip: Add private address tag to any address under My Name Tag !
ERC-20
Overview
Max Total Supply
999,999,929,636.27352127740392509 ETA
Holders
58
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
7,738,059,230.864047797176520115 ETAValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
This contract contains unverified libraries: GlobalLimits, SellLimit
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
EtalonTokenOwner
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <=0.8.7; //import "hardhat/console.sol"; import "contracts/EtalonToken.sol"; import "contracts/Owned.sol"; import "contracts/TaxContract.sol"; import "prb-math/contracts/PRBMathUD60x18.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; // подключаем библиотеку для работы с пулом ликвидности import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol"; import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; // the admin settings contract EtalonTokenOwner is EtalonToken, Owned { //using Pricing for Pricing.PricingData; using GlobalLimits for GlobalLimits.GlobalLimitsData; using SellLimit for SellLimit.SellLimitData; using PRBMathUD60x18 for uint256; // the liquidity pool library // adds liquidity to the liquidity pool, the liquidity token is burned // ETH and token are taken from the contract address function OwnerAddLiquidityToPair() public payable onlyOwner { // creating a pair on the uniswap _UniswapV2Pair = IUniswapV2Pair( IUniswapV2Factory(_UniswapRouter.factory()).createPair( address(this), _UniswapRouter.WETH() ) ); // confirm that we will transfer the specified amount of token to the router _approve(address(this), address(_UniswapRouter), type(uint256).max); // shoving liquidity into the pair (the entire ETH balance that is on the contract) _UniswapRouter.addLiquidityETH{value: address(this).balance}( address(this), // the current token is adding to the liquidity pool balanceOf(address(this)), // adding the tokens 0, 0, //address(msg.sender), address(0), // who to send the liquidity tokens to block.timestamp ); // get liquidity pool reserves (uint256 RouterToken, uint256 RouterEth, ) = _UniswapV2Pair .getReserves(); // limit initialization _GlobalLimits.Initialize( _GlobalLimits._MaxFallPercent, _GlobalLimits._PriceControlTimeIntervalMinutes, PRBMathUD60x18.div(RouterEth, RouterToken) // current price ); _SellLimit.Initialize(_SellLimit.DefaultMaxFallPercent); } // mints the specified amount of token to the specified address function OwnerMint(address account, uint256 amount) public onlyOwner { // memorizing an account if (account != address(_UniswapRouter)) TryAddToAccountList(account); // mint _mint(account, amount); } // the admin burns the entire token on the specified account function OwnerBurnAll(address account) public onlyOwner { _burn(account, balanceOf(account)); } // initializes the tax library // only admin, for testing function OwnerInitializeTax( uint256 taxIntervalDays, uint256 constantTaxPercent, uint256 minBalancePercentTransactionForReward, uint256 rewardStopAccountPercent, uint256 maxTaxPercent ) public onlyOwner { InitializeTax( taxIntervalDays, constantTaxPercent, minBalancePercentTransactionForReward, rewardStopAccountPercent, maxTaxPercent ); } }
// SPDX-License-Identifier: MIT // Etalon Token https://www.etalontoken.org was created by the World's Engineers https://www.worldsengineers.org // Etalon is a wealth accumulating token, your personal free pocket bank. pragma solidity >=0.4.22 <=0.8.7; //import "hardhat/console.sol"; //import "./Pricing.sol"; import "./SellLimit.sol"; import "./GlobalLimits.sol"; import "contracts/LimboContract.sol"; import "contracts/TaxContract.sol"; import "prb-math/contracts/PRBMathUD60x18.sol"; import "@uniswap/v2-periphery/contracts/libraries/SafeMath.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; // adding the liquidity pool library import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol"; import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; //import "@uniswap/v3-core/artifacts/contracts/interfaces/IUniswapV3Pool.sol/IUniswapV3Pool.json"; //import "@uniswap/v3-core/artifacts/contracts/interfaces/IUniswapV3Factory.sol"; // Etalon Token contract EtalonToken is LimboContract("Etalon", "ETA") { using PRBMathUD60x18 for uint256; //using Pricing for Pricing.PricingData; using SellLimit for SellLimit.SellLimitData; using GlobalLimits for GlobalLimits.GlobalLimitsData; using SafeMath for uint256; // settings uint256 constant INITIAL_EMISSION = 1e30; // emission in constructor uint256 constant MAX_PRICE_FALL_PERCENT = 1e16; // 1e18=100% the maximum accepted percentage as a price movement for a single transaction from the account uint256 constant MAX_FALL_PERCENT_GLOBAL = 2e16; // (1%)the maximum accepted percentage as a price movement for multiple transactions uint256 constant PRICE_CONTROL_TIME_INTERVAL_MINUTES = 60; // time interval for price control (after this interval, a trace price measurement occurs) uint256 constant MIN_CELL_INTERVAL_SEC = 60; // minimal interval for a sell transaction uint256 constant MAX_ONE_ACCOUNT_AMMOUNT_PERCENT = 1e16; // the maximum percentage of the total supply that could be owned by the account(100%=1e18) // events event OnIncrementGlobalLimits(uint256 maxFallPercent); // increment global limits event OnDecrementGlobalLimits(uint256 maxFallPercent); // decrement global limits event OnIncrementSellLimit(uint256 maxFallPercent); // the sell limit while selling is raised up event OnDecrementSellLimit(uint256 maxFallPercent); // the sell limit while selling is pulled down uint256 public _TotalOnAccounts; // how many tokens are in total on all accounts (except the tax pools) mapping(address => uint256) _LastBuyTimes; // when was the last buy on any account (except the router) //Pricing.PricingData internal _Pricing; // the current price SellLimit.SellLimitData public _SellLimit; // current limit on token withdraw for single account GlobalLimits.GlobalLimitsData public _GlobalLimits; // global limit on token withdraw IUniswapV2Router02 public _UniswapRouter = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); // the Uniswap router address IUniswapV2Pair public _UniswapV2Pair; // the pair constructor() { // developer's reward mint uint256 devCash = PRBMathUD60x18.mul(INITIAL_EMISSION, 3e16); // 3% in total uint256 dev1 = PRBMathUD60x18.mul(devCash, 6e17); // 60% Captain Iceberg uint256 dev2 = PRBMathUD60x18.mul(devCash, 3e17); // 30% Tsar uint256 dev3 = PRBMathUD60x18.mul(devCash, 1e17); // 10% Dismorales // 60% _mint(0x2aBb515dD8bc2CD707FceDcbD5E780F9d899Ba34, PRBMathUD60x18.div(dev1, 3e18)); // A1 _mint(0x322aA2aC658BA2Aa3A4D7D680eB2bFcFDbe8D50E, PRBMathUD60x18.div(dev1, 3e18)); // A2 _mint(0x20572a1C268fBDEe8C3D53980513AB435c5673B0, PRBMathUD60x18.div(dev1, 3e18)); // A3 // 30% _mint(0x1d3d6671a8A6650E60802613a3838865a4c260ef, PRBMathUD60x18.div(dev2, 5e18)); // K1 _mint(0x623bD33fC62875B25E2bdcd73CaD25911cD034d2, PRBMathUD60x18.div(dev2, 5e18)); // K2 _mint(0xCa063a5Fa006a0b2349c0F5eb984896b4396de85, PRBMathUD60x18.div(dev2, 5e18)); // K3 _mint(0x13DaCD602d00B92A6942A0047fBbfE67f980f4A6, PRBMathUD60x18.div(dev2, 5e18)); // K4 _mint(0x37A47B09454d54dECe30a19B7860975C14FAB83e, PRBMathUD60x18.div(dev2, 5e18)); // K5 // 10% _mint(0xE102c1e0E0DB088ea15f9032b839E9C8cAf92cBC, dev3); // AR // create the emission _mint(address(this), INITIAL_EMISSION-devCash); // initializing the price corrector _SellLimit.Initialize(MAX_PRICE_FALL_PERCENT); // initializing the library that controls the maximum and the minimum of the sell limits _GlobalLimits.Initialize( MAX_FALL_PERCENT_GLOBAL, PRICE_CONTROL_TIME_INTERVAL_MINUTES, 1 // minimum possible number ); } // current average price (how much ETH for 1 ETA) function GetCurrentMidPrice() public view returns (uint256) { if (address(_UniswapV2Pair) == address(0)) return 0; (uint256 RouterToken, uint256 RouterEth, ) = _UniswapV2Pair .getReserves(); return PRBMathUD60x18.div(RouterEth, RouterToken); } // the amount of tokens with taxes but except Limbo function totalSupply() public view override returns (uint256) { return _TotalOnAccounts + GetTotalTax(); } // the maximum of totalSupply that could be held on one account (100%=1e18) function GetMaxOneAccountPercent() public pure returns (uint256) { return MAX_ONE_ACCOUNT_AMMOUNT_PERCENT; } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal override { // correctors require(from != to, "Error! Sending tokens to yourself is not permitted"); // mint and burn proccessing if (from == address(0)) { _TotalOnAccounts += amount; return; } if (to == address(0)) { _TotalOnAccounts = _TotalOnAccounts.sub(amount); return; } // if transfter to router from the current contract then consider it as adding liquidity if (from == address(this) && to == address(_UniswapV2Pair)) return; // updating the global limits and dependent on them the local limits UpdateSellLimits(GetCurrentMidPrice()); // limiting the quick sell-transaction to prevent the front-running QuickSaleLimit(from, to); // account limits MaxAccountAmmountLimit(from, to, amount); // get amount of ETA and ETH on router (uint256 RouterToken, uint256 RouterEth, ) = _UniswapV2Pair .getReserves(); // the price corrector (sell limitations) if (from != address(0) && to == address(_UniswapV2Pair)) { _SellLimit.CheckLimit(RouterEth, RouterToken, amount); } // we list every account if (from != address(_UniswapV2Pair)) TryAddToAccountList(from); if (to != address(_UniswapV2Pair)) TryAddToAccountList(to); // try the next tax interval TryNextTaxInterval(_TotalOnAccounts.sub(RouterToken)); // try to pay dividends and leave the Limbo if (from != address(_UniswapV2Pair)) TryGetRewardAndLimboOut(from, amount); if (to != address(_UniswapV2Pair)) TryGetRewardAndLimboOut(to, amount); // get taxes uint256 tax = GetTax(amount, balanceOf(from), _TotalOnAccounts); // try to "mine" Limbo accounts with half tax uint256 minedLimbo = LimboMining(from, tax / 2); // decreasing the tax amount when Limbo account was mined tax = tax.sub(minedLimbo); // burn tax (we don not burn the pool tax) if (tax > 0 && from != address(_UniswapV2Pair)) { // burn tax _burn(from, tax); // adding the collected taxes to the Tax Pool AddTaxToPool(tax / 2); } } // updating the global limits and dependend on them the local limits function UpdateSellLimits(uint256 newPrice) internal { //console.log("newPrice: ", newPrice); int256 globalLimits = _GlobalLimits.Update(newPrice); if (globalLimits > 0) { if (globalLimits == 2) emit OnIncrementGlobalLimits(_GlobalLimits._MaxFallPercent); if (_SellLimit.IncrementLimits()) emit OnIncrementSellLimit(_SellLimit.MaxFallPercent); } if (globalLimits < 0) { //console.log(2); if (globalLimits == -2) emit OnDecrementGlobalLimits(_GlobalLimits._MaxFallPercent); if (_SellLimit.DecrementLimits()) emit OnDecrementSellLimit(_SellLimit.MaxFallPercent); } //console.log(3); } // preventing the "quick swap-selling right after artificial buy" // when a situation occurs then print an exception: "Error! Selling tokens is permitted in a minute after a buy. Try later." function QuickSaleLimit(address from, address to) internal { // limiters if (from == address(0) || to == address(0) || from == to) return; // if recieved from router then keep it's timestamp and don't do anything else if (from == address(_UniswapV2Pair)) { _LastBuyTimes[to] = block.timestamp; // memorize when was the last sell return; } // if tokens are send to router (swap selling) if (to == address(_UniswapV2Pair)) { uint256 timeInterval = block.timestamp - _LastBuyTimes[from]; require( timeInterval >= MIN_CELL_INTERVAL_SEC * 1 seconds, "Error! Selling tokens is permitted in a minute after a buy. Try later." ); } } // wallet limiters // if the account holds more than 1% of the circulating supply then print an exeption. function MaxAccountAmmountLimit( address from, // from who address to, // to whom uint256 addamount // amount to be added ) internal view { if (from == address(0) || to == address(_UniswapV2Pair)) return; require( balanceOf(to) + addamount <= MaxAccountAmmount(), "The recipient is holding 1% or more of the circulating supply. Sending to this address is not permitted" ); } // the maximumum amount of tokens that could be held on one account function MaxAccountAmmount() public view returns (uint256) { return PRBMathUD60x18.mul(totalSupply(), MAX_ONE_ACCOUNT_AMMOUNT_PERCENT); } // gives back the maximum interval in seconds, after sell swaps are permitted function GetMinCellIntervalSec() public pure returns (uint256) { return MIN_CELL_INTERVAL_SEC; } // the maximum percenteage that price could be negatively changed 1e18=1% function GetMaxFallPercent() public view returns (uint256) { return _SellLimit.MaxFallPercent; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <=0.8.7; // gives the owner rights contract Owned { address _Owner; constructor() { _Owner = msg.sender; } modifier onlyOwner { require(msg.sender == _Owner, "Only owner can call this function."); _; } // shows Owner // if 0 then there is no Owner // Owner is needed only to set up the token function GetOwner() public view returns (address) { return _Owner; } // sets new Owner // if Owner set to 0 then there is no more Owner function SetOwner(address newOwner) public onlyOwner { _Owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <=0.8.7; //import "hardhat/console.sol"; import "prb-math/contracts/PRBMathUD60x18.sol"; // describes the logic of taxes contract TaxContract { using PRBMathUD60x18 for uint256; event OnReward(address indexed account, uint256 value); // who and how much rewards received event OnTaxInterval(uint256 indexed number, uint256 poolSize, uint256 totalOnAccounts); // when the tax interval was changed // settings uint256 _TaxIntervalMinutes = 10080; // taxation interval (7 days) uint256 _ConstantTaxPercent = 1e16; // the constant component of the tax 100%=1e18 uint256 _MinBalancePercentTransactionForReward = 5e15; // minimal percentage of the balance that you need to spend to get a reward uint256 _RewardStopAccountPercent = 1e16; // at what percentage of the total issue (except for the router), at the time of transition to the new tax interval, the reward will become 0 (the reward drops when the wallet size approaches this percentage) uint256 _MaxTaxPercent = 1e17; // maximum tax percentage 100%=1e18 mapping(address => uint256) _taxGettings; // time when account was collected fee last time mapping(address => uint256) _LastRewardedTransactions; // when were the last transactions made that could participate in receiving rewards (see the rule of min transaction size from the size of the wallet) uint256 _currentTaxPool; // how much tax fee collected in this tax getting interval uint256 internal _lastTaxPool; // how much tax fee collected in last tax getting interval uint256 _lastTaxTime; // last time when tax gettings interval was switched uint256 _lastTotalOnAccounts; // how much was on account at the time of completion of the previous tax collection uint256 _givedTax; // how many taxes were distributed (distributed from the pool of past taxation) uint256 _TaxIntervalNumber; // current tax getting interval number constructor() { _lastTaxTime = block.timestamp; } // sets the taxation settings function InitializeTax( uint256 taxIntervalMinutes, uint256 constantTaxPercent, uint256 minBalancePercentTransactionForReward, uint256 rewardStopAccountPercent, uint256 maxTaxPercent ) internal { _TaxIntervalMinutes = taxIntervalMinutes; _ConstantTaxPercent = constantTaxPercent; _MinBalancePercentTransactionForReward = minBalancePercentTransactionForReward; _RewardStopAccountPercent = rewardStopAccountPercent; _MaxTaxPercent = maxTaxPercent; _lastTaxTime = block.timestamp; } // when were the last transactions made that could participate in receiving rewards (see the rule of min transaction size from the size of the wallet) function GetLastRewardedTransactionTime(address account) public view returns (uint256) { return _LastRewardedTransactions[account]; } // returns the time when the specified account received the tax or 0 if it did not receive the tax function GetLastRewardTime(address account) public view returns (uint256) { return _taxGettings[account]; } // how many taxes were collected during the previous tax interval function GetLastTaxPool() public view returns (uint256) { return _lastTaxPool; } // returns the time when the last change of the tax interval occurred, or 0 if there was no change yet function GetLastTaxPoolTime() public view returns (uint256) { return _lastTaxTime; } // how much was on all accounts (except for the router) at the time of changing the tax interval function GetLastTotalOnAccounts() public view returns (uint256) { return _lastTotalOnAccounts; } //returns the currently set tax interval in days function GetTaxIntervalMinutes() public view returns (uint256) { return _TaxIntervalMinutes; } // min percentage of the balance that you need to spend to get a reward 1%=1e18 function GetMinBalancePercentTransactionForReward() public view returns (uint256) { return _MinBalancePercentTransactionForReward; } // how many taxes are collected for the current tax interval function GetCurrentTaxPool() public view returns (uint256) { return _currentTaxPool; } // how many taxes were distributed (distributed from the pool of past taxation) function GetGivedTax() public view returns (uint256) { return _givedTax; } // returns the current tax interval number // now everything is done taking into account the fact that 0 - until the zero tax interval passes, then 1, etc function GetTaxIntervalNumber() public view returns (uint256) { return _TaxIntervalNumber; } // how much in total is there an undisclosed tax function GetTotalTax() public view returns (uint256) { return _currentTaxPool + _lastTaxPool - _givedTax; } // attempt to switch to the next tax interval // tokensOnAccounts - how many tokens are there in total on all accounts subject to tax distribution (all except the router) function TryNextTaxInterval(uint256 tokensOnAccounts) internal { if (block.timestamp < _lastTaxTime + _TaxIntervalMinutes * 1 minutes) return; //console.log("NEXT_TIME"); // we transfer all the collected for the distribution, plus what was not distributed _lastTaxPool = _lastTaxPool - _givedTax; _lastTaxPool += _currentTaxPool; // we reset the collection of funds and how much was issued _currentTaxPool = 0; _givedTax = 0; // we remember how much money the participants have in their hands (to calculate the share of each) _lastTotalOnAccounts = tokensOnAccounts; // we write the current date when the tax interval was changed _lastTaxTime = block.timestamp; // update the counter of tax intervals ++_TaxIntervalNumber; emit OnTaxInterval(_TaxIntervalNumber, _lastTaxPool, _lastTotalOnAccounts); } // adds the amount issued from the collected pool // if more than _lastTaxPool is added, it will add how much is missing to _lastTaxPool // returns how much was added function AddGivedTax(uint256 amount) internal returns (uint256) { uint256 last = _givedTax; _givedTax += amount; if (_givedTax > _lastTaxPool) _givedTax = _lastTaxPool; return _givedTax - last; } // adds a tax to the tax pool function AddTaxToPool(uint256 tax) internal { _currentTaxPool += tax; } // if true, then you can get a reward for the transaction function IsRewardedTransaction( uint256 accountBalance, uint256 transactionAmount ) public view returns (bool) { // if there was nothing on account, then he does not receive a reward if (accountBalance == 0) return false; // how many percent of the transaction from the total account balance uint256 accountTransactionPercent = PRBMathUD60x18.div( transactionAmount, accountBalance ); return accountTransactionPercent >= _MinBalancePercentTransactionForReward; } // updates information about who has received awards and how much // throws the event OnReward, if there was a non-zero reward // returns how much tax the specified account should receive // returns 0 - if there is no reward // 1 tax interval, it will return the value >0 only once // accountBalance - account balance // taxes are not distributed in the 0 tax interval function UpdateAccountReward( address account, // account uint256 accountBalance, // account balance uint256 transactionAmount // transfer amount ) internal returns (uint256) { // limiter if the time of the last receipt of tax is greater than or equal to the time of the last transition to a new taxation cycle if (account == address(0)) return 0; // if the transaction is less than min percent, it is not considered if (!IsRewardedTransaction(accountBalance, transactionAmount)) { //console.log("is not rewarded transaction!"); return 0; } // we remember that we have completed a transaction that can participate in the distribution of rewards //console.log("rewarded transaction!"); _LastRewardedTransactions[account] = block.timestamp; // limiter, if the account has already received a reward if (_taxGettings[account] >= _lastTaxTime + 1 days) return 0; // if 0 is the tax interval if (_TaxIntervalNumber == 0) return 0; // don't need it? if (_lastTotalOnAccounts == 0) return 0; // everything was distributed if (_givedTax >= _lastTaxPool) return 0; // if you have issued more than the tax pool, then we will not issue anything further // we write when I received a reward (or I didn't get it, because the limiters worked) _taxGettings[account] = block.timestamp; // how much interest did the account have at the time of changing the tax interval from the entire issue uint256 percentOfTotal = PRBMathUD60x18.div( accountBalance, _lastTotalOnAccounts ); // calculate reward uint256 reward = PRBMathUD60x18.mul(percentOfTotal, _lastTaxPool); // calculation of the multiplication ratio of the tax (the closer the account to 1% of all accounts, the smaller the coefficient of those 1% = 0 0% = 1e18) reward = PRBMathUD60x18.mul( reward, GetRewardDynamicKoef(accountBalance) ); // we increase the counter of the issued tax _givedTax += reward; //console.log("reward=", reward); if (reward > 0) emit OnReward(account, reward); return reward; } // returns the reward coefficient // when 0 of the total number of accounts // 0 - when 1% of the selected issue (on account) function GetRewardDynamicKoef(uint256 accountBalance) public view returns (uint256) { // how much interest did the account have at the time of changing the tax interval from the entire issue uint256 percentOfTotal = PRBMathUD60x18.div( accountBalance, _lastTotalOnAccounts ); if (percentOfTotal >= _RewardStopAccountPercent) return 0; return 1e18 - PRBMathUD60x18.div(percentOfTotal, _RewardStopAccountPercent); } // returns the tax on the specified number of tokens function GetTax( uint256 numTokens, // how much do we transfer uint256 accountBalance, // the balance on the account that transfers uint256 totalOnAccounts // the entire issue without an router ) public view returns (uint256) { // calculating the tax uint256 tax = GetStaticTax(numTokens) + GetDynamicTax(numTokens, accountBalance, totalOnAccounts); // limit the tax uint256 maxTax = PRBMathUD60x18.mul(numTokens, _MaxTaxPercent); if (tax > maxTax) tax = maxTax; // the results return tax; } // returns the static amount of the transaction tax function GetStaticTax( uint256 numTokens // how much do we transfer ) public view returns (uint256) { return PRBMathUD60x18.mul(numTokens, _ConstantTaxPercent); } // returns the dynamic component of the transaction tax function GetDynamicTax( uint256 numTokens, // how much do we transfer uint256 accountBalance, // the balance on the account that transfers uint256 totalOnAccounts // the entire emission without the router ) public pure returns (uint256) { // 0 if the total emission is 0 if (totalOnAccounts == 0) return 0; // calculation of the dynamic component of the tax (100% of the total token will pay 100% from the top of the transaction size) // transaction size factor uint256 transactionK = PRBMathUD60x18.div(numTokens, totalOnAccounts); // adding a tax uint256 tax = PRBMathUD60x18.mul(transactionK, numTokens); // calculation of the dynamic component of the tax (depending on the size of the wallet, an account of 100% of the total token will pay 100% on top) transactionK = PRBMathUD60x18.div(accountBalance, totalOnAccounts); // adding a tax tax += PRBMathUD60x18.mul(transactionK, numTokens); // the results return tax; } // returns the percentage of the constant component of the tax 100%=1e18 function GetConstantTaxPercent() public view returns (uint256) { return _ConstantTaxPercent; } // returns the percentage at which the dynamic reward becomes 0 1e18=100% function GetRewardStopAccountPercent() public view returns (uint256) { return _RewardStopAccountPercent; } // // maximum tax percentage 100%=1e18 function GetMaxTaxPercent() public view returns (uint256) { return _MaxTaxPercent; } }
// SPDX-License-Identifier: WTFPL pragma solidity >=0.8.4; import "./PRBMath.sol"; /// @title PRBMathUD60x18 /// @author Paul Razvan Berg /// @notice Smart contract library for advanced fixed-point math that works with uint256 numbers considered to have 18 /// trailing decimals. We call this number representation unsigned 60.18-decimal fixed-point, since there can be up to 60 /// digits in the integer part and up to 18 decimals in the fractional part. The numbers are bound by the minimum and the /// maximum values permitted by the Solidity type uint256. library PRBMathUD60x18 { /// @dev Half the SCALE number. uint256 internal constant HALF_SCALE = 5e17; /// @dev log2(e) as an unsigned 60.18-decimal fixed-point number. uint256 internal constant LOG2_E = 1442695040888963407; /// @dev The maximum value an unsigned 60.18-decimal fixed-point number can have. uint256 internal constant MAX_UD60x18 = 115792089237316195423570985008687907853269984665640564039457584007913129639935; /// @dev The maximum whole value an unsigned 60.18-decimal fixed-point number can have. uint256 internal constant MAX_WHOLE_UD60x18 = 115792089237316195423570985008687907853269984665640564039457000000000000000000; /// @dev How many trailing decimals can be represented. uint256 internal constant SCALE = 1e18; /// @notice Calculates arithmetic average of x and y, rounding down. /// @param x The first operand as an unsigned 60.18-decimal fixed-point number. /// @param y The second operand as an unsigned 60.18-decimal fixed-point number. /// @return result The arithmetic average as an unsigned 60.18-decimal fixed-point number. function avg(uint256 x, uint256 y) internal pure returns (uint256 result) { // The operations can never overflow. unchecked { // The last operand checks if both x and y are odd and if that is the case, we add 1 to the result. We need // to do this because if both numbers are odd, the 0.5 remainder gets truncated twice. result = (x >> 1) + (y >> 1) + (x & y & 1); } } /// @notice Yields the least unsigned 60.18 decimal fixed-point number greater than or equal to x. /// /// @dev Optimised for fractional value inputs, because for every whole value there are (1e18 - 1) fractional counterparts. /// See https://en.wikipedia.org/wiki/Floor_and_ceiling_functions. /// /// Requirements: /// - x must be less than or equal to MAX_WHOLE_UD60x18. /// /// @param x The unsigned 60.18-decimal fixed-point number to ceil. /// @param result The least integer greater than or equal to x, as an unsigned 60.18-decimal fixed-point number. function ceil(uint256 x) internal pure returns (uint256 result) { if (x > MAX_WHOLE_UD60x18) { revert PRBMathUD60x18__CeilOverflow(x); } assembly { // Equivalent to "x % SCALE" but faster. let remainder := mod(x, SCALE) // Equivalent to "SCALE - remainder" but faster. let delta := sub(SCALE, remainder) // Equivalent to "x + delta * (remainder > 0 ? 1 : 0)" but faster. result := add(x, mul(delta, gt(remainder, 0))) } } /// @notice Divides two unsigned 60.18-decimal fixed-point numbers, returning a new unsigned 60.18-decimal fixed-point number. /// /// @dev Uses mulDiv to enable overflow-safe multiplication and division. /// /// Requirements: /// - The denominator cannot be zero. /// /// @param x The numerator as an unsigned 60.18-decimal fixed-point number. /// @param y The denominator as an unsigned 60.18-decimal fixed-point number. /// @param result The quotient as an unsigned 60.18-decimal fixed-point number. function div(uint256 x, uint256 y) internal pure returns (uint256 result) { result = PRBMath.mulDiv(x, SCALE, y); } /// @notice Returns Euler's number as an unsigned 60.18-decimal fixed-point number. /// @dev See https://en.wikipedia.org/wiki/E_(mathematical_constant). function e() internal pure returns (uint256 result) { result = 2718281828459045235; } /// @notice Calculates the natural exponent of x. /// /// @dev Based on the insight that e^x = 2^(x * log2(e)). /// /// Requirements: /// - All from "log2". /// - x must be less than 133.084258667509499441. /// /// @param x The exponent as an unsigned 60.18-decimal fixed-point number. /// @return result The result as an unsigned 60.18-decimal fixed-point number. function exp(uint256 x) internal pure returns (uint256 result) { // Without this check, the value passed to "exp2" would be greater than 192. if (x >= 133084258667509499441) { revert PRBMathUD60x18__ExpInputTooBig(x); } // Do the fixed-point multiplication inline to save gas. unchecked { uint256 doubleScaleProduct = x * LOG2_E; result = exp2((doubleScaleProduct + HALF_SCALE) / SCALE); } } /// @notice Calculates the binary exponent of x using the binary fraction method. /// /// @dev See https://ethereum.stackexchange.com/q/79903/24693. /// /// Requirements: /// - x must be 192 or less. /// - The result must fit within MAX_UD60x18. /// /// @param x The exponent as an unsigned 60.18-decimal fixed-point number. /// @return result The result as an unsigned 60.18-decimal fixed-point number. function exp2(uint256 x) internal pure returns (uint256 result) { // 2^192 doesn't fit within the 192.64-bit format used internally in this function. if (x >= 192e18) { revert PRBMathUD60x18__Exp2InputTooBig(x); } unchecked { // Convert x to the 192.64-bit fixed-point format. uint256 x192x64 = (x << 64) / SCALE; // Pass x to the PRBMath.exp2 function, which uses the 192.64-bit fixed-point number representation. result = PRBMath.exp2(x192x64); } } /// @notice Yields the greatest unsigned 60.18 decimal fixed-point number less than or equal to x. /// @dev Optimised for fractional value inputs, because for every whole value there are (1e18 - 1) fractional counterparts. /// See https://en.wikipedia.org/wiki/Floor_and_ceiling_functions. /// @param x The unsigned 60.18-decimal fixed-point number to floor. /// @param result The greatest integer less than or equal to x, as an unsigned 60.18-decimal fixed-point number. function floor(uint256 x) internal pure returns (uint256 result) { assembly { // Equivalent to "x % SCALE" but faster. let remainder := mod(x, SCALE) // Equivalent to "x - remainder * (remainder > 0 ? 1 : 0)" but faster. result := sub(x, mul(remainder, gt(remainder, 0))) } } /// @notice Yields the excess beyond the floor of x. /// @dev Based on the odd function definition https://en.wikipedia.org/wiki/Fractional_part. /// @param x The unsigned 60.18-decimal fixed-point number to get the fractional part of. /// @param result The fractional part of x as an unsigned 60.18-decimal fixed-point number. function frac(uint256 x) internal pure returns (uint256 result) { assembly { result := mod(x, SCALE) } } /// @notice Converts a number from basic integer form to unsigned 60.18-decimal fixed-point representation. /// /// @dev Requirements: /// - x must be less than or equal to MAX_UD60x18 divided by SCALE. /// /// @param x The basic integer to convert. /// @param result The same number in unsigned 60.18-decimal fixed-point representation. function fromUint(uint256 x) internal pure returns (uint256 result) { unchecked { if (x > MAX_UD60x18 / SCALE) { revert PRBMathUD60x18__FromUintOverflow(x); } result = x * SCALE; } } /// @notice Calculates geometric mean of x and y, i.e. sqrt(x * y), rounding down. /// /// @dev Requirements: /// - x * y must fit within MAX_UD60x18, lest it overflows. /// /// @param x The first operand as an unsigned 60.18-decimal fixed-point number. /// @param y The second operand as an unsigned 60.18-decimal fixed-point number. /// @return result The result as an unsigned 60.18-decimal fixed-point number. function gm(uint256 x, uint256 y) internal pure returns (uint256 result) { if (x == 0) { return 0; } unchecked { // Checking for overflow this way is faster than letting Solidity do it. uint256 xy = x * y; if (xy / x != y) { revert PRBMathUD60x18__GmOverflow(x, y); } // We don't need to multiply by the SCALE here because the x*y product had already picked up a factor of SCALE // during multiplication. See the comments within the "sqrt" function. result = PRBMath.sqrt(xy); } } /// @notice Calculates 1 / x, rounding towards zero. /// /// @dev Requirements: /// - x cannot be zero. /// /// @param x The unsigned 60.18-decimal fixed-point number for which to calculate the inverse. /// @return result The inverse as an unsigned 60.18-decimal fixed-point number. function inv(uint256 x) internal pure returns (uint256 result) { unchecked { // 1e36 is SCALE * SCALE. result = 1e36 / x; } } /// @notice Calculates the natural logarithm of x. /// /// @dev Based on the insight that ln(x) = log2(x) / log2(e). /// /// Requirements: /// - All from "log2". /// /// Caveats: /// - All from "log2". /// - This doesn't return exactly 1 for 2.718281828459045235, for that we would need more fine-grained precision. /// /// @param x The unsigned 60.18-decimal fixed-point number for which to calculate the natural logarithm. /// @return result The natural logarithm as an unsigned 60.18-decimal fixed-point number. function ln(uint256 x) internal pure returns (uint256 result) { // Do the fixed-point multiplication inline to save gas. This is overflow-safe because the maximum value that log2(x) // can return is 196205294292027477728. unchecked { result = (log2(x) * SCALE) / LOG2_E; } } /// @notice Calculates the common logarithm of x. /// /// @dev First checks if x is an exact power of ten and it stops if yes. If it's not, calculates the common /// logarithm based on the insight that log10(x) = log2(x) / log2(10). /// /// Requirements: /// - All from "log2". /// /// Caveats: /// - All from "log2". /// /// @param x The unsigned 60.18-decimal fixed-point number for which to calculate the common logarithm. /// @return result The common logarithm as an unsigned 60.18-decimal fixed-point number. function log10(uint256 x) internal pure returns (uint256 result) { if (x < SCALE) { revert PRBMathUD60x18__LogInputTooSmall(x); } // Note that the "mul" in this block is the assembly multiplication operation, not the "mul" function defined // in this contract. // prettier-ignore assembly { switch x case 1 { result := mul(SCALE, sub(0, 18)) } case 10 { result := mul(SCALE, sub(1, 18)) } case 100 { result := mul(SCALE, sub(2, 18)) } case 1000 { result := mul(SCALE, sub(3, 18)) } case 10000 { result := mul(SCALE, sub(4, 18)) } case 100000 { result := mul(SCALE, sub(5, 18)) } case 1000000 { result := mul(SCALE, sub(6, 18)) } case 10000000 { result := mul(SCALE, sub(7, 18)) } case 100000000 { result := mul(SCALE, sub(8, 18)) } case 1000000000 { result := mul(SCALE, sub(9, 18)) } case 10000000000 { result := mul(SCALE, sub(10, 18)) } case 100000000000 { result := mul(SCALE, sub(11, 18)) } case 1000000000000 { result := mul(SCALE, sub(12, 18)) } case 10000000000000 { result := mul(SCALE, sub(13, 18)) } case 100000000000000 { result := mul(SCALE, sub(14, 18)) } case 1000000000000000 { result := mul(SCALE, sub(15, 18)) } case 10000000000000000 { result := mul(SCALE, sub(16, 18)) } case 100000000000000000 { result := mul(SCALE, sub(17, 18)) } case 1000000000000000000 { result := 0 } case 10000000000000000000 { result := SCALE } case 100000000000000000000 { result := mul(SCALE, 2) } case 1000000000000000000000 { result := mul(SCALE, 3) } case 10000000000000000000000 { result := mul(SCALE, 4) } case 100000000000000000000000 { result := mul(SCALE, 5) } case 1000000000000000000000000 { result := mul(SCALE, 6) } case 10000000000000000000000000 { result := mul(SCALE, 7) } case 100000000000000000000000000 { result := mul(SCALE, 8) } case 1000000000000000000000000000 { result := mul(SCALE, 9) } case 10000000000000000000000000000 { result := mul(SCALE, 10) } case 100000000000000000000000000000 { result := mul(SCALE, 11) } case 1000000000000000000000000000000 { result := mul(SCALE, 12) } case 10000000000000000000000000000000 { result := mul(SCALE, 13) } case 100000000000000000000000000000000 { result := mul(SCALE, 14) } case 1000000000000000000000000000000000 { result := mul(SCALE, 15) } case 10000000000000000000000000000000000 { result := mul(SCALE, 16) } case 100000000000000000000000000000000000 { result := mul(SCALE, 17) } case 1000000000000000000000000000000000000 { result := mul(SCALE, 18) } case 10000000000000000000000000000000000000 { result := mul(SCALE, 19) } case 100000000000000000000000000000000000000 { result := mul(SCALE, 20) } case 1000000000000000000000000000000000000000 { result := mul(SCALE, 21) } case 10000000000000000000000000000000000000000 { result := mul(SCALE, 22) } case 100000000000000000000000000000000000000000 { result := mul(SCALE, 23) } case 1000000000000000000000000000000000000000000 { result := mul(SCALE, 24) } case 10000000000000000000000000000000000000000000 { result := mul(SCALE, 25) } case 100000000000000000000000000000000000000000000 { result := mul(SCALE, 26) } case 1000000000000000000000000000000000000000000000 { result := mul(SCALE, 27) } case 10000000000000000000000000000000000000000000000 { result := mul(SCALE, 28) } case 100000000000000000000000000000000000000000000000 { result := mul(SCALE, 29) } case 1000000000000000000000000000000000000000000000000 { result := mul(SCALE, 30) } case 10000000000000000000000000000000000000000000000000 { result := mul(SCALE, 31) } case 100000000000000000000000000000000000000000000000000 { result := mul(SCALE, 32) } case 1000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 33) } case 10000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 34) } case 100000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 35) } case 1000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 36) } case 10000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 37) } case 100000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 38) } case 1000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 39) } case 10000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 40) } case 100000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 41) } case 1000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 42) } case 10000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 43) } case 100000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 44) } case 1000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 45) } case 10000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 46) } case 100000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 47) } case 1000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 48) } case 10000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 49) } case 100000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 50) } case 1000000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 51) } case 10000000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 52) } case 100000000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 53) } case 1000000000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 54) } case 10000000000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 55) } case 100000000000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 56) } case 1000000000000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 57) } case 10000000000000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 58) } case 100000000000000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 59) } default { result := MAX_UD60x18 } } if (result == MAX_UD60x18) { // Do the fixed-point division inline to save gas. The denominator is log2(10). unchecked { result = (log2(x) * SCALE) / 3321928094887362347; } } } /// @notice Calculates the binary logarithm of x. /// /// @dev Based on the iterative approximation algorithm. /// https://en.wikipedia.org/wiki/Binary_logarithm#Iterative_approximation /// /// Requirements: /// - x must be greater than or equal to SCALE, otherwise the result would be negative. /// /// Caveats: /// - The results are nor perfectly accurate to the last decimal, due to the lossy precision of the iterative approximation. /// /// @param x The unsigned 60.18-decimal fixed-point number for which to calculate the binary logarithm. /// @return result The binary logarithm as an unsigned 60.18-decimal fixed-point number. function log2(uint256 x) internal pure returns (uint256 result) { if (x < SCALE) { revert PRBMathUD60x18__LogInputTooSmall(x); } unchecked { // Calculate the integer part of the logarithm and add it to the result and finally calculate y = x * 2^(-n). uint256 n = PRBMath.mostSignificantBit(x / SCALE); // The integer part of the logarithm as an unsigned 60.18-decimal fixed-point number. The operation can't overflow // because n is maximum 255 and SCALE is 1e18. result = n * SCALE; // This is y = x * 2^(-n). uint256 y = x >> n; // If y = 1, the fractional part is zero. if (y == SCALE) { return result; } // Calculate the fractional part via the iterative approximation. // The "delta >>= 1" part is equivalent to "delta /= 2", but shifting bits is faster. for (uint256 delta = HALF_SCALE; delta > 0; delta >>= 1) { y = (y * y) / SCALE; // Is y^2 > 2 and so in the range [2,4)? if (y >= 2 * SCALE) { // Add the 2^(-m) factor to the logarithm. result += delta; // Corresponds to z/2 on Wikipedia. y >>= 1; } } } } /// @notice Multiplies two unsigned 60.18-decimal fixed-point numbers together, returning a new unsigned 60.18-decimal /// fixed-point number. /// @dev See the documentation for the "PRBMath.mulDivFixedPoint" function. /// @param x The multiplicand as an unsigned 60.18-decimal fixed-point number. /// @param y The multiplier as an unsigned 60.18-decimal fixed-point number. /// @return result The product as an unsigned 60.18-decimal fixed-point number. function mul(uint256 x, uint256 y) internal pure returns (uint256 result) { result = PRBMath.mulDivFixedPoint(x, y); } /// @notice Returns PI as an unsigned 60.18-decimal fixed-point number. function pi() internal pure returns (uint256 result) { result = 3141592653589793238; } /// @notice Raises x to the power of y. /// /// @dev Based on the insight that x^y = 2^(log2(x) * y). /// /// Requirements: /// - All from "exp2", "log2" and "mul". /// /// Caveats: /// - All from "exp2", "log2" and "mul". /// - Assumes 0^0 is 1. /// /// @param x Number to raise to given power y, as an unsigned 60.18-decimal fixed-point number. /// @param y Exponent to raise x to, as an unsigned 60.18-decimal fixed-point number. /// @return result x raised to power y, as an unsigned 60.18-decimal fixed-point number. function pow(uint256 x, uint256 y) internal pure returns (uint256 result) { if (x == 0) { result = y == 0 ? SCALE : uint256(0); } else { result = exp2(mul(log2(x), y)); } } /// @notice Raises x (unsigned 60.18-decimal fixed-point number) to the power of y (basic unsigned integer) using the /// famous algorithm "exponentiation by squaring". /// /// @dev See https://en.wikipedia.org/wiki/Exponentiation_by_squaring /// /// Requirements: /// - The result must fit within MAX_UD60x18. /// /// Caveats: /// - All from "mul". /// - Assumes 0^0 is 1. /// /// @param x The base as an unsigned 60.18-decimal fixed-point number. /// @param y The exponent as an uint256. /// @return result The result as an unsigned 60.18-decimal fixed-point number. function powu(uint256 x, uint256 y) internal pure returns (uint256 result) { // Calculate the first iteration of the loop in advance. result = y & 1 > 0 ? x : SCALE; // Equivalent to "for(y /= 2; y > 0; y /= 2)" but faster. for (y >>= 1; y > 0; y >>= 1) { x = PRBMath.mulDivFixedPoint(x, x); // Equivalent to "y % 2 == 1" but faster. if (y & 1 > 0) { result = PRBMath.mulDivFixedPoint(result, x); } } } /// @notice Returns 1 as an unsigned 60.18-decimal fixed-point number. function scale() internal pure returns (uint256 result) { result = SCALE; } /// @notice Calculates the square root of x, rounding down. /// @dev Uses the Babylonian method https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method. /// /// Requirements: /// - x must be less than MAX_UD60x18 / SCALE. /// /// @param x The unsigned 60.18-decimal fixed-point number for which to calculate the square root. /// @return result The result as an unsigned 60.18-decimal fixed-point . function sqrt(uint256 x) internal pure returns (uint256 result) { unchecked { if (x > MAX_UD60x18 / SCALE) { revert PRBMathUD60x18__SqrtOverflow(x); } // Multiply x by the SCALE to account for the factor of SCALE that is picked up when multiplying two unsigned // 60.18-decimal fixed-point numbers together (in this case, those two numbers are both the square root). result = PRBMath.sqrt(x * SCALE); } } /// @notice Converts a unsigned 60.18-decimal fixed-point number to basic integer form, rounding down in the process. /// @param x The unsigned 60.18-decimal fixed-point number to convert. /// @return result The same number in basic integer form. function toUint(uint256 x) internal pure returns (uint256 result) { unchecked { result = x / SCALE; } } }
pragma solidity >=0.6.2; import './IUniswapV2Router01.sol'; interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; }
pragma solidity >=0.5.0; interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; }
pragma solidity >=0.5.0; interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <=0.8.7; import "prb-math/contracts/PRBMathUD60x18.sol"; import "hardhat/console.sol"; // transaction limit on price collapse library SellLimit { using PRBMathUD60x18 for uint256; struct SellLimitData { uint256 MaxFallPercent; // the maximum percentage by which can collapse the cours 1e18=1% uint256 DefaultMaxFallPercent; // the default value for the maximum collapse per transaction } // initializing the constrains for the single transaction function Initialize(SellLimitData storage data, uint256 maxFreeFallPercent) public { data.MaxFallPercent = maxFreeFallPercent; data.DefaultMaxFallPercent = maxFreeFallPercent; } // reduces the limit by prohibiting large transactions // doesn't reduce less than 1 function DecrementLimits(SellLimitData storage data) public returns (bool) { uint256 last = data.MaxFallPercent; // reducing the limit uint256 newMaxFallPercent = PRBMathUD60x18.div( data.MaxFallPercent, 2e18 ); //limitation if (newMaxFallPercent < 1) return false; // setting a new limit data.MaxFallPercent = newMaxFallPercent; // the results return data.MaxFallPercent != last; } // increases the limit, allowing you to share transactions larger // it does not increase more than the default one function IncrementLimits(SellLimitData storage data) public returns (bool) { uint256 last = data.MaxFallPercent; // increasing the limit uint256 newMaxFallPercent = PRBMathUD60x18.mul( data.MaxFallPercent, 2e18 ); // if more than the default, then restriction if (newMaxFallPercent > data.DefaultMaxFallPercent) newMaxFallPercent = data.DefaultMaxFallPercent; // setting a new limit data.MaxFallPercent = newMaxFallPercent; // outputting the result return data.MaxFallPercent != last; } // checks the limiters of a single transaction // call only when transferring to the exchanges (selling token) // if more than the maximum percentage is burned, such a transaction is cancelled with an error "too large sell transaction" function CheckLimit( SellLimitData storage data, uint256 routerLastEth, // how much was on the router before the ETH transaction uint256 routerLastToken, // how much on the router before the transaction uint256 ammount // how much are we trying to transfer ) public view { //console.log("data.MaxFallPercent", data.MaxFallPercent); //console.log("data.MaxBurnPercentage", data.MaxBurnPercentage); //console.log("routerLastEth", routerLastEth); //console.log("routerLastToken", routerLastToken); //console.log("ammount", ammount); // calculation of the old price uint256 lastPrice = PRBMathUD60x18.div(routerLastEth, routerLastToken); if (lastPrice == 0) return; // if the price was 0, we do nothing //console.log("lastPrice", lastPrice); // calculation of the new amount of tokens on the router uint256 routerNewToken = routerLastToken + ammount; //console.log("routerNewToken", routerNewToken); // calculation of the new ETH on the exchanger //uint256 routerNewEth = routerLastEth - // PRBMathUD60x18.mul(lastPrice, ammount); uint256 k = PRBMathUD60x18.mul(routerLastEth, routerLastToken); //console.log("k", k); uint256 routerNewEth = PRBMathUD60x18.div(k, routerNewToken); //console.log("routerNewEth", routerNewEth); // calculation of the new price (hypothetical, if you transfer the entire amount) //uint256 newPrice = PRBMathUD60x18.div(routerNewEth, routerNewToken); //console.log("newPrice", newPrice); // get how much ETH is transferred from the pool if (routerLastEth <= routerNewEth) return; uint256 ethReceived = routerLastEth - routerNewEth; //console.log("ethReceived", ethReceived); // if the price goes up, there are no limitations //if (newPrice > lastPrice) return; // the price drop calculation uint256 priceImpact = PRBMathUD60x18.div(ethReceived, routerLastEth); //console.log("impact", priceImpact); //uint256 priceFall = 1e18 - PRBMathUD60x18.div(newPrice, lastPrice); //console.log("priceFall", priceFall); require( priceImpact <= data.MaxFallPercent, "The transaction will drop the price more than allowed. Try splitting your transaction into parts, or try to swap a lesser amount." ); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <=0.8.7; import "prb-math/contracts/PRBMathUD60x18.sol"; //import "hardhat/console.sol"; // work with limits on the input/output of all accounts library GlobalLimits { using PRBMathUD60x18 for uint256; // data structure of global limits struct GlobalLimitsData { uint256 _MaxFallPercent; // how much can the exchange rate collapse in a time interval in percent 1%=1e16 uint256 _PriceControlTimeIntervalMinutes; // time interval for price control (after this interval the next price measurement takes place) uint256 _ControlTime; // time of the last cost measurement uint256 _ControlTimePrice; // the price at the time of the last cost measurement uint256 _DefaultMaxFallPercent; // to what size does the limit increase } // initializes global limits function Initialize( GlobalLimitsData storage data, uint256 maxFallPercent, // how much can the exchange rate collapse in a time interval in percent 1%=1e16 uint256 priceControlTimeIntervalMinutes, // time interval for price control (after this interval the next price measurement takes place) uint256 price // initial cost ) public { data._MaxFallPercent = maxFallPercent; data._DefaultMaxFallPercent = maxFallPercent; data._PriceControlTimeIntervalMinutes = priceControlTimeIntervalMinutes; data._ControlTime = block.timestamp; data._ControlTimePrice = price; } // updates global limits // result codes: // 0 then account limits are not changed // 1 unsuccessful attempt to increment the sale limit (increase the maximum collapse when selling) // -1 unsuccessful attempt to increment the sale limit but there was a limiter in the current structure, then nothing changed (decrease maximal collapse when selling) // 2 increment selling limit (increase maximal slump during sale) // -2 decrement of sales limit (decrease maximal drop of sales) // // here are 3 events - price went higher, price went lower, or checkout time expired - then an attempt to increase function Update( GlobalLimitsData storage data, uint256 newPrice // new token price ) public returns (int256) { // if the new price collapses course by more than a certain percentage, then the limit is changed if ( newPrice < data._ControlTimePrice && PRBMathUD60x18.div(newPrice, data._ControlTimePrice) < 1e18 - data._MaxFallPercent ) { // reducing the limit uint256 last = data._MaxFallPercent; DecrementLimits(data); // new reference time data._ControlTime = block.timestamp; data._ControlTimePrice = newPrice; // the local limits should be reduced if (last == data._MaxFallPercent) return -1; else return -2; } // if the new price has gone up by more than a certain percentage, then the limit is changed if ( newPrice > data._ControlTimePrice && PRBMathUD60x18.div(newPrice, data._ControlTimePrice) > 1e18 + data._MaxFallPercent ) { // increasing the limit uint256 last = data._MaxFallPercent; IncrementLimits(data); // new reference time data._ControlTime = block.timestamp; data._ControlTimePrice = newPrice; // local limits should be increased if (last == data._MaxFallPercent) return 1; else return 2; } // limits should be increased if there were no time change if ( block.timestamp >= data._ControlTime + data._PriceControlTimeIntervalMinutes * 1 minutes ) { // increasing the limit uint256 last = data._MaxFallPercent; IncrementLimits(data); // new reference time data._ControlTime = block.timestamp; data._ControlTimePrice = newPrice; // the local limits should be increased if (last == data._MaxFallPercent) return 1; else return 2; } // the local limits have not changed return 0; } function DecrementLimits(GlobalLimitsData storage data) public { // reducing the limit uint256 newMaxFallPercent = PRBMathUD60x18.div( data._MaxFallPercent, 2e18 ); // restriction if (newMaxFallPercent < 1) return; // set a new limit data._MaxFallPercent = newMaxFallPercent; } // increases the limit, allowing you to make larger transactions // doesn't increase more than the default function IncrementLimits(GlobalLimitsData storage data) public { // increasing the limit uint256 newMaxFallPercent = PRBMathUD60x18.mul( data._MaxFallPercent, 2e18 ); // if more than the default, then the restriction if (newMaxFallPercent > data._DefaultMaxFallPercent) newMaxFallPercent = data._DefaultMaxFallPercent; // set a new limit data._MaxFallPercent = newMaxFallPercent; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <=0.8.7; //mport "hardhat/console.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "prb-math/contracts/PRBMathUD60x18.sol"; import "contracts/TaxContract.sol"; // describes the Limbo of the contract contract LimboContract is ERC20, TaxContract { using PRBMathUD60x18 for uint256; using EnumerableSet for EnumerableSet.AddressSet; // settings uint256 constant LIMBO_MINING_ITERATIONS = 10; // maximum number of Limbo mining iterations per transaction uint256 constant MIN_BALANCE_ON_LIMBO = 777; // min account balance when in Limbo uint256 constant TAX_ITERATIONS_FOR_LIMBO_DETECT = 12; // how many tax intervals should be missed for the account to get in Limbo uint256 constant LIMBO_BACK_KOEF = 10e18; // the coefficient; the bigger wallet will be restored slower // Limbo events event OnAddLimbo(address indexed account, uint256 count); // who went to the Limbo and for how long event OnLimboRestore(address indexed account, uint256 value); // who and how many recovered from it event OnLimboState(address indexed account, bool value); // who and what ia their Limbo state(in limbo/not in limbo) event OnLimboMining(address indexed account, uint256 value); // who is going to be found address[] _SetOfAccounts; // an array of all accounts, for iterations of Limbo mining mapping(address => bool) _existInSet; // if true, the address was added to the set of all accounts uint256 _limboMiningPos = 0; // the position of the mining algorithm in the list of all known accounts uint256 _limboTotal; // total Limbo of all accounts mapping(address => uint256) _limbo; // key = account, value - how much was burned in Limbo mapping(address => bool) _limboState; // if true, then the account is in Limbo (it is not possible to say unequivocally about the state of limbo from the limbo column - maybe the acc is being restored at the moment) mapping(address => uint256) _personalLimbo; // amounts to burn when limit of tokens on account is reached constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {} // makes an attempt to send a certain amount of token to Limbo // returns how many tokens were burned in Limbo // the miner does not mine itself function LimboMining(address miner, uint256 burnCount) internal returns (uint256) { // if there were no tax intervals then Limbo is not available if (GetTaxIntervalNumber() < TAX_ITERATIONS_FOR_LIMBO_DETECT) return 0; // determine the number of mining iterations uint256 miningCount = LIMBO_MINING_ITERATIONS + 1; // counter of remaining iterations uint256 startPos = _limboMiningPos; // start position uint256 burnInLimbo = 0; // how much burnt in limbo // start the mining cycle miningCount times while (--miningCount > 0 && burnInLimbo < burnCount) { // we take the account address address adr = _SetOfAccounts[_limboMiningPos]; // make sure it will not mine itself if (adr == miner) { _limboMiningPos++; continue; } // processing accounts that are in limbo if (IsNeedAccountInLimbo(adr)) burnInLimbo += AddLimboToAccount(adr, burnCount - burnInLimbo); // cutter if everything that needs to be burned (so that the trail of the account is not searched until this one is burned) if (burnInLimbo >= burnCount) break; // go to next iteration _limboMiningPos++; if (_limboMiningPos >= _SetOfAccounts.length) _limboMiningPos = 0; // if the same position taken (bypassed everyone), then we stop the cycle if (_limboMiningPos == startPos) break; } if (burnInLimbo > 0) emit OnLimboMining(miner, burnInLimbo); return burnInLimbo; } // adds a limbo to the account, the specified max amount of the token // returns how much was added // if the account was added to the Limbo, then _limboState[account] = true; (it is marked as an account located in Limbo) function AddLimboToAccount(address account, uint256 maxCount) internal returns (uint256) { // we determine how much can be added to the Limbo uint256 canAddToLimbo = GetMaxAddToLimbo(account); // if the request to add more than the max value, then we adjust the request if (maxCount > canAddToLimbo) maxCount = canAddToLimbo; // limiter if nothing is added to the Limbo if (maxCount == 0) return 0; // inform that the account is in the Limbo if (!_limboState[account]) { _limboState[account] = true; emit OnLimboState(account, true); } // we are writing a new amount of Limbo on the account _limbo[account] = _limbo[account] + maxCount; // adding total limbo _limboTotal += maxCount; // burn _burn(account, maxCount); // we inform you that the account has true Limbo state emit OnAddLimbo(account, maxCount); // we output the result - how much was added to the Limbo return maxCount; } // performs recovery from Limbo for the specified max amount of token // returns how much was restored from limbo // if at least something from the Limbo was returned, the account state will change to the state outside of Limbo ( _limboState[account] = false) function LimboRestore(address account, uint256 maxCount) internal returns (uint256) { // we take the size of the Limbo on the account uint256 accountLimbo = _limbo[account]; // limiter if there is no limbo or the request is 0 (nothing is restored) if (accountLimbo == 0 || maxCount == 0) return 0; // if the request for a refund is greater than the limit on the acc then we adjust the request if (maxCount > accountLimbo) maxCount = accountLimbo; // we inform you that the account has false Limbo state if (_limboState[account]) { _limboState[account] = false; emit OnLimboState(account, false); } // we are writing a new amount of the Limbo on the account _limbo[account] = accountLimbo - maxCount; // taking away the total Limbo _limboTotal -= maxCount; // mint to account _mint(account, maxCount); // when account leaves the Limbo emit OnLimboRestore(account, maxCount); // we output the results - how much was restored from the Limbo return maxCount; } // attempt to get a reward and get out of the Limbo // you can't pass the address of the router here function TryGetRewardAndLimboOut( address account, // account uint256 transactionAmount // transaction size ) internal { // limiter if (account == address(0)) return; // we take the reward from the tax pool uint256 reward = UpdateAccountReward( account, balanceOf(account), transactionAmount ); // we get a reward if (reward != 0) _mint(account, reward); // we determine how much is need to be returned from the Limbo uint256 limboRestore = PRBMathUD60x18.mul( reward + transactionAmount, LIMBO_BACK_KOEF ); // limbo account size limiter uint256 accountLimbo = _limbo[account]; if (limboRestore > accountLimbo) limboRestore = accountLimbo; // we take as much as we can from the pool limboRestore = AddGivedTax(limboRestore); // we return from the Limbo as much as possible from this amount LimboRestore(account, limboRestore); } // makes an attempt to set an account to the list of known ones, for mining Limbo // 0 address will not be added function TryAddToAccountList(address account) internal { if (account == address(0) || _existInSet[account]) return; _existInSet[account] = true; _SetOfAccounts.push(account); } // returns how much can be sent to the Limbo for the specified account function GetMaxAddToLimbo(address account) public view returns (uint256) { if (account == address(0)) return 0; // we take the current balance uint256 balance = balanceOf(account); // if the balance is less than min possible if (balance <= MIN_BALANCE_ON_LIMBO) return 0; // if the balance is more than mines possible return balance - MIN_BALANCE_ON_LIMBO; } // returns the minimum balance of the account function GetMinBalanceOnLimbo() public pure returns (uint256) { return MIN_BALANCE_ON_LIMBO; } // checks whether the account needs to go to the Limbo // the account is not necessarily in the Limbo - this only indicates that it can be mined and go to the Limbo function IsNeedAccountInLimbo(address account) public view returns (bool) { // if the account must be in limbo if (account == address(0)) return false; if (GetTaxIntervalNumber() < TAX_ITERATIONS_FOR_LIMBO_DETECT) return false; // if the intervals are more than critical, then it should be in Limbo return GetLastRewardedTransactionTime(account) + (GetTaxIntervalMinutes() * 1 minutes) * TAX_ITERATIONS_FOR_LIMBO_DETECT < GetLastTaxPoolTime(); } function IsAccountInLimbo(address account) public view returns (bool) { // is the account in Limbo? if (account == address(0)) return false; return _limboState[account]; } // returns the total Limbo of the contract function GetLimboTotal() public view returns (uint256) { return _limboTotal; } // returns the total Limbo for the account function GetLimbo(address account) public view returns (uint256) { return _limbo[account]; } // returns the Limbo state for the account function GetLimboState(address account) public view returns (bool) { return _limboState[account]; } // returns the number of intarvals of taxation you need to skip to get to the Limbo function GetTaxIterationsForLimboDetect() public pure returns (uint256) { return TAX_ITERATIONS_FOR_LIMBO_DETECT; } }
pragma solidity =0.8.4; // a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math) library SafeMath { function add(uint x, uint y) internal pure returns (uint z) { require((z = x + y) >= x, 'ds-math-add-overflow'); } function sub(uint x, uint y) internal pure returns (uint z) { require((z = x - y) <= x, 'ds-math-sub-underflow'); } function mul(uint x, uint y) internal pure returns (uint z) { require(y == 0 || (z = x * y) / y == x, 'ds-math-mul-overflow'); } }
// SPDX-License-Identifier: MIT pragma solidity >= 0.4.22 <0.9.0; library console { address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67); function _sendLogPayload(bytes memory payload) private view { uint256 payloadLength = payload.length; address consoleAddress = CONSOLE_ADDRESS; assembly { let payloadStart := add(payload, 32) let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0) } } function log() internal view { _sendLogPayload(abi.encodeWithSignature("log()")); } function logInt(int p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(int)", p0)); } function logUint(uint p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint)", p0)); } function logString(string memory p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); } function logBool(bool p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); } function logAddress(address p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); } function logBytes(bytes memory p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes)", p0)); } function logBytes1(bytes1 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0)); } function logBytes2(bytes2 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0)); } function logBytes3(bytes3 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0)); } function logBytes4(bytes4 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0)); } function logBytes5(bytes5 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0)); } function logBytes6(bytes6 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0)); } function logBytes7(bytes7 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0)); } function logBytes8(bytes8 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0)); } function logBytes9(bytes9 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0)); } function logBytes10(bytes10 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0)); } function logBytes11(bytes11 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0)); } function logBytes12(bytes12 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0)); } function logBytes13(bytes13 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0)); } function logBytes14(bytes14 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0)); } function logBytes15(bytes15 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0)); } function logBytes16(bytes16 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0)); } function logBytes17(bytes17 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0)); } function logBytes18(bytes18 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0)); } function logBytes19(bytes19 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0)); } function logBytes20(bytes20 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0)); } function logBytes21(bytes21 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0)); } function logBytes22(bytes22 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0)); } function logBytes23(bytes23 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0)); } function logBytes24(bytes24 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0)); } function logBytes25(bytes25 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0)); } function logBytes26(bytes26 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0)); } function logBytes27(bytes27 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0)); } function logBytes28(bytes28 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0)); } function logBytes29(bytes29 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0)); } function logBytes30(bytes30 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0)); } function logBytes31(bytes31 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0)); } function logBytes32(bytes32 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0)); } function log(uint p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint)", p0)); } function log(string memory p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); } function log(bool p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); } function log(address p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); } function log(uint p0, uint p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint)", p0, p1)); } function log(uint p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string)", p0, p1)); } function log(uint p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool)", p0, p1)); } function log(uint p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address)", p0, p1)); } function log(string memory p0, uint p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint)", p0, p1)); } function log(string memory p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1)); } function log(string memory p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1)); } function log(string memory p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1)); } function log(bool p0, uint p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint)", p0, p1)); } function log(bool p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1)); } function log(bool p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1)); } function log(bool p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1)); } function log(address p0, uint p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint)", p0, p1)); } function log(address p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1)); } function log(address p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1)); } function log(address p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1)); } function log(uint p0, uint p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint)", p0, p1, p2)); } function log(uint p0, uint p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string)", p0, p1, p2)); } function log(uint p0, uint p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool)", p0, p1, p2)); } function log(uint p0, uint p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address)", p0, p1, p2)); } function log(uint p0, string memory p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint)", p0, p1, p2)); } function log(uint p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,string)", p0, p1, p2)); } function log(uint p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool)", p0, p1, p2)); } function log(uint p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,address)", p0, p1, p2)); } function log(uint p0, bool p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint)", p0, p1, p2)); } function log(uint p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string)", p0, p1, p2)); } function log(uint p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool)", p0, p1, p2)); } function log(uint p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address)", p0, p1, p2)); } function log(uint p0, address p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint)", p0, p1, p2)); } function log(uint p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,string)", p0, p1, p2)); } function log(uint p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool)", p0, p1, p2)); } function log(uint p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,address)", p0, p1, p2)); } function log(string memory p0, uint p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint)", p0, p1, p2)); } function log(string memory p0, uint p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,string)", p0, p1, p2)); } function log(string memory p0, uint p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool)", p0, p1, p2)); } function log(string memory p0, uint p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,address)", p0, p1, p2)); } function log(string memory p0, string memory p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint)", p0, p1, p2)); } function log(string memory p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2)); } function log(string memory p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2)); } function log(string memory p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2)); } function log(string memory p0, bool p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint)", p0, p1, p2)); } function log(string memory p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2)); } function log(string memory p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2)); } function log(string memory p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2)); } function log(string memory p0, address p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint)", p0, p1, p2)); } function log(string memory p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2)); } function log(string memory p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2)); } function log(string memory p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2)); } function log(bool p0, uint p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint)", p0, p1, p2)); } function log(bool p0, uint p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string)", p0, p1, p2)); } function log(bool p0, uint p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool)", p0, p1, p2)); } function log(bool p0, uint p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address)", p0, p1, p2)); } function log(bool p0, string memory p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint)", p0, p1, p2)); } function log(bool p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2)); } function log(bool p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2)); } function log(bool p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2)); } function log(bool p0, bool p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint)", p0, p1, p2)); } function log(bool p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2)); } function log(bool p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2)); } function log(bool p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2)); } function log(bool p0, address p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint)", p0, p1, p2)); } function log(bool p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2)); } function log(bool p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2)); } function log(bool p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2)); } function log(address p0, uint p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint)", p0, p1, p2)); } function log(address p0, uint p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,string)", p0, p1, p2)); } function log(address p0, uint p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool)", p0, p1, p2)); } function log(address p0, uint p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,address)", p0, p1, p2)); } function log(address p0, string memory p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint)", p0, p1, p2)); } function log(address p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2)); } function log(address p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2)); } function log(address p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2)); } function log(address p0, bool p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint)", p0, p1, p2)); } function log(address p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2)); } function log(address p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2)); } function log(address p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2)); } function log(address p0, address p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint)", p0, p1, p2)); } function log(address p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2)); } function log(address p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2)); } function log(address p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2)); } function log(uint p0, uint p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,uint)", p0, p1, p2, p3)); } function log(uint p0, uint p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,string)", p0, p1, p2, p3)); } function log(uint p0, uint p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,bool)", p0, p1, p2, p3)); } function log(uint p0, uint p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,address)", p0, p1, p2, p3)); } function log(uint p0, uint p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,uint)", p0, p1, p2, p3)); } function log(uint p0, uint p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,string)", p0, p1, p2, p3)); } function log(uint p0, uint p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,bool)", p0, p1, p2, p3)); } function log(uint p0, uint p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,address)", p0, p1, p2, p3)); } function log(uint p0, uint p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,uint)", p0, p1, p2, p3)); } function log(uint p0, uint p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,string)", p0, p1, p2, p3)); } function log(uint p0, uint p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,bool)", p0, p1, p2, p3)); } function log(uint p0, uint p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,address)", p0, p1, p2, p3)); } function log(uint p0, uint p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,uint)", p0, p1, p2, p3)); } function log(uint p0, uint p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,string)", p0, p1, p2, p3)); } function log(uint p0, uint p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,bool)", p0, p1, p2, p3)); } function log(uint p0, uint p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,address)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,uint)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,string)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,bool)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,address)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,uint)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,string)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,bool)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,address)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,uint)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,string)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,bool)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,address)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,uint)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,string)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,bool)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,address)", p0, p1, p2, p3)); } function log(uint p0, bool p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,uint)", p0, p1, p2, p3)); } function log(uint p0, bool p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,string)", p0, p1, p2, p3)); } function log(uint p0, bool p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,bool)", p0, p1, p2, p3)); } function log(uint p0, bool p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,address)", p0, p1, p2, p3)); } function log(uint p0, bool p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,uint)", p0, p1, p2, p3)); } function log(uint p0, bool p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,string)", p0, p1, p2, p3)); } function log(uint p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,bool)", p0, p1, p2, p3)); } function log(uint p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,address)", p0, p1, p2, p3)); } function log(uint p0, bool p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,uint)", p0, p1, p2, p3)); } function log(uint p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,string)", p0, p1, p2, p3)); } function log(uint p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,bool)", p0, p1, p2, p3)); } function log(uint p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,address)", p0, p1, p2, p3)); } function log(uint p0, bool p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,uint)", p0, p1, p2, p3)); } function log(uint p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,string)", p0, p1, p2, p3)); } function log(uint p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,bool)", p0, p1, p2, p3)); } function log(uint p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,address)", p0, p1, p2, p3)); } function log(uint p0, address p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,uint)", p0, p1, p2, p3)); } function log(uint p0, address p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,string)", p0, p1, p2, p3)); } function log(uint p0, address p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,bool)", p0, p1, p2, p3)); } function log(uint p0, address p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,address)", p0, p1, p2, p3)); } function log(uint p0, address p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,uint)", p0, p1, p2, p3)); } function log(uint p0, address p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,string)", p0, p1, p2, p3)); } function log(uint p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,bool)", p0, p1, p2, p3)); } function log(uint p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,address)", p0, p1, p2, p3)); } function log(uint p0, address p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,uint)", p0, p1, p2, p3)); } function log(uint p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,string)", p0, p1, p2, p3)); } function log(uint p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,bool)", p0, p1, p2, p3)); } function log(uint p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,address)", p0, p1, p2, p3)); } function log(uint p0, address p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,uint)", p0, p1, p2, p3)); } function log(uint p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,string)", p0, p1, p2, p3)); } function log(uint p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,bool)", p0, p1, p2, p3)); } function log(uint p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,address)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,uint)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,string)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,address)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,uint)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,string)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,address)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,uint)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,uint)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,string)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,uint)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,uint)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,uint)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3)); } function log(bool p0, uint p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,uint)", p0, p1, p2, p3)); } function log(bool p0, uint p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,string)", p0, p1, p2, p3)); } function log(bool p0, uint p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,bool)", p0, p1, p2, p3)); } function log(bool p0, uint p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,address)", p0, p1, p2, p3)); } function log(bool p0, uint p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,uint)", p0, p1, p2, p3)); } function log(bool p0, uint p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,string)", p0, p1, p2, p3)); } function log(bool p0, uint p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,bool)", p0, p1, p2, p3)); } function log(bool p0, uint p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,address)", p0, p1, p2, p3)); } function log(bool p0, uint p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,uint)", p0, p1, p2, p3)); } function log(bool p0, uint p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,string)", p0, p1, p2, p3)); } function log(bool p0, uint p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, uint p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,address)", p0, p1, p2, p3)); } function log(bool p0, uint p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,uint)", p0, p1, p2, p3)); } function log(bool p0, uint p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,string)", p0, p1, p2, p3)); } function log(bool p0, uint p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,bool)", p0, p1, p2, p3)); } function log(bool p0, uint p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,uint)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,uint)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,uint)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3)); } function log(address p0, uint p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,uint)", p0, p1, p2, p3)); } function log(address p0, uint p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,string)", p0, p1, p2, p3)); } function log(address p0, uint p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,bool)", p0, p1, p2, p3)); } function log(address p0, uint p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,address)", p0, p1, p2, p3)); } function log(address p0, uint p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,uint)", p0, p1, p2, p3)); } function log(address p0, uint p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,string)", p0, p1, p2, p3)); } function log(address p0, uint p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,bool)", p0, p1, p2, p3)); } function log(address p0, uint p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,address)", p0, p1, p2, p3)); } function log(address p0, uint p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,uint)", p0, p1, p2, p3)); } function log(address p0, uint p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,string)", p0, p1, p2, p3)); } function log(address p0, uint p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,bool)", p0, p1, p2, p3)); } function log(address p0, uint p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,address)", p0, p1, p2, p3)); } function log(address p0, uint p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,uint)", p0, p1, p2, p3)); } function log(address p0, uint p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,string)", p0, p1, p2, p3)); } function log(address p0, uint p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,bool)", p0, p1, p2, p3)); } function log(address p0, uint p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,uint)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,uint)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3)); } function log(address p0, address p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,uint)", p0, p1, p2, p3)); } function log(address p0, address p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,string)", p0, p1, p2, p3)); } function log(address p0, address p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,address)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3)); } }
// SPDX-License-Identifier: WTFPL pragma solidity >=0.8.4; /// @notice Emitted when the result overflows uint256. error PRBMath__MulDivFixedPointOverflow(uint256 prod1); /// @notice Emitted when the result overflows uint256. error PRBMath__MulDivOverflow(uint256 prod1, uint256 denominator); /// @notice Emitted when one of the inputs is type(int256).min. error PRBMath__MulDivSignedInputTooSmall(); /// @notice Emitted when the intermediary absolute result overflows int256. error PRBMath__MulDivSignedOverflow(uint256 rAbs); /// @notice Emitted when the input is MIN_SD59x18. error PRBMathSD59x18__AbsInputTooSmall(); /// @notice Emitted when ceiling a number overflows SD59x18. error PRBMathSD59x18__CeilOverflow(int256 x); /// @notice Emitted when one of the inputs is MIN_SD59x18. error PRBMathSD59x18__DivInputTooSmall(); /// @notice Emitted when one of the intermediary unsigned results overflows SD59x18. error PRBMathSD59x18__DivOverflow(uint256 rAbs); /// @notice Emitted when the input is greater than 133.084258667509499441. error PRBMathSD59x18__ExpInputTooBig(int256 x); /// @notice Emitted when the input is greater than 192. error PRBMathSD59x18__Exp2InputTooBig(int256 x); /// @notice Emitted when flooring a number underflows SD59x18. error PRBMathSD59x18__FloorUnderflow(int256 x); /// @notice Emitted when converting a basic integer to the fixed-point format overflows SD59x18. error PRBMathSD59x18__FromIntOverflow(int256 x); /// @notice Emitted when converting a basic integer to the fixed-point format underflows SD59x18. error PRBMathSD59x18__FromIntUnderflow(int256 x); /// @notice Emitted when the product of the inputs is negative. error PRBMathSD59x18__GmNegativeProduct(int256 x, int256 y); /// @notice Emitted when multiplying the inputs overflows SD59x18. error PRBMathSD59x18__GmOverflow(int256 x, int256 y); /// @notice Emitted when the input is less than or equal to zero. error PRBMathSD59x18__LogInputTooSmall(int256 x); /// @notice Emitted when one of the inputs is MIN_SD59x18. error PRBMathSD59x18__MulInputTooSmall(); /// @notice Emitted when the intermediary absolute result overflows SD59x18. error PRBMathSD59x18__MulOverflow(uint256 rAbs); /// @notice Emitted when the intermediary absolute result overflows SD59x18. error PRBMathSD59x18__PowuOverflow(uint256 rAbs); /// @notice Emitted when the input is negative. error PRBMathSD59x18__SqrtNegativeInput(int256 x); /// @notice Emitted when the calculting the square root overflows SD59x18. error PRBMathSD59x18__SqrtOverflow(int256 x); /// @notice Emitted when addition overflows UD60x18. error PRBMathUD60x18__AddOverflow(uint256 x, uint256 y); /// @notice Emitted when ceiling a number overflows UD60x18. error PRBMathUD60x18__CeilOverflow(uint256 x); /// @notice Emitted when the input is greater than 133.084258667509499441. error PRBMathUD60x18__ExpInputTooBig(uint256 x); /// @notice Emitted when the input is greater than 192. error PRBMathUD60x18__Exp2InputTooBig(uint256 x); /// @notice Emitted when converting a basic integer to the fixed-point format format overflows UD60x18. error PRBMathUD60x18__FromUintOverflow(uint256 x); /// @notice Emitted when multiplying the inputs overflows UD60x18. error PRBMathUD60x18__GmOverflow(uint256 x, uint256 y); /// @notice Emitted when the input is less than 1. error PRBMathUD60x18__LogInputTooSmall(uint256 x); /// @notice Emitted when the calculting the square root overflows UD60x18. error PRBMathUD60x18__SqrtOverflow(uint256 x); /// @notice Emitted when subtraction underflows UD60x18. error PRBMathUD60x18__SubUnderflow(uint256 x, uint256 y); /// @dev Common mathematical functions used in both PRBMathSD59x18 and PRBMathUD60x18. Note that this shared library /// does not always assume the signed 59.18-decimal fixed-point or the unsigned 60.18-decimal fixed-point /// representation. When it does not, it is explictly mentioned in the NatSpec documentation. library PRBMath { /// STRUCTS /// struct SD59x18 { int256 value; } struct UD60x18 { uint256 value; } /// STORAGE /// /// @dev How many trailing decimals can be represented. uint256 internal constant SCALE = 1e18; /// @dev Largest power of two divisor of SCALE. uint256 internal constant SCALE_LPOTD = 262144; /// @dev SCALE inverted mod 2^256. uint256 internal constant SCALE_INVERSE = 78156646155174841979727994598816262306175212592076161876661508869554232690281; /// FUNCTIONS /// /// @notice Calculates the binary exponent of x using the binary fraction method. /// @dev Has to use 192.64-bit fixed-point numbers. /// See https://ethereum.stackexchange.com/a/96594/24693. /// @param x The exponent as an unsigned 192.64-bit fixed-point number. /// @return result The result as an unsigned 60.18-decimal fixed-point number. function exp2(uint256 x) internal pure returns (uint256 result) { unchecked { // Start from 0.5 in the 192.64-bit fixed-point format. result = 0x800000000000000000000000000000000000000000000000; // Multiply the result by root(2, 2^-i) when the bit at position i is 1. None of the intermediary results overflows // because the initial result is 2^191 and all magic factors are less than 2^65. if (x & 0x8000000000000000 > 0) { result = (result * 0x16A09E667F3BCC909) >> 64; } if (x & 0x4000000000000000 > 0) { result = (result * 0x1306FE0A31B7152DF) >> 64; } if (x & 0x2000000000000000 > 0) { result = (result * 0x1172B83C7D517ADCE) >> 64; } if (x & 0x1000000000000000 > 0) { result = (result * 0x10B5586CF9890F62A) >> 64; } if (x & 0x800000000000000 > 0) { result = (result * 0x1059B0D31585743AE) >> 64; } if (x & 0x400000000000000 > 0) { result = (result * 0x102C9A3E778060EE7) >> 64; } if (x & 0x200000000000000 > 0) { result = (result * 0x10163DA9FB33356D8) >> 64; } if (x & 0x100000000000000 > 0) { result = (result * 0x100B1AFA5ABCBED61) >> 64; } if (x & 0x80000000000000 > 0) { result = (result * 0x10058C86DA1C09EA2) >> 64; } if (x & 0x40000000000000 > 0) { result = (result * 0x1002C605E2E8CEC50) >> 64; } if (x & 0x20000000000000 > 0) { result = (result * 0x100162F3904051FA1) >> 64; } if (x & 0x10000000000000 > 0) { result = (result * 0x1000B175EFFDC76BA) >> 64; } if (x & 0x8000000000000 > 0) { result = (result * 0x100058BA01FB9F96D) >> 64; } if (x & 0x4000000000000 > 0) { result = (result * 0x10002C5CC37DA9492) >> 64; } if (x & 0x2000000000000 > 0) { result = (result * 0x1000162E525EE0547) >> 64; } if (x & 0x1000000000000 > 0) { result = (result * 0x10000B17255775C04) >> 64; } if (x & 0x800000000000 > 0) { result = (result * 0x1000058B91B5BC9AE) >> 64; } if (x & 0x400000000000 > 0) { result = (result * 0x100002C5C89D5EC6D) >> 64; } if (x & 0x200000000000 > 0) { result = (result * 0x10000162E43F4F831) >> 64; } if (x & 0x100000000000 > 0) { result = (result * 0x100000B1721BCFC9A) >> 64; } if (x & 0x80000000000 > 0) { result = (result * 0x10000058B90CF1E6E) >> 64; } if (x & 0x40000000000 > 0) { result = (result * 0x1000002C5C863B73F) >> 64; } if (x & 0x20000000000 > 0) { result = (result * 0x100000162E430E5A2) >> 64; } if (x & 0x10000000000 > 0) { result = (result * 0x1000000B172183551) >> 64; } if (x & 0x8000000000 > 0) { result = (result * 0x100000058B90C0B49) >> 64; } if (x & 0x4000000000 > 0) { result = (result * 0x10000002C5C8601CC) >> 64; } if (x & 0x2000000000 > 0) { result = (result * 0x1000000162E42FFF0) >> 64; } if (x & 0x1000000000 > 0) { result = (result * 0x10000000B17217FBB) >> 64; } if (x & 0x800000000 > 0) { result = (result * 0x1000000058B90BFCE) >> 64; } if (x & 0x400000000 > 0) { result = (result * 0x100000002C5C85FE3) >> 64; } if (x & 0x200000000 > 0) { result = (result * 0x10000000162E42FF1) >> 64; } if (x & 0x100000000 > 0) { result = (result * 0x100000000B17217F8) >> 64; } if (x & 0x80000000 > 0) { result = (result * 0x10000000058B90BFC) >> 64; } if (x & 0x40000000 > 0) { result = (result * 0x1000000002C5C85FE) >> 64; } if (x & 0x20000000 > 0) { result = (result * 0x100000000162E42FF) >> 64; } if (x & 0x10000000 > 0) { result = (result * 0x1000000000B17217F) >> 64; } if (x & 0x8000000 > 0) { result = (result * 0x100000000058B90C0) >> 64; } if (x & 0x4000000 > 0) { result = (result * 0x10000000002C5C860) >> 64; } if (x & 0x2000000 > 0) { result = (result * 0x1000000000162E430) >> 64; } if (x & 0x1000000 > 0) { result = (result * 0x10000000000B17218) >> 64; } if (x & 0x800000 > 0) { result = (result * 0x1000000000058B90C) >> 64; } if (x & 0x400000 > 0) { result = (result * 0x100000000002C5C86) >> 64; } if (x & 0x200000 > 0) { result = (result * 0x10000000000162E43) >> 64; } if (x & 0x100000 > 0) { result = (result * 0x100000000000B1721) >> 64; } if (x & 0x80000 > 0) { result = (result * 0x10000000000058B91) >> 64; } if (x & 0x40000 > 0) { result = (result * 0x1000000000002C5C8) >> 64; } if (x & 0x20000 > 0) { result = (result * 0x100000000000162E4) >> 64; } if (x & 0x10000 > 0) { result = (result * 0x1000000000000B172) >> 64; } if (x & 0x8000 > 0) { result = (result * 0x100000000000058B9) >> 64; } if (x & 0x4000 > 0) { result = (result * 0x10000000000002C5D) >> 64; } if (x & 0x2000 > 0) { result = (result * 0x1000000000000162E) >> 64; } if (x & 0x1000 > 0) { result = (result * 0x10000000000000B17) >> 64; } if (x & 0x800 > 0) { result = (result * 0x1000000000000058C) >> 64; } if (x & 0x400 > 0) { result = (result * 0x100000000000002C6) >> 64; } if (x & 0x200 > 0) { result = (result * 0x10000000000000163) >> 64; } if (x & 0x100 > 0) { result = (result * 0x100000000000000B1) >> 64; } if (x & 0x80 > 0) { result = (result * 0x10000000000000059) >> 64; } if (x & 0x40 > 0) { result = (result * 0x1000000000000002C) >> 64; } if (x & 0x20 > 0) { result = (result * 0x10000000000000016) >> 64; } if (x & 0x10 > 0) { result = (result * 0x1000000000000000B) >> 64; } if (x & 0x8 > 0) { result = (result * 0x10000000000000006) >> 64; } if (x & 0x4 > 0) { result = (result * 0x10000000000000003) >> 64; } if (x & 0x2 > 0) { result = (result * 0x10000000000000001) >> 64; } if (x & 0x1 > 0) { result = (result * 0x10000000000000001) >> 64; } // We're doing two things at the same time: // // 1. Multiply the result by 2^n + 1, where "2^n" is the integer part and the one is added to account for // the fact that we initially set the result to 0.5. This is accomplished by subtracting from 191 // rather than 192. // 2. Convert the result to the unsigned 60.18-decimal fixed-point format. // // This works because 2^(191-ip) = 2^ip / 2^191, where "ip" is the integer part "2^n". result *= SCALE; result >>= (191 - (x >> 64)); } } /// @notice Finds the zero-based index of the first one in the binary representation of x. /// @dev See the note on msb in the "Find First Set" Wikipedia article https://en.wikipedia.org/wiki/Find_first_set /// @param x The uint256 number for which to find the index of the most significant bit. /// @return msb The index of the most significant bit as an uint256. function mostSignificantBit(uint256 x) internal pure returns (uint256 msb) { if (x >= 2**128) { x >>= 128; msb += 128; } if (x >= 2**64) { x >>= 64; msb += 64; } if (x >= 2**32) { x >>= 32; msb += 32; } if (x >= 2**16) { x >>= 16; msb += 16; } if (x >= 2**8) { x >>= 8; msb += 8; } if (x >= 2**4) { x >>= 4; msb += 4; } if (x >= 2**2) { x >>= 2; msb += 2; } if (x >= 2**1) { // No need to shift x any more. msb += 1; } } /// @notice Calculates floor(x*y÷denominator) with full precision. /// /// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv. /// /// Requirements: /// - The denominator cannot be zero. /// - The result must fit within uint256. /// /// Caveats: /// - This function does not work with fixed-point numbers. /// /// @param x The multiplicand as an uint256. /// @param y The multiplier as an uint256. /// @param denominator The divisor as an uint256. /// @return result The result as an uint256. function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { // 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; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { unchecked { result = prod0 / denominator; } return result; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (prod1 >= denominator) { revert PRBMath__MulDivOverflow(prod1, denominator); } /////////////////////////////////////////////// // 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. unchecked { // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 lpotdod = denominator & (~denominator + 1); assembly { // Divide denominator by lpotdod. denominator := div(denominator, lpotdod) // Divide [prod1 prod0] by lpotdod. prod0 := div(prod0, lpotdod) // Flip lpotdod such that it is 2^256 / lpotdod. If lpotdod is zero, then it becomes one. lpotdod := add(div(sub(0, lpotdod), lpotdod), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * lpotdod; // 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; // Now use 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 floor(x*y÷1e18) with full precision. /// /// @dev Variant of "mulDiv" with constant folding, i.e. in which the denominator is always 1e18. Before returning the /// final result, we add 1 if (x * y) % SCALE >= HALF_SCALE. Without this, 6.6e-19 would be truncated to 0 instead of /// being rounded to 1e-18. See "Listing 6" and text above it at https://accu.org/index.php/journals/1717. /// /// Requirements: /// - The result must fit within uint256. /// /// Caveats: /// - The body is purposely left uncommented; see the NatSpec comments in "PRBMath.mulDiv" to understand how this works. /// - It is assumed that the result can never be type(uint256).max when x and y solve the following two equations: /// 1. x * y = type(uint256).max * SCALE /// 2. (x * y) % SCALE >= SCALE / 2 /// /// @param x The multiplicand as an unsigned 60.18-decimal fixed-point number. /// @param y The multiplier as an unsigned 60.18-decimal fixed-point number. /// @return result The result as an unsigned 60.18-decimal fixed-point number. function mulDivFixedPoint(uint256 x, uint256 y) internal pure returns (uint256 result) { uint256 prod0; uint256 prod1; assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } if (prod1 >= SCALE) { revert PRBMath__MulDivFixedPointOverflow(prod1); } uint256 remainder; uint256 roundUpUnit; assembly { remainder := mulmod(x, y, SCALE) roundUpUnit := gt(remainder, 499999999999999999) } if (prod1 == 0) { unchecked { result = (prod0 / SCALE) + roundUpUnit; return result; } } assembly { result := add( mul( or( div(sub(prod0, remainder), SCALE_LPOTD), mul(sub(prod1, gt(remainder, prod0)), add(div(sub(0, SCALE_LPOTD), SCALE_LPOTD), 1)) ), SCALE_INVERSE ), roundUpUnit ) } } /// @notice Calculates floor(x*y÷denominator) with full precision. /// /// @dev An extension of "mulDiv" for signed numbers. Works by computing the signs and the absolute values separately. /// /// Requirements: /// - None of the inputs can be type(int256).min. /// - The result must fit within int256. /// /// @param x The multiplicand as an int256. /// @param y The multiplier as an int256. /// @param denominator The divisor as an int256. /// @return result The result as an int256. function mulDivSigned( int256 x, int256 y, int256 denominator ) internal pure returns (int256 result) { if (x == type(int256).min || y == type(int256).min || denominator == type(int256).min) { revert PRBMath__MulDivSignedInputTooSmall(); } // Get hold of the absolute values of x, y and the denominator. uint256 ax; uint256 ay; uint256 ad; unchecked { ax = x < 0 ? uint256(-x) : uint256(x); ay = y < 0 ? uint256(-y) : uint256(y); ad = denominator < 0 ? uint256(-denominator) : uint256(denominator); } // Compute the absolute value of (x*y)÷denominator. The result must fit within int256. uint256 rAbs = mulDiv(ax, ay, ad); if (rAbs > uint256(type(int256).max)) { revert PRBMath__MulDivSignedOverflow(rAbs); } // Get the signs of x, y and the denominator. uint256 sx; uint256 sy; uint256 sd; assembly { sx := sgt(x, sub(0, 1)) sy := sgt(y, sub(0, 1)) sd := sgt(denominator, sub(0, 1)) } // XOR over sx, sy and sd. This is checking whether there are one or three negative signs in the inputs. // If yes, the result should be negative. result = sx ^ sy ^ sd == 0 ? -int256(rAbs) : int256(rAbs); } /// @notice Calculates the square root of x, rounding down. /// @dev Uses the Babylonian method https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method. /// /// Caveats: /// - This function does not work with fixed-point numbers. /// /// @param x The uint256 number for which to calculate the square root. /// @return result The result as an uint256. function sqrt(uint256 x) internal pure returns (uint256 result) { if (x == 0) { return 0; } // Set the initial guess to the closest power of two that is higher than x. uint256 xAux = uint256(x); result = 1; if (xAux >= 0x100000000000000000000000000000000) { xAux >>= 128; result <<= 64; } if (xAux >= 0x10000000000000000) { xAux >>= 64; result <<= 32; } if (xAux >= 0x100000000) { xAux >>= 32; result <<= 16; } if (xAux >= 0x10000) { xAux >>= 16; result <<= 8; } if (xAux >= 0x100) { xAux >>= 8; result <<= 4; } if (xAux >= 0x10) { xAux >>= 4; result <<= 2; } if (xAux >= 0x8) { result <<= 1; } // The operations can never overflow because the result is max 2^127 when it enters this block. unchecked { result = (result + x / result) >> 1; result = (result + x / result) >> 1; result = (result + x / result) >> 1; result = (result + x / result) >> 1; result = (result + x / result) >> 1; result = (result + x / result) >> 1; result = (result + x / result) >> 1; // Seven iterations should be enough uint256 roundedDownResult = x / result; return result >= roundedDownResult ? roundedDownResult : result; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.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}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of 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. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The defaut value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor (string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); _approve(sender, _msgSender(), currentAllowance - amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, currentAllowance - subtractedValue); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); _balances[sender] = senderBalance - amount; _balances[recipient] += amount; emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); _balances[account] = accountBalance - amount; _totalSupply -= amount; emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @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. * * ``` * 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. */ 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 of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping (bytes32 => uint256) _indexes; } /** * @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._indexes[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 read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 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 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[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._indexes[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) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } // 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); } // 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)))); } // 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 on 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)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) 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 `amount` 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 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ 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 pragma solidity ^0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
pragma solidity >=0.6.2; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": { "contracts/GlobalLimits.sol": { "GlobalLimits": "0x5e1593ad595b5b8ccb41e441cd13fc2399b02d27" }, "contracts/SellLimit.sol": { "SellLimit": "0x909599aa2a8a3618e645e37489e2c2b0435e37eb" } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"prod1","type":"uint256"}],"name":"PRBMath__MulDivFixedPointOverflow","type":"error"},{"inputs":[{"internalType":"uint256","name":"prod1","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"PRBMath__MulDivOverflow","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"count","type":"uint256"}],"name":"OnAddLimbo","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxFallPercent","type":"uint256"}],"name":"OnDecrementGlobalLimits","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxFallPercent","type":"uint256"}],"name":"OnDecrementSellLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxFallPercent","type":"uint256"}],"name":"OnIncrementGlobalLimits","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxFallPercent","type":"uint256"}],"name":"OnIncrementSellLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"OnLimboMining","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"OnLimboRestore","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"value","type":"bool"}],"name":"OnLimboState","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"OnReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"number","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"poolSize","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalOnAccounts","type":"uint256"}],"name":"OnTaxInterval","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"},{"inputs":[],"name":"GetConstantTaxPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GetCurrentMidPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GetCurrentTaxPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"uint256","name":"accountBalance","type":"uint256"},{"internalType":"uint256","name":"totalOnAccounts","type":"uint256"}],"name":"GetDynamicTax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"GetGivedTax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"GetLastRewardTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"GetLastRewardedTransactionTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GetLastTaxPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GetLastTaxPoolTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GetLastTotalOnAccounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"GetLimbo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"GetLimboState","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GetLimboTotal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"GetMaxAddToLimbo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GetMaxFallPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GetMaxOneAccountPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"GetMaxTaxPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GetMinBalanceOnLimbo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"GetMinBalancePercentTransactionForReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GetMinCellIntervalSec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"GetOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"accountBalance","type":"uint256"}],"name":"GetRewardDynamicKoef","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GetRewardStopAccountPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numTokens","type":"uint256"}],"name":"GetStaticTax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"uint256","name":"accountBalance","type":"uint256"},{"internalType":"uint256","name":"totalOnAccounts","type":"uint256"}],"name":"GetTax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GetTaxIntervalMinutes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GetTaxIntervalNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GetTaxIterationsForLimboDetect","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"GetTotalTax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"IsAccountInLimbo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"IsNeedAccountInLimbo","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"accountBalance","type":"uint256"},{"internalType":"uint256","name":"transactionAmount","type":"uint256"}],"name":"IsRewardedTransaction","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MaxAccountAmmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OwnerAddLiquidityToPair","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnerBurnAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"taxIntervalDays","type":"uint256"},{"internalType":"uint256","name":"constantTaxPercent","type":"uint256"},{"internalType":"uint256","name":"minBalancePercentTransactionForReward","type":"uint256"},{"internalType":"uint256","name":"rewardStopAccountPercent","type":"uint256"},{"internalType":"uint256","name":"maxTaxPercent","type":"uint256"}],"name":"OwnerInitializeTax","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"OwnerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"SetOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"_GlobalLimits","outputs":[{"internalType":"uint256","name":"_MaxFallPercent","type":"uint256"},{"internalType":"uint256","name":"_PriceControlTimeIntervalMinutes","type":"uint256"},{"internalType":"uint256","name":"_ControlTime","type":"uint256"},{"internalType":"uint256","name":"_ControlTimePrice","type":"uint256"},{"internalType":"uint256","name":"_DefaultMaxFallPercent","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_SellLimit","outputs":[{"internalType":"uint256","name":"MaxFallPercent","type":"uint256"},{"internalType":"uint256","name":"DefaultMaxFallPercent","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_TotalOnAccounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_UniswapRouter","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_UniswapV2Pair","outputs":[{"internalType":"contract IUniswapV2Pair","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":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052612760600555662386f26fc1000060068190556611c37937e0800060075560085567016345785d8a00006009556000601455602280546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d1790553480156200006957600080fd5b506040518060400160405280600681526020016522ba30b637b760d11b8152506040518060400160405280600381526020016245544160e81b81525081818160039080519060200190620000bf92919062001e3f565b508051620000d590600490602084019062001e3f565b50505042600e81905550505060006200010e6c0c9f2c9cd04674edea40000000666a94d74f4300006200048c60201b620014e91760201c565b905060006200013182670853a0d2313c00006200048c60201b620014e91760201c565b905060006200015483670429d069189e00006200048c60201b620014e91760201c565b90506000620001778467016345785d8a00006200048c60201b620014e91760201c565b9050620001b7732abb515dd8bc2cd707fcedcbd5e780f9d899ba34620001b1856729a2241af62c0000620004ac60201b620014f51760201c565b620004ce565b620001ef73322aa2ac658ba2aa3a4d7d680eb2bfcfdbe8d50e620001b1856729a2241af62c0000620004ac60201b620014f51760201c565b620002277320572a1c268fbdee8c3d53980513ab435c5673b0620001b1856729a2241af62c0000620004ac60201b620014f51760201c565b6200025f731d3d6671a8a6650e60802613a3838865a4c260ef620001b184674563918244f40000620004ac60201b620014f51760201c565b6200029773623bd33fc62875b25e2bdcd73cad25911cd034d2620001b184674563918244f40000620004ac60201b620014f51760201c565b620002cf73ca063a5fa006a0b2349c0f5eb984896b4396de85620001b184674563918244f40000620004ac60201b620014f51760201c565b620003077313dacd602d00b92a6942a0047fbbfe67f980f4a6620001b184674563918244f40000620004ac60201b620014f51760201c565b6200033f7337a47b09454d54dece30a19b7860975c14fab83e620001b184674563918244f40000620004ac60201b620014f51760201c565b6200035f73e102c1e0e0db088ea15f9032b839e9c8caf92cbc82620004ce565b6200037d30620001b1866c0c9f2c9cd04674edea4000000062001fef565b604051631cc8801960e21b8152601b6004820152662386f26fc10000602482015273909599aa2a8a3618e645e37489e2c2b0435e37eb9063732200649060440160006040518083038186803b158015620003d657600080fd5b505af4158015620003eb573d6000803e3d6000fd5b505060405163815c0b3d60e01b8152601d600482015266470de4df8200006024820152603c604482015260016064820152735e1593ad595b5b8ccb41e441cd13fc2399b02d27925063815c0b3d915060840160006040518083038186803b1580156200045657600080fd5b505af41580156200046b573d6000803e3d6000fd5b5050602480546001600160a01b031916331790555062002094945050505050565b6000620004a58383620005b460201b6200150a1760201c565b9392505050565b6000620004a583670de0b6b3a7640000846200067b60201b620015cc1760201c565b6001600160a01b0382166200052a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064015b60405180910390fd5b62000538600083836200075b565b80600260008282546200054c919062001f91565b90915550506001600160a01b038216600090815260208190526040812080548392906200057b90849062001f91565b90915550506040518181526001600160a01b03831690600090600080516020620050f88339815191529060200160405180910390a35050565b60008080600019848609848602925082811083820303915050670de0b6b3a76400008110620005fa5760405163698d9a0160e11b81526004810182905260240162000521565b600080670de0b6b3a76400008688099150506706f05b59d3b1ffff811182620006365780670de0b6b3a764000085040194505050505062000675565b620400008285030493909111909103600160ee1b02919091177faccb18165bd6fe31ae1cf318dc5b51eee0e1ba569b88cd74c1773b91fac10669020190505b92915050565b600080806000198587098587029250828110838203039150508060001415620006c757838281620006bc57634e487b7160e01b600052601260045260246000fd5b0492505050620004a5565b838110620006f357604051631dcf306360e21b8152600481018290526024810185905260440162000521565b600084868809600260036001881981018916988990049182028318808302840302808302840302808302840302808302840302808302840302918202909203026000889003889004909101858311909403939093029303949094049190911702949350505050565b816001600160a01b0316836001600160a01b03161415620007da5760405162461bcd60e51b815260206004820152603260248201527f4572726f72212053656e64696e6720746f6b656e7320746f20796f757273656c60448201527119881a5cc81b9bdd081c195c9b5a5d1d195960721b606482015260840162000521565b6001600160a01b03831662000807578060196000828254620007fd919062001f91565b9091555050505050565b6001600160a01b0382166200083a57620008328160195462000b4460201b620016a81790919060201c565b601955505050565b6001600160a01b038316301480156200086057506023546001600160a01b038381169116145b156200086b57505050565b6200087f6200087962000ba6565b62000c82565b6200088b838362000f38565b6200089883838362001088565b600080602360009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015620008ea57600080fd5b505afa158015620008ff573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000925919062001f3d565b506001600160701b0391821693501690506001600160a01b038516158015906200095c57506023546001600160a01b038581169116145b15620009dd57604051635ab2735160e01b8152601b600482015260248101829052604481018390526064810184905273909599aa2a8a3618e645e37489e2c2b0435e37eb90635ab273519060840160006040518083038186803b158015620009c357600080fd5b505af4158015620009d8573d6000803e3d6000fd5b505050505b6023546001600160a01b03868116911614620009fe57620009fe856200119a565b6023546001600160a01b0385811691161462000a1f5762000a1f846200119a565b62000a4562000a3f8360195462000b4460201b620016a81790919060201c565b62001238565b6023546001600160a01b0386811691161462000a675762000a67858462001309565b6023546001600160a01b0385811691161462000a895762000a89848462001309565b600062000ab98462000ab0886001600160a01b031660009081526020819052604090205490565b601954620013d5565b9050600062000ad58762000acf60028562001fac565b62001431565b905062000af1818362000b4460201b620016a81790919060201c565b915060008211801562000b1257506023546001600160a01b03888116911614155b1562000b3b5762000b248783620015cf565b62000b3b62000b3560028462001fac565b6200172b565b50505050505050565b60008262000b53838262001fef565b9150811115620006755760405162461bcd60e51b815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015260640162000521565b6023546000906001600160a01b031662000bc05750600090565b600080602360009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801562000c1257600080fd5b505afa15801562000c27573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000c4d919062001f3d565b506001600160701b031691506001600160701b0316915062000c7b8183620004ac60201b620014f51760201c565b9250505090565b604051635d27ad5b60e01b8152601d600482015260248101829052600090735e1593ad595b5b8ccb41e441cd13fc2399b02d2790635d27ad5b9060440160206040518083038186803b15801562000cd857600080fd5b505af415801562000ced573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000d13919062001f24565b9050600081131562000e2457806002141562000d6057601d546040519081527f2aa6782993a70d8c6a1c38a2b836297828bf67712bac6ec90adaff636813f2a69060200160405180910390a15b60405163bc15d82f60e01b8152601b600482015273909599aa2a8a3618e645e37489e2c2b0435e37eb9063bc15d82f9060240160206040518083038186803b15801562000dac57600080fd5b505af415801562000dc1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000de7919062001f02565b1562000e2457601b546040519081527ff6d581c245e7fd5125c17e9096a7405ce97d7d82392c98cbc4345a71fab3b6119060200160405180910390a15b600081121562000f345780600119141562000e7057601d546040519081527f44f3dfea493297a27286ed5892cbce4c1f8d3dbcb172de1ba0734d9cd6fc91689060200160405180910390a15b6040516359ae990d60e01b8152601b600482015273909599aa2a8a3618e645e37489e2c2b0435e37eb906359ae990d9060240160206040518083038186803b15801562000ebc57600080fd5b505af415801562000ed1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000ef7919062001f02565b1562000f3457601b546040519081527fbc98d532d62547b656a0dc50382e9f3bb2142dcf9df9d53b519d13e4c68c48ce9060200160405180910390a15b5050565b6001600160a01b038216158062000f5657506001600160a01b038116155b8062000f735750806001600160a01b0316826001600160a01b0316145b1562000f7d575050565b6023546001600160a01b038381169116141562000fb1576001600160a01b03166000908152601a6020526040902042905550565b6023546001600160a01b038281169116141562000f34576001600160a01b0382166000908152601a602052604081205462000fed904262001fef565b905062000ffd603c600162001fcd565b811015620010835760405162461bcd60e51b815260206004820152604660248201527f4572726f72212053656c6c696e6720746f6b656e73206973207065726d69747460448201527f656420696e2061206d696e7574652061667465722061206275792e20547279206064820152653630ba32b91760d11b608482015260a40162000521565b505050565b6001600160a01b0383161580620010ac57506023546001600160a01b038381169116145b15620010b757505050565b620010c162001747565b81620010e2846001600160a01b031660009081526020819052604090205490565b620010ee919062001f91565b1115620010835760405162461bcd60e51b815260206004820152606760248201527f54686520726563697069656e7420697320686f6c64696e67203125206f72206d60448201527f6f7265206f66207468652063697263756c6174696e6720737570706c792e205360648201527f656e64696e6720746f20746869732061646472657373206973206e6f742070656084820152661c9b5a5d1d195960ca1b60a482015260c40162000521565b6001600160a01b0381161580620011c957506001600160a01b03811660009081526013602052604090205460ff165b15620011d25750565b6001600160a01b03166000818152601360205260408120805460ff191660019081179091556012805491820181559091527fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec34440180546001600160a01b0319169091179055565b6005546200124890603c62001fcd565b600e5462001257919062001f91565b421015620012625750565b601054600d5462001274919062001fef565b600d818155600c54916000906200128d90849062001f91565b90915550506000600c8190556010819055600f82905542600e5560118054909190620012b99062002060565b90915550601154600d54600f546040517f61f1e392e9a0f5d4589c28805ee9418227d5925aa194387a640d38ed2886495892620012fe92908252602082015260400190565b60405180910390a250565b6001600160a01b0382166200131c575050565b60006200134a8362001343816001600160a01b031660009081526020819052604090205490565b8462001775565b905080156200135f576200135f8382620004ce565b60006200138b62001371848462001f91565b678ac7230489e800006200048c60201b620014e91760201c565b6001600160a01b03851660009081526016602052604090205490915080821115620013b4578091505b620013bf826200190a565b9150620013cd858362001949565b505050505050565b600080620013e585858562001a9b565b620013f08662001b28565b620013fc919062001f91565b9050600062001419866009546200048c60201b620014e91760201c565b90508082111562001428578091505b50949350505050565b6000600c6200143f60115490565b10156200144f5750600062000675565b60006200145f600a600162001f91565b60145490915060005b6000620014758462002009565b9350831180156200148557508481105b156200157a576000601260145481548110620014b157634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0390811691508716811415620014f25760148054906000620014e68362002060565b91905055505062001468565b620014fd8162001b43565b1562001529576200151a8162001514848962001fef565b62001bcb565b62001526908362001f91565b91505b8582106200153857506200157a565b601480549060006200154a8362002060565b909155505060125460145410620015615760006014555b8260145414156200157357506200157a565b5062001468565b8015620015c657856001600160a01b03167f240664d6876438faf8f19bea3d236dab225c95917912b9f06fafef6a10e8342e82604051620015bd91815260200190565b60405180910390a25b95945050505050565b6001600160a01b038216620016315760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840162000521565b6200163f826000836200075b565b6001600160a01b03821660009081526020819052604090205481811015620016b55760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840162000521565b620016c1828262001fef565b6001600160a01b03841660009081526020819052604081209190915560028054849290620016f190849062001fef565b90915550506040518281526000906001600160a01b03851690600080516020620050f88339815191529060200160405180910390a3505050565b80600c60008282546200173f919062001f91565b909155505050565b6000620017706200175762001d19565b662386f26fc100006200048c60201b620014e91760201c565b905090565b60006001600160a01b0384166200178f57506000620004a5565b6200179b838362001d34565b620017a957506000620004a5565b6001600160a01b0384166000908152600b60205260409020429055600e54620017d6906201518062001f91565b6001600160a01b0385166000908152600a602052604090205410620017fe57506000620004a5565b6011546200180f57506000620004a5565b600f546200182057506000620004a5565b600d54601054106200183557506000620004a5565b6001600160a01b0384166000908152600a602090815260408220429055600f546200186c91869190620014f5620004ac821b17901c565b905060006200188982600d546200048c60201b620014e91760201c565b9050620018ac816200189b8762001d6b565b6200048c60201b620014e91760201c565b90508060106000828254620018c2919062001f91565b90915550508015620015c657856001600160a01b03167fd1072bb52c3131d0c96197b73fb8a45637e30f8b6664fc142310cc9b242859b482604051620015bd91815260200190565b6010805460009183908362001920838562001f91565b9091555050600d5460105411156200193957600d546010555b80601054620004a5919062001fef565b6001600160a01b0382166000908152601660205260408120548015806200196e575082155b156200197f57600091505062000675565b808311156200198c578092505b6001600160a01b03841660009081526017602052604090205460ff161562001a01576001600160a01b0384166000818152601760209081526040808320805460ff19169055519182527f27c60316003a72bcf0ff0ed61d3796019998dc193c0f563d2b71e80defee3e6e910160405180910390a25b62001a0d838262001fef565b6001600160a01b0385166000908152601660205260408120919091556015805485929062001a3d90849062001fef565b9091555062001a4f90508484620004ce565b836001600160a01b03167f22c17ab37648d95f55a8112c13181232bed68954ca0f21e8ef3012fc0c9e21948460405162001a8b91815260200190565b60405180910390a2509092915050565b60008162001aac57506000620004a5565b600062001ac58584620004ac60201b620014f51760201c565b9050600062001ae082876200048c60201b620014e91760201c565b905062001af98585620004ac60201b620014f51760201c565b915062001b1282876200048c60201b620014e91760201c565b62001b1e908262001f91565b9695505050505050565b600062000675826006546200048c60201b620014e91760201c565b60006001600160a01b03821662001b5c57506000919050565b600c62001b6860115490565b101562001b7757506000919050565b600e54600c62001b8660055490565b62001b9390603c62001fcd565b62001b9f919062001fcd565b6001600160a01b0384166000908152600b602052604090205462001bc4919062001f91565b1092915050565b60008062001bd98462001dc9565b90508083111562001be8578092505b8262001bf957600091505062000675565b6001600160a01b03841660009081526017602052604090205460ff1662001c75576001600160a01b038416600081815260176020908152604091829020805460ff1916600190811790915591519182527f27c60316003a72bcf0ff0ed61d3796019998dc193c0f563d2b71e80defee3e6e910160405180910390a25b6001600160a01b03841660009081526016602052604090205462001c9b90849062001f91565b6001600160a01b0385166000908152601660205260408120919091556015805485929062001ccb90849062001f91565b9091555062001cdd90508484620015cf565b836001600160a01b03167f97be809100083430a19c5b645f049037dd8f2cd1ebbcd365f3d41a0cfdec04b38460405162001a8b91815260200190565b600062001d2562001e1c565b60195462001770919062001f91565b60008262001d455750600062000675565b600062001d5e8385620004ac60201b620014f51760201c565b6007541115949350505050565b60008062001d8783600f54620004ac60201b620014f51760201c565b9050600854811062001d9c5750600092915050565b62001db581600854620004ac60201b620014f51760201c565b620004a590670de0b6b3a764000062001fef565b60006001600160a01b03821662001de257506000919050565b6001600160a01b038216600090815260208190526040902054610309811162001e0e5750600092915050565b620004a56103098262001fef565b6000601054600d54600c5462001e33919062001f91565b62001770919062001fef565b82805462001e4d9062002023565b90600052602060002090601f01602090048101928262001e71576000855562001ebc565b82601f1062001e8c57805160ff191683800117855562001ebc565b8280016001018555821562001ebc579182015b8281111562001ebc57825182559160200191906001019062001e9f565b5062001eca92915062001ece565b5090565b5b8082111562001eca576000815560010162001ecf565b80516001600160701b038116811462001efd57600080fd5b919050565b60006020828403121562001f14578081fd5b81518015158114620004a5578182fd5b60006020828403121562001f36578081fd5b5051919050565b60008060006060848603121562001f52578182fd5b62001f5d8462001ee5565b925062001f6d6020850162001ee5565b9150604084015163ffffffff8116811462001f86578182fd5b809150509250925092565b6000821982111562001fa75762001fa76200207e565b500190565b60008262001fc857634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161562001fea5762001fea6200207e565b500290565b6000828210156200200457620020046200207e565b500390565b6000816200201b576200201b6200207e565b506000190190565b600181811c908216806200203857607f821691505b602082108114156200205a57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156200207757620020776200207e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b61305480620020a46000396000f3fe6080604052600436106103355760003560e01c8063885282e7116101ab578063b8801ed7116100f7578063dd62ed3e11610095578063e44dd2ec1161006f578063e44dd2ec14610974578063e6250cc014610994578063e75fabb4146109a8578063f7bd9578146109c857600080fd5b8063dd62ed3e14610904578063e16cfac21461094a578063e37f48301461095f57600080fd5b8063d1d2d498116100d1578063d1d2d4981461089a578063d23b924f146108ba578063d7505653146108cf578063da1d2717146108e457600080fd5b8063b8801ed71461085c578063c9214c3014610872578063cb3720ed1461089257600080fd5b806395d89b4111610164578063a9059cbb1161013e578063a9059cbb146107f2578063a999422914610812578063ae7b28fb14610827578063b4c982c61461084757600080fd5b806395d89b411461078d5780639bacc42f146107a2578063a457c2d7146107d257600080fd5b8063885282e7146106cd5780638d671be3146106ed578063901706cd14610702578063915cda7914610722578063916b0df614610737578063954ea6651461076d57600080fd5b806355ac0e0a1161028557806369021d461161022357806376dcb19d116101fd57806376dcb19d146106585780637f6bb00f1461067857806381933a581461069857806385ba5d02146106b857600080fd5b806369021d46146105d457806370a0823114610623578063735023751461064357600080fd5b806359ec74af1161025f57806359ec74af1461053c578063622650d114610575578063664b72c614610589578063682a93ab1461059e57600080fd5b806355ac0e0a146104dc57806358276bdd146104f157806359c8602f1461050657600080fd5b80631e4af52e116102f25780632b7aaecb116102cc5780632b7aaecb146104765780632f8eb3071461048b578063313ce567146104a057806339509351146104bc57600080fd5b80631e4af52e1461042c57806323b872dd1461044157806323b885031461046157600080fd5b806306fdde031461033a578063095ea7b3146103655780630ae50a3914610395578063167d3e9c146103c757806318160ddd146103e95780631ddb4d761461040c575b600080fd5b34801561034657600080fd5b5061034f6109e2565b60405161035c9190612e83565b60405180910390f35b34801561037157600080fd5b50610385610380366004612d07565b610a74565b604051901515815260200161035c565b3480156103a157600080fd5b506024546001600160a01b03165b6040516001600160a01b03909116815260200161035c565b3480156103d357600080fd5b506103e76103e2366004612c57565b610a8b565b005b3480156103f557600080fd5b506103fe610ae0565b60405190815260200161035c565b34801561041857600080fd5b506103fe610427366004612df1565b610afc565b34801561043857600080fd5b506011546103fe565b34801561044d57600080fd5b5061038561045c366004612cc7565b610b46565b34801561046d57600080fd5b506103fe610bf7565b34801561048257600080fd5b506015546103fe565b34801561049757600080fd5b506006546103fe565b3480156104ac57600080fd5b506040516012815260200161035c565b3480156104c857600080fd5b506103856104d7366004612d07565b610cc1565b3480156104e857600080fd5b50600f546103fe565b3480156104fd57600080fd5b506103096103fe565b34801561051257600080fd5b506103fe610521366004612c57565b6001600160a01b03166000908152600b602052604090205490565b34801561054857600080fd5b50610385610557366004612c57565b6001600160a01b031660009081526017602052604090205460ff1690565b34801561058157600080fd5b50600c6103fe565b34801561059557600080fd5b50600d546103fe565b3480156105aa57600080fd5b506103fe6105b9366004612c57565b6001600160a01b03166000908152600a602052604090205490565b3480156105e057600080fd5b50601d54601e54601f546020546021546105fb949392919085565b604080519586526020860194909452928401919091526060830152608082015260a00161035c565b34801561062f57600080fd5b506103fe61063e366004612c57565b610cf8565b34801561064f57600080fd5b50600c546103fe565b34801561066457600080fd5b506103e7610673366004612d07565b610d13565b34801561068457600080fd5b506103e7610693366004612c57565b610d69565b3480156106a457600080fd5b506103fe6106b3366004612db8565b610da8565b3480156106c457600080fd5b50600e546103fe565b3480156106d957600080fd5b506103e76106e8366004612e49565b610de9565b3480156106f957600080fd5b506103fe610e2e565b34801561070e57600080fd5b506023546103af906001600160a01b031681565b34801561072e57600080fd5b506005546103fe565b34801561074357600080fd5b506103fe610752366004612c57565b6001600160a01b031660009081526016602052604090205490565b34801561077957600080fd5b506022546103af906001600160a01b031681565b34801561079957600080fd5b5061034f610e4d565b3480156107ae57600080fd5b50601b54601c546107bd919082565b6040805192835260208301919091520161035c565b3480156107de57600080fd5b506103856107ed366004612d07565b610e5c565b3480156107fe57600080fd5b5061038561080d366004612d07565b610ef7565b34801561081e57600080fd5b506008546103fe565b34801561083357600080fd5b50610385610842366004612dd0565b610f04565b34801561085357600080fd5b50601b546103fe565b34801561086857600080fd5b506103fe60195481565b34801561087e57600080fd5b5061038561088d366004612c57565b610f2c565b6103e7610f63565b3480156108a657600080fd5b506103fe6108b5366004612db8565b6113ab565b3480156108c657600080fd5b506103fe6113b9565b3480156108db57600080fd5b506007546103fe565b3480156108f057600080fd5b506103856108ff366004612c57565b6113d3565b34801561091057600080fd5b506103fe61091f366004612c8f565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b34801561095657600080fd5b506009546103fe565b34801561096b57600080fd5b506010546103fe565b34801561098057600080fd5b506103fe61098f366004612c57565b611451565b3480156109a057600080fd5b50603c6103fe565b3480156109b457600080fd5b506103fe6109c3366004612df1565b611494565b3480156109d457600080fd5b50662386f26fc100006103fe565b6060600380546109f190612f9d565b80601f0160208091040260200160405190810160405280929190818152602001828054610a1d90612f9d565b8015610a6a5780601f10610a3f57610100808354040283529160200191610a6a565b820191906000526020600020905b815481529060010190602001808311610a4d57829003601f168201915b5050505050905090565b6000610a813384846116fe565b5060015b92915050565b6024546001600160a01b03163314610abe5760405162461bcd60e51b8152600401610ab590612ed6565b60405180910390fd5b602480546001600160a01b0319166001600160a01b0392909216919091179055565b6000610aea610e2e565b601954610af79190612f18565b905090565b600080610b0a858585611494565b610b13866113ab565b610b1d9190612f18565b90506000610b2d866009546114e9565b905080821115610b3b578091505b5090505b9392505050565b6000610b53848484611823565b6001600160a01b038416600090815260016020908152604080832033845290915290205482811015610bd85760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610ab5565b610bec8533610be78685612f6f565b6116fe565b506001949350505050565b6023546000906001600160a01b0316610c105750600090565b600080602360009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015610c6157600080fd5b505afa158015610c75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c999190612d6a565b506001600160701b031691506001600160701b03169150610cba81836114f5565b9250505090565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610a81918590610be7908690612f18565b6001600160a01b031660009081526020819052604090205490565b6024546001600160a01b03163314610d3d5760405162461bcd60e51b8152600401610ab590612ed6565b6022546001600160a01b03838116911614610d5b57610d5b82611a06565b610d658282611aa2565b5050565b6024546001600160a01b03163314610d935760405162461bcd60e51b8152600401610ab590612ed6565b610da581610da083610cf8565b611b8d565b50565b600080610db783600f546114f5565b90506008548110610dcb5750600092915050565b610dd7816008546114f5565b610b3f90670de0b6b3a7640000612f6f565b6024546001600160a01b03163314610e135760405162461bcd60e51b8152600401610ab590612ed6565b60059490945560069290925560075560085560095542600e55565b6000601054600d54600c54610e439190612f18565b610af79190612f6f565b6060600480546109f190612f9d565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610ede5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610ab5565b610eed3385610be78685612f6f565b5060019392505050565b6000610a81338484611823565b600082610f1357506000610a85565b6000610f1f83856114f5565b6007541115949350505050565b60006001600160a01b038216610f4457506000919050565b506001600160a01b031660009081526017602052604090205460ff1690565b6024546001600160a01b03163314610f8d5760405162461bcd60e51b8152600401610ab590612ed6565b602260009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610fdb57600080fd5b505afa158015610fef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110139190612c73565b6001600160a01b031663c9c6539630602260009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561107057600080fd5b505afa158015611084573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a89190612c73565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156110f057600080fd5b505af1158015611104573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111289190612c73565b602380546001600160a01b0319166001600160a01b03928316179055602254611156913091166000196116fe565b6022546001600160a01b031663f305d719473061117281610cf8565b6040516001600160e01b031960e086901b1681526001600160a01b03909216600483015260248201526000604482018190526064820181905260848201524260a482015260c4016060604051808303818588803b1580156111d257600080fd5b505af11580156111e6573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061120b9190612e1c565b505060235460408051630240bc6b60e21b815290516000935083926001600160a01b031691630902f1ac916004808301926060929190829003018186803b15801561125557600080fd5b505afa158015611269573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128d9190612d6a565b506001600160701b031691506001600160701b03169150601d735e1593ad595b5b8ccb41e441cd13fc2399b02d2763815c0b3d9091601d60000154601d600101546112d886886114f5565b6040516001600160e01b031960e087901b168152600481019490945260248401929092526044830152606482015260840160006040518083038186803b15801561132157600080fd5b505af4158015611335573d6000803e3d6000fd5b5050601c54604051631cc8801960e21b8152601b6004820152602481019190915273909599aa2a8a3618e645e37489e2c2b0435e37eb92506373220064915060440160006040518083038186803b15801561138f57600080fd5b505af41580156113a3573d6000803e3d6000fd5b505050505050565b6000610a85826006546114e9565b6000610af76113c6610ae0565b662386f26fc100006114e9565b60006001600160a01b0382166113eb57506000919050565b600c6113f660115490565b101561140457506000919050565b600e54600c61141260055490565b61141d90603c612f50565b6114279190612f50565b6001600160a01b0384166000908152600b602052604090205461144a9190612f18565b1092915050565b60006001600160a01b03821661146957506000919050565b600061147483610cf8565b905061030981116114885750600092915050565b610b3f61030982612f6f565b6000816114a357506000610b3f565b60006114af85846114f5565b905060006114bd82876114e9565b90506114c985856114f5565b91506114d582876114e9565b6114df9082612f18565b9695505050505050565b6000610b3f838361150a565b6000610b3f83670de0b6b3a7640000846115cc565b60008080600019848609848602925082811083820303915050670de0b6b3a7640000811061154e5760405163698d9a0160e11b815260048101829052602401610ab5565b600080670de0b6b3a76400008688099150506706f05b59d3b1ffff8111826115885780670de0b6b3a7640000850401945050505050610a85565b620400008285030493909111909103600160ee1b02919091177faccb18165bd6fe31ae1cf318dc5b51eee0e1ba569b88cd74c1773b91fac106690201905092915050565b6000808060001985870985870292508281108382030391505080600014156116155783828161160b57634e487b7160e01b600052601260045260246000fd5b0492505050610b3f565b83811061163f57604051631dcf306360e21b81526004810182905260248101859052604401610ab5565b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b6000826116b58382612f6f565b9150811115610a855760405162461bcd60e51b815260206004820152601560248201527464732d6d6174682d7375622d756e646572666c6f7760581b6044820152606401610ab5565b6001600160a01b0383166117605760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610ab5565b6001600160a01b0382166117c15760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610ab5565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166118875760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610ab5565b6001600160a01b0382166118e95760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610ab5565b6118f4838383611ce8565b6001600160a01b0383166000908152602081905260409020548181101561196c5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610ab5565b6119768282612f6f565b6001600160a01b0380861660009081526020819052604080822093909355908516815290812080548492906119ac908490612f18565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516119f891815260200190565b60405180910390a350505050565b6001600160a01b0381161580611a3457506001600160a01b03811660009081526013602052604090205460ff165b15611a3c5750565b6001600160a01b03166000818152601360205260408120805460ff191660019081179091556012805491820181559091527fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec34440180546001600160a01b0319169091179055565b6001600160a01b038216611af85760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610ab5565b611b0460008383611ce8565b8060026000828254611b169190612f18565b90915550506001600160a01b03821660009081526020819052604081208054839290611b43908490612f18565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038216611bed5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610ab5565b611bf982600083611ce8565b6001600160a01b03821660009081526020819052604090205481811015611c6d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610ab5565b611c778282612f6f565b6001600160a01b03841660009081526020819052604081209190915560028054849290611ca5908490612f6f565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001611816565b816001600160a01b0316836001600160a01b03161415611d655760405162461bcd60e51b815260206004820152603260248201527f4572726f72212053656e64696e6720746f6b656e7320746f20796f757273656c60448201527119881a5cc81b9bdd081c195c9b5a5d1d195960721b6064820152608401610ab5565b6001600160a01b038316611d8f578060196000828254611d859190612f18565b9091555050505050565b6001600160a01b038216611db257601954611daa90826116a8565b601955505050565b6001600160a01b03831630148015611dd757506023546001600160a01b038381169116145b15611de157505050565b611df1611dec610bf7565b612059565b611dfb83836122fc565b611e06838383612441565b600080602360009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015611e5757600080fd5b505afa158015611e6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e8f9190612d6a565b506001600160701b0391821693501690506001600160a01b03851615801590611ec557506023546001600160a01b038581169116145b15611f4357604051635ab2735160e01b8152601b600482015260248101829052604481018390526064810184905273909599aa2a8a3618e645e37489e2c2b0435e37eb90635ab273519060840160006040518083038186803b158015611f2a57600080fd5b505af4158015611f3e573d6000803e3d6000fd5b505050505b6023546001600160a01b03868116911614611f6157611f6185611a06565b6023546001600160a01b03858116911614611f7f57611f7f84611a06565b601954611f9590611f9090846116a8565b612534565b6023546001600160a01b03868116911614611fb457611fb485846125f9565b6023546001600160a01b03858116911614611fd357611fd384846125f9565b6000611fea84611fe288610cf8565b601954610afc565b9050600061200287611ffd600285612f30565b61268c565b905061200e82826116a8565b915060008211801561202e57506023546001600160a01b03888116911614155b156120505761203d8783611b8d565b61205061204b600284612f30565b612809565b50505050505050565b604051635d27ad5b60e01b8152601d600482015260248101829052600090735e1593ad595b5b8ccb41e441cd13fc2399b02d2790635d27ad5b9060440160206040518083038186803b1580156120ae57600080fd5b505af41580156120c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120e69190612d52565b905060008113156121f057806002141561213157601d546040519081527f2aa6782993a70d8c6a1c38a2b836297828bf67712bac6ec90adaff636813f2a69060200160405180910390a15b60405163bc15d82f60e01b8152601b600482015273909599aa2a8a3618e645e37489e2c2b0435e37eb9063bc15d82f9060240160206040518083038186803b15801561217c57600080fd5b505af4158015612190573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121b49190612d32565b156121f057601b546040519081527ff6d581c245e7fd5125c17e9096a7405ce97d7d82392c98cbc4345a71fab3b6119060200160405180910390a15b6000811215610d655780600119141561223a57601d546040519081527f44f3dfea493297a27286ed5892cbce4c1f8d3dbcb172de1ba0734d9cd6fc91689060200160405180910390a15b6040516359ae990d60e01b8152601b600482015273909599aa2a8a3618e645e37489e2c2b0435e37eb906359ae990d9060240160206040518083038186803b15801561228557600080fd5b505af4158015612299573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122bd9190612d32565b15610d6557601b546040519081527fbc98d532d62547b656a0dc50382e9f3bb2142dcf9df9d53b519d13e4c68c48ce9060200160405180910390a15050565b6001600160a01b038216158061231957506001600160a01b038116155b806123355750806001600160a01b0316826001600160a01b0316145b1561233e575050565b6023546001600160a01b0383811691161415612371576001600160a01b03166000908152601a6020526040902042905550565b6023546001600160a01b0382811691161415610d65576001600160a01b0382166000908152601a60205260408120546123aa9042612f6f565b90506123b8603c6001612f50565b81101561243c5760405162461bcd60e51b815260206004820152604660248201527f4572726f72212053656c6c696e6720746f6b656e73206973207065726d69747460448201527f656420696e2061206d696e7574652061667465722061206275792e20547279206064820152653630ba32b91760d11b608482015260a401610ab5565b505050565b6001600160a01b038316158061246457506023546001600160a01b038381169116145b1561246e57505050565b6124766113b9565b8161248084610cf8565b61248a9190612f18565b111561243c5760405162461bcd60e51b815260206004820152606760248201527f54686520726563697069656e7420697320686f6c64696e67203125206f72206d60448201527f6f7265206f66207468652063697263756c6174696e6720737570706c792e205360648201527f656e64696e6720746f20746869732061646472657373206973206e6f742070656084820152661c9b5a5d1d195960ca1b60a482015260c401610ab5565b60055461254290603c612f50565b600e5461254f9190612f18565b4210156125595750565b601054600d546125699190612f6f565b600d818155600c5491600090612580908490612f18565b90915550506000600c8190556010819055600f82905542600e55601180549091906125aa90612fd8565b90915550601154600d54600f546040517f61f1e392e9a0f5d4589c28805ee9418227d5925aa194387a640d38ed28864958926125ee92908252602082015260400190565b60405180910390a250565b6001600160a01b03821661260b575050565b60006126208361261a85610cf8565b84612823565b90508015612632576126328382611aa2565b600061264f6126418484612f18565b678ac7230489e800006114e9565b6001600160a01b03851660009081526016602052604090205490915080821115612677578091505b6126808261297a565b91506113a385836129b4565b6000600c61269960115490565b10156126a757506000610a85565b60006126b5600a6001612f18565b60145490915060005b60006126c984612f86565b9350831180156126d857508481105b156127b657600060126014548154811061270257634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b039081169150871681141561273f576014805490600061273483612fd8565b9190505550506126be565b612748816113d3565b1561276d576127608161275b8489612f6f565b612afa565b61276a9083612f18565b91505b85821061277a57506127b6565b6014805490600061278a83612fd8565b9091555050601254601454106127a05760006014555b8260145414156127b057506127b6565b506126be565b801561280057856001600160a01b03167f240664d6876438faf8f19bea3d236dab225c95917912b9f06fafef6a10e8342e826040516127f791815260200190565b60405180910390a25b95945050505050565b80600c600082825461281b9190612f18565b909155505050565b60006001600160a01b03841661283b57506000610b3f565b6128458383610f04565b61285157506000610b3f565b6001600160a01b0384166000908152600b60205260409020429055600e5461287c9062015180612f18565b6001600160a01b0385166000908152600a6020526040902054106128a257506000610b3f565b6011546128b157506000610b3f565b600f546128c057506000610b3f565b600d54601054106128d357506000610b3f565b6001600160a01b0384166000908152600a60205260408120429055600f546128fc9085906114f5565b9050600061290c82600d546114e9565b90506129208161291b87610da8565b6114e9565b905080601060008282546129349190612f18565b9091555050801561280057856001600160a01b03167fd1072bb52c3131d0c96197b73fb8a45637e30f8b6664fc142310cc9b242859b4826040516127f791815260200190565b6010805460009183908361298e8385612f18565b9091555050600d5460105411156129a657600d546010555b80601054610b3f9190612f6f565b6001600160a01b0382166000908152601660205260408120548015806129d8575082155b156129e7576000915050610a85565b808311156129f3578092505b6001600160a01b03841660009081526017602052604090205460ff1615612a67576001600160a01b0384166000818152601760209081526040808320805460ff19169055519182527f27c60316003a72bcf0ff0ed61d3796019998dc193c0f563d2b71e80defee3e6e910160405180910390a25b612a718382612f6f565b6001600160a01b03851660009081526016602052604081209190915560158054859290612a9f908490612f6f565b90915550612aaf90508484611aa2565b836001600160a01b03167f22c17ab37648d95f55a8112c13181232bed68954ca0f21e8ef3012fc0c9e219484604051612aea91815260200190565b60405180910390a2509092915050565b600080612b0684611451565b905080831115612b14578092505b82612b23576000915050610a85565b6001600160a01b03841660009081526017602052604090205460ff16612b9e576001600160a01b038416600081815260176020908152604091829020805460ff1916600190811790915591519182527f27c60316003a72bcf0ff0ed61d3796019998dc193c0f563d2b71e80defee3e6e910160405180910390a25b6001600160a01b038416600090815260166020526040902054612bc2908490612f18565b6001600160a01b03851660009081526016602052604081209190915560158054859290612bf0908490612f18565b90915550612c0090508484611b8d565b836001600160a01b03167f97be809100083430a19c5b645f049037dd8f2cd1ebbcd365f3d41a0cfdec04b384604051612aea91815260200190565b80516001600160701b0381168114612c5257600080fd5b919050565b600060208284031215612c68578081fd5b8135610b3f81613009565b600060208284031215612c84578081fd5b8151610b3f81613009565b60008060408385031215612ca1578081fd5b8235612cac81613009565b91506020830135612cbc81613009565b809150509250929050565b600080600060608486031215612cdb578081fd5b8335612ce681613009565b92506020840135612cf681613009565b929592945050506040919091013590565b60008060408385031215612d19578182fd5b8235612d2481613009565b946020939093013593505050565b600060208284031215612d43578081fd5b81518015158114610b3f578182fd5b600060208284031215612d63578081fd5b5051919050565b600080600060608486031215612d7e578283fd5b612d8784612c3b565b9250612d9560208501612c3b565b9150604084015163ffffffff81168114612dad578182fd5b809150509250925092565b600060208284031215612dc9578081fd5b5035919050565b60008060408385031215612de2578182fd5b50508035926020909101359150565b600080600060608486031215612e05578283fd5b505081359360208301359350604090920135919050565b600080600060608486031215612e30578283fd5b8351925060208401519150604084015190509250925092565b600080600080600060a08688031215612e60578081fd5b505083359560208501359550604085013594606081013594506080013592509050565b6000602080835283518082850152825b81811015612eaf57858101830151858201604001528201612e93565b81811115612ec05783604083870101525b50601f01601f1916929092016040019392505050565b60208082526022908201527f4f6e6c79206f776e65722063616e2063616c6c20746869732066756e6374696f604082015261371760f11b606082015260800190565b60008219821115612f2b57612f2b612ff3565b500190565b600082612f4b57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612f6a57612f6a612ff3565b500290565b600082821015612f8157612f81612ff3565b500390565b600081612f9557612f95612ff3565b506000190190565b600181811c90821680612fb157607f821691505b60208210811415612fd257634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612fec57612fec612ff3565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610da557600080fdfea2646970667358221220da0793153052c8b55da0432f1e51fc530975467508484f181e04356cfd28128864736f6c63430008040033ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
Deployed Bytecode
0x6080604052600436106103355760003560e01c8063885282e7116101ab578063b8801ed7116100f7578063dd62ed3e11610095578063e44dd2ec1161006f578063e44dd2ec14610974578063e6250cc014610994578063e75fabb4146109a8578063f7bd9578146109c857600080fd5b8063dd62ed3e14610904578063e16cfac21461094a578063e37f48301461095f57600080fd5b8063d1d2d498116100d1578063d1d2d4981461089a578063d23b924f146108ba578063d7505653146108cf578063da1d2717146108e457600080fd5b8063b8801ed71461085c578063c9214c3014610872578063cb3720ed1461089257600080fd5b806395d89b4111610164578063a9059cbb1161013e578063a9059cbb146107f2578063a999422914610812578063ae7b28fb14610827578063b4c982c61461084757600080fd5b806395d89b411461078d5780639bacc42f146107a2578063a457c2d7146107d257600080fd5b8063885282e7146106cd5780638d671be3146106ed578063901706cd14610702578063915cda7914610722578063916b0df614610737578063954ea6651461076d57600080fd5b806355ac0e0a1161028557806369021d461161022357806376dcb19d116101fd57806376dcb19d146106585780637f6bb00f1461067857806381933a581461069857806385ba5d02146106b857600080fd5b806369021d46146105d457806370a0823114610623578063735023751461064357600080fd5b806359ec74af1161025f57806359ec74af1461053c578063622650d114610575578063664b72c614610589578063682a93ab1461059e57600080fd5b806355ac0e0a146104dc57806358276bdd146104f157806359c8602f1461050657600080fd5b80631e4af52e116102f25780632b7aaecb116102cc5780632b7aaecb146104765780632f8eb3071461048b578063313ce567146104a057806339509351146104bc57600080fd5b80631e4af52e1461042c57806323b872dd1461044157806323b885031461046157600080fd5b806306fdde031461033a578063095ea7b3146103655780630ae50a3914610395578063167d3e9c146103c757806318160ddd146103e95780631ddb4d761461040c575b600080fd5b34801561034657600080fd5b5061034f6109e2565b60405161035c9190612e83565b60405180910390f35b34801561037157600080fd5b50610385610380366004612d07565b610a74565b604051901515815260200161035c565b3480156103a157600080fd5b506024546001600160a01b03165b6040516001600160a01b03909116815260200161035c565b3480156103d357600080fd5b506103e76103e2366004612c57565b610a8b565b005b3480156103f557600080fd5b506103fe610ae0565b60405190815260200161035c565b34801561041857600080fd5b506103fe610427366004612df1565b610afc565b34801561043857600080fd5b506011546103fe565b34801561044d57600080fd5b5061038561045c366004612cc7565b610b46565b34801561046d57600080fd5b506103fe610bf7565b34801561048257600080fd5b506015546103fe565b34801561049757600080fd5b506006546103fe565b3480156104ac57600080fd5b506040516012815260200161035c565b3480156104c857600080fd5b506103856104d7366004612d07565b610cc1565b3480156104e857600080fd5b50600f546103fe565b3480156104fd57600080fd5b506103096103fe565b34801561051257600080fd5b506103fe610521366004612c57565b6001600160a01b03166000908152600b602052604090205490565b34801561054857600080fd5b50610385610557366004612c57565b6001600160a01b031660009081526017602052604090205460ff1690565b34801561058157600080fd5b50600c6103fe565b34801561059557600080fd5b50600d546103fe565b3480156105aa57600080fd5b506103fe6105b9366004612c57565b6001600160a01b03166000908152600a602052604090205490565b3480156105e057600080fd5b50601d54601e54601f546020546021546105fb949392919085565b604080519586526020860194909452928401919091526060830152608082015260a00161035c565b34801561062f57600080fd5b506103fe61063e366004612c57565b610cf8565b34801561064f57600080fd5b50600c546103fe565b34801561066457600080fd5b506103e7610673366004612d07565b610d13565b34801561068457600080fd5b506103e7610693366004612c57565b610d69565b3480156106a457600080fd5b506103fe6106b3366004612db8565b610da8565b3480156106c457600080fd5b50600e546103fe565b3480156106d957600080fd5b506103e76106e8366004612e49565b610de9565b3480156106f957600080fd5b506103fe610e2e565b34801561070e57600080fd5b506023546103af906001600160a01b031681565b34801561072e57600080fd5b506005546103fe565b34801561074357600080fd5b506103fe610752366004612c57565b6001600160a01b031660009081526016602052604090205490565b34801561077957600080fd5b506022546103af906001600160a01b031681565b34801561079957600080fd5b5061034f610e4d565b3480156107ae57600080fd5b50601b54601c546107bd919082565b6040805192835260208301919091520161035c565b3480156107de57600080fd5b506103856107ed366004612d07565b610e5c565b3480156107fe57600080fd5b5061038561080d366004612d07565b610ef7565b34801561081e57600080fd5b506008546103fe565b34801561083357600080fd5b50610385610842366004612dd0565b610f04565b34801561085357600080fd5b50601b546103fe565b34801561086857600080fd5b506103fe60195481565b34801561087e57600080fd5b5061038561088d366004612c57565b610f2c565b6103e7610f63565b3480156108a657600080fd5b506103fe6108b5366004612db8565b6113ab565b3480156108c657600080fd5b506103fe6113b9565b3480156108db57600080fd5b506007546103fe565b3480156108f057600080fd5b506103856108ff366004612c57565b6113d3565b34801561091057600080fd5b506103fe61091f366004612c8f565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b34801561095657600080fd5b506009546103fe565b34801561096b57600080fd5b506010546103fe565b34801561098057600080fd5b506103fe61098f366004612c57565b611451565b3480156109a057600080fd5b50603c6103fe565b3480156109b457600080fd5b506103fe6109c3366004612df1565b611494565b3480156109d457600080fd5b50662386f26fc100006103fe565b6060600380546109f190612f9d565b80601f0160208091040260200160405190810160405280929190818152602001828054610a1d90612f9d565b8015610a6a5780601f10610a3f57610100808354040283529160200191610a6a565b820191906000526020600020905b815481529060010190602001808311610a4d57829003601f168201915b5050505050905090565b6000610a813384846116fe565b5060015b92915050565b6024546001600160a01b03163314610abe5760405162461bcd60e51b8152600401610ab590612ed6565b60405180910390fd5b602480546001600160a01b0319166001600160a01b0392909216919091179055565b6000610aea610e2e565b601954610af79190612f18565b905090565b600080610b0a858585611494565b610b13866113ab565b610b1d9190612f18565b90506000610b2d866009546114e9565b905080821115610b3b578091505b5090505b9392505050565b6000610b53848484611823565b6001600160a01b038416600090815260016020908152604080832033845290915290205482811015610bd85760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610ab5565b610bec8533610be78685612f6f565b6116fe565b506001949350505050565b6023546000906001600160a01b0316610c105750600090565b600080602360009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015610c6157600080fd5b505afa158015610c75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c999190612d6a565b506001600160701b031691506001600160701b03169150610cba81836114f5565b9250505090565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610a81918590610be7908690612f18565b6001600160a01b031660009081526020819052604090205490565b6024546001600160a01b03163314610d3d5760405162461bcd60e51b8152600401610ab590612ed6565b6022546001600160a01b03838116911614610d5b57610d5b82611a06565b610d658282611aa2565b5050565b6024546001600160a01b03163314610d935760405162461bcd60e51b8152600401610ab590612ed6565b610da581610da083610cf8565b611b8d565b50565b600080610db783600f546114f5565b90506008548110610dcb5750600092915050565b610dd7816008546114f5565b610b3f90670de0b6b3a7640000612f6f565b6024546001600160a01b03163314610e135760405162461bcd60e51b8152600401610ab590612ed6565b60059490945560069290925560075560085560095542600e55565b6000601054600d54600c54610e439190612f18565b610af79190612f6f565b6060600480546109f190612f9d565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610ede5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610ab5565b610eed3385610be78685612f6f565b5060019392505050565b6000610a81338484611823565b600082610f1357506000610a85565b6000610f1f83856114f5565b6007541115949350505050565b60006001600160a01b038216610f4457506000919050565b506001600160a01b031660009081526017602052604090205460ff1690565b6024546001600160a01b03163314610f8d5760405162461bcd60e51b8152600401610ab590612ed6565b602260009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610fdb57600080fd5b505afa158015610fef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110139190612c73565b6001600160a01b031663c9c6539630602260009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561107057600080fd5b505afa158015611084573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a89190612c73565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156110f057600080fd5b505af1158015611104573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111289190612c73565b602380546001600160a01b0319166001600160a01b03928316179055602254611156913091166000196116fe565b6022546001600160a01b031663f305d719473061117281610cf8565b6040516001600160e01b031960e086901b1681526001600160a01b03909216600483015260248201526000604482018190526064820181905260848201524260a482015260c4016060604051808303818588803b1580156111d257600080fd5b505af11580156111e6573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061120b9190612e1c565b505060235460408051630240bc6b60e21b815290516000935083926001600160a01b031691630902f1ac916004808301926060929190829003018186803b15801561125557600080fd5b505afa158015611269573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128d9190612d6a565b506001600160701b031691506001600160701b03169150601d735e1593ad595b5b8ccb41e441cd13fc2399b02d2763815c0b3d9091601d60000154601d600101546112d886886114f5565b6040516001600160e01b031960e087901b168152600481019490945260248401929092526044830152606482015260840160006040518083038186803b15801561132157600080fd5b505af4158015611335573d6000803e3d6000fd5b5050601c54604051631cc8801960e21b8152601b6004820152602481019190915273909599aa2a8a3618e645e37489e2c2b0435e37eb92506373220064915060440160006040518083038186803b15801561138f57600080fd5b505af41580156113a3573d6000803e3d6000fd5b505050505050565b6000610a85826006546114e9565b6000610af76113c6610ae0565b662386f26fc100006114e9565b60006001600160a01b0382166113eb57506000919050565b600c6113f660115490565b101561140457506000919050565b600e54600c61141260055490565b61141d90603c612f50565b6114279190612f50565b6001600160a01b0384166000908152600b602052604090205461144a9190612f18565b1092915050565b60006001600160a01b03821661146957506000919050565b600061147483610cf8565b905061030981116114885750600092915050565b610b3f61030982612f6f565b6000816114a357506000610b3f565b60006114af85846114f5565b905060006114bd82876114e9565b90506114c985856114f5565b91506114d582876114e9565b6114df9082612f18565b9695505050505050565b6000610b3f838361150a565b6000610b3f83670de0b6b3a7640000846115cc565b60008080600019848609848602925082811083820303915050670de0b6b3a7640000811061154e5760405163698d9a0160e11b815260048101829052602401610ab5565b600080670de0b6b3a76400008688099150506706f05b59d3b1ffff8111826115885780670de0b6b3a7640000850401945050505050610a85565b620400008285030493909111909103600160ee1b02919091177faccb18165bd6fe31ae1cf318dc5b51eee0e1ba569b88cd74c1773b91fac106690201905092915050565b6000808060001985870985870292508281108382030391505080600014156116155783828161160b57634e487b7160e01b600052601260045260246000fd5b0492505050610b3f565b83811061163f57604051631dcf306360e21b81526004810182905260248101859052604401610ab5565b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b6000826116b58382612f6f565b9150811115610a855760405162461bcd60e51b815260206004820152601560248201527464732d6d6174682d7375622d756e646572666c6f7760581b6044820152606401610ab5565b6001600160a01b0383166117605760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610ab5565b6001600160a01b0382166117c15760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610ab5565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166118875760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610ab5565b6001600160a01b0382166118e95760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610ab5565b6118f4838383611ce8565b6001600160a01b0383166000908152602081905260409020548181101561196c5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610ab5565b6119768282612f6f565b6001600160a01b0380861660009081526020819052604080822093909355908516815290812080548492906119ac908490612f18565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516119f891815260200190565b60405180910390a350505050565b6001600160a01b0381161580611a3457506001600160a01b03811660009081526013602052604090205460ff165b15611a3c5750565b6001600160a01b03166000818152601360205260408120805460ff191660019081179091556012805491820181559091527fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec34440180546001600160a01b0319169091179055565b6001600160a01b038216611af85760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610ab5565b611b0460008383611ce8565b8060026000828254611b169190612f18565b90915550506001600160a01b03821660009081526020819052604081208054839290611b43908490612f18565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038216611bed5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610ab5565b611bf982600083611ce8565b6001600160a01b03821660009081526020819052604090205481811015611c6d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610ab5565b611c778282612f6f565b6001600160a01b03841660009081526020819052604081209190915560028054849290611ca5908490612f6f565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001611816565b816001600160a01b0316836001600160a01b03161415611d655760405162461bcd60e51b815260206004820152603260248201527f4572726f72212053656e64696e6720746f6b656e7320746f20796f757273656c60448201527119881a5cc81b9bdd081c195c9b5a5d1d195960721b6064820152608401610ab5565b6001600160a01b038316611d8f578060196000828254611d859190612f18565b9091555050505050565b6001600160a01b038216611db257601954611daa90826116a8565b601955505050565b6001600160a01b03831630148015611dd757506023546001600160a01b038381169116145b15611de157505050565b611df1611dec610bf7565b612059565b611dfb83836122fc565b611e06838383612441565b600080602360009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015611e5757600080fd5b505afa158015611e6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e8f9190612d6a565b506001600160701b0391821693501690506001600160a01b03851615801590611ec557506023546001600160a01b038581169116145b15611f4357604051635ab2735160e01b8152601b600482015260248101829052604481018390526064810184905273909599aa2a8a3618e645e37489e2c2b0435e37eb90635ab273519060840160006040518083038186803b158015611f2a57600080fd5b505af4158015611f3e573d6000803e3d6000fd5b505050505b6023546001600160a01b03868116911614611f6157611f6185611a06565b6023546001600160a01b03858116911614611f7f57611f7f84611a06565b601954611f9590611f9090846116a8565b612534565b6023546001600160a01b03868116911614611fb457611fb485846125f9565b6023546001600160a01b03858116911614611fd357611fd384846125f9565b6000611fea84611fe288610cf8565b601954610afc565b9050600061200287611ffd600285612f30565b61268c565b905061200e82826116a8565b915060008211801561202e57506023546001600160a01b03888116911614155b156120505761203d8783611b8d565b61205061204b600284612f30565b612809565b50505050505050565b604051635d27ad5b60e01b8152601d600482015260248101829052600090735e1593ad595b5b8ccb41e441cd13fc2399b02d2790635d27ad5b9060440160206040518083038186803b1580156120ae57600080fd5b505af41580156120c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120e69190612d52565b905060008113156121f057806002141561213157601d546040519081527f2aa6782993a70d8c6a1c38a2b836297828bf67712bac6ec90adaff636813f2a69060200160405180910390a15b60405163bc15d82f60e01b8152601b600482015273909599aa2a8a3618e645e37489e2c2b0435e37eb9063bc15d82f9060240160206040518083038186803b15801561217c57600080fd5b505af4158015612190573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121b49190612d32565b156121f057601b546040519081527ff6d581c245e7fd5125c17e9096a7405ce97d7d82392c98cbc4345a71fab3b6119060200160405180910390a15b6000811215610d655780600119141561223a57601d546040519081527f44f3dfea493297a27286ed5892cbce4c1f8d3dbcb172de1ba0734d9cd6fc91689060200160405180910390a15b6040516359ae990d60e01b8152601b600482015273909599aa2a8a3618e645e37489e2c2b0435e37eb906359ae990d9060240160206040518083038186803b15801561228557600080fd5b505af4158015612299573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122bd9190612d32565b15610d6557601b546040519081527fbc98d532d62547b656a0dc50382e9f3bb2142dcf9df9d53b519d13e4c68c48ce9060200160405180910390a15050565b6001600160a01b038216158061231957506001600160a01b038116155b806123355750806001600160a01b0316826001600160a01b0316145b1561233e575050565b6023546001600160a01b0383811691161415612371576001600160a01b03166000908152601a6020526040902042905550565b6023546001600160a01b0382811691161415610d65576001600160a01b0382166000908152601a60205260408120546123aa9042612f6f565b90506123b8603c6001612f50565b81101561243c5760405162461bcd60e51b815260206004820152604660248201527f4572726f72212053656c6c696e6720746f6b656e73206973207065726d69747460448201527f656420696e2061206d696e7574652061667465722061206275792e20547279206064820152653630ba32b91760d11b608482015260a401610ab5565b505050565b6001600160a01b038316158061246457506023546001600160a01b038381169116145b1561246e57505050565b6124766113b9565b8161248084610cf8565b61248a9190612f18565b111561243c5760405162461bcd60e51b815260206004820152606760248201527f54686520726563697069656e7420697320686f6c64696e67203125206f72206d60448201527f6f7265206f66207468652063697263756c6174696e6720737570706c792e205360648201527f656e64696e6720746f20746869732061646472657373206973206e6f742070656084820152661c9b5a5d1d195960ca1b60a482015260c401610ab5565b60055461254290603c612f50565b600e5461254f9190612f18565b4210156125595750565b601054600d546125699190612f6f565b600d818155600c5491600090612580908490612f18565b90915550506000600c8190556010819055600f82905542600e55601180549091906125aa90612fd8565b90915550601154600d54600f546040517f61f1e392e9a0f5d4589c28805ee9418227d5925aa194387a640d38ed28864958926125ee92908252602082015260400190565b60405180910390a250565b6001600160a01b03821661260b575050565b60006126208361261a85610cf8565b84612823565b90508015612632576126328382611aa2565b600061264f6126418484612f18565b678ac7230489e800006114e9565b6001600160a01b03851660009081526016602052604090205490915080821115612677578091505b6126808261297a565b91506113a385836129b4565b6000600c61269960115490565b10156126a757506000610a85565b60006126b5600a6001612f18565b60145490915060005b60006126c984612f86565b9350831180156126d857508481105b156127b657600060126014548154811061270257634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b039081169150871681141561273f576014805490600061273483612fd8565b9190505550506126be565b612748816113d3565b1561276d576127608161275b8489612f6f565b612afa565b61276a9083612f18565b91505b85821061277a57506127b6565b6014805490600061278a83612fd8565b9091555050601254601454106127a05760006014555b8260145414156127b057506127b6565b506126be565b801561280057856001600160a01b03167f240664d6876438faf8f19bea3d236dab225c95917912b9f06fafef6a10e8342e826040516127f791815260200190565b60405180910390a25b95945050505050565b80600c600082825461281b9190612f18565b909155505050565b60006001600160a01b03841661283b57506000610b3f565b6128458383610f04565b61285157506000610b3f565b6001600160a01b0384166000908152600b60205260409020429055600e5461287c9062015180612f18565b6001600160a01b0385166000908152600a6020526040902054106128a257506000610b3f565b6011546128b157506000610b3f565b600f546128c057506000610b3f565b600d54601054106128d357506000610b3f565b6001600160a01b0384166000908152600a60205260408120429055600f546128fc9085906114f5565b9050600061290c82600d546114e9565b90506129208161291b87610da8565b6114e9565b905080601060008282546129349190612f18565b9091555050801561280057856001600160a01b03167fd1072bb52c3131d0c96197b73fb8a45637e30f8b6664fc142310cc9b242859b4826040516127f791815260200190565b6010805460009183908361298e8385612f18565b9091555050600d5460105411156129a657600d546010555b80601054610b3f9190612f6f565b6001600160a01b0382166000908152601660205260408120548015806129d8575082155b156129e7576000915050610a85565b808311156129f3578092505b6001600160a01b03841660009081526017602052604090205460ff1615612a67576001600160a01b0384166000818152601760209081526040808320805460ff19169055519182527f27c60316003a72bcf0ff0ed61d3796019998dc193c0f563d2b71e80defee3e6e910160405180910390a25b612a718382612f6f565b6001600160a01b03851660009081526016602052604081209190915560158054859290612a9f908490612f6f565b90915550612aaf90508484611aa2565b836001600160a01b03167f22c17ab37648d95f55a8112c13181232bed68954ca0f21e8ef3012fc0c9e219484604051612aea91815260200190565b60405180910390a2509092915050565b600080612b0684611451565b905080831115612b14578092505b82612b23576000915050610a85565b6001600160a01b03841660009081526017602052604090205460ff16612b9e576001600160a01b038416600081815260176020908152604091829020805460ff1916600190811790915591519182527f27c60316003a72bcf0ff0ed61d3796019998dc193c0f563d2b71e80defee3e6e910160405180910390a25b6001600160a01b038416600090815260166020526040902054612bc2908490612f18565b6001600160a01b03851660009081526016602052604081209190915560158054859290612bf0908490612f18565b90915550612c0090508484611b8d565b836001600160a01b03167f97be809100083430a19c5b645f049037dd8f2cd1ebbcd365f3d41a0cfdec04b384604051612aea91815260200190565b80516001600160701b0381168114612c5257600080fd5b919050565b600060208284031215612c68578081fd5b8135610b3f81613009565b600060208284031215612c84578081fd5b8151610b3f81613009565b60008060408385031215612ca1578081fd5b8235612cac81613009565b91506020830135612cbc81613009565b809150509250929050565b600080600060608486031215612cdb578081fd5b8335612ce681613009565b92506020840135612cf681613009565b929592945050506040919091013590565b60008060408385031215612d19578182fd5b8235612d2481613009565b946020939093013593505050565b600060208284031215612d43578081fd5b81518015158114610b3f578182fd5b600060208284031215612d63578081fd5b5051919050565b600080600060608486031215612d7e578283fd5b612d8784612c3b565b9250612d9560208501612c3b565b9150604084015163ffffffff81168114612dad578182fd5b809150509250925092565b600060208284031215612dc9578081fd5b5035919050565b60008060408385031215612de2578182fd5b50508035926020909101359150565b600080600060608486031215612e05578283fd5b505081359360208301359350604090920135919050565b600080600060608486031215612e30578283fd5b8351925060208401519150604084015190509250925092565b600080600080600060a08688031215612e60578081fd5b505083359560208501359550604085013594606081013594506080013592509050565b6000602080835283518082850152825b81811015612eaf57858101830151858201604001528201612e93565b81811115612ec05783604083870101525b50601f01601f1916929092016040019392505050565b60208082526022908201527f4f6e6c79206f776e65722063616e2063616c6c20746869732066756e6374696f604082015261371760f11b606082015260800190565b60008219821115612f2b57612f2b612ff3565b500190565b600082612f4b57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612f6a57612f6a612ff3565b500290565b600082821015612f8157612f81612ff3565b500390565b600081612f9557612f95612ff3565b506000190190565b600181811c90821680612fb157607f821691505b60208210811415612fd257634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612fec57612fec612ff3565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610da557600080fdfea2646970667358221220da0793153052c8b55da0432f1e51fc530975467508484f181e04356cfd28128864736f6c63430008040033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.