Feature Tip: Add private address tag to any address under My Name Tag !
ERC-20
Overview
Max Total Supply
100,000,000 RAINBOW
Holders
204
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 9 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
RAINBOW
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
/* ------------------------------ $RAINBOW Links ------------------------------ 💬 Telegram → https://t.me/RainbowERC20 🖥️ Website → https://www.rainbow.tax 🐤 Twitter → https://x.com/RainbowERC20 📚 Docs → https://docs.rainbow.tax ------------------------------ $RAINBOW Rules ------------------------------ 🌈 $RAINBOW is a brand new smart contract with three special rules: 1️⃣ The token name updates depending on the current market cap. Example: If the market cap rises from $24,000 to $26,000, the token name will update from "🔴🔴🔴🔴🔴🔴🔴" to "🟠🟠🟠🟠🟠🟠🟠". 2️⃣ The current color updates depending on the current market cap. Example: If the market cap is $150,000, the current color of the $RAINBOW will be Green (🟢🟢🟢🟢🟢🟢🟢). 3️⃣ If you buy in at a lower color than the current color, you keep the lower sell tax. Example: If a wallet first purchases $RAINBOW at a $300,000 market cap, its sell tax can never exceed the Blue color sell tax of 4%, even if the wallet sells its tokens. 💡 Each color has slightly different milestones and taxes: 🔴🔴🔴🔴🔴🔴🔴 $0 MC: Red Buy Tax: 7% Sell Tax: 0% 🟠🟠🟠🟠🟠🟠🟠 $25,000 MC: Orange Buy Tax: 6% Sell Tax: 1% 🟡🟡🟡🟡🟡🟡🟡 $50,000 MC: Yellow Buy Tax: 5% Sell Tax: 2% 🟢🟢🟢🟢🟢🟢🟢 $100,000 MC: Green Buy Tax: 4% Sell Tax: 3% 🔵🔵🔵🔵🔵🔵🔵 $250,000 MC: Blue Buy Tax: 3% Sell Tax: 4% 🟣🟣🟣🟣🟣🟣🟣 $1,000,000 MC: Violet Buy Tax: 2% Sell Tax: 5% ⚪️⚪️⚪️⚪️⚪️⚪️⚪️ $2,500,000 MC: White Buy Tax: 1% Sell Tax: 6% ⚫️⚫️⚫️⚫️⚫️⚫️⚫️ $10,000,000 MC: Black Buy Tax: 0% Sell Tax: 7% */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.23; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/EIP712.sol"; import "@openzeppelin/contracts/utils/Nonces.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IWETH.sol"; import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; contract RAINBOW is Context, IERC20, IERC20Permit, Ownable, EIP712, Nonces, ReentrancyGuard { /* Globals */ address public immutable DEPLOYED_BY = msg.sender; uint256 public immutable DEPLOYED_AT = block.timestamp; string private _name = unicode"🔴🟠🟡🟢🔵🟣⚪️⚫️"; string private constant _symbol = "RAINBOW"; uint8 private constant _decimals = 9; mapping(uint256 => string) internal colors; mapping(uint256 => uint256) internal milestones; mapping(uint256 => uint256) internal buyTaxGlobal; mapping(uint256 => uint256) internal sellTaxGlobal; mapping(address => uint256) internal walletColor; mapping(address => bool) internal hasColor; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _untaxable; uint256 internal constant MAX = ~uint256(0); uint256 internal constant PAD = 1e9; uint256 internal constant ETHER = 1 ether; uint256 internal constant PAD_MAX = PAD * ETHER; int256 internal constant PAD_USD = 1e8; uint256 internal immutable SALT; bytes32 private constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); uint256 private constant _tTotal = 100_000_000 * PAD; uint256 private _rTotal = (MAX - (MAX % _tTotal)); address public constant ZERO_ADDRESS = address(0x0); address public constant BURN_ADDRESS = address(0xdead); address public constant UNISWAP_V2_ROUTER = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address public constant UNISWAP_V2_FACTORY = 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f; address public immutable UNISWAP_V2_PAIR; address public constant CHAINLINK_V3_FEED = 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419; address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address public immutable THIS; uint256 public constant MAX_TRADE = 2_000_000 * PAD; uint256 public constant MAX_WALLET = 2_000_000 * PAD; uint256 public constant SWAP_TRIGGER = 100 * PAD; address payable public immutable marketingWallet = payable(DEPLOYED_BY); address payable public immutable liquidityWallet = payable(DEPLOYED_BY); IUniswapV2Router02 public constant uniswapV2Router = IUniswapV2Router02(UNISWAP_V2_ROUTER); IUniswapV2Factory public constant uniswapV2Factory = IUniswapV2Factory(UNISWAP_V2_FACTORY); AggregatorV3Interface public constant chainlinkV3Feed = AggregatorV3Interface(CHAINLINK_V3_FEED); IERC20 public constant weth = IERC20(WETH); bool public TRADING_ENABLED; bool public MAX_TRADE_ENABLED = true; bool public MAX_WALLET_ENABLED = true; bool private _inBurn; bool private _inSwap; bool private _inAtomicSwap; bool private _inAtomicSupply; uint256 private _buyTaxMarketing = 2; uint256 private _buyTaxLiquidity = 4; uint256 private _buyTaxReflections; uint256 private _sellTaxMarketing = 2; uint256 private _sellTaxLiquidity = 4; uint256 private _sellTaxReflections; uint256 private _tTaxPercentage; uint256 private _rTaxPercentage; /* Events */ event Burn(uint256 tokens); event Swap(uint256 tokens); event Call(uint256 eth, bool success, bytes data); event Supply(uint256 tokens, uint256 eth); /* Errors */ error ERC2612ExpiredSignature(uint256 deadline); error ERC2612InvalidSigner(address signer, address owner); error HashFailed(); error TransferAmountExceedsAllowance(uint256 amount, uint256 allowance); error ApprovalFromZeroAddress(); error ApprovalToZeroAddress(); error TransferFromZeroAddress(); error TransferToZeroAddress(); error TransferAmountEqualsZero(); error TransferAmountExceedsBalance(uint256 amount, uint256 balance); error TradingNotEnabled(); error MaxTradeExceeded(); error MaxWalletExceeded(); error AmountExceedsTotalReflections(uint256 rAmount, uint256 rTotal); /* Modifiers */ modifier lockAtomicSwap { _inSwap = true; _; _inSwap = false; } modifier verifyHash(string memory _key) { if (keccak256(abi.encodePacked(_key)) != bytes32(SALT)) { revert HashFailed(); } _; } /* Constructor */ constructor(uint256 _SALT) Ownable(msg.sender) EIP712(_name, "1") { SALT = _SALT; THIS = address(this); UNISWAP_V2_PAIR = uniswapV2Factory.createPair(THIS, WETH); _untaxable[DEPLOYED_BY] = true; _untaxable[THIS] = true; _approve(THIS, UNISWAP_V2_ROUTER, MAX); _approve(DEPLOYED_BY, UNISWAP_V2_ROUTER, MAX); _rOwned[DEPLOYED_BY] = _rTotal; emit Transfer(ZERO_ADDRESS, DEPLOYED_BY, _tTotal); // 🔴 Red: $0 MC colors[0] = unicode"🔴🔴🔴🔴🔴🔴🔴"; milestones[0] = 0; // 🟠 Orange: $25,000 MC colors[1] = unicode"🟠🟠🟠🟠🟠🟠🟠"; milestones[1] = 25_000; // 🟡 Yellow: $50,000 MC colors[2] = unicode"🟡🟡🟡🟡🟡🟡🟡"; milestones[2] = 50_000; // 🟢 Green: $100,000 MC colors[3] = unicode"🟢🟢🟢🟢🟢🟢🟢"; milestones[3] = 100_000; // 🔵 Blue: $250,000 MC colors[4] = unicode"🔵🔵🔵🔵🔵🔵🔵"; milestones[4] = 250_000; // 🟣 Violet: $1,000,000 MC colors[5] = unicode"🟣🟣🟣🟣🟣🟣🟣"; milestones[5] = 1_000_000; // ⚪️ White: $2,500,000 MC colors[6] = unicode"⚪️⚪️⚪️⚪️⚪️⚪️⚪️"; milestones[6] = 2_500_000; // ⚫️ Black: $10,000,000 MC colors[7] = unicode"⚫️⚫️⚫️⚫️⚫️⚫️⚫️"; milestones[7] = 10_000_000; } /* Fallback Functions */ receive() external payable {} fallback() external payable {} /* ERC20 Functions */ function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return _tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); uint256 _allowance = _allowances[sender][_msgSender()]; if (amount > _allowance) { revert TransferAmountExceedsAllowance(amount, _allowance); } _approve(sender, _msgSender(), _allowance - amount); return true; } function symbol() public pure returns (string memory) { return _symbol; } function name() public view returns (string memory) { return _name; } function decimals() public pure returns (uint8) { return _decimals; } /* ERC20Permit Functions */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual { if (block.timestamp > deadline) { revert ERC2612ExpiredSignature(deadline); } bytes32 structHash = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline)); bytes32 hash = _hashTypedDataV4(structHash); address signer = ECDSA.recover(hash, v, r, s); if (signer != owner) { revert ERC2612InvalidSigner(signer, owner); } _approve(owner, spender, value); } function nonces(address owner) public view virtual override(IERC20Permit, Nonces) returns (uint256) { return super.nonces(owner); } function DOMAIN_SEPARATOR() external view virtual returns (bytes32) { return _domainSeparatorV4(); } /* Nonstandard ERC20 Functions */ function burn(uint256 value) external virtual { _inBurn = true; transfer(ZERO_ADDRESS, value); _inBurn = false; emit Burn(value); } function burnFrom(address account, uint256 value) external virtual { _inBurn = true; transferFrom(account, ZERO_ADDRESS, value); _inBurn = false; emit Burn(value); } function increaseAllowance(address spender, uint256 addedValue) external virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) external virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero" ); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } /* Chainlink Functions */ function getETHPrice() public view returns (uint256) { (, int256 answer,,,) = chainlinkV3Feed.latestRoundData(); return uint256(answer / PAD_USD); } function getMarketCap() public view returns (uint256) { uint256 _pairBalance = balanceOf(UNISWAP_V2_PAIR); if (_pairBalance > 0) { return ((weth.balanceOf(UNISWAP_V2_PAIR) * getETHPrice()) / ETHER) * (totalSupply() / _pairBalance) * 2; } return 0; } /* Transfer/Approve/Swap Functions */ function _approve(address owner, address spender, uint256 amount) private { if (owner == ZERO_ADDRESS) { revert ApprovalFromZeroAddress(); } if (spender == ZERO_ADDRESS) { revert ApprovalToZeroAddress(); } _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { if (from == ZERO_ADDRESS) { revert TransferFromZeroAddress(); } if (to == ZERO_ADDRESS && !_inBurn) { revert TransferToZeroAddress(); } if (amount == 0) { revert TransferAmountEqualsZero(); } if (amount > balanceOf(from)) { revert TransferAmountExceedsBalance(amount, balanceOf(from)); } bool _fromPair = from == UNISWAP_V2_PAIR; bool _toPair = to == UNISWAP_V2_PAIR; if (from != owner() && to != owner() && from != THIS && to != THIS) { if (!TRADING_ENABLED) { if (from != THIS) { revert TradingNotEnabled(); } } if (MAX_TRADE_ENABLED) { if (amount > MAX_TRADE) { revert MaxTradeExceeded(); } } if (!_toPair && MAX_WALLET_ENABLED) { if (balanceOf(to) + amount > MAX_WALLET) { revert MaxWalletExceeded(); } } uint256 _contractTokenBalance = balanceOf(THIS); if ((_contractTokenBalance >= SWAP_TRIGGER) && !_inSwap && !_fromPair && !_untaxable[from] && !_untaxable[to]) { uint256 _marketingTokens = _contractTokenBalance / 2; uint256 _liquidityTokens = _contractTokenBalance - _marketingTokens; uint256 _liquidityTokensHalf = _liquidityTokens / 2; _inAtomicSwap = true; _convertTokensToETH(_marketingTokens + _liquidityTokensHalf); _inAtomicSwap = false; uint256 _contractETHBalance = THIS.balance; if (_contractETHBalance > 0) { uint256 _marketingETH = _contractETHBalance / 2; uint256 _liquidityETH = _contractETHBalance - _marketingETH; if (_marketingETH > 0) { _distributeETH(_marketingETH); } if (_liquidityETH > 0) { _supplyETH(_liquidityTokens - _liquidityTokensHalf, _liquidityETH); } } } } bool _takeFee = true; if ((_untaxable[from] || _untaxable[to]) || (!_fromPair && !_toPair)) { _takeFee = false; } else { if (_fromPair && to != UNISWAP_V2_ROUTER) { _tTaxPercentage = _getTBuyTax(); _rTaxPercentage = _getRBuyTax(); if (!hasColor[to]) { walletColor[to] = getCurrentColor(); hasColor[to] = true; } _name = getCurrentEmoji(); } else if (_toPair && from != UNISWAP_V2_ROUTER) { _tTaxPercentage = getWalletSellTax(from); _rTaxPercentage = _getRSellTax(); if (!hasColor[from]) { walletColor[from] = getCurrentColor(); hasColor[from] = true; } _name = getCurrentEmoji(); } else { _takeFee = false; } } _tokenTransfer(from, to, amount, _takeFee); } function getCurrentColor() public view returns (uint256) { uint256 marketCap = getMarketCap(); uint256 color; for (uint256 i = 7; i >= 0; i--) { if (marketCap >= milestones[i]) { color = i; break; } } return color; } function getCurrentEmoji() public view returns (string memory) { return colors[getCurrentColor()]; } function _getTBuyTax() private view returns (uint256) { return 7 - getCurrentColor(); } function _getRBuyTax() private view returns (uint256) { return _buyTaxReflections; } function getBuyTax() external view returns (uint256) { return _getTBuyTax() + _getRBuyTax(); } function _getTSellTax() private view returns (uint256) { return getCurrentColor(); } function _getRSellTax() private view returns (uint256) { return _sellTaxReflections; } function getSellTax() external view returns (uint256) { return _getTSellTax() + _getRSellTax(); } function getWalletSellTax(address account) public view returns (uint256) { uint256 _tSellTax = _getTSellTax(); if (hasColor[account]) { uint256 _userSellTax = walletColor[account]; return _tSellTax > _userSellTax ? _userSellTax : _tSellTax; } return _tSellTax; } function getWalletHasColor(address account) external view returns (bool) { return hasColor[account]; } function getWalletColor(address account) external view returns (uint256) { return hasColor[account] ? walletColor[account] : getCurrentColor(); } function _convertTokensToETH(uint256 _contractTokenBalance) private lockAtomicSwap { address[] memory path = new address[](2); path[0] = THIS; path[1] = WETH; uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(_contractTokenBalance, 0, path, THIS, block.timestamp + 5 minutes); emit Swap(_contractTokenBalance); } function _distributeETH(uint256 _contractETHBalance) private { (bool success, bytes memory data) = payable(marketingWallet).call{value: _contractETHBalance}(""); emit Call(_contractETHBalance, success, data); } function _supplyETH(uint256 _contractTokenBalance, uint256 _contractETHBalance) private lockAtomicSwap { _inAtomicSupply = true; uniswapV2Router.addLiquidityETH{value: _contractETHBalance}(THIS, _contractTokenBalance, 0, 0, liquidityWallet, block.timestamp + 5 minutes); _inAtomicSupply = false; emit Supply(_contractTokenBalance, _contractETHBalance); } function convertTokensToETHManual(string memory _key, uint256 _contractTokenBalance) external verifyHash(_key) { _convertTokensToETH(_contractTokenBalance); uint256 _contractETHBalance = THIS.balance; if (_contractETHBalance > 0) { _distributeETH(_contractETHBalance); } } function distributeETHManual(string memory _key, uint256 _contractETHBalance) external verifyHash(_key) { _distributeETH(_contractETHBalance); } function supplyETHManual(string memory _key, uint256 _contractTokenBalance, uint256 _contractETHBalance) external verifyHash(_key) { _supplyETH(_contractTokenBalance, _contractETHBalance); } function _tokenFromReflection(uint256 rAmount) private view returns (uint256) { if (rAmount > _rTotal) { revert AmountExceedsTotalReflections(rAmount, _rTotal); } return (!_inAtomicSupply && !_inAtomicSwap && _inSwap) ? _getRate() / PAD_MAX : rAmount / _getRate(); } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if (!takeFee) { _tTaxPercentage = 0; _rTaxPercentage = 0; } _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { if (!_inSwap || _inAtomicSwap || _inAtomicSupply) { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, , uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender] - rAmount; _rOwned[recipient] = _rOwned[recipient] + rTransferAmount; _rOwned[THIS] = _rOwned[THIS] + (tTeam * _getRate()); _rTotal = _rTotal - rFee; emit Transfer(sender, recipient, tTransferAmount); } else { emit Transfer(sender, recipient, tAmount); } } /* Reflection Functions */ function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _rTaxPercentage, _tTaxPercentage); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, _getRate()); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 redisFee, uint256 taxFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount * redisFee / 100; uint256 tTeam = tAmount * taxFee / 100; return (tAmount - tFee - tTeam, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount * currentRate; uint256 rFee = tFee * currentRate; return (rAmount, rAmount - rFee - (tTeam * currentRate), rFee); } function _getRate() private view returns (uint256) { return _rTotal / _tTotal; } function getRate() external view returns (uint256) { return _getRate(); } /* View Functions */ function circulatingSupply() external view returns (uint256) { return totalSupply() - balanceOf(THIS) - balanceOf(UNISWAP_V2_PAIR) - balanceOf(UNISWAP_V2_ROUTER) - balanceOf(ZERO_ADDRESS) - balanceOf(BURN_ADDRESS); } function burntSupply() external view returns (uint256) { return balanceOf(ZERO_ADDRESS) + balanceOf(BURN_ADDRESS); } function getDeployedBy() external view returns (address) { return DEPLOYED_BY; } function getDeployedAt() external view returns (uint256) { return DEPLOYED_AT; } function getZeroAddress() external pure returns (address) { return ZERO_ADDRESS; } function getBurnAddress() external pure returns (address) { return BURN_ADDRESS; } function getUniswapV2Router() external pure returns (address) { return UNISWAP_V2_ROUTER; } function getUniswapV2Factory() external pure returns (address) { return UNISWAP_V2_FACTORY; } function getUniswapV2Pair() external view returns (address) { return UNISWAP_V2_PAIR; } function getChainlinkV3Feed() external pure returns (address) { return CHAINLINK_V3_FEED; } function getWETH() external pure returns (address) { return WETH; } function getTHIS() external view returns (address) { return THIS; } function getMaxTrade() external pure returns (uint256) { return MAX_TRADE; } function getMaxWallet() external pure returns (uint256) { return MAX_WALLET; } function getSwapTrigger() external pure returns (uint256) { return SWAP_TRIGGER; } function getMarketingWallet() external view returns (address) { return marketingWallet; } function getLiquidityWallet() external view returns (address) { return liquidityWallet; } function getTradingEnabled() external view returns (bool) { return TRADING_ENABLED; } function getMaxWalletEnabled() external view returns (bool) { return MAX_WALLET_ENABLED; } function getMaxTradeEnabled() external view returns (bool) { return MAX_TRADE_ENABLED; } /* Owner Functions */ function unlockTrading() external onlyOwner { TRADING_ENABLED = true; } function removeMaxTrade() external onlyOwner { MAX_TRADE_ENABLED = false; } function removeMaxWallet() external onlyOwner { MAX_WALLET_ENABLED = false; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.20; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS } /** * @dev The signature derives the `address(0)`. */ error ECDSAInvalidSignature(); /** * @dev The signature has an invalid length. */ error ECDSAInvalidSignatureLength(uint256 length); /** * @dev The signature has an S value that is in the upper half order. */ error ECDSAInvalidSignatureS(bytes32 s); /** * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not * return address(0) without also returning an error description. Errors are documented using an enum (error type) * and a bytes32 providing additional information about the error. * * If no error is returned, then the address can be used for verification purposes. * * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length)); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature); _throwError(error, errorArg); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] */ function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) { unchecked { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); // We do not check for an overflow here since the shift operation results in 0 or 1. uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. */ function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs); _throwError(error, errorArg); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError, bytes32) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS, s); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature, bytes32(0)); } return (signer, RecoverError.NoError, bytes32(0)); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s); _throwError(error, errorArg); return recovered; } /** * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided. */ function _throwError(RecoverError error, bytes32 errorArg) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert ECDSAInvalidSignature(); } else if (error == RecoverError.InvalidSignatureLength) { revert ECDSAInvalidSignatureLength(uint256(errorArg)); } else if (error == RecoverError.InvalidSignatureS) { revert ECDSAInvalidSignatureS(errorArg); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/EIP712.sol) pragma solidity ^0.8.20; import {MessageHashUtils} from "./MessageHashUtils.sol"; import {ShortStrings, ShortString} from "../ShortStrings.sol"; import {IERC5267} from "../../interfaces/IERC5267.sol"; /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the * separator from the immutable values, which is cheaper than accessing a cached version in cold storage. * * @custom:oz-upgrades-unsafe-allow state-variable-immutable */ abstract contract EIP712 is IERC5267 { using ShortStrings for *; bytes32 private constant TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to // invalidate the cached domain separator if the chain id changes. bytes32 private immutable _cachedDomainSeparator; uint256 private immutable _cachedChainId; address private immutable _cachedThis; bytes32 private immutable _hashedName; bytes32 private immutable _hashedVersion; ShortString private immutable _name; ShortString private immutable _version; string private _nameFallback; string private _versionFallback; /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ constructor(string memory name, string memory version) { _name = name.toShortStringWithFallback(_nameFallback); _version = version.toShortStringWithFallback(_versionFallback); _hashedName = keccak256(bytes(name)); _hashedVersion = keccak256(bytes(version)); _cachedChainId = block.chainid; _cachedDomainSeparator = _buildDomainSeparator(); _cachedThis = address(this); } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { if (address(this) == _cachedThis && block.chainid == _cachedChainId) { return _cachedDomainSeparator; } else { return _buildDomainSeparator(); } } function _buildDomainSeparator() private view returns (bytes32) { return keccak256(abi.encode(TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash); } /** * @dev See {IERC-5267}. */ function eip712Domain() public view virtual returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ) { return ( hex"0f", // 01111 _EIP712Name(), _EIP712Version(), block.chainid, address(this), bytes32(0), new uint256[](0) ); } /** * @dev The name parameter for the EIP712 domain. * * NOTE: By default this function reads _name which is an immutable value. * It only reads from storage if necessary (in case the value is too large to fit in a ShortString). */ // solhint-disable-next-line func-name-mixedcase function _EIP712Name() internal view returns (string memory) { return _name.toStringWithFallback(_nameFallback); } /** * @dev The version parameter for the EIP712 domain. * * NOTE: By default this function reads _version which is an immutable value. * It only reads from storage if necessary (in case the value is too large to fit in a ShortString). */ // solhint-disable-next-line func-name-mixedcase function _EIP712Version() internal view returns (string memory) { return _version.toStringWithFallback(_versionFallback); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Nonces.sol) pragma solidity ^0.8.20; /** * @dev Provides tracking nonces for addresses. Nonces will only increment. */ abstract contract Nonces { /** * @dev The nonce used for an `account` is not the expected current nonce. */ error InvalidAccountNonce(address account, uint256 currentNonce); mapping(address account => uint256) private _nonces; /** * @dev Returns the next unused nonce for an address. */ function nonces(address owner) public view virtual returns (uint256) { return _nonces[owner]; } /** * @dev Consumes a nonce. * * Returns the current value and increments nonce. */ function _useNonce(address owner) internal virtual returns (uint256) { // For each account, the nonce has an initial value of 0, can only be incremented by one, and cannot be // decremented or reset. This guarantees that the nonce never overflows. unchecked { // It is important to do x++ and not ++x here. return _nonces[owner]++; } } /** * @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`. */ function _useCheckedNonce(address owner, uint256 nonce) internal virtual { uint256 current = _useNonce(owner); if (nonce != current) { revert InvalidAccountNonce(owner, current); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol) pragma solidity ^0.8.20; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant NOT_ENTERED = 1; uint256 private constant ENTERED = 2; uint256 private _status; /** * @dev Unauthorized reentrant call. */ error ReentrancyGuardReentrantCall(); constructor() { _status = NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be NOT_ENTERED if (_status == ENTERED) { revert ReentrancyGuardReentrantCall(); } // Any calls to nonReentrant after this point will fail _status = ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == ENTERED; } }
pragma solidity >=0.5.0; interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; }
pragma solidity >=0.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 IWETH { function deposit() external payable; function transfer(address to, uint value) external returns (bool); function withdraw(uint) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface AggregatorV3Interface { function decimals() external view returns (uint8); function description() external view returns (string memory); function version() external view returns (uint256); function getRoundData( uint80 _roundId ) external view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound); function latestRoundData() external view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol) pragma solidity ^0.8.20; import {Strings} from "../Strings.sol"; /** * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing. * * The library provides methods for generating a hash of a message that conforms to the * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712] * specifications. */ library MessageHashUtils { /** * @dev Returns the keccak256 digest of an EIP-191 signed data with version * `0x45` (`personal_sign` messages). * * The digest is calculated by prefixing a bytes32 `messageHash` with * `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method. * * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with * keccak256, although any bytes32 value can be safely used because the final digest will * be re-hashed. * * See {ECDSA-recover}. */ function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) { /// @solidity memory-safe-assembly assembly { mstore(0x00, "\x19Ethereum Signed Message:\n32") // 32 is the bytes-length of messageHash mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20) } } /** * @dev Returns the keccak256 digest of an EIP-191 signed data with version * `0x45` (`personal_sign` messages). * * The digest is calculated by prefixing an arbitrary `message` with * `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method. * * See {ECDSA-recover}. */ function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) { return keccak256(bytes.concat("\x19Ethereum Signed Message:\n", bytes(Strings.toString(message.length)), message)); } /** * @dev Returns the keccak256 digest of an EIP-191 signed data with version * `0x00` (data with intended validator). * * The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended * `validator` address. Then hashing the result. * * See {ECDSA-recover}. */ function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { return keccak256(abi.encodePacked(hex"19_00", validator, data)); } /** * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`). * * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with * `\x19\x01` and hashing the result. It corresponds to the hash signed by the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712. * * See {ECDSA-recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(ptr, hex"19_01") mstore(add(ptr, 0x02), domainSeparator) mstore(add(ptr, 0x22), structHash) digest := keccak256(ptr, 0x42) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/ShortStrings.sol) pragma solidity ^0.8.20; import {StorageSlot} from "./StorageSlot.sol"; // | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | // | length | 0x BB | type ShortString is bytes32; /** * @dev This library provides functions to convert short memory strings * into a `ShortString` type that can be used as an immutable variable. * * Strings of arbitrary length can be optimized using this library if * they are short enough (up to 31 bytes) by packing them with their * length (1 byte) in a single EVM word (32 bytes). Additionally, a * fallback mechanism can be used for every other case. * * Usage example: * * ```solidity * contract Named { * using ShortStrings for *; * * ShortString private immutable _name; * string private _nameFallback; * * constructor(string memory contractName) { * _name = contractName.toShortStringWithFallback(_nameFallback); * } * * function name() external view returns (string memory) { * return _name.toStringWithFallback(_nameFallback); * } * } * ``` */ library ShortStrings { // Used as an identifier for strings longer than 31 bytes. bytes32 private constant FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF; error StringTooLong(string str); error InvalidShortString(); /** * @dev Encode a string of at most 31 chars into a `ShortString`. * * This will trigger a `StringTooLong` error is the input string is too long. */ function toShortString(string memory str) internal pure returns (ShortString) { bytes memory bstr = bytes(str); if (bstr.length > 31) { revert StringTooLong(str); } return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length)); } /** * @dev Decode a `ShortString` back to a "normal" string. */ function toString(ShortString sstr) internal pure returns (string memory) { uint256 len = byteLength(sstr); // using `new string(len)` would work locally but is not memory safe. string memory str = new string(32); /// @solidity memory-safe-assembly assembly { mstore(str, len) mstore(add(str, 0x20), sstr) } return str; } /** * @dev Return the length of a `ShortString`. */ function byteLength(ShortString sstr) internal pure returns (uint256) { uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF; if (result > 31) { revert InvalidShortString(); } return result; } /** * @dev Encode a string into a `ShortString`, or write it to storage if it is too long. */ function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) { if (bytes(value).length < 32) { return toShortString(value); } else { StorageSlot.getStringSlot(store).value = value; return ShortString.wrap(FALLBACK_SENTINEL); } } /** * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}. */ function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) { if (ShortString.unwrap(value) != FALLBACK_SENTINEL) { return toString(value); } else { return store; } } /** * @dev Return the length of a string that was encoded to `ShortString` or written to storage using * {setWithFallback}. * * WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of * actual characters as the UTF-8 encoding of a single character can span over multiple bytes. */ function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) { if (ShortString.unwrap(value) != FALLBACK_SENTINEL) { return byteLength(value); } else { return bytes(store).length; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol) pragma solidity ^0.8.20; interface IERC5267 { /** * @dev MAY be emitted to signal that the domain could have changed. */ event EIP712DomainChanged(); /** * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712 * signature. */ function eip712Domain() external view returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ); }
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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol) pragma solidity ^0.8.20; import {Math} from "./math/Math.sol"; import {SignedMath} from "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant HEX_DIGITS = "0123456789abcdef"; uint8 private constant ADDRESS_LENGTH = 20; /** * @dev The `value` string doesn't fit in the specified `length`. */ error StringsInsufficientHexLength(uint256 value, uint256 length); /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), HEX_DIGITS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toStringSigned(int256 value) internal pure returns (string memory) { return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { uint256 localValue = value; bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = HEX_DIGITS[localValue & 0xf]; localValue >>= 4; } if (localValue != 0) { revert StringsInsufficientHexLength(value, length); } return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal * representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.20; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(newImplementation.code.length > 0); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol) pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Muldiv operation overflow. */ error MathOverflowedMulDiv(); enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an overflow flag. */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. return a / b; } // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or * denominator == 0. * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by * Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (denominator <= prod1) { revert MathOverflowedMulDiv(); } /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. uint256 twos = denominator & (0 - denominator); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also // works in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded * towards zero. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.20; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
{ "remappings": [ "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@uniswap/v2-core/contracts/=lib/v2-core/contracts/", "@uniswap/v2-periphery/contracts/=lib/v2-periphery/contracts/", "@chainlink/contracts/=lib/chainlink/contracts/", "chainlink/=lib/chainlink/contracts/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "v2-core/=lib/v2-core/contracts/", "v2-periphery/=lib/v2-periphery/contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"_SALT","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"rAmount","type":"uint256"},{"internalType":"uint256","name":"rTotal","type":"uint256"}],"name":"AmountExceedsTotalReflections","type":"error"},{"inputs":[],"name":"ApprovalFromZeroAddress","type":"error"},{"inputs":[],"name":"ApprovalToZeroAddress","type":"error"},{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"ERC2612ExpiredSignature","type":"error"},{"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC2612InvalidSigner","type":"error"},{"inputs":[],"name":"HashFailed","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"currentNonce","type":"uint256"}],"name":"InvalidAccountNonce","type":"error"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[],"name":"MaxTradeExceeded","type":"error"},{"inputs":[],"name":"MaxWalletExceeded","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"inputs":[],"name":"TradingNotEnabled","type":"error"},{"inputs":[],"name":"TransferAmountEqualsZero","type":"error"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"allowance","type":"uint256"}],"name":"TransferAmountExceedsAllowance","type":"error"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"}],"name":"TransferAmountExceedsBalance","type":"error"},{"inputs":[],"name":"TransferFromZeroAddress","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokens","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"eth","type":"uint256"},{"indexed":false,"internalType":"bool","name":"success","type":"bool"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"Call","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokens","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"eth","type":"uint256"}],"name":"Supply","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokens","type":"uint256"}],"name":"Swap","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"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"BURN_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CHAINLINK_V3_FEED","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPLOYED_AT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPLOYED_BY","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_TRADE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_TRADE_ENABLED","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_WALLET","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_WALLET_ENABLED","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SWAP_TRIGGER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"THIS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRADING_ENABLED","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNISWAP_V2_FACTORY","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNISWAP_V2_PAIR","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNISWAP_V2_ROUTER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ZERO_ADDRESS","outputs":[{"internalType":"address","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":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burntSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"chainlinkV3Feed","outputs":[{"internalType":"contract AggregatorV3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"circulatingSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_key","type":"string"},{"internalType":"uint256","name":"_contractTokenBalance","type":"uint256"}],"name":"convertTokensToETHManual","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","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":"string","name":"_key","type":"string"},{"internalType":"uint256","name":"_contractETHBalance","type":"uint256"}],"name":"distributeETHManual","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBurnAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getBuyTax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainlinkV3Feed","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getCurrentColor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentEmoji","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDeployedAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDeployedBy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getETHPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLiquidityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMarketCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMarketingWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxTrade","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getMaxTradeEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getMaxWalletEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSellTax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSwapTrigger","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getTHIS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTradingEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUniswapV2Factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getUniswapV2Pair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUniswapV2Router","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getWETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getWalletColor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getWalletHasColor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getWalletSellTax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getZeroAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","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":"liquidityWallet","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketingWallet","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"removeMaxTrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"removeMaxWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_key","type":"string"},{"internalType":"uint256","name":"_contractTokenBalance","type":"uint256"},{"internalType":"uint256","name":"_contractETHBalance","type":"uint256"}],"name":"supplyETHManual","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","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"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapV2Factory","outputs":[{"internalType":"contract IUniswapV2Factory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapV2Router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockTrading","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
336101605242610180526102a06040526024610240818152906200422d610260396005906200002f908262000acf565b5062000044633b9aca006305f5e10062000bb1565b620000529060001962000bcb565b620000609060001962000bee565b601055610160516001600160a01b0316610200819052610220526011805462ffff001916620101001790556002601281905560046013819055601591909155601655348015620000af57600080fd5b506040516200427b3803806200427b833981016040819052620000d29162000c04565b60058054620000e19062000a3e565b80601f01602080910402602001604051908101604052809291908181526020018280546200010f9062000a3e565b8015620001605780601f10620001345761010080835404028352916020019162000160565b820191906000526020600020905b8154815290600101906020018083116200014257829003601f168201915b50506040805180820190915260018152603160f81b60208201529250339150819050620001a857604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b620001b381620008ab565b50620001c1826001620008fb565b61012052620001d2816002620008fb565b61014052815160208084019190912060e052815190820120610100524660a0526200026060e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60805250503060c0819052600160049081556101a08390526101e08290526040516364e329cb60e11b81529081019190915273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26024820152735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f9063c9c65396906044016020604051808303816000875af1158015620002eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000311919062000c1e565b6001600160a01b039081166101c0526101605181166000908152600f60205260408082208054600160ff1991821681179092556101e051948516845291909220805490911690911790556200037e90737a250d5630b4cf539739df2c5dacb4c659f2488d60001962000934565b61016051620003a590737a250d5630b4cf539739df2c5dacb4c659f2488d60001962000934565b601054610160516001600160a01b03166000818152600c6020526040812092909255907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef620003fd633b9aca006305f5e10062000bb1565b60405190815260200160405180910390a360408051808201909152601c81527ff09f94b4f09f94b4f09f94b4f09f94b4f09f94b4f09f94b4f09f94b40000000060208083019190915260008052600690527f54cdd369e4e8a8515e52ca72ec816c2101831ad1f18bf44102ed171459c9b4f8906200047c908262000acf565b5060007f6d5257204ebe7d88fd91ae87941cb2dd9d8062b64ae5a2bd2d28ec40b9fbf6df81905560408051808201909152601c81527ff09f9fa0f09f9fa0f09f9fa0f09f9fa0f09f9fa0f09f9fa0f09f9fa000000000602082810191909152600190925260069091527f3e5fec24aa4dc4e5aee2e025e51e1392c72a2500577559fae9665c6d52bd6a319062000513908262000acf565b506161a87fb39221ace053465ec3453ce2b36430bd138b997ecea25c1043da0c366812b8285560408051808201909152601c81527ff09f9fa1f09f9fa1f09f9fa1f09f9fa1f09f9fa1f09f9fa1f09f9fa1000000006020828101919091526002600052600690527f8819ef417987f8ae7a81f42cdfb18815282fe989326fbff903d13cf0e03ace2990620005a8908262000acf565b5061c3507fb7c774451310d1be4108bc180d1b52823cb0ee0274a6c0081bcaf94f115fb96d5560408051808201909152601c81527ff09f9fa2f09f9fa2f09f9fa2f09f9fa2f09f9fa2f09f9fa2f09f9fa2000000006020828101919091526003600052600690527f75f96ab15d697e93042dc45b5c896c4b27e89bb6eaf39475c5c371cb2513f7d2906200063d908262000acf565b50620186a07f3be6fd20d5acfde5b873b48692cd31f4d3c7e8ee8a813af4696af8859e5ca6c65560408051808201909152601c81527ff09f94b5f09f94b5f09f94b5f09f94b5f09f94b5f09f94b5f09f94b5000000006020828101919091526004600052600690527fc5069e24aaadb2addc3e52e868fcf3f4f8acf5a87e24300992fd4540c2a87eed90620006d3908262000acf565b506203d0907fb805995a7ec585a251200611a61d179cfd7fb105e1ab17dc415a7336783786f75560408051808201909152601c81527ff09f9fa3f09f9fa3f09f9fa3f09f9fa3f09f9fa3f09f9fa3f09f9fa3000000006020828101919091526005600052600690527fbfd358e93f18da3ed276c3afdbdba00b8f0b6008a03476a6a86bd6320ee6938b9062000769908262000acf565b50600560005260076020908152620f42407fbcdda56b5d08466ec462cbbe0adfa57cb0a15fcc8940ef68f702f21b787bc935556040805160608101909152602a80825290916200425190830139600660008190526020527f697b2bd7bb2984c4e0dc14c79c987d37818484a62958b9c45a0e8b962f20650f90620007ee908262000acf565b50600660005260076020908152622625a07f55c5b153ab560fcde54a63b18c7f53d75501706907cef8767fbded79ab9997c7556040805160608101909152602a80825290916200420390830139600760005260066020527f4ced6d0d36392b04cc5d8761b1327b3bbba6e1089c77f60a9a9ca18e05e4f00e9062000873908262000acf565b505060076000819052602052629896807fb7c49cceb9f85950584035457a41ebbd8cf93b9b612733ad25aa9731ac43aad65562000cc6565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020835110156200091b576200091383620009e5565b90506200092e565b8162000928848262000acf565b5060ff90505b92915050565b6001600160a01b0383166200095c57604051630cd149e760e31b815260040160405180910390fd5b6001600160a01b0382166200098457604051633424766160e01b815260040160405180910390fd5b6001600160a01b038381166000818152600e602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600080829050601f8151111562000a13578260405163305a27a960e01b81526004016200019f919062000c50565b805162000a208262000ca1565b179392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c9082168062000a5357607f821691505b60208210810362000a7457634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000aca576000816000526020600020601f850160051c8101602086101562000aa55750805b601f850160051c820191505b8181101562000ac65782815560010162000ab1565b5050505b505050565b81516001600160401b0381111562000aeb5762000aeb62000a28565b62000b038162000afc845462000a3e565b8462000a7a565b602080601f83116001811462000b3b576000841562000b225750858301515b600019600386901b1c1916600185901b17855562000ac6565b600085815260208120601f198616915b8281101562000b6c5788860151825594840194600190910190840162000b4b565b508582101562000b8b5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176200092e576200092e62000b9b565b60008262000be957634e487b7160e01b600052601260045260246000fd5b500690565b818103818111156200092e576200092e62000b9b565b60006020828403121562000c1757600080fd5b5051919050565b60006020828403121562000c3157600080fd5b81516001600160a01b038116811462000c4957600080fd5b9392505050565b60006020808352835180602085015260005b8181101562000c805785810183015185820160400152820162000c62565b506000604082860101526040601f19601f8301168501019250505092915050565b8051602080830151919081101562000a745760001960209190910360031b1b16919050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516101e05161020051610220516133df62000e2460003960008181610b4601528181610c1e01526125640152600081816105fd0152818161091201526122ae01526000818161053201528181610b8e0152818161107e0152818161143201528181611ae401528181611b2201528181611b6801528181611c5f01528181611d750152818161212f015281816121e10152818161253f01528181612a010152612a440152600081816105ca01528181610d68015281816112ad01528181611314015281816114090152611a720152600081816110040152818161149301526116400152600081816108a90152610bc101526000818161063301526107d5015260006124e3015260006124b6015260006120a60152600061207e01526000611fd9015260006120030152600061202d01526133df6000f3fe6080604052600436106104305760003560e01c80637ecebe0011610227578063c2c68ee11161012d578063ddcac06f116100b0578063f2fde38b11610077578063f2fde38b14610d36578063f40acc3d14610d56578063fa83cb5814610d8a578063fccc281314610da2578063ff7e96b814610db857005b8063ddcac06f14610ce2578063de816fa814610cf7578063df7787a414610d0c578063e130ce6114610d21578063f0feda2c14610d0c57005b8063d4698016116100f4578063d469801614610c0c578063d505accf14610c40578063d8af22c114610c60578063dc07b61714610c87578063dd62ed3e14610c9c57005b8063c2c68ee114610b6a578063c387b73914610b7f578063c792562314610bb2578063cae5f11e14610be5578063cd02a6d314610a6557005b80639ae23e07116101b5578063a9059cbb1161017c578063a9059cbb14610ae2578063abdf74ec14610b02578063ad5c464814610749578063b0bc85de14610b22578063b79cb2a014610b3757005b80639ae23e0714610a655780639cc7475014610a8d578063a457c2d714610aad578063a607a8d914610acd578063a82ed9ec1461056957005b8063909265c5116101f9578063909265c5146109ed5780639358928b14610a0c5780639483fbcb14610a2157806395d89b4114610a3557806399d8fae31461085a57005b80637ecebe001461097257806384b0196e146109925780638da5cb5b146109ba57806390825c28146109d857005b806338b39d29116103375780635581fc13116102ba57806370a082311161028157806370a08231146108cb578063715018a6146108eb57806375f0a87414610900578063761ba5291461093457806379cc67901461095257005b80635581fc131461082b578063561045291461084557806359d0f7131461085a578063679aefce146108825780636ebb8cd21461089757005b80634a16b8e4116102fe5780634a16b8e4146107915780634bea8529146107a65780634efe0939146107c6578063538ba4f9146107f9578063548f21041461080e57005b806338b39d29146106f457806339509351146107095780633c3fad4c146107295780633fc8cef31461074957806342966c681461077157005b806318160ddd116103bf57806323b872dd1161038657806323b872dd14610655578063252d723a1461067557806330e935141461068a578063313ce567146106c35780633644e515146106df57005b806318160ddd146105a65780631a788f95146105545780631abfa629146105bb5780631d4e49eb146105ee57806320fbbe7a1461062157005b8063095ea7b311610403578063095ea7b3146104f05780630b6014e9146105205780630fa604e4146105545780631694505e1461056957806317f362811461059157005b806271c175146104395780630103982d146104795780630255874f146104a057806306fdde03146104ce57005b3661043757005b005b34801561044557600080fd5b50737a250d5630b4cf539739df2c5dacb4c659f2488d5b6040516001600160a01b0390911681526020015b60405180910390f35b34801561048557600080fd5b50735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f61045c565b3480156104ac57600080fd5b506104c06104bb366004612c96565b610dd8565b604051908152602001610470565b3480156104da57600080fd5b506104e3610e3d565b6040516104709190612d08565b3480156104fc57600080fd5b5061051061050b366004612d1b565b610ecf565b6040519015158152602001610470565b34801561052c57600080fd5b5061045c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561056057600080fd5b506104c0610ee5565b34801561057557600080fd5b5061045c737a250d5630b4cf539739df2c5dacb4c659f2488d81565b34801561059d57600080fd5b506104c0610efd565b3480156105b257600080fd5b506104c0610f0f565b3480156105c757600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061045c565b3480156105fa57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061045c565b34801561062d57600080fd5b5061045c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561066157600080fd5b50610510610670366004612d45565b610f23565b34801561068157600080fd5b506104c0610fa3565b34801561069657600080fd5b506105106106a5366004612c96565b6001600160a01b03166000908152600b602052604090205460ff1690565b3480156106cf57600080fd5b5060405160098152602001610470565b3480156106eb57600080fd5b506104c0610fc0565b34801561070057600080fd5b5061dead61045c565b34801561071557600080fd5b50610510610724366004612d1b565b610fca565b34801561073557600080fd5b50610437610744366004612e24565b611001565b34801561075557600080fd5b5061045c73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b34801561077d57600080fd5b5061043761078c366004612e69565b6110b4565b34801561079d57600080fd5b506104e3611116565b3480156107b257600080fd5b506104c06107c1366004612c96565b61113d565b3480156107d257600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061045c565b34801561080557600080fd5b5061045c600081565b34801561081a57600080fd5b50601154610100900460ff16610510565b34801561083757600080fd5b506011546105109060ff1681565b34801561085157600080fd5b506104c0611186565b34801561086657600080fd5b5061045c735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f81565b34801561088e57600080fd5b506104c061119d565b3480156108a357600080fd5b506104c07f000000000000000000000000000000000000000000000000000000000000000081565b3480156108d757600080fd5b506104c06108e6366004612c96565b6111a7565b3480156108f757600080fd5b506104376111c9565b34801561090c57600080fd5b5061045c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561094057600080fd5b5060115462010000900460ff16610510565b34801561095e57600080fd5b5061043761096d366004612d1b565b6111dd565b34801561097e57600080fd5b506104c061098d366004612c96565b611241565b34801561099e57600080fd5b506109a761125f565b6040516104709796959493929190612e82565b3480156109c657600080fd5b506000546001600160a01b031661045c565b3480156109e457600080fd5b506104c06112a5565b3480156109f957600080fd5b5060115461051090610100900460ff1681565b348015610a1857600080fd5b506104c06113d0565b348015610a2d57600080fd5b50600061045c565b348015610a4157600080fd5b506040805180820190915260078152665241494e424f5760c81b60208201526104e3565b348015610a7157600080fd5b5061045c735f4ec3df9cbd43714fe2740f5e3616155c5b841981565b348015610a9957600080fd5b50610437610aa8366004612e24565b611490565b348015610ab957600080fd5b50610510610ac8366004612d1b565b611508565b348015610ad957600080fd5b506104c06115a1565b348015610aee57600080fd5b50610510610afd366004612d1b565b611630565b348015610b0e57600080fd5b50610437610b1d366004612f1b565b61163d565b348015610b2e57600080fd5b506104c06116b1565b348015610b4357600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061045c565b348015610b7657600080fd5b506104376116c4565b348015610b8b57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061045c565b348015610bbe57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006104c0565b348015610bf157600080fd5b5073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc261045c565b348015610c1857600080fd5b5061045c7f000000000000000000000000000000000000000000000000000000000000000081565b348015610c4c57600080fd5b50610437610c5b366004612f69565b6116db565b348015610c6c57600080fd5b50735f4ec3df9cbd43714fe2740f5e3616155c5b841961045c565b348015610c9357600080fd5b50610437611815565b348015610ca857600080fd5b506104c0610cb7366004612fdc565b6001600160a01b039182166000908152600e6020908152604080832093909416825291909152205490565b348015610cee57600080fd5b506104c061182b565b348015610d0357600080fd5b506104c061183c565b348015610d1857600080fd5b506104c0611884565b348015610d2d57600080fd5b50610437611895565b348015610d4257600080fd5b50610437610d51366004612c96565b6118aa565b348015610d6257600080fd5b5061045c7f000000000000000000000000000000000000000000000000000000000000000081565b348015610d9657600080fd5b5060115460ff16610510565b348015610dae57600080fd5b5061045c61dead81565b348015610dc457600080fd5b506011546105109062010000900460ff1681565b600080610de36118e8565b6001600160a01b0384166000908152600b602052604090205490915060ff1615610e37576001600160a01b0383166000908152600a6020526040902054808211610e2d5781610e2f565b805b949350505050565b92915050565b606060058054610e4c9061300f565b80601f0160208091040260200160405190810160405280929190818152602001828054610e789061300f565b8015610ec55780601f10610e9a57610100808354040283529160200191610ec5565b820191906000526020600020905b815481529060010190602001808311610ea857829003601f168201915b5050505050905090565b6000610edc3384846118f2565b50600192915050565b6000610ef8633b9aca00621e848061305f565b905090565b610f0c633b9aca00606461305f565b81565b6000610ef8633b9aca006305f5e10061305f565b6000610f308484846119a2565b6001600160a01b0384166000908152600e6020908152604080832033845290915290205480831115610f845760405163b2811c5960e01b815260048101849052602481018290526044015b60405180910390fd5b610f988533610f938685613076565b6118f2565b506001949350505050565b6000610fae60145490565b610fb6611fb7565b610ef89190613089565b6000610ef8611fcc565b336000818152600e602090815260408083206001600160a01b03871684529091528120549091610edc918590610f93908690613089565b817f000000000000000000000000000000000000000000000000000000000000000060001b81604051602001611037919061309c565b604051602081830303815290604052805190602001201461106b5760405163832d990560e01b815260040160405180910390fd5b611074826120f7565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163180156110ae576110ae816122a9565b50505050565b6011805463ff000000191663010000001790556110d2600082611630565b506011805463ff000000191690556040518181527fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb9060200160405180910390a150565b60606006600061112461183c565b81526020019081526020016000208054610e4c9061300f565b6001600160a01b0381166000908152600b602052604081205460ff1661116a5761116561183c565b610e37565b506001600160a01b03166000908152600a602052604090205490565b600061119361dead6111a7565b610fb660006111a7565b6000610ef8612361565b6001600160a01b0381166000908152600c6020526040812054610e3790612382565b6111d1612432565b6111db600061245f565b565b6011805463ff000000191663010000001790556111fc82600083610f23565b506011805463ff000000191690556040518181527fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb9060200160405180910390a15050565b6001600160a01b038116600090815260036020526040812054610e37565b6000606080600080600060606112736124af565b61127b6124dc565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6000806112d17f00000000000000000000000000000000000000000000000000000000000000006111a7565b905080156113c857806112e2610f0f565b6112ec91906130ce565b670de0b6b3a76400006112fd6115a1565b6040516370a0823160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016600482015273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2906370a0823190602401602060405180830381865afa158015611375573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139991906130e2565b6113a3919061305f565b6113ad91906130ce565b6113b7919061305f565b6113c290600261305f565b91505090565b600091505090565b60006113dd61dead6111a7565b6113e760006111a7565b611404737a250d5630b4cf539739df2c5dacb4c659f2488d6111a7565b61142d7f00000000000000000000000000000000000000000000000000000000000000006111a7565b6114567f00000000000000000000000000000000000000000000000000000000000000006111a7565b61145e610f0f565b6114689190613076565b6114729190613076565b61147c9190613076565b6114869190613076565b610ef89190613076565b817f000000000000000000000000000000000000000000000000000000000000000060001b816040516020016114c6919061309c565b60405160208183030381529060405280519060200120146114fa5760405163832d990560e01b815260040160405180910390fd5b611503826122a9565b505050565b336000908152600e602090815260408083206001600160a01b03861684529091528120548281101561158a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610f7b565b61159733858584036118f2565b5060019392505050565b600080735f4ec3df9cbd43714fe2740f5e3616155c5b84196001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156115f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061161a9190613115565b5050509150506305f5e100816113c29190613165565b6000610edc3384846119a2565b827f000000000000000000000000000000000000000000000000000000000000000060001b81604051602001611673919061309c565b60405160208183030381529060405280519060200120146116a75760405163832d990560e01b815260040160405180910390fd5b6110ae8383612509565b60006116bc60175490565b610fb66118e8565b6116cc612432565b6011805460ff19166001179055565b834211156116ff5760405163313c898160e11b815260048101859052602401610f7b565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988888861174c8c6001600160a01b0316600090815260036020526040902080546001810190915590565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e00160405160208183030381529060405280519060200120905060006117a78261266a565b905060006117b782878787612697565b9050896001600160a01b0316816001600160a01b0316146117fe576040516325c0072360e11b81526001600160a01b0380831660048301528b166024820152604401610f7b565b6118098a8a8a6118f2565b50505050505050505050565b61181d612432565b6011805462ff000019169055565b6000610ef8633b9aca00606461305f565b6000806118476112a5565b9050600060075b600081815260076020526040902054831061186b5780915061187d565b8061187581613193565b91505061184e565b5092915050565b610f0c633b9aca00621e848061305f565b61189d612432565b6011805461ff0019169055565b6118b2612432565b6001600160a01b0381166118dc57604051631e4fbdf760e01b815260006004820152602401610f7b565b6118e58161245f565b50565b6000610ef861183c565b6001600160a01b03831661191957604051630cd149e760e31b815260040160405180910390fd5b6001600160a01b03821661194057604051633424766160e01b815260040160405180910390fd5b6001600160a01b038381166000818152600e602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166119c957604051630b07e54560e11b815260040160405180910390fd5b6001600160a01b0382161580156119ea57506011546301000000900460ff16155b15611a0857604051633a954ecd60e21b815260040160405180910390fd5b80600003611a29576040516361e7856b60e11b815260040160405180910390fd5b611a32836111a7565b811115611a655780611a43846111a7565b6040516350d2479d60e11b815260048101929092526024820152604401610f7b565b6001600160a01b038381167f0000000000000000000000000000000000000000000000000000000000000000821690811491841614611aac6000546001600160a01b031690565b6001600160a01b0316856001600160a01b031614158015611adb57506000546001600160a01b03858116911614155b8015611b1957507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316856001600160a01b031614155b8015611b5757507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b031614155b15611deb5760115460ff16611bb8577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316856001600160a01b031614611bb8576040516312f1f92360e01b815260040160405180910390fd5b601154610100900460ff1615611bf957611bd9633b9aca00621e848061305f565b831115611bf957604051630133125960e61b815260040160405180910390fd5b80158015611c0f575060115462010000900460ff165b15611c5857611c25633b9aca00621e848061305f565b83611c2f866111a7565b611c399190613089565b1115611c5857604051632ce93b5960e01b815260040160405180910390fd5b6000611c837f00000000000000000000000000000000000000000000000000000000000000006111a7565b9050611c94633b9aca00606461305f565b8110158015611cae5750601154640100000000900460ff16155b8015611cb8575082155b8015611cdd57506001600160a01b0386166000908152600f602052604090205460ff16155b8015611d0257506001600160a01b0385166000908152600f602052604090205460ff16155b15611de9576000611d146002836130ce565b90506000611d228284613076565b90506000611d316002836130ce565b6011805465ff00000000001916650100000000001790559050611d5c611d578285613089565b6120f7565b6011805465ff0000000000191690556001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016318015611de4576000611da96002836130ce565b90506000611db78284613076565b90508115611dc857611dc8826122a9565b8015611de157611de1611ddb8587613076565b82612509565b50505b505050505b505b6001600160a01b0385166000908152600f602052604090205460019060ff1680611e2d57506001600160a01b0385166000908152600f602052604090205460ff165b80611e3f575082158015611e3f575081155b15611e4c57506000611fa3565b828015611e7657506001600160a01b038516737a250d5630b4cf539739df2c5dacb4c659f2488d14155b15611eff57611e83611fb7565b6018556014546019556001600160a01b0385166000908152600b602052604090205460ff16611ee457611eb461183c565b6001600160a01b0386166000908152600a6020908152604080832093909355600b905220805460ff191660011790555b611eec611116565b600590611ef990826131f2565b50611fa3565b818015611f2957506001600160a01b038616737a250d5630b4cf539739df2c5dacb4c659f2488d14155b15611f9f57611f3786610dd8565b6018556017546019556001600160a01b0386166000908152600b602052604090205460ff16611ee457611f6861183c565b6001600160a01b0387166000908152600a6020908152604080832093909355600b905220805460ff19166001179055611eec611116565b5060005b611faf868686846126c5565b505050505050565b6000611fc161183c565b610ef8906007613076565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561202557507f000000000000000000000000000000000000000000000000000000000000000046145b1561204f57507f000000000000000000000000000000000000000000000000000000000000000090565b610ef8604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b6011805464ff0000000019166401000000001790556040805160028082526060820183526000926020830190803683370190505090507f000000000000000000000000000000000000000000000000000000000000000081600081518110612161576121616132b2565b60200260200101906001600160a01b031690816001600160a01b03168152505073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2816001815181106121a9576121a96132b2565b6001600160a01b0390921660209283029190910190910152737a250d5630b4cf539739df2c5dacb4c659f2488d63791ac947836000847f000000000000000000000000000000000000000000000000000000000000000061220c4261012c613089565b6040518663ffffffff1660e01b815260040161222c9594939291906132c8565b600060405180830381600087803b15801561224657600080fd5b505af115801561225a573d6000803e3d6000fd5b505050507f89f1d38d98c13362767fbcc2b0e375c1c3c4429b4648ea2a99839d962779b5d18260405161228f91815260200190565b60405180910390a150506011805464ff0000000019169055565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168360405160006040518083038185875af1925050503d8060008114612317576040519150601f19603f3d011682016040523d82523d6000602084013e61231c565b606091505b50915091507f0f3178f92d7e0d59c92a9b170e30dad99b3d592d690a083683f9cd6645ab1b1b8383836040516123549392919061333b565b60405180910390a1505050565b6000612375633b9aca006305f5e10061305f565b601054610ef891906130ce565b60006010548211156123b5576010546040516340b83d2160e11b8152610f7b918491600401918252602082015260400190565b6011546601000000000000900460ff161580156123de575060115465010000000000900460ff16155b80156123f45750601154640100000000900460ff165b61240a57612400612361565b61116590836130ce565b612420670de0b6b3a7640000633b9aca0061305f565b612428612361565b610e3791906130ce565b6000546001600160a01b031633146111db5760405163118cdaa760e01b8152336004820152602401610f7b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060610ef87f000000000000000000000000000000000000000000000000000000000000000060016126e0565b6060610ef87f000000000000000000000000000000000000000000000000000000000000000060026126e0565b6011805466ff00ff0000000019166601000100000000179055737a250d5630b4cf539739df2c5dacb4c659f2488d63f305d719827f0000000000000000000000000000000000000000000000000000000000000000856000807f000000000000000000000000000000000000000000000000000000000000000061258f4261012c613089565b60405160e089901b6001600160e01b03191681526001600160a01b039687166004820152602481019590955260448501939093526064840191909152909216608482015260a481019190915260c40160606040518083038185885af11580156125fc573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906126219190613365565b50506011805466ff000000000000191690555060408051838152602081018390527f5e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5c910161228f565b6000610e37612677611fcc565b8360405161190160f01b8152600281019290925260228201526042902090565b6000806000806126a98888888861278b565b9250925092506126b9828261285a565b50909695505050505050565b806126d557600060188190556019555b6110ae848484612917565b606060ff83146126fa576126f383612b16565b9050610e37565b8180546127069061300f565b80601f01602080910402602001604051908101604052809291908181526020018280546127329061300f565b801561277f5780601f106127545761010080835404028352916020019161277f565b820191906000526020600020905b81548152906001019060200180831161276257829003601f168201915b50505050509050610e37565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156127c65750600091506003905082612850565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa15801561281a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661284657506000925060019150829050612850565b9250600091508190505b9450945094915050565b600082600381111561286e5761286e613393565b03612877575050565b600182600381111561288b5761288b613393565b036128a95760405163f645eedf60e01b815260040160405180910390fd5b60028260038111156128bd576128bd613393565b036128de5760405163fce698f760e01b815260048101829052602401610f7b565b60038260038111156128f2576128f2613393565b03612913576040516335e2f38360e21b815260048101829052602401610f7b565b5050565b601154640100000000900460ff16158061293c575060115465010000000000900460ff165b8061295357506011546601000000000000900460ff165b15612ad157600080600080600061296986612b55565b6001600160a01b038e166000908152600c6020526040902054959a50939850919650945090925061299c91879150613076565b6001600160a01b03808a166000908152600c602052604080822093909355908916815220546129cc908590613089565b6001600160a01b0388166000908152600c60205260409020556129ed612361565b6129f7908261305f565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166000908152600c6020526040902054612a3a9190613089565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166000908152600c6020526040902055601054612a81908490613076565b6010556040518281526001600160a01b0380891691908a16907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050505050505050565b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161199591815260200190565b60606000612b2383612baa565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b6000806000806000806000806000612b728a601954601854612bd2565b9250925092506000806000612b908d8686612b8b612361565b612c2b565b919f909e50909c50959a5093985091965092945050505050565b600060ff8216601f811115610e3757604051632cd44ac360e21b815260040160405180910390fd5b60008080806064612be3878961305f565b612bed91906130ce565b905060006064612bfd878a61305f565b612c0791906130ce565b905080612c14838a613076565b612c1e9190613076565b9891975095509350505050565b6000808080612c3a858961305f565b90506000612c48868961305f565b905081612c55878961305f565b612c5f8385613076565b612c699190613076565b909a90995090975095505050505050565b80356001600160a01b0381168114612c9157600080fd5b919050565b600060208284031215612ca857600080fd5b612cb182612c7a565b9392505050565b60005b83811015612cd3578181015183820152602001612cbb565b50506000910152565b60008151808452612cf4816020860160208601612cb8565b601f01601f19169290920160200192915050565b602081526000612cb16020830184612cdc565b60008060408385031215612d2e57600080fd5b612d3783612c7a565b946020939093013593505050565b600080600060608486031215612d5a57600080fd5b612d6384612c7a565b9250612d7160208501612c7a565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b600082601f830112612da857600080fd5b813567ffffffffffffffff80821115612dc357612dc3612d81565b604051601f8301601f19908116603f01168101908282118183101715612deb57612deb612d81565b81604052838152866020858801011115612e0457600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215612e3757600080fd5b823567ffffffffffffffff811115612e4e57600080fd5b612e5a85828601612d97565b95602094909401359450505050565b600060208284031215612e7b57600080fd5b5035919050565b60ff60f81b881681526000602060e06020840152612ea360e084018a612cdc565b8381036040850152612eb5818a612cdc565b606085018990526001600160a01b038816608086015260a0850187905284810360c08601528551808252602080880193509091019060005b81811015612f0957835183529284019291840191600101612eed565b50909c9b505050505050505050505050565b600080600060608486031215612f3057600080fd5b833567ffffffffffffffff811115612f4757600080fd5b612f5386828701612d97565b9660208601359650604090950135949350505050565b600080600080600080600060e0888a031215612f8457600080fd5b612f8d88612c7a565b9650612f9b60208901612c7a565b95506040880135945060608801359350608088013560ff81168114612fbf57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215612fef57600080fd5b612ff883612c7a565b915061300660208401612c7a565b90509250929050565b600181811c9082168061302357607f821691505b60208210810361304357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610e3757610e37613049565b81810381811115610e3757610e37613049565b80820180821115610e3757610e37613049565b600082516130ae818460208701612cb8565b9190910192915050565b634e487b7160e01b600052601260045260246000fd5b6000826130dd576130dd6130b8565b500490565b6000602082840312156130f457600080fd5b5051919050565b805169ffffffffffffffffffff81168114612c9157600080fd5b600080600080600060a0868803121561312d57600080fd5b613136866130fb565b9450602086015193506040860151925060608601519150613159608087016130fb565b90509295509295909350565b600082613174576131746130b8565b600160ff1b82146000198414161561318e5761318e613049565b500590565b6000816131a2576131a2613049565b506000190190565b601f821115611503576000816000526020600020601f850160051c810160208610156131d35750805b601f850160051c820191505b81811015611faf578281556001016131df565b815167ffffffffffffffff81111561320c5761320c612d81565b6132208161321a845461300f565b846131aa565b602080601f831160018114613255576000841561323d5750858301515b600019600386901b1c1916600185901b178555611faf565b600085815260208120601f198616915b8281101561328457888601518255948401946001909101908401613265565b50858210156132a25787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b600060a08201878352602087602085015260a0604085015281875180845260c08601915060208901935060005b8181101561331a5784516001600160a01b0316835293830193918301916001016132f5565b50506001600160a01b03969096166060850152505050608001529392505050565b838152821515602082015260606040820152600061335c6060830184612cdc565b95945050505050565b60008060006060848603121561337a57600080fd5b8351925060208401519150604084015190509250925092565b634e487b7160e01b600052602160045260246000fdfea26469706673582212209fddbf76b5f9e230425a466a93cb293d615331c0f279643e1d3264489d18194964736f6c63430008170033e29aabefb88fe29aabefb88fe29aabefb88fe29aabefb88fe29aabefb88fe29aabefb88fe29aabefb88ff09f94b4f09f9fa0f09f9fa1f09f9fa2f09f94b5f09f9fa3e29aaaefb88fe29aabefb88fe29aaaefb88fe29aaaefb88fe29aaaefb88fe29aaaefb88fe29aaaefb88fe29aaaefb88fe29aaaefb88fb53b7ca515051d49e851c07bd0fbdddb8010a9366f5b1f5fb737ba21a4356301
Deployed Bytecode
0x6080604052600436106104305760003560e01c80637ecebe0011610227578063c2c68ee11161012d578063ddcac06f116100b0578063f2fde38b11610077578063f2fde38b14610d36578063f40acc3d14610d56578063fa83cb5814610d8a578063fccc281314610da2578063ff7e96b814610db857005b8063ddcac06f14610ce2578063de816fa814610cf7578063df7787a414610d0c578063e130ce6114610d21578063f0feda2c14610d0c57005b8063d4698016116100f4578063d469801614610c0c578063d505accf14610c40578063d8af22c114610c60578063dc07b61714610c87578063dd62ed3e14610c9c57005b8063c2c68ee114610b6a578063c387b73914610b7f578063c792562314610bb2578063cae5f11e14610be5578063cd02a6d314610a6557005b80639ae23e07116101b5578063a9059cbb1161017c578063a9059cbb14610ae2578063abdf74ec14610b02578063ad5c464814610749578063b0bc85de14610b22578063b79cb2a014610b3757005b80639ae23e0714610a655780639cc7475014610a8d578063a457c2d714610aad578063a607a8d914610acd578063a82ed9ec1461056957005b8063909265c5116101f9578063909265c5146109ed5780639358928b14610a0c5780639483fbcb14610a2157806395d89b4114610a3557806399d8fae31461085a57005b80637ecebe001461097257806384b0196e146109925780638da5cb5b146109ba57806390825c28146109d857005b806338b39d29116103375780635581fc13116102ba57806370a082311161028157806370a08231146108cb578063715018a6146108eb57806375f0a87414610900578063761ba5291461093457806379cc67901461095257005b80635581fc131461082b578063561045291461084557806359d0f7131461085a578063679aefce146108825780636ebb8cd21461089757005b80634a16b8e4116102fe5780634a16b8e4146107915780634bea8529146107a65780634efe0939146107c6578063538ba4f9146107f9578063548f21041461080e57005b806338b39d29146106f457806339509351146107095780633c3fad4c146107295780633fc8cef31461074957806342966c681461077157005b806318160ddd116103bf57806323b872dd1161038657806323b872dd14610655578063252d723a1461067557806330e935141461068a578063313ce567146106c35780633644e515146106df57005b806318160ddd146105a65780631a788f95146105545780631abfa629146105bb5780631d4e49eb146105ee57806320fbbe7a1461062157005b8063095ea7b311610403578063095ea7b3146104f05780630b6014e9146105205780630fa604e4146105545780631694505e1461056957806317f362811461059157005b806271c175146104395780630103982d146104795780630255874f146104a057806306fdde03146104ce57005b3661043757005b005b34801561044557600080fd5b50737a250d5630b4cf539739df2c5dacb4c659f2488d5b6040516001600160a01b0390911681526020015b60405180910390f35b34801561048557600080fd5b50735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f61045c565b3480156104ac57600080fd5b506104c06104bb366004612c96565b610dd8565b604051908152602001610470565b3480156104da57600080fd5b506104e3610e3d565b6040516104709190612d08565b3480156104fc57600080fd5b5061051061050b366004612d1b565b610ecf565b6040519015158152602001610470565b34801561052c57600080fd5b5061045c7f000000000000000000000000b4dfdf86771b6eaeeb9c80c5b8eeb7a72ae659a781565b34801561056057600080fd5b506104c0610ee5565b34801561057557600080fd5b5061045c737a250d5630b4cf539739df2c5dacb4c659f2488d81565b34801561059d57600080fd5b506104c0610efd565b3480156105b257600080fd5b506104c0610f0f565b3480156105c757600080fd5b507f000000000000000000000000e8b86950cf652492177d9f0031c6e6d30fd34a1b61045c565b3480156105fa57600080fd5b507f00000000000000000000000008d0839cb03879aa36240dcc5c6449ca929fd29e61045c565b34801561062d57600080fd5b5061045c7f00000000000000000000000008d0839cb03879aa36240dcc5c6449ca929fd29e81565b34801561066157600080fd5b50610510610670366004612d45565b610f23565b34801561068157600080fd5b506104c0610fa3565b34801561069657600080fd5b506105106106a5366004612c96565b6001600160a01b03166000908152600b602052604090205460ff1690565b3480156106cf57600080fd5b5060405160098152602001610470565b3480156106eb57600080fd5b506104c0610fc0565b34801561070057600080fd5b5061dead61045c565b34801561071557600080fd5b50610510610724366004612d1b565b610fca565b34801561073557600080fd5b50610437610744366004612e24565b611001565b34801561075557600080fd5b5061045c73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b34801561077d57600080fd5b5061043761078c366004612e69565b6110b4565b34801561079d57600080fd5b506104e3611116565b3480156107b257600080fd5b506104c06107c1366004612c96565b61113d565b3480156107d257600080fd5b507f00000000000000000000000008d0839cb03879aa36240dcc5c6449ca929fd29e61045c565b34801561080557600080fd5b5061045c600081565b34801561081a57600080fd5b50601154610100900460ff16610510565b34801561083757600080fd5b506011546105109060ff1681565b34801561085157600080fd5b506104c0611186565b34801561086657600080fd5b5061045c735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f81565b34801561088e57600080fd5b506104c061119d565b3480156108a357600080fd5b506104c07f000000000000000000000000000000000000000000000000000000006566897f81565b3480156108d757600080fd5b506104c06108e6366004612c96565b6111a7565b3480156108f757600080fd5b506104376111c9565b34801561090c57600080fd5b5061045c7f00000000000000000000000008d0839cb03879aa36240dcc5c6449ca929fd29e81565b34801561094057600080fd5b5060115462010000900460ff16610510565b34801561095e57600080fd5b5061043761096d366004612d1b565b6111dd565b34801561097e57600080fd5b506104c061098d366004612c96565b611241565b34801561099e57600080fd5b506109a761125f565b6040516104709796959493929190612e82565b3480156109c657600080fd5b506000546001600160a01b031661045c565b3480156109e457600080fd5b506104c06112a5565b3480156109f957600080fd5b5060115461051090610100900460ff1681565b348015610a1857600080fd5b506104c06113d0565b348015610a2d57600080fd5b50600061045c565b348015610a4157600080fd5b506040805180820190915260078152665241494e424f5760c81b60208201526104e3565b348015610a7157600080fd5b5061045c735f4ec3df9cbd43714fe2740f5e3616155c5b841981565b348015610a9957600080fd5b50610437610aa8366004612e24565b611490565b348015610ab957600080fd5b50610510610ac8366004612d1b565b611508565b348015610ad957600080fd5b506104c06115a1565b348015610aee57600080fd5b50610510610afd366004612d1b565b611630565b348015610b0e57600080fd5b50610437610b1d366004612f1b565b61163d565b348015610b2e57600080fd5b506104c06116b1565b348015610b4357600080fd5b507f00000000000000000000000008d0839cb03879aa36240dcc5c6449ca929fd29e61045c565b348015610b7657600080fd5b506104376116c4565b348015610b8b57600080fd5b507f000000000000000000000000b4dfdf86771b6eaeeb9c80c5b8eeb7a72ae659a761045c565b348015610bbe57600080fd5b507f000000000000000000000000000000000000000000000000000000006566897f6104c0565b348015610bf157600080fd5b5073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc261045c565b348015610c1857600080fd5b5061045c7f00000000000000000000000008d0839cb03879aa36240dcc5c6449ca929fd29e81565b348015610c4c57600080fd5b50610437610c5b366004612f69565b6116db565b348015610c6c57600080fd5b50735f4ec3df9cbd43714fe2740f5e3616155c5b841961045c565b348015610c9357600080fd5b50610437611815565b348015610ca857600080fd5b506104c0610cb7366004612fdc565b6001600160a01b039182166000908152600e6020908152604080832093909416825291909152205490565b348015610cee57600080fd5b506104c061182b565b348015610d0357600080fd5b506104c061183c565b348015610d1857600080fd5b506104c0611884565b348015610d2d57600080fd5b50610437611895565b348015610d4257600080fd5b50610437610d51366004612c96565b6118aa565b348015610d6257600080fd5b5061045c7f000000000000000000000000e8b86950cf652492177d9f0031c6e6d30fd34a1b81565b348015610d9657600080fd5b5060115460ff16610510565b348015610dae57600080fd5b5061045c61dead81565b348015610dc457600080fd5b506011546105109062010000900460ff1681565b600080610de36118e8565b6001600160a01b0384166000908152600b602052604090205490915060ff1615610e37576001600160a01b0383166000908152600a6020526040902054808211610e2d5781610e2f565b805b949350505050565b92915050565b606060058054610e4c9061300f565b80601f0160208091040260200160405190810160405280929190818152602001828054610e789061300f565b8015610ec55780601f10610e9a57610100808354040283529160200191610ec5565b820191906000526020600020905b815481529060010190602001808311610ea857829003601f168201915b5050505050905090565b6000610edc3384846118f2565b50600192915050565b6000610ef8633b9aca00621e848061305f565b905090565b610f0c633b9aca00606461305f565b81565b6000610ef8633b9aca006305f5e10061305f565b6000610f308484846119a2565b6001600160a01b0384166000908152600e6020908152604080832033845290915290205480831115610f845760405163b2811c5960e01b815260048101849052602481018290526044015b60405180910390fd5b610f988533610f938685613076565b6118f2565b506001949350505050565b6000610fae60145490565b610fb6611fb7565b610ef89190613089565b6000610ef8611fcc565b336000818152600e602090815260408083206001600160a01b03871684529091528120549091610edc918590610f93908690613089565b817fb53b7ca515051d49e851c07bd0fbdddb8010a9366f5b1f5fb737ba21a435630160001b81604051602001611037919061309c565b604051602081830303815290604052805190602001201461106b5760405163832d990560e01b815260040160405180910390fd5b611074826120f7565b6001600160a01b037f000000000000000000000000b4dfdf86771b6eaeeb9c80c5b8eeb7a72ae659a7163180156110ae576110ae816122a9565b50505050565b6011805463ff000000191663010000001790556110d2600082611630565b506011805463ff000000191690556040518181527fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb9060200160405180910390a150565b60606006600061112461183c565b81526020019081526020016000208054610e4c9061300f565b6001600160a01b0381166000908152600b602052604081205460ff1661116a5761116561183c565b610e37565b506001600160a01b03166000908152600a602052604090205490565b600061119361dead6111a7565b610fb660006111a7565b6000610ef8612361565b6001600160a01b0381166000908152600c6020526040812054610e3790612382565b6111d1612432565b6111db600061245f565b565b6011805463ff000000191663010000001790556111fc82600083610f23565b506011805463ff000000191690556040518181527fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb9060200160405180910390a15050565b6001600160a01b038116600090815260036020526040812054610e37565b6000606080600080600060606112736124af565b61127b6124dc565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6000806112d17f000000000000000000000000e8b86950cf652492177d9f0031c6e6d30fd34a1b6111a7565b905080156113c857806112e2610f0f565b6112ec91906130ce565b670de0b6b3a76400006112fd6115a1565b6040516370a0823160e01b81526001600160a01b037f000000000000000000000000e8b86950cf652492177d9f0031c6e6d30fd34a1b16600482015273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2906370a0823190602401602060405180830381865afa158015611375573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139991906130e2565b6113a3919061305f565b6113ad91906130ce565b6113b7919061305f565b6113c290600261305f565b91505090565b600091505090565b60006113dd61dead6111a7565b6113e760006111a7565b611404737a250d5630b4cf539739df2c5dacb4c659f2488d6111a7565b61142d7f000000000000000000000000e8b86950cf652492177d9f0031c6e6d30fd34a1b6111a7565b6114567f000000000000000000000000b4dfdf86771b6eaeeb9c80c5b8eeb7a72ae659a76111a7565b61145e610f0f565b6114689190613076565b6114729190613076565b61147c9190613076565b6114869190613076565b610ef89190613076565b817fb53b7ca515051d49e851c07bd0fbdddb8010a9366f5b1f5fb737ba21a435630160001b816040516020016114c6919061309c565b60405160208183030381529060405280519060200120146114fa5760405163832d990560e01b815260040160405180910390fd5b611503826122a9565b505050565b336000908152600e602090815260408083206001600160a01b03861684529091528120548281101561158a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610f7b565b61159733858584036118f2565b5060019392505050565b600080735f4ec3df9cbd43714fe2740f5e3616155c5b84196001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156115f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061161a9190613115565b5050509150506305f5e100816113c29190613165565b6000610edc3384846119a2565b827fb53b7ca515051d49e851c07bd0fbdddb8010a9366f5b1f5fb737ba21a435630160001b81604051602001611673919061309c565b60405160208183030381529060405280519060200120146116a75760405163832d990560e01b815260040160405180910390fd5b6110ae8383612509565b60006116bc60175490565b610fb66118e8565b6116cc612432565b6011805460ff19166001179055565b834211156116ff5760405163313c898160e11b815260048101859052602401610f7b565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988888861174c8c6001600160a01b0316600090815260036020526040902080546001810190915590565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e00160405160208183030381529060405280519060200120905060006117a78261266a565b905060006117b782878787612697565b9050896001600160a01b0316816001600160a01b0316146117fe576040516325c0072360e11b81526001600160a01b0380831660048301528b166024820152604401610f7b565b6118098a8a8a6118f2565b50505050505050505050565b61181d612432565b6011805462ff000019169055565b6000610ef8633b9aca00606461305f565b6000806118476112a5565b9050600060075b600081815260076020526040902054831061186b5780915061187d565b8061187581613193565b91505061184e565b5092915050565b610f0c633b9aca00621e848061305f565b61189d612432565b6011805461ff0019169055565b6118b2612432565b6001600160a01b0381166118dc57604051631e4fbdf760e01b815260006004820152602401610f7b565b6118e58161245f565b50565b6000610ef861183c565b6001600160a01b03831661191957604051630cd149e760e31b815260040160405180910390fd5b6001600160a01b03821661194057604051633424766160e01b815260040160405180910390fd5b6001600160a01b038381166000818152600e602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166119c957604051630b07e54560e11b815260040160405180910390fd5b6001600160a01b0382161580156119ea57506011546301000000900460ff16155b15611a0857604051633a954ecd60e21b815260040160405180910390fd5b80600003611a29576040516361e7856b60e11b815260040160405180910390fd5b611a32836111a7565b811115611a655780611a43846111a7565b6040516350d2479d60e11b815260048101929092526024820152604401610f7b565b6001600160a01b038381167f000000000000000000000000e8b86950cf652492177d9f0031c6e6d30fd34a1b821690811491841614611aac6000546001600160a01b031690565b6001600160a01b0316856001600160a01b031614158015611adb57506000546001600160a01b03858116911614155b8015611b1957507f000000000000000000000000b4dfdf86771b6eaeeb9c80c5b8eeb7a72ae659a76001600160a01b0316856001600160a01b031614155b8015611b5757507f000000000000000000000000b4dfdf86771b6eaeeb9c80c5b8eeb7a72ae659a76001600160a01b0316846001600160a01b031614155b15611deb5760115460ff16611bb8577f000000000000000000000000b4dfdf86771b6eaeeb9c80c5b8eeb7a72ae659a76001600160a01b0316856001600160a01b031614611bb8576040516312f1f92360e01b815260040160405180910390fd5b601154610100900460ff1615611bf957611bd9633b9aca00621e848061305f565b831115611bf957604051630133125960e61b815260040160405180910390fd5b80158015611c0f575060115462010000900460ff165b15611c5857611c25633b9aca00621e848061305f565b83611c2f866111a7565b611c399190613089565b1115611c5857604051632ce93b5960e01b815260040160405180910390fd5b6000611c837f000000000000000000000000b4dfdf86771b6eaeeb9c80c5b8eeb7a72ae659a76111a7565b9050611c94633b9aca00606461305f565b8110158015611cae5750601154640100000000900460ff16155b8015611cb8575082155b8015611cdd57506001600160a01b0386166000908152600f602052604090205460ff16155b8015611d0257506001600160a01b0385166000908152600f602052604090205460ff16155b15611de9576000611d146002836130ce565b90506000611d228284613076565b90506000611d316002836130ce565b6011805465ff00000000001916650100000000001790559050611d5c611d578285613089565b6120f7565b6011805465ff0000000000191690556001600160a01b037f000000000000000000000000b4dfdf86771b6eaeeb9c80c5b8eeb7a72ae659a716318015611de4576000611da96002836130ce565b90506000611db78284613076565b90508115611dc857611dc8826122a9565b8015611de157611de1611ddb8587613076565b82612509565b50505b505050505b505b6001600160a01b0385166000908152600f602052604090205460019060ff1680611e2d57506001600160a01b0385166000908152600f602052604090205460ff165b80611e3f575082158015611e3f575081155b15611e4c57506000611fa3565b828015611e7657506001600160a01b038516737a250d5630b4cf539739df2c5dacb4c659f2488d14155b15611eff57611e83611fb7565b6018556014546019556001600160a01b0385166000908152600b602052604090205460ff16611ee457611eb461183c565b6001600160a01b0386166000908152600a6020908152604080832093909355600b905220805460ff191660011790555b611eec611116565b600590611ef990826131f2565b50611fa3565b818015611f2957506001600160a01b038616737a250d5630b4cf539739df2c5dacb4c659f2488d14155b15611f9f57611f3786610dd8565b6018556017546019556001600160a01b0386166000908152600b602052604090205460ff16611ee457611f6861183c565b6001600160a01b0387166000908152600a6020908152604080832093909355600b905220805460ff19166001179055611eec611116565b5060005b611faf868686846126c5565b505050505050565b6000611fc161183c565b610ef8906007613076565b6000306001600160a01b037f000000000000000000000000b4dfdf86771b6eaeeb9c80c5b8eeb7a72ae659a71614801561202557507f000000000000000000000000000000000000000000000000000000000000000146145b1561204f57507f3a60850b465b2fe6627557766ac12a4123200a293d6e195756f15959c858435290565b610ef8604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f2bb908a2e1aba25d563ef6f2f501771a62fee0240d317d533c90a7dfff4161ea918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b6011805464ff0000000019166401000000001790556040805160028082526060820183526000926020830190803683370190505090507f000000000000000000000000b4dfdf86771b6eaeeb9c80c5b8eeb7a72ae659a781600081518110612161576121616132b2565b60200260200101906001600160a01b031690816001600160a01b03168152505073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2816001815181106121a9576121a96132b2565b6001600160a01b0390921660209283029190910190910152737a250d5630b4cf539739df2c5dacb4c659f2488d63791ac947836000847f000000000000000000000000b4dfdf86771b6eaeeb9c80c5b8eeb7a72ae659a761220c4261012c613089565b6040518663ffffffff1660e01b815260040161222c9594939291906132c8565b600060405180830381600087803b15801561224657600080fd5b505af115801561225a573d6000803e3d6000fd5b505050507f89f1d38d98c13362767fbcc2b0e375c1c3c4429b4648ea2a99839d962779b5d18260405161228f91815260200190565b60405180910390a150506011805464ff0000000019169055565b6000807f00000000000000000000000008d0839cb03879aa36240dcc5c6449ca929fd29e6001600160a01b03168360405160006040518083038185875af1925050503d8060008114612317576040519150601f19603f3d011682016040523d82523d6000602084013e61231c565b606091505b50915091507f0f3178f92d7e0d59c92a9b170e30dad99b3d592d690a083683f9cd6645ab1b1b8383836040516123549392919061333b565b60405180910390a1505050565b6000612375633b9aca006305f5e10061305f565b601054610ef891906130ce565b60006010548211156123b5576010546040516340b83d2160e11b8152610f7b918491600401918252602082015260400190565b6011546601000000000000900460ff161580156123de575060115465010000000000900460ff16155b80156123f45750601154640100000000900460ff165b61240a57612400612361565b61116590836130ce565b612420670de0b6b3a7640000633b9aca0061305f565b612428612361565b610e3791906130ce565b6000546001600160a01b031633146111db5760405163118cdaa760e01b8152336004820152602401610f7b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060610ef87f00000000000000000000000000000000000000000000000000000000000000ff60016126e0565b6060610ef87f310000000000000000000000000000000000000000000000000000000000000160026126e0565b6011805466ff00ff0000000019166601000100000000179055737a250d5630b4cf539739df2c5dacb4c659f2488d63f305d719827f000000000000000000000000b4dfdf86771b6eaeeb9c80c5b8eeb7a72ae659a7856000807f00000000000000000000000008d0839cb03879aa36240dcc5c6449ca929fd29e61258f4261012c613089565b60405160e089901b6001600160e01b03191681526001600160a01b039687166004820152602481019590955260448501939093526064840191909152909216608482015260a481019190915260c40160606040518083038185885af11580156125fc573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906126219190613365565b50506011805466ff000000000000191690555060408051838152602081018390527f5e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5c910161228f565b6000610e37612677611fcc565b8360405161190160f01b8152600281019290925260228201526042902090565b6000806000806126a98888888861278b565b9250925092506126b9828261285a565b50909695505050505050565b806126d557600060188190556019555b6110ae848484612917565b606060ff83146126fa576126f383612b16565b9050610e37565b8180546127069061300f565b80601f01602080910402602001604051908101604052809291908181526020018280546127329061300f565b801561277f5780601f106127545761010080835404028352916020019161277f565b820191906000526020600020905b81548152906001019060200180831161276257829003601f168201915b50505050509050610e37565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156127c65750600091506003905082612850565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa15801561281a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661284657506000925060019150829050612850565b9250600091508190505b9450945094915050565b600082600381111561286e5761286e613393565b03612877575050565b600182600381111561288b5761288b613393565b036128a95760405163f645eedf60e01b815260040160405180910390fd5b60028260038111156128bd576128bd613393565b036128de5760405163fce698f760e01b815260048101829052602401610f7b565b60038260038111156128f2576128f2613393565b03612913576040516335e2f38360e21b815260048101829052602401610f7b565b5050565b601154640100000000900460ff16158061293c575060115465010000000000900460ff165b8061295357506011546601000000000000900460ff165b15612ad157600080600080600061296986612b55565b6001600160a01b038e166000908152600c6020526040902054959a50939850919650945090925061299c91879150613076565b6001600160a01b03808a166000908152600c602052604080822093909355908916815220546129cc908590613089565b6001600160a01b0388166000908152600c60205260409020556129ed612361565b6129f7908261305f565b6001600160a01b037f000000000000000000000000b4dfdf86771b6eaeeb9c80c5b8eeb7a72ae659a7166000908152600c6020526040902054612a3a9190613089565b6001600160a01b037f000000000000000000000000b4dfdf86771b6eaeeb9c80c5b8eeb7a72ae659a7166000908152600c6020526040902055601054612a81908490613076565b6010556040518281526001600160a01b0380891691908a16907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050505050505050565b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161199591815260200190565b60606000612b2383612baa565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b6000806000806000806000806000612b728a601954601854612bd2565b9250925092506000806000612b908d8686612b8b612361565b612c2b565b919f909e50909c50959a5093985091965092945050505050565b600060ff8216601f811115610e3757604051632cd44ac360e21b815260040160405180910390fd5b60008080806064612be3878961305f565b612bed91906130ce565b905060006064612bfd878a61305f565b612c0791906130ce565b905080612c14838a613076565b612c1e9190613076565b9891975095509350505050565b6000808080612c3a858961305f565b90506000612c48868961305f565b905081612c55878961305f565b612c5f8385613076565b612c699190613076565b909a90995090975095505050505050565b80356001600160a01b0381168114612c9157600080fd5b919050565b600060208284031215612ca857600080fd5b612cb182612c7a565b9392505050565b60005b83811015612cd3578181015183820152602001612cbb565b50506000910152565b60008151808452612cf4816020860160208601612cb8565b601f01601f19169290920160200192915050565b602081526000612cb16020830184612cdc565b60008060408385031215612d2e57600080fd5b612d3783612c7a565b946020939093013593505050565b600080600060608486031215612d5a57600080fd5b612d6384612c7a565b9250612d7160208501612c7a565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b600082601f830112612da857600080fd5b813567ffffffffffffffff80821115612dc357612dc3612d81565b604051601f8301601f19908116603f01168101908282118183101715612deb57612deb612d81565b81604052838152866020858801011115612e0457600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215612e3757600080fd5b823567ffffffffffffffff811115612e4e57600080fd5b612e5a85828601612d97565b95602094909401359450505050565b600060208284031215612e7b57600080fd5b5035919050565b60ff60f81b881681526000602060e06020840152612ea360e084018a612cdc565b8381036040850152612eb5818a612cdc565b606085018990526001600160a01b038816608086015260a0850187905284810360c08601528551808252602080880193509091019060005b81811015612f0957835183529284019291840191600101612eed565b50909c9b505050505050505050505050565b600080600060608486031215612f3057600080fd5b833567ffffffffffffffff811115612f4757600080fd5b612f5386828701612d97565b9660208601359650604090950135949350505050565b600080600080600080600060e0888a031215612f8457600080fd5b612f8d88612c7a565b9650612f9b60208901612c7a565b95506040880135945060608801359350608088013560ff81168114612fbf57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215612fef57600080fd5b612ff883612c7a565b915061300660208401612c7a565b90509250929050565b600181811c9082168061302357607f821691505b60208210810361304357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610e3757610e37613049565b81810381811115610e3757610e37613049565b80820180821115610e3757610e37613049565b600082516130ae818460208701612cb8565b9190910192915050565b634e487b7160e01b600052601260045260246000fd5b6000826130dd576130dd6130b8565b500490565b6000602082840312156130f457600080fd5b5051919050565b805169ffffffffffffffffffff81168114612c9157600080fd5b600080600080600060a0868803121561312d57600080fd5b613136866130fb565b9450602086015193506040860151925060608601519150613159608087016130fb565b90509295509295909350565b600082613174576131746130b8565b600160ff1b82146000198414161561318e5761318e613049565b500590565b6000816131a2576131a2613049565b506000190190565b601f821115611503576000816000526020600020601f850160051c810160208610156131d35750805b601f850160051c820191505b81811015611faf578281556001016131df565b815167ffffffffffffffff81111561320c5761320c612d81565b6132208161321a845461300f565b846131aa565b602080601f831160018114613255576000841561323d5750858301515b600019600386901b1c1916600185901b178555611faf565b600085815260208120601f198616915b8281101561328457888601518255948401946001909101908401613265565b50858210156132a25787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b600060a08201878352602087602085015260a0604085015281875180845260c08601915060208901935060005b8181101561331a5784516001600160a01b0316835293830193918301916001016132f5565b50506001600160a01b03969096166060850152505050608001529392505050565b838152821515602082015260606040820152600061335c6060830184612cdc565b95945050505050565b60008060006060848603121561337a57600080fd5b8351925060208401519150604084015190509250925092565b634e487b7160e01b600052602160045260246000fdfea26469706673582212209fddbf76b5f9e230425a466a93cb293d615331c0f279643e1d3264489d18194964736f6c63430008170033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
b53b7ca515051d49e851c07bd0fbdddb8010a9366f5b1f5fb737ba21a4356301
-----Decoded View---------------
Arg [0] : _SALT (uint256): 81973729837545005151646811921962854399656226595465159949066504300143714853633
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : b53b7ca515051d49e851c07bd0fbdddb8010a9366f5b1f5fb737ba21a4356301
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.