Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 191 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Permit | 18730039 | 387 days ago | IN | 0 ETH | 0.00337365 | ||||
Approve | 18723188 | 388 days ago | IN | 0 ETH | 0.00247983 | ||||
Ext Convert WHIR... | 18721373 | 388 days ago | IN | 0 ETH | 0.01075336 | ||||
Approve | 18721356 | 388 days ago | IN | 0 ETH | 0.00257742 | ||||
Approve | 18721349 | 388 days ago | IN | 0 ETH | 0.00419017 | ||||
Approve | 18721284 | 388 days ago | IN | 0 ETH | 0.00348367 | ||||
Approve | 18721273 | 388 days ago | IN | 0 ETH | 0.00354269 | ||||
Approve | 18721200 | 388 days ago | IN | 0 ETH | 0.00352132 | ||||
Approve | 18721142 | 388 days ago | IN | 0 ETH | 0.00354418 | ||||
Approve | 18721111 | 388 days ago | IN | 0 ETH | 0.00325922 | ||||
Approve | 18721108 | 388 days ago | IN | 0 ETH | 0.00282318 | ||||
Approve | 18721059 | 388 days ago | IN | 0 ETH | 0.0027092 | ||||
Approve | 18721057 | 388 days ago | IN | 0 ETH | 0.00274665 | ||||
Approve | 18721043 | 388 days ago | IN | 0 ETH | 0.00284952 | ||||
Approve | 18721039 | 388 days ago | IN | 0 ETH | 0.00290961 | ||||
Approve | 18721036 | 388 days ago | IN | 0 ETH | 0.00298216 | ||||
Approve | 18721033 | 388 days ago | IN | 0 ETH | 0.00293783 | ||||
Approve | 18721033 | 388 days ago | IN | 0 ETH | 0.00293783 | ||||
Approve | 18721033 | 388 days ago | IN | 0 ETH | 0.00293783 | ||||
Approve | 18721033 | 388 days ago | IN | 0 ETH | 0.00298446 | ||||
Approve | 18721033 | 388 days ago | IN | 0 ETH | 0.0030311 | ||||
Approve | 18721033 | 388 days ago | IN | 0 ETH | 0.0030311 | ||||
Approve | 18721032 | 388 days ago | IN | 0 ETH | 0.00520447 | ||||
Approve | 18721029 | 388 days ago | IN | 0 ETH | 0.00284746 | ||||
Approve | 18720967 | 388 days ago | IN | 0 ETH | 0.00319775 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
18721373 | 388 days ago | 8.28182764 ETH | ||||
18721373 | 388 days ago | 8.28182764 ETH | ||||
18721359 | 388 days ago | 0.00366874 ETH | ||||
18721359 | 388 days ago | 0.00183437 ETH | ||||
18721359 | 388 days ago | 0.00183437 ETH | ||||
18721359 | 388 days ago | 0.00733749 ETH | ||||
18721357 | 388 days ago | 0.00603588 ETH | ||||
18721357 | 388 days ago | 0.00301794 ETH | ||||
18721357 | 388 days ago | 0.00301794 ETH | ||||
18721357 | 388 days ago | 0.01205955 ETH | ||||
18721355 | 388 days ago | 0.00001221 ETH | ||||
18721355 | 388 days ago | 0.01741172 ETH | ||||
18721355 | 388 days ago | 0.00870586 ETH | ||||
18721355 | 388 days ago | 0.00870586 ETH | ||||
18721355 | 388 days ago | 0.03482344 ETH | ||||
18721216 | 388 days ago | 0.00679999 ETH | ||||
18721216 | 388 days ago | 0.00339999 ETH | ||||
18721216 | 388 days ago | 0.00339999 ETH | ||||
18721216 | 388 days ago | 0.01358459 ETH | ||||
18721210 | 388 days ago | 0.00001539 ETH | ||||
18721210 | 388 days ago | 0.00731083 ETH | ||||
18721210 | 388 days ago | 0.00365541 ETH | ||||
18721210 | 388 days ago | 0.00365541 ETH | ||||
18721210 | 388 days ago | 0.01457302 ETH | ||||
18721207 | 388 days ago | 0.00004864 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Whirl
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)
/* Telegram → https://t.me/WhirlExchange Twitter → https://twitter.com/WhirlExchange Website → https://whirl.exchange Gitbook → https://docs.whirl.exchange 🥷 Mix tokens via Binance in minutes with our live, working mixer: https://whirl.exchange 💨 Fast. Private. Registration-free. 💰 Hold $WHIRL for premium features and rebates. $WHIRL is licensed under the MIT license. Copyright © 2023 Whirl.Exchange */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.23; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {IERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol"; import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol"; import {IUniswapV2Factory} from "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; import {IUniswapV2Router02} from "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import {AggregatorV3Interface} from "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; contract Whirl is IERC20, IERC20Permit, Ownable, EIP712, Nonces { uint256 internal constant MAX = ~uint256(0); string private _name = "Whirl"; string private constant _symbol = "WHIRL"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _zeroFeeWallet; uint256 private constant _tTotal = 100_000_000 gwei; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 internal constant PADDING_GWEI = 10 ** _decimals; uint256 internal constant PADDING_ETHER = 10 ** (_decimals * 2); uint256 internal constant PADDING_GETHER = PADDING_GWEI * PADDING_ETHER; uint256 internal immutable KECCAK_SEED; bytes32 private constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); address public constant ROUTER = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address public constant FACTORY = 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f; address public constant ORACLE = 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419; address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; uint256 public constant maxBuy = 2_000_000 gwei; uint256 public constant maxWallet = 2_000_000 gwei; uint256 public constant minFeeSwap = 100 gwei; address public constant ZERO_ADDRESS = 0x0000000000000000000000000000000000000000; address public constant DEAD_ADDRESS = 0x000000000000000000000000000000000000dEaD; address public immutable PAIR; address public immutable WHIRL; IUniswapV2Router02 public constant router = IUniswapV2Router02(ROUTER); IUniswapV2Factory public constant factory = IUniswapV2Factory(FACTORY); AggregatorV3Interface public constant oracle = AggregatorV3Interface(ORACLE); IERC20 public constant weth = IERC20(WETH); bool public tradingEnabled = false; bool public maxBuyEnabled = true; bool public maxWalletEnabled = true; bool private _awaitingUniswapCall; bool private _awaitingUniswapTrade; bool private _awaitingUniswapAddLP; uint256 private _buyFeeMarketing = 1; uint256 private _buyFeeInsurance = 1; uint256 private _buyFeeLiquidity = 2; uint256 private _buyFeeReflections = 0; uint256 private _sellFeeMarketing = 1; uint256 private _sellFeeInsurance = 1; uint256 private _sellFeeLiquidity = 2; uint256 private _sellFeeReflections = 0; uint256 private _totalFeeMarketing = _buyFeeMarketing + _sellFeeMarketing; uint256 private _totalFeeInsurance = _buyFeeInsurance + _sellFeeInsurance; uint256 private _totalFeeLiquidity = _buyFeeLiquidity + _sellFeeLiquidity; uint256 private _totalFeeReflections = _buyFeeReflections + _sellFeeReflections; uint256 private _buyFeeTotal = _buyFeeMarketing + _buyFeeInsurance + _buyFeeLiquidity + _buyFeeReflections; uint256 private _sellFeeTotal = _sellFeeMarketing + _sellFeeInsurance + _sellFeeLiquidity + _sellFeeReflections; uint256 private _tFeePct = _buyFeeTotal; uint256 private _rFeePct = 0; address payable public immutable marketingFund = payable(msg.sender); address payable public immutable insuranceFund = payable(msg.sender); address payable public immutable liquidityFund = payable(msg.sender); event FeeSwap(uint256 tokens); event SendMarketingFee(uint256 eth, bool success, bytes data); event SendInsuranceFee(uint256 eth, bool success, bytes data); event SendLiquidityFee(uint256 tokens, uint256 eth); event Burn(uint256 tokens); error ERC2612ExpiredSignature(uint256 deadline); error ERC2612InvalidSigner(address signer, address owner); error KeccakError(); error AllowanceExceeded(uint256 amount, uint256 allowance); error ApprovalFromZero(); error ApprovalToZero(); error TransferFromZero(); error TransferToZero(); error TransferOfZero(); error BalanceExceeded(uint256 amount, uint256 balance); error TradingNotLive(); error MaxBuy(); error MaxWallet(); modifier keccak_verify(string calldata _key) { if (keccak256(abi.encodePacked(_key)) != bytes32(KECCAK_SEED)) { revert KeccakError(); } _; } modifier lockInternalSwap { _awaitingUniswapCall = true; _; _awaitingUniswapCall = false; } constructor(uint256 _KECCAK_SEED) Ownable(msg.sender) EIP712(_name, "1") { WHIRL = address(this); PAIR = factory.createPair(WHIRL, WETH); KECCAK_SEED = _KECCAK_SEED; _zeroFeeWallet[msg.sender] = true; _zeroFeeWallet[WHIRL] = true; _approve(WHIRL, ROUTER, MAX); _approve(msg.sender, ROUTER, MAX); _rOwned[msg.sender] = _rTotal; emit Transfer(ZERO_ADDRESS, msg.sender, _tTotal); } receive() external payable {} fallback() external payable {} 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 AllowanceExceeded(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; } function burn(uint256 value) external virtual { if (value > balanceOf(msg.sender)) { revert BalanceExceeded(value, balanceOf(msg.sender)); } _tokenTransfer(msg.sender, ZERO_ADDRESS, value, false); emit Burn(value); } function burnFrom(address account, uint256 value) external virtual { if (value > balanceOf(account)) { revert BalanceExceeded(value, balanceOf(account)); } _tokenTransfer(account, ZERO_ADDRESS, value, false); uint256 _allowance = _allowances[account][_msgSender()]; if (value > _allowance) { revert AllowanceExceeded(value, _allowance); } _approve(account, _msgSender(), _allowance - value); 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; } 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(); } function getETHPrice() public view returns (uint256) { (, int256 answer,,,) = oracle.latestRoundData(); return uint256(answer / 1e8); } function getWHIRLPrice() public view returns (uint256) { uint256 _pairBalance = balanceOf(PAIR); if (_pairBalance > 0) { return ((weth.balanceOf(PAIR) * getETHPrice()) / _pairBalance); } return 0; } function getWalletValue(address account) external view returns (uint256) { return balanceOf(account) * getWHIRLPrice(); } function getMarketCap() external view returns (uint256) { uint256 _pairBalance = balanceOf(PAIR); if (_pairBalance > 0) { return ((weth.balanceOf(PAIR) * getETHPrice()) / PADDING_ETHER) * (totalSupply() / _pairBalance) * 2; } return 0; } function _approve(address owner, address spender, uint256 amount) private { if (owner == ZERO_ADDRESS) { revert ApprovalFromZero(); } if (spender == ZERO_ADDRESS) { revert ApprovalToZero(); } _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { if (from == ZERO_ADDRESS) { revert TransferFromZero(); } if (to == ZERO_ADDRESS) { revert TransferToZero(); } if (amount == 0) { revert TransferOfZero(); } if (amount > balanceOf(from)) { revert BalanceExceeded(amount, balanceOf(from)); } bool _fromPair = from == PAIR; bool _toPair = to == PAIR; if (from != owner() && to != owner() && from != WHIRL && to != WHIRL) { if (!tradingEnabled) { if (from != WHIRL) { revert TradingNotLive(); } } if (maxBuyEnabled) { if (amount > maxBuy) { revert MaxBuy(); } } if (!_toPair && maxWalletEnabled) { if (balanceOf(to) + amount > maxWallet) { revert MaxWallet(); } } uint256 _contractTokenBalance = balanceOf(WHIRL); if (_contractTokenBalance >= minFeeSwap && !_awaitingUniswapCall && !_fromPair && !_zeroFeeWallet[from] && !_zeroFeeWallet[to]) { uint256 _tTotalFee = _getTBuyFee() + _getTSellFee(); if (_tTotalFee > 0) { uint256 _marketingTokens = _contractTokenBalance * _totalFeeMarketing / _tTotalFee; uint256 _insuranceTokens = _contractTokenBalance * _totalFeeInsurance / _tTotalFee; uint256 _liquidityTokens = _contractTokenBalance - _marketingTokens - _insuranceTokens; uint256 _liquidityTokensHalf = _liquidityTokens / 2; _awaitingUniswapTrade = true; _convertWHIRLToETH(_marketingTokens + _liquidityTokensHalf); _awaitingUniswapTrade = false; uint256 _contractETHBalance = WHIRL.balance; if (_contractETHBalance > 0) { if (_tTotalFee > 0) { uint256 _marketingETH = _contractETHBalance * _totalFeeMarketing / _tTotalFee; if (_marketingETH > 0) { _distributeETH(marketingFund, _marketingETH); } uint256 _insuranceETH = _contractETHBalance * _totalFeeInsurance / _tTotalFee; if (_insuranceETH > 0) { _distributeETH(insuranceFund, _insuranceETH); } uint256 _liquidityETH = _contractETHBalance - _marketingETH - _insuranceETH; if (_liquidityETH > 0) { _supplyETH(_liquidityTokens - _liquidityTokensHalf, _liquidityETH); } } else { _distributeETH(marketingFund, _contractETHBalance); } } } } } bool _takeFee = true; if ((_zeroFeeWallet[from] || _zeroFeeWallet[to]) || (!_fromPair && !_toPair)) { _takeFee = false; } else { if (_fromPair && to != ROUTER) { _tFeePct = _getTBuyFee(); _rFeePct = _getRBuyFee(); } else if (_toPair && from != ROUTER) { _tFeePct = _getTSellFee(); _rFeePct = _getRSellFee(); } else { _takeFee = false; } } _tokenTransfer(from, to, amount, _takeFee); } function _getTBuyFee() private view returns (uint256) { return _buyFeeMarketing + _buyFeeInsurance + _buyFeeLiquidity; } function _getRBuyFee() private view returns (uint256) { return _buyFeeReflections; } function getBuyFee() external view returns (uint256) { return _getTBuyFee() + _getRBuyFee(); } function _getTSellFee() private view returns (uint256) { return _sellFeeMarketing + _sellFeeInsurance + _sellFeeLiquidity; } function _getRSellFee() private view returns (uint256) { return _sellFeeReflections; } function getSellFee() external view returns (uint256) { return _getTSellFee() + _getRSellFee(); } function _convertWHIRLToETH(uint256 _contractTokenBalance) private lockInternalSwap { address[] memory path = new address[](2); path[0] = WHIRL; path[1] = WETH; router.swapExactTokensForETHSupportingFeeOnTransferTokens(_contractTokenBalance, 0, path, WHIRL, block.timestamp + 30 minutes); emit FeeSwap(_contractTokenBalance); } function _distributeETH(address _fund, uint256 _contractETHBalance) private { (bool success, bytes memory data) = payable(_fund).call{value: _contractETHBalance}(""); emit SendMarketingFee(_contractETHBalance, success, data); } function _supplyETH(uint256 _contractTokenBalance, uint256 _contractETHBalance) private lockInternalSwap { _awaitingUniswapAddLP = true; router.addLiquidityETH{value: _contractETHBalance}(WHIRL, _contractTokenBalance, 0, 0, liquidityFund, block.timestamp + 30 minutes); _awaitingUniswapAddLP = false; emit SendLiquidityFee(_contractTokenBalance, _contractETHBalance); } function extConvertWHIRLToETH(string calldata _key, uint256 _contractTokenBalance) external keccak_verify(_key) { if (_contractTokenBalance > 0) { _convertWHIRLToETH(_contractTokenBalance); } uint256 _contractETHBalance = WHIRL.balance; if (_contractETHBalance > 0) { _distributeETH(marketingFund, _contractETHBalance); } } function extDistributeETH(string calldata _key, uint256 _contractETHBalance) external keccak_verify(_key) { if (_contractETHBalance > 0) { _distributeETH(marketingFund, _contractETHBalance); } } function extSupplyETHManual(string calldata _key, uint256 _contractTokenBalance, uint256 _contractETHBalance) external keccak_verify(_key) { _supplyETH(_contractTokenBalance, _contractETHBalance); } function _tokenFromReflection(uint256 rAmount) private view returns (uint256) { if (rAmount > _rTotal) { revert(); } return (!_awaitingUniswapAddLP && !_awaitingUniswapTrade && _awaitingUniswapCall) ? _getRate() / PADDING_GETHER : rAmount / _getRate(); } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if (!takeFee) { _tFeePct = 0; _rFeePct = 0; } _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { if (!_awaitingUniswapCall || _awaitingUniswapTrade || _awaitingUniswapAddLP) { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, , uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender] - rAmount; _rOwned[recipient] = _rOwned[recipient] + rTransferAmount; _rOwned[WHIRL] = _rOwned[WHIRL] + (tTeam * _getRate()); _rTotal = _rTotal - rFee; emit Transfer(sender, recipient, tTransferAmount); } else { emit Transfer(sender, recipient, tAmount); } } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _rFeePct, _tFeePct); (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 feePct) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount * redisFee / 100; uint256 tTeam = tAmount * feePct / 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 getRouter() external pure returns (address) { return ROUTER; } function getFactory() external pure returns (address) { return FACTORY; } function getOracle() external pure returns (address) { return ORACLE; } function getPair() external view returns (address) { return PAIR; } function getMaxBuy() external view returns (bool, uint256) { return (maxBuyEnabled, maxBuyEnabled ? maxBuy : MAX); } function getMaxWallet() external view returns (bool, uint256) { return (maxWalletEnabled, maxWalletEnabled ? maxWallet : MAX); } function getMinFeeSwap() external pure returns (uint256) { return minFeeSwap; } function getFeeWallets() external view returns (address, address, address) { return (marketingFund, insuranceFund, liquidityFund); } function live() external view returns (bool) { return tradingEnabled; } function disableMaxBuy() external onlyOwner { maxBuyEnabled = false; } function disableMaxWallet() external onlyOwner { maxWalletEnabled = false; } function startTrading() external onlyOwner { tradingEnabled = true; } }
// 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/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); } } }
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; }
// 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/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/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) (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":"_KECCAK_SEED","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"allowance","type":"uint256"}],"name":"AllowanceExceeded","type":"error"},{"inputs":[],"name":"ApprovalFromZero","type":"error"},{"inputs":[],"name":"ApprovalToZero","type":"error"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"}],"name":"BalanceExceeded","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":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"currentNonce","type":"uint256"}],"name":"InvalidAccountNonce","type":"error"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[],"name":"KeccakError","type":"error"},{"inputs":[],"name":"MaxBuy","type":"error"},{"inputs":[],"name":"MaxWallet","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"inputs":[],"name":"TradingNotLive","type":"error"},{"inputs":[],"name":"TransferFromZero","type":"error"},{"inputs":[],"name":"TransferOfZero","type":"error"},{"inputs":[],"name":"TransferToZero","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":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokens","type":"uint256"}],"name":"FeeSwap","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":"eth","type":"uint256"},{"indexed":false,"internalType":"bool","name":"success","type":"bool"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"SendInsuranceFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokens","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"eth","type":"uint256"}],"name":"SendLiquidityFee","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":"SendMarketingFee","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":"DEAD_ADDRESS","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":"FACTORY","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ORACLE","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAIR","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"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":"WHIRL","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":"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":[],"name":"disableMaxBuy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableMaxWallet","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":[{"internalType":"string","name":"_key","type":"string"},{"internalType":"uint256","name":"_contractTokenBalance","type":"uint256"}],"name":"extConvertWHIRLToETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_key","type":"string"},{"internalType":"uint256","name":"_contractETHBalance","type":"uint256"}],"name":"extDistributeETH","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":"extSupplyETHManual","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"contract IUniswapV2Factory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBuyFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getETHPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFactory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getFeeWallets","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMarketCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxBuy","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxWallet","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMinFeeSwap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getOracle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getPair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getSellFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWHIRLPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getWalletValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"insuranceFund","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquidityFund","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"live","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketingFund","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxBuy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxBuyEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxWalletEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minFeeSwap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"oracle","outputs":[{"internalType":"contract AggregatorV3Interface","name":"","type":"address"}],"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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startTrading","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":[],"name":"tradingEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","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
61026060405260056102209081526415da1a5c9b60da1b61024052600490620000299082620006da565b506200004067016345785d8a0000600019620007a6565b6200004e90600019620007df565b600955600a805462ffffff1916620101001790556001600b819055600c8190556002600d8190556000600e819055600f83905560108390556011919091556012556200009b9080620007f5565b601355601054600c54620000b09190620007f5565b601455601154600d54620000c59190620007f5565b601555601254600e54620000da9190620007f5565b601655600e54600d54600c54600b54620000f59190620007f5565b620001019190620007f5565b6200010d9190620007f5565b601755601254601154601054600f54620001289190620007f5565b620001349190620007f5565b620001409190620007f5565b6018556017546019556000601a55336101c08190526101e0819052610200523480156200016c57600080fd5b5060405162003af938038062003af98339810160408190526200018f916200080b565b600480546200019e9062000649565b80601f0160208091040260200160405190810160405280929190818152602001828054620001cc9062000649565b80156200021d5780601f10620001f1576101008083540402835291602001916200021d565b820191906000526020600020905b815481529060010190602001808311620001ff57829003601f168201915b50506040805180820190915260018152603160f81b602082015292503391508190506200026557604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6200027081620004b6565b506200027e82600162000506565b610120526200028f81600262000506565b61014052815160208084019190912060e052815190820120610100524660a0526200031d60e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60805250503060c08190526101a08190526040516364e329cb60e11b8152600481019190915273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26024820152735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f9063c9c65396906044016020604051808303816000875af11580156200039c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003c2919062000825565b6001600160a01b0390811661018052610160829052336000908152600860205260408082208054600160ff1991821681179092556101a051948516845291909220805490911690911790556200043090737a250d5630b4cf539739df2c5dacb4c659f2488d6000196200053f565b6200045333737a250d5630b4cf539739df2c5dacb4c659f2488d6000196200053f565b600954336000818152600560205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90620004a79067016345785d8a0000815260200190565b60405180910390a350620008cd565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208351101562000526576200051e83620005f0565b905062000539565b81620005338482620006da565b5060ff90505b92915050565b6001600160a01b0383166200056757604051633ec81b6d60e21b815260040160405180910390fd5b6001600160a01b0382166200058f576040516347242c1560e11b815260040160405180910390fd5b6001600160a01b0383811660008181526007602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600080829050601f815111156200061e578260405163305a27a960e01b81526004016200025c919062000857565b80516200062b82620008a8565b179392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200065e57607f821691505b6020821081036200067f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620006d5576000816000526020600020601f850160051c81016020861015620006b05750805b601f850160051c820191505b81811015620006d157828155600101620006bc565b5050505b505050565b81516001600160401b03811115620006f657620006f662000633565b6200070e8162000707845462000649565b8462000685565b602080601f8311600181146200074657600084156200072d5750858301515b600019600386901b1c1916600185901b178555620006d1565b600085815260208120601f198616915b82811015620007775788860151825594840194600190910190840162000756565b5085821015620007965787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600082620007c457634e487b7160e01b600052601260045260246000fd5b500690565b634e487b7160e01b600052601160045260246000fd5b81810381811115620005395762000539620007c9565b80820180821115620005395762000539620007c9565b6000602082840312156200081e57600080fd5b5051919050565b6000602082840312156200083857600080fd5b81516001600160a01b03811681146200085057600080fd5b9392505050565b60006020808352835180602085015260005b81811015620008875785810183015185820160400152820162000869565b506000604082860101526040601f19601f8301168501019250505092915050565b805160208083015191908110156200067f5760001960209190910360031b1b16919050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516101e051610200516130cb62000a2e6000396000818161064a015281816108b40152612106015260008181610622015281816109c20152611ba90152600081816105fd01528181610b2001528181610f87015281816114e701528181611b5c0152611c0d015260008181610b74015281816114bb0152818161183c0152818161187a015281816118c0015281816119a401528181611b07015281816120e10152818161226b0152818161231d0152818161250d0152612550015260008181610952015281816109f30152818161109301528181611107015281816113330152818161137f01526117ca015260008181610f1301528181610ffd0152611439015260006120870152600061205a01526000611e5101526000611e2901526000611d8401526000611dae01526000611dd801526130cb6000f3fe6080604052600436106103815760003560e01c80638b27278b116101cf578063b46a51a111610101578063dd62ed3e1161009a578063f2fde38b1161006c578063f2fde38b14610b42578063f887ea40146104dc578063f8b45b05146106c4578063fe797cfe14610b6257005b8063dd62ed3e14610a97578063e26ea3a414610add578063e5507f4e14610af6578063f256b13014610b0e57005b8063c45a0155116100d3578063c45a015514610480578063cf6c3e2c14610a37578063d045a32914610a57578063d505accf14610a7757005b8063b46a51a11461099b578063b7902303146109b0578063c1f1b1b5146109e4578063c34e480014610a1757005b806397eccf2a11610173578063a98a934a11610145578063a98a934a1461092b578063ace3a8a714610940578063ad5c464814610561578063b0f479a11461097457005b806397eccf2a146108a2578063a457c2d7146108d6578063a607a8d9146108f6578063a9059cbb1461090b57005b806390825c28116101ac57806390825c2814610832578063957aa58c1461084757806395d89b411461085f57806396790d4a1461088d57005b80638b27278b146107df5780638da5cb5b146107ff5780638f818b901461081d57005b806342966c68116102b357806376b35d811161024c578063831e41581161021e578063831e415814610749578063833b1fce1461076957806384b0196e1461079057806388cc58e4146107b857005b806376b35d81146106f457806379cc6790146107095780637dc0d1d0146105195780637ecebe001461072957005b8063538ba4f911610285578063538ba4f91461068f57806370a08231146106a457806370db69d6146106c4578063715018a6146106df57005b806342966c68146105a85780634ada218b146105c85780634aee3e9f146105e25780634e6fd6c41461067957005b80632dd310001161032557806338013f02116102f757806338013f021461051957806339509351146105415780633fc8cef314610561578063417fd2d61461058957005b80632dd3100014610480578063313ce567146104c057806332fe7b26146104dc5780633644e5151461050457005b806318160ddd1161035e57806318160ddd1461041157806323b872dd14610436578063289af0d814610456578063293230b81461046b57005b806306fdde031461038a578063095ea7b3146103b55780630fa604e4146103e557005b3661038857005b005b34801561039657600080fd5b5061039f610b96565b6040516103ac9190612a1b565b60405180910390f35b3480156103c157600080fd5b506103d56103d0366004612a51565b610c28565b60405190151581526020016103ac565b3480156103f157600080fd5b506103fa610c3f565b6040805192151583526020830191909152016103ac565b34801561041d57600080fd5b5067016345785d8a00005b6040519081526020016103ac565b34801561044257600080fd5b506103d5610451366004612a7b565b610c6e565b34801561046257600080fd5b50610428610cee565b34801561047757600080fd5b50610388610d10565b34801561048c57600080fd5b506104a8735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f81565b6040516001600160a01b0390911681526020016103ac565b3480156104cc57600080fd5b50604051600981526020016103ac565b3480156104e857600080fd5b506104a8737a250d5630b4cf539739df2c5dacb4c659f2488d81565b34801561051057600080fd5b50610428610d27565b34801561052557600080fd5b506104a8735f4ec3df9cbd43714fe2740f5e3616155c5b841981565b34801561054d57600080fd5b506103d561055c366004612a51565b610d31565b34801561056d57600080fd5b506104a873c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b34801561059557600080fd5b50600a546103d590610100900460ff1681565b3480156105b457600080fd5b506103886105c3366004612ab7565b610d68565b3480156105d457600080fd5b50600a546103d59060ff1681565b3480156105ee57600080fd5b50604080516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811682527f0000000000000000000000000000000000000000000000000000000000000000811660208301527f000000000000000000000000000000000000000000000000000000000000000016918101919091526060016103ac565b34801561068557600080fd5b506104a861dead81565b34801561069b57600080fd5b506104a8600081565b3480156106b057600080fd5b506104286106bf366004612ad0565b610de8565b3480156106d057600080fd5b5061042866071afd498d000081565b3480156106eb57600080fd5b50610388610e0a565b34801561070057600080fd5b50610388610e1e565b34801561071557600080fd5b50610388610724366004612a51565b610e33565b34801561073557600080fd5b50610428610744366004612ad0565b610ef1565b34801561075557600080fd5b50610388610764366004612b34565b610f0f565b34801561077557600080fd5b50735f4ec3df9cbd43714fe2740f5e3616155c5b84196104a8565b34801561079c57600080fd5b506107a5610fb3565b6040516103ac9796959493929190612b80565b3480156107c457600080fd5b50735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f6104a8565b3480156107eb57600080fd5b506103886107fa366004612c19565b610ff9565b34801561080b57600080fd5b506000546001600160a01b03166104a8565b34801561082957600080fd5b50610428611078565b34801561083e57600080fd5b5061042861108b565b34801561085357600080fd5b50600a5460ff166103d5565b34801561086b57600080fd5b5060408051808201909152600581526415d212549360da1b602082015261039f565b34801561089957600080fd5b506103fa6111c3565b3480156108ae57600080fd5b506104a87f000000000000000000000000000000000000000000000000000000000000000081565b3480156108e257600080fd5b506103d56108f1366004612a51565b6111e0565b34801561090257600080fd5b50610428611279565b34801561091757600080fd5b506103d5610926366004612a51565b611308565b34801561093757600080fd5b50610388611315565b34801561094c57600080fd5b506104a87f000000000000000000000000000000000000000000000000000000000000000081565b34801561098057600080fd5b50737a250d5630b4cf539739df2c5dacb4c659f2488d6104a8565b3480156109a757600080fd5b5061042861132b565b3480156109bc57600080fd5b506104a87f000000000000000000000000000000000000000000000000000000000000000081565b3480156109f057600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006104a8565b348015610a2357600080fd5b50610428610a32366004612ad0565b611418565b348015610a4357600080fd5b50610388610a52366004612b34565b611435565b348015610a6357600080fd5b50600a546103d59062010000900460ff1681565b348015610a8357600080fd5b50610388610a92366004612c6a565b61150c565b348015610aa357600080fd5b50610428610ab2366004612cdd565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205490565b348015610ae957600080fd5b5061042864174876e80081565b348015610b0257600080fd5b5064174876e800610428565b348015610b1a57600080fd5b506104a87f000000000000000000000000000000000000000000000000000000000000000081565b348015610b4e57600080fd5b50610388610b5d366004612ad0565b611646565b348015610b6e57600080fd5b506104a87f000000000000000000000000000000000000000000000000000000000000000081565b606060048054610ba590612d10565b80601f0160208091040260200160405190810160405280929190818152602001828054610bd190612d10565b8015610c1e5780601f10610bf357610100808354040283529160200191610c1e565b820191906000526020600020905b815481529060010190602001808311610c0157829003601f168201915b5050505050905090565b6000610c35338484611684565b5060015b92915050565b600a54600090819062010000900460ff1680610c5d57600019610c66565b66071afd498d00005b915091509091565b6000610c7b848484611734565b6001600160a01b038416600090815260076020908152604080832033845290915290205480831115610ccf57604051635492412b60e11b815260048101849052602481018290526044015b60405180910390fd5b610ce38533610cde8685612d60565b611684565b506001949350505050565b6000610cf960125490565b610d01611d35565b610d0b9190612d73565b905090565b610d18611d4a565b600a805460ff19166001179055565b6000610d0b611d77565b3360008181526007602090815260408083206001600160a01b03871684529091528120549091610c35918590610cde908690612d73565b610d7133610de8565b811115610da45780610d8233610de8565b60405163f4dcf56b60e01b815260048101929092526024820152604401610cc6565b610db2336000836000611ea2565b6040518181527fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb9060200160405180910390a150565b6001600160a01b038116600090815260056020526040812054610c3990611ec3565b610e12611d4a565b610e1c6000611f6a565b565b610e26611d4a565b600a805461ff0019169055565b610e3c82610de8565b811115610e4d5780610d8283610de8565b610e5b826000836000611ea2565b6001600160a01b038216600090815260076020908152604080832033845290915290205480821115610eaa57604051635492412b60e11b81526004810183905260248101829052604401610cc6565b610eb98333610cde8585612d60565b6040518281527fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb9060200160405180910390a1505050565b6001600160a01b038116600090815260036020526040812054610c39565b82827f000000000000000000000000000000000000000000000000000000000000000060001b8282604051602001610f48929190612d86565b6040516020818303038152906040528051906020012014610f7c576040516323b369c560e21b815260040160405180910390fd5b8215610fac57610fac7f000000000000000000000000000000000000000000000000000000000000000084611fba565b5050505050565b600060608060008060006060610fc7612053565b610fcf612080565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b83837f000000000000000000000000000000000000000000000000000000000000000060001b8282604051602001611032929190612d86565b6040516020818303038152906040528051906020012014611066576040516323b369c560e21b815260040160405180910390fd5b61107084846120ad565b505050505050565b6000611083600e5490565b610d01612220565b6000806110b77f0000000000000000000000000000000000000000000000000000000000000000610de8565b905080156111bb576110d18167016345785d8a0000612dac565b6110dd60096002612dc0565b6110e890600a612ec7565b6110f0611279565b6040516370a0823160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016600482015273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2906370a0823190602401602060405180830381865afa158015611168573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061118c9190612ed6565b6111969190612eef565b6111a09190612dac565b6111aa9190612eef565b6111b5906002612eef565b91505090565b600091505090565b600a546000908190610100900460ff1680610c5d57600019610c66565b3360009081526007602090815260408083206001600160a01b0386168452909152812054828110156112625760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610cc6565b61126f3385858403611684565b5060019392505050565b600080735f4ec3df9cbd43714fe2740f5e3616155c5b84196001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156112ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f29190612f20565b5050509150506305f5e100816111b59190612f70565b6000610c35338484611734565b61131d611d4a565b600a805462ff000019169055565b6000806113577f0000000000000000000000000000000000000000000000000000000000000000610de8565b905080156111bb5780611368611279565b6040516370a0823160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016600482015273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2906370a0823190602401602060405180830381865afa1580156113e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114049190612ed6565b61140e9190612eef565b6111b59190612dac565b600061142261132b565b61142b83610de8565b610c399190612eef565b82827f000000000000000000000000000000000000000000000000000000000000000060001b828260405160200161146e929190612d86565b60405160208183030381529060405280519060200120146114a2576040516323b369c560e21b815260040160405180910390fd5b82156114b1576114b183612235565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016318015611070576110707f000000000000000000000000000000000000000000000000000000000000000082611fba565b834211156115305760405163313c898160e11b815260048101859052602401610cc6565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988888861157d8c6001600160a01b0316600090815260036020526040902080546001810190915590565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e00160405160208183030381529060405280519060200120905060006115d8826123cb565b905060006115e8828787876123f8565b9050896001600160a01b0316816001600160a01b03161461162f576040516325c0072360e11b81526001600160a01b0380831660048301528b166024820152604401610cc6565b61163a8a8a8a611684565b50505050505050505050565b61164e611d4a565b6001600160a01b03811661167857604051631e4fbdf760e01b815260006004820152602401610cc6565b61168181611f6a565b50565b6001600160a01b0383166116ab57604051633ec81b6d60e21b815260040160405180910390fd5b6001600160a01b0382166116d2576040516347242c1560e11b815260040160405180910390fd5b6001600160a01b0383811660008181526007602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b03831661175b5760405163f38f85c360e01b815260040160405180910390fd5b6001600160a01b0382166117825760405163a38ca3d960e01b815260040160405180910390fd5b806000036117a35760405163ef4f660360e01b815260040160405180910390fd5b6117ac83610de8565b8111156117bd5780610d8284610de8565b6001600160a01b038381167f00000000000000000000000000000000000000000000000000000000000000008216908114918416146118046000546001600160a01b031690565b6001600160a01b0316856001600160a01b03161415801561183357506000546001600160a01b03858116911614155b801561187157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316856001600160a01b031614155b80156118af57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b031614155b15611c3c57600a5460ff16611910577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316856001600160a01b031614611910576040516302b7c73360e01b815260040160405180910390fd5b600a54610100900460ff16156119475766071afd498d00008311156119475760405162a2a6e360e51b815260040160405180910390fd5b8015801561195d5750600a5462010000900460ff165b1561199d5766071afd498d00008361197486610de8565b61197e9190612d73565b111561199d57604051630949534d60e31b815260040160405180910390fd5b60006119c87f0000000000000000000000000000000000000000000000000000000000000000610de8565b905064174876e80081101580156119e95750600a546301000000900460ff16155b80156119f3575082155b8015611a1857506001600160a01b03861660009081526008602052604090205460ff16155b8015611a3d57506001600160a01b03851660009081526008602052604090205460ff16155b15611c3a576000611a4c611d35565b611a54612220565b611a5e9190612d73565b90508015611c385760008160135484611a779190612eef565b611a819190612dac565b905060008260145485611a949190612eef565b611a9e9190612dac565b9050600081611aad8487612d60565b611ab79190612d60565b90506000611ac6600283612dac565b600a805464ff0000000019166401000000001790559050611aef611aea8286612d73565b612235565b600a805464ff00000000191690556001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016318015611c32578515611c085760008660135483611b459190612eef565b611b4f9190612dac565b90508015611b8157611b817f000000000000000000000000000000000000000000000000000000000000000082611fba565b60008760145484611b929190612eef565b611b9c9190612dac565b90508015611bce57611bce7f000000000000000000000000000000000000000000000000000000000000000082611fba565b600081611bdb8486612d60565b611be59190612d60565b90508015611c0057611c00611bfa8688612d60565b826120ad565b505050611c32565b611c327f000000000000000000000000000000000000000000000000000000000000000082611fba565b50505050505b505b505b6001600160a01b03851660009081526008602052604090205460019060ff1680611c7e57506001600160a01b03851660009081526008602052604090205460ff165b80611c90575082158015611c90575081155b15611c9d57506000611d29565b828015611cc757506001600160a01b038516737a250d5630b4cf539739df2c5dacb4c659f2488d14155b15611ce357611cd4612220565b601955600e545b601a55611d29565b818015611d0d57506001600160a01b038616737a250d5630b4cf539739df2c5dacb4c659f2488d14155b15611d2557611d1a611d35565b601955601254611cdb565b5060005b61107086868684611ea2565b6000601154601054600f54610d019190612d73565b6000546001600160a01b03163314610e1c5760405163118cdaa760e01b8152336004820152602401610cc6565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015611dd057507f000000000000000000000000000000000000000000000000000000000000000046145b15611dfa57507f000000000000000000000000000000000000000000000000000000000000000090565b610d0b604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b80611eb25760006019819055601a555b611ebd848484612426565b50505050565b6000600954821115611ed457600080fd5b600a5465010000000000900460ff16158015611efb5750600a54640100000000900460ff16155b8015611f105750600a546301000000900460ff165b611f2b57611f1c612622565b611f269083612dac565b610c39565b611f3760096002612dc0565b611f4290600a612ec7565b611f4e6009600a612ec7565b611f589190612eef565b611f60612622565b610c399190612dac565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080836001600160a01b03168360405160006040518083038185875af1925050503d8060008114612008576040519150601f19603f3d011682016040523d82523d6000602084013e61200d565b606091505b50915091507ffceb7297ad5adaa14c4d67ff8ca5ea354d440bf53fdcf8e387f80dffbc6777ec83838360405161204593929190612f9e565b60405180910390a150505050565b6060610d0b7f0000000000000000000000000000000000000000000000000000000000000000600161263a565b6060610d0b7f0000000000000000000000000000000000000000000000000000000000000000600261263a565b600a805465ff00ff000000191665010001000000179055737a250d5630b4cf539739df2c5dacb4c659f2488d63f305d719827f0000000000000000000000000000000000000000000000000000000000000000856000807f000000000000000000000000000000000000000000000000000000000000000061213142610708612d73565b60405160e089901b6001600160e01b03191681526001600160a01b039687166004820152602481019590955260448501939093526064840191909152909216608482015260a481019190915260c40160606040518083038185885af115801561219e573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906121c39190612fc8565b5050600a805465ff0000000000191690555060408051838152602081018390527f255bf213400477e336cd345f579495e48d7fe558c06f79c351ef9c323e9e550b91015b60405180910390a15050600a805463ff00000019169055565b6000600d54600c54600b54610d019190612d73565b600a805463ff000000191663010000001790556040805160028082526060820183526000926020830190803683370190505090507f00000000000000000000000000000000000000000000000000000000000000008160008151811061229d5761229d612ff6565b60200260200101906001600160a01b031690816001600160a01b03168152505073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2816001815181106122e5576122e5612ff6565b6001600160a01b0390921660209283029190910190910152737a250d5630b4cf539739df2c5dacb4c659f2488d63791ac947836000847f000000000000000000000000000000000000000000000000000000000000000061234842610708612d73565b6040518663ffffffff1660e01b815260040161236895949392919061300c565b600060405180830381600087803b15801561238257600080fd5b505af1158015612396573d6000803e3d6000fd5b505050507f1cfca31204cc745553128283c3bd97acb07e803bd611f352db637c644eb59b878260405161220791815260200190565b6000610c396123d8611d77565b8360405161190160f01b8152600281019290925260228201526042902090565b60008060008061240a888888886126e5565b92509250925061241a82826127b4565b50909695505050505050565b600a546301000000900460ff1615806124495750600a54640100000000900460ff165b8061245f5750600a5465010000000000900460ff165b156125dd57600080600080600061247586612871565b6001600160a01b038e16600090815260056020526040902054959a5093985091965094509092506124a891879150612d60565b6001600160a01b03808a1660009081526005602052604080822093909355908916815220546124d8908590612d73565b6001600160a01b0388166000908152600560205260409020556124f9612622565b6125039082612eef565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166000908152600560205260409020546125469190612d73565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660009081526005602052604090205560095461258d908490612d60565b6009556040518281526001600160a01b0380891691908a16907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050505050505050565b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161172791815260200190565b600067016345785d8a0000600954610d0b9190612dac565b606060ff83146126545761264d836128c6565b9050610c39565b81805461266090612d10565b80601f016020809104026020016040519081016040528092919081815260200182805461268c90612d10565b80156126d95780601f106126ae576101008083540402835291602001916126d9565b820191906000526020600020905b8154815290600101906020018083116126bc57829003601f168201915b50505050509050610c39565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111561272057506000915060039050826127aa565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015612774573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166127a0575060009250600191508290506127aa565b9250600091508190505b9450945094915050565b60008260038111156127c8576127c861307f565b036127d1575050565b60018260038111156127e5576127e561307f565b036128035760405163f645eedf60e01b815260040160405180910390fd5b60028260038111156128175761281761307f565b036128385760405163fce698f760e01b815260048101829052602401610cc6565b600382600381111561284c5761284c61307f565b0361286d576040516335e2f38360e21b815260048101829052602401610cc6565b5050565b600080600080600080600080600061288e8a601a54601954612905565b92509250925060008060006128ac8d86866128a7612622565b61295e565b919f909e50909c50959a5093985091965092945050505050565b606060006128d3836129ad565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b600080808060646129168789612eef565b6129209190612dac565b905060006064612930878a612eef565b61293a9190612dac565b905080612947838a612d60565b6129519190612d60565b9891975095509350505050565b600080808061296d8589612eef565b9050600061297b8689612eef565b9050816129888789612eef565b6129928385612d60565b61299c9190612d60565b909a90995090975095505050505050565b600060ff8216601f811115610c3957604051632cd44ac360e21b815260040160405180910390fd5b6000815180845260005b818110156129fb576020818501810151868301820152016129df565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000612a2e60208301846129d5565b9392505050565b80356001600160a01b0381168114612a4c57600080fd5b919050565b60008060408385031215612a6457600080fd5b612a6d83612a35565b946020939093013593505050565b600080600060608486031215612a9057600080fd5b612a9984612a35565b9250612aa760208501612a35565b9150604084013590509250925092565b600060208284031215612ac957600080fd5b5035919050565b600060208284031215612ae257600080fd5b612a2e82612a35565b60008083601f840112612afd57600080fd5b50813567ffffffffffffffff811115612b1557600080fd5b602083019150836020828501011115612b2d57600080fd5b9250929050565b600080600060408486031215612b4957600080fd5b833567ffffffffffffffff811115612b6057600080fd5b612b6c86828701612aeb565b909790965060209590950135949350505050565b60ff60f81b881681526000602060e06020840152612ba160e084018a6129d5565b8381036040850152612bb3818a6129d5565b606085018990526001600160a01b038816608086015260a0850187905284810360c08601528551808252602080880193509091019060005b81811015612c0757835183529284019291840191600101612beb565b50909c9b505050505050505050505050565b60008060008060608587031215612c2f57600080fd5b843567ffffffffffffffff811115612c4657600080fd5b612c5287828801612aeb565b90989097506020870135966040013595509350505050565b600080600080600080600060e0888a031215612c8557600080fd5b612c8e88612a35565b9650612c9c60208901612a35565b95506040880135945060608801359350608088013560ff81168114612cc057600080fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215612cf057600080fd5b612cf983612a35565b9150612d0760208401612a35565b90509250929050565b600181811c90821680612d2457607f821691505b602082108103612d4457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610c3957610c39612d4a565b80820180821115610c3957610c39612d4a565b8183823760009101908152919050565b634e487b7160e01b600052601260045260246000fd5b600082612dbb57612dbb612d96565b500490565b60ff8181168382160290811690818114612ddc57612ddc612d4a565b5092915050565b600181815b80851115612e1e578160001904821115612e0457612e04612d4a565b80851615612e1157918102915b93841c9390800290612de8565b509250929050565b600082612e3557506001610c39565b81612e4257506000610c39565b8160018114612e585760028114612e6257612e7e565b6001915050610c39565b60ff841115612e7357612e73612d4a565b50506001821b610c39565b5060208310610133831016604e8410600b8410161715612ea1575081810a610c39565b612eab8383612de3565b8060001904821115612ebf57612ebf612d4a565b029392505050565b6000612a2e60ff841683612e26565b600060208284031215612ee857600080fd5b5051919050565b8082028115828204841417610c3957610c39612d4a565b805169ffffffffffffffffffff81168114612a4c57600080fd5b600080600080600060a08688031215612f3857600080fd5b612f4186612f06565b9450602086015193506040860151925060608601519150612f6460808701612f06565b90509295509295909350565b600082612f7f57612f7f612d96565b600160ff1b821460001984141615612f9957612f99612d4a565b500590565b8381528215156020820152606060408201526000612fbf60608301846129d5565b95945050505050565b600080600060608486031215612fdd57600080fd5b8351925060208401519150604084015190509250925092565b634e487b7160e01b600052603260045260246000fd5b600060a08201878352602087602085015260a0604085015281875180845260c08601915060208901935060005b8181101561305e5784516001600160a01b031683529383019391830191600101613039565b50506001600160a01b03969096166060850152505050608001529392505050565b634e487b7160e01b600052602160045260246000fdfea26469706673582212205fe089d1c9f6ce5b1d4d0847855a0da525d134451c9385c715b8e4e935106aca64736f6c63430008170033d8afe1c66252cc93792010b8432e17501ccecb68d6d68c7e1008a02c4fad6208
Deployed Bytecode
0x6080604052600436106103815760003560e01c80638b27278b116101cf578063b46a51a111610101578063dd62ed3e1161009a578063f2fde38b1161006c578063f2fde38b14610b42578063f887ea40146104dc578063f8b45b05146106c4578063fe797cfe14610b6257005b8063dd62ed3e14610a97578063e26ea3a414610add578063e5507f4e14610af6578063f256b13014610b0e57005b8063c45a0155116100d3578063c45a015514610480578063cf6c3e2c14610a37578063d045a32914610a57578063d505accf14610a7757005b8063b46a51a11461099b578063b7902303146109b0578063c1f1b1b5146109e4578063c34e480014610a1757005b806397eccf2a11610173578063a98a934a11610145578063a98a934a1461092b578063ace3a8a714610940578063ad5c464814610561578063b0f479a11461097457005b806397eccf2a146108a2578063a457c2d7146108d6578063a607a8d9146108f6578063a9059cbb1461090b57005b806390825c28116101ac57806390825c2814610832578063957aa58c1461084757806395d89b411461085f57806396790d4a1461088d57005b80638b27278b146107df5780638da5cb5b146107ff5780638f818b901461081d57005b806342966c68116102b357806376b35d811161024c578063831e41581161021e578063831e415814610749578063833b1fce1461076957806384b0196e1461079057806388cc58e4146107b857005b806376b35d81146106f457806379cc6790146107095780637dc0d1d0146105195780637ecebe001461072957005b8063538ba4f911610285578063538ba4f91461068f57806370a08231146106a457806370db69d6146106c4578063715018a6146106df57005b806342966c68146105a85780634ada218b146105c85780634aee3e9f146105e25780634e6fd6c41461067957005b80632dd310001161032557806338013f02116102f757806338013f021461051957806339509351146105415780633fc8cef314610561578063417fd2d61461058957005b80632dd3100014610480578063313ce567146104c057806332fe7b26146104dc5780633644e5151461050457005b806318160ddd1161035e57806318160ddd1461041157806323b872dd14610436578063289af0d814610456578063293230b81461046b57005b806306fdde031461038a578063095ea7b3146103b55780630fa604e4146103e557005b3661038857005b005b34801561039657600080fd5b5061039f610b96565b6040516103ac9190612a1b565b60405180910390f35b3480156103c157600080fd5b506103d56103d0366004612a51565b610c28565b60405190151581526020016103ac565b3480156103f157600080fd5b506103fa610c3f565b6040805192151583526020830191909152016103ac565b34801561041d57600080fd5b5067016345785d8a00005b6040519081526020016103ac565b34801561044257600080fd5b506103d5610451366004612a7b565b610c6e565b34801561046257600080fd5b50610428610cee565b34801561047757600080fd5b50610388610d10565b34801561048c57600080fd5b506104a8735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f81565b6040516001600160a01b0390911681526020016103ac565b3480156104cc57600080fd5b50604051600981526020016103ac565b3480156104e857600080fd5b506104a8737a250d5630b4cf539739df2c5dacb4c659f2488d81565b34801561051057600080fd5b50610428610d27565b34801561052557600080fd5b506104a8735f4ec3df9cbd43714fe2740f5e3616155c5b841981565b34801561054d57600080fd5b506103d561055c366004612a51565b610d31565b34801561056d57600080fd5b506104a873c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b34801561059557600080fd5b50600a546103d590610100900460ff1681565b3480156105b457600080fd5b506103886105c3366004612ab7565b610d68565b3480156105d457600080fd5b50600a546103d59060ff1681565b3480156105ee57600080fd5b50604080516001600160a01b037f000000000000000000000000da8c0832a8a65e1f127beca34f90d0b32397a210811682527f000000000000000000000000da8c0832a8a65e1f127beca34f90d0b32397a210811660208301527f000000000000000000000000da8c0832a8a65e1f127beca34f90d0b32397a21016918101919091526060016103ac565b34801561068557600080fd5b506104a861dead81565b34801561069b57600080fd5b506104a8600081565b3480156106b057600080fd5b506104286106bf366004612ad0565b610de8565b3480156106d057600080fd5b5061042866071afd498d000081565b3480156106eb57600080fd5b50610388610e0a565b34801561070057600080fd5b50610388610e1e565b34801561071557600080fd5b50610388610724366004612a51565b610e33565b34801561073557600080fd5b50610428610744366004612ad0565b610ef1565b34801561075557600080fd5b50610388610764366004612b34565b610f0f565b34801561077557600080fd5b50735f4ec3df9cbd43714fe2740f5e3616155c5b84196104a8565b34801561079c57600080fd5b506107a5610fb3565b6040516103ac9796959493929190612b80565b3480156107c457600080fd5b50735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f6104a8565b3480156107eb57600080fd5b506103886107fa366004612c19565b610ff9565b34801561080b57600080fd5b506000546001600160a01b03166104a8565b34801561082957600080fd5b50610428611078565b34801561083e57600080fd5b5061042861108b565b34801561085357600080fd5b50600a5460ff166103d5565b34801561086b57600080fd5b5060408051808201909152600581526415d212549360da1b602082015261039f565b34801561089957600080fd5b506103fa6111c3565b3480156108ae57600080fd5b506104a87f000000000000000000000000da8c0832a8a65e1f127beca34f90d0b32397a21081565b3480156108e257600080fd5b506103d56108f1366004612a51565b6111e0565b34801561090257600080fd5b50610428611279565b34801561091757600080fd5b506103d5610926366004612a51565b611308565b34801561093757600080fd5b50610388611315565b34801561094c57600080fd5b506104a87f000000000000000000000000975aa190dd749377c84ef520b3d87f543563c5ea81565b34801561098057600080fd5b50737a250d5630b4cf539739df2c5dacb4c659f2488d6104a8565b3480156109a757600080fd5b5061042861132b565b3480156109bc57600080fd5b506104a87f000000000000000000000000da8c0832a8a65e1f127beca34f90d0b32397a21081565b3480156109f057600080fd5b507f000000000000000000000000975aa190dd749377c84ef520b3d87f543563c5ea6104a8565b348015610a2357600080fd5b50610428610a32366004612ad0565b611418565b348015610a4357600080fd5b50610388610a52366004612b34565b611435565b348015610a6357600080fd5b50600a546103d59062010000900460ff1681565b348015610a8357600080fd5b50610388610a92366004612c6a565b61150c565b348015610aa357600080fd5b50610428610ab2366004612cdd565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205490565b348015610ae957600080fd5b5061042864174876e80081565b348015610b0257600080fd5b5064174876e800610428565b348015610b1a57600080fd5b506104a87f000000000000000000000000da8c0832a8a65e1f127beca34f90d0b32397a21081565b348015610b4e57600080fd5b50610388610b5d366004612ad0565b611646565b348015610b6e57600080fd5b506104a87f0000000000000000000000003235bc7ed37c522ecfb171748a74001f15a0897e81565b606060048054610ba590612d10565b80601f0160208091040260200160405190810160405280929190818152602001828054610bd190612d10565b8015610c1e5780601f10610bf357610100808354040283529160200191610c1e565b820191906000526020600020905b815481529060010190602001808311610c0157829003601f168201915b5050505050905090565b6000610c35338484611684565b5060015b92915050565b600a54600090819062010000900460ff1680610c5d57600019610c66565b66071afd498d00005b915091509091565b6000610c7b848484611734565b6001600160a01b038416600090815260076020908152604080832033845290915290205480831115610ccf57604051635492412b60e11b815260048101849052602481018290526044015b60405180910390fd5b610ce38533610cde8685612d60565b611684565b506001949350505050565b6000610cf960125490565b610d01611d35565b610d0b9190612d73565b905090565b610d18611d4a565b600a805460ff19166001179055565b6000610d0b611d77565b3360008181526007602090815260408083206001600160a01b03871684529091528120549091610c35918590610cde908690612d73565b610d7133610de8565b811115610da45780610d8233610de8565b60405163f4dcf56b60e01b815260048101929092526024820152604401610cc6565b610db2336000836000611ea2565b6040518181527fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb9060200160405180910390a150565b6001600160a01b038116600090815260056020526040812054610c3990611ec3565b610e12611d4a565b610e1c6000611f6a565b565b610e26611d4a565b600a805461ff0019169055565b610e3c82610de8565b811115610e4d5780610d8283610de8565b610e5b826000836000611ea2565b6001600160a01b038216600090815260076020908152604080832033845290915290205480821115610eaa57604051635492412b60e11b81526004810183905260248101829052604401610cc6565b610eb98333610cde8585612d60565b6040518281527fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb9060200160405180910390a1505050565b6001600160a01b038116600090815260036020526040812054610c39565b82827fd8afe1c66252cc93792010b8432e17501ccecb68d6d68c7e1008a02c4fad620860001b8282604051602001610f48929190612d86565b6040516020818303038152906040528051906020012014610f7c576040516323b369c560e21b815260040160405180910390fd5b8215610fac57610fac7f000000000000000000000000da8c0832a8a65e1f127beca34f90d0b32397a21084611fba565b5050505050565b600060608060008060006060610fc7612053565b610fcf612080565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b83837fd8afe1c66252cc93792010b8432e17501ccecb68d6d68c7e1008a02c4fad620860001b8282604051602001611032929190612d86565b6040516020818303038152906040528051906020012014611066576040516323b369c560e21b815260040160405180910390fd5b61107084846120ad565b505050505050565b6000611083600e5490565b610d01612220565b6000806110b77f000000000000000000000000975aa190dd749377c84ef520b3d87f543563c5ea610de8565b905080156111bb576110d18167016345785d8a0000612dac565b6110dd60096002612dc0565b6110e890600a612ec7565b6110f0611279565b6040516370a0823160e01b81526001600160a01b037f000000000000000000000000975aa190dd749377c84ef520b3d87f543563c5ea16600482015273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2906370a0823190602401602060405180830381865afa158015611168573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061118c9190612ed6565b6111969190612eef565b6111a09190612dac565b6111aa9190612eef565b6111b5906002612eef565b91505090565b600091505090565b600a546000908190610100900460ff1680610c5d57600019610c66565b3360009081526007602090815260408083206001600160a01b0386168452909152812054828110156112625760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610cc6565b61126f3385858403611684565b5060019392505050565b600080735f4ec3df9cbd43714fe2740f5e3616155c5b84196001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156112ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f29190612f20565b5050509150506305f5e100816111b59190612f70565b6000610c35338484611734565b61131d611d4a565b600a805462ff000019169055565b6000806113577f000000000000000000000000975aa190dd749377c84ef520b3d87f543563c5ea610de8565b905080156111bb5780611368611279565b6040516370a0823160e01b81526001600160a01b037f000000000000000000000000975aa190dd749377c84ef520b3d87f543563c5ea16600482015273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2906370a0823190602401602060405180830381865afa1580156113e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114049190612ed6565b61140e9190612eef565b6111b59190612dac565b600061142261132b565b61142b83610de8565b610c399190612eef565b82827fd8afe1c66252cc93792010b8432e17501ccecb68d6d68c7e1008a02c4fad620860001b828260405160200161146e929190612d86565b60405160208183030381529060405280519060200120146114a2576040516323b369c560e21b815260040160405180910390fd5b82156114b1576114b183612235565b6001600160a01b037f0000000000000000000000003235bc7ed37c522ecfb171748a74001f15a0897e16318015611070576110707f000000000000000000000000da8c0832a8a65e1f127beca34f90d0b32397a21082611fba565b834211156115305760405163313c898160e11b815260048101859052602401610cc6565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988888861157d8c6001600160a01b0316600090815260036020526040902080546001810190915590565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e00160405160208183030381529060405280519060200120905060006115d8826123cb565b905060006115e8828787876123f8565b9050896001600160a01b0316816001600160a01b03161461162f576040516325c0072360e11b81526001600160a01b0380831660048301528b166024820152604401610cc6565b61163a8a8a8a611684565b50505050505050505050565b61164e611d4a565b6001600160a01b03811661167857604051631e4fbdf760e01b815260006004820152602401610cc6565b61168181611f6a565b50565b6001600160a01b0383166116ab57604051633ec81b6d60e21b815260040160405180910390fd5b6001600160a01b0382166116d2576040516347242c1560e11b815260040160405180910390fd5b6001600160a01b0383811660008181526007602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b03831661175b5760405163f38f85c360e01b815260040160405180910390fd5b6001600160a01b0382166117825760405163a38ca3d960e01b815260040160405180910390fd5b806000036117a35760405163ef4f660360e01b815260040160405180910390fd5b6117ac83610de8565b8111156117bd5780610d8284610de8565b6001600160a01b038381167f000000000000000000000000975aa190dd749377c84ef520b3d87f543563c5ea8216908114918416146118046000546001600160a01b031690565b6001600160a01b0316856001600160a01b03161415801561183357506000546001600160a01b03858116911614155b801561187157507f0000000000000000000000003235bc7ed37c522ecfb171748a74001f15a0897e6001600160a01b0316856001600160a01b031614155b80156118af57507f0000000000000000000000003235bc7ed37c522ecfb171748a74001f15a0897e6001600160a01b0316846001600160a01b031614155b15611c3c57600a5460ff16611910577f0000000000000000000000003235bc7ed37c522ecfb171748a74001f15a0897e6001600160a01b0316856001600160a01b031614611910576040516302b7c73360e01b815260040160405180910390fd5b600a54610100900460ff16156119475766071afd498d00008311156119475760405162a2a6e360e51b815260040160405180910390fd5b8015801561195d5750600a5462010000900460ff165b1561199d5766071afd498d00008361197486610de8565b61197e9190612d73565b111561199d57604051630949534d60e31b815260040160405180910390fd5b60006119c87f0000000000000000000000003235bc7ed37c522ecfb171748a74001f15a0897e610de8565b905064174876e80081101580156119e95750600a546301000000900460ff16155b80156119f3575082155b8015611a1857506001600160a01b03861660009081526008602052604090205460ff16155b8015611a3d57506001600160a01b03851660009081526008602052604090205460ff16155b15611c3a576000611a4c611d35565b611a54612220565b611a5e9190612d73565b90508015611c385760008160135484611a779190612eef565b611a819190612dac565b905060008260145485611a949190612eef565b611a9e9190612dac565b9050600081611aad8487612d60565b611ab79190612d60565b90506000611ac6600283612dac565b600a805464ff0000000019166401000000001790559050611aef611aea8286612d73565b612235565b600a805464ff00000000191690556001600160a01b037f0000000000000000000000003235bc7ed37c522ecfb171748a74001f15a0897e16318015611c32578515611c085760008660135483611b459190612eef565b611b4f9190612dac565b90508015611b8157611b817f000000000000000000000000da8c0832a8a65e1f127beca34f90d0b32397a21082611fba565b60008760145484611b929190612eef565b611b9c9190612dac565b90508015611bce57611bce7f000000000000000000000000da8c0832a8a65e1f127beca34f90d0b32397a21082611fba565b600081611bdb8486612d60565b611be59190612d60565b90508015611c0057611c00611bfa8688612d60565b826120ad565b505050611c32565b611c327f000000000000000000000000da8c0832a8a65e1f127beca34f90d0b32397a21082611fba565b50505050505b505b505b6001600160a01b03851660009081526008602052604090205460019060ff1680611c7e57506001600160a01b03851660009081526008602052604090205460ff165b80611c90575082158015611c90575081155b15611c9d57506000611d29565b828015611cc757506001600160a01b038516737a250d5630b4cf539739df2c5dacb4c659f2488d14155b15611ce357611cd4612220565b601955600e545b601a55611d29565b818015611d0d57506001600160a01b038616737a250d5630b4cf539739df2c5dacb4c659f2488d14155b15611d2557611d1a611d35565b601955601254611cdb565b5060005b61107086868684611ea2565b6000601154601054600f54610d019190612d73565b6000546001600160a01b03163314610e1c5760405163118cdaa760e01b8152336004820152602401610cc6565b6000306001600160a01b037f0000000000000000000000003235bc7ed37c522ecfb171748a74001f15a0897e16148015611dd057507f000000000000000000000000000000000000000000000000000000000000000146145b15611dfa57507f3c05bd6d676df6a892983d690d95336d9a9e7c4d40e160757886e0f1a16fd0bf90565b610d0b604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527fd59a1f46cf94e6e7af34137595cbabbd1314d0d4146803234a12cbc73d8fbceb918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b80611eb25760006019819055601a555b611ebd848484612426565b50505050565b6000600954821115611ed457600080fd5b600a5465010000000000900460ff16158015611efb5750600a54640100000000900460ff16155b8015611f105750600a546301000000900460ff165b611f2b57611f1c612622565b611f269083612dac565b610c39565b611f3760096002612dc0565b611f4290600a612ec7565b611f4e6009600a612ec7565b611f589190612eef565b611f60612622565b610c399190612dac565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080836001600160a01b03168360405160006040518083038185875af1925050503d8060008114612008576040519150601f19603f3d011682016040523d82523d6000602084013e61200d565b606091505b50915091507ffceb7297ad5adaa14c4d67ff8ca5ea354d440bf53fdcf8e387f80dffbc6777ec83838360405161204593929190612f9e565b60405180910390a150505050565b6060610d0b7f576869726c000000000000000000000000000000000000000000000000000005600161263a565b6060610d0b7f3100000000000000000000000000000000000000000000000000000000000001600261263a565b600a805465ff00ff000000191665010001000000179055737a250d5630b4cf539739df2c5dacb4c659f2488d63f305d719827f0000000000000000000000003235bc7ed37c522ecfb171748a74001f15a0897e856000807f000000000000000000000000da8c0832a8a65e1f127beca34f90d0b32397a21061213142610708612d73565b60405160e089901b6001600160e01b03191681526001600160a01b039687166004820152602481019590955260448501939093526064840191909152909216608482015260a481019190915260c40160606040518083038185885af115801561219e573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906121c39190612fc8565b5050600a805465ff0000000000191690555060408051838152602081018390527f255bf213400477e336cd345f579495e48d7fe558c06f79c351ef9c323e9e550b91015b60405180910390a15050600a805463ff00000019169055565b6000600d54600c54600b54610d019190612d73565b600a805463ff000000191663010000001790556040805160028082526060820183526000926020830190803683370190505090507f0000000000000000000000003235bc7ed37c522ecfb171748a74001f15a0897e8160008151811061229d5761229d612ff6565b60200260200101906001600160a01b031690816001600160a01b03168152505073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2816001815181106122e5576122e5612ff6565b6001600160a01b0390921660209283029190910190910152737a250d5630b4cf539739df2c5dacb4c659f2488d63791ac947836000847f0000000000000000000000003235bc7ed37c522ecfb171748a74001f15a0897e61234842610708612d73565b6040518663ffffffff1660e01b815260040161236895949392919061300c565b600060405180830381600087803b15801561238257600080fd5b505af1158015612396573d6000803e3d6000fd5b505050507f1cfca31204cc745553128283c3bd97acb07e803bd611f352db637c644eb59b878260405161220791815260200190565b6000610c396123d8611d77565b8360405161190160f01b8152600281019290925260228201526042902090565b60008060008061240a888888886126e5565b92509250925061241a82826127b4565b50909695505050505050565b600a546301000000900460ff1615806124495750600a54640100000000900460ff165b8061245f5750600a5465010000000000900460ff165b156125dd57600080600080600061247586612871565b6001600160a01b038e16600090815260056020526040902054959a5093985091965094509092506124a891879150612d60565b6001600160a01b03808a1660009081526005602052604080822093909355908916815220546124d8908590612d73565b6001600160a01b0388166000908152600560205260409020556124f9612622565b6125039082612eef565b6001600160a01b037f0000000000000000000000003235bc7ed37c522ecfb171748a74001f15a0897e166000908152600560205260409020546125469190612d73565b6001600160a01b037f0000000000000000000000003235bc7ed37c522ecfb171748a74001f15a0897e1660009081526005602052604090205560095461258d908490612d60565b6009556040518281526001600160a01b0380891691908a16907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050505050505050565b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161172791815260200190565b600067016345785d8a0000600954610d0b9190612dac565b606060ff83146126545761264d836128c6565b9050610c39565b81805461266090612d10565b80601f016020809104026020016040519081016040528092919081815260200182805461268c90612d10565b80156126d95780601f106126ae576101008083540402835291602001916126d9565b820191906000526020600020905b8154815290600101906020018083116126bc57829003601f168201915b50505050509050610c39565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111561272057506000915060039050826127aa565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015612774573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166127a0575060009250600191508290506127aa565b9250600091508190505b9450945094915050565b60008260038111156127c8576127c861307f565b036127d1575050565b60018260038111156127e5576127e561307f565b036128035760405163f645eedf60e01b815260040160405180910390fd5b60028260038111156128175761281761307f565b036128385760405163fce698f760e01b815260048101829052602401610cc6565b600382600381111561284c5761284c61307f565b0361286d576040516335e2f38360e21b815260048101829052602401610cc6565b5050565b600080600080600080600080600061288e8a601a54601954612905565b92509250925060008060006128ac8d86866128a7612622565b61295e565b919f909e50909c50959a5093985091965092945050505050565b606060006128d3836129ad565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b600080808060646129168789612eef565b6129209190612dac565b905060006064612930878a612eef565b61293a9190612dac565b905080612947838a612d60565b6129519190612d60565b9891975095509350505050565b600080808061296d8589612eef565b9050600061297b8689612eef565b9050816129888789612eef565b6129928385612d60565b61299c9190612d60565b909a90995090975095505050505050565b600060ff8216601f811115610c3957604051632cd44ac360e21b815260040160405180910390fd5b6000815180845260005b818110156129fb576020818501810151868301820152016129df565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000612a2e60208301846129d5565b9392505050565b80356001600160a01b0381168114612a4c57600080fd5b919050565b60008060408385031215612a6457600080fd5b612a6d83612a35565b946020939093013593505050565b600080600060608486031215612a9057600080fd5b612a9984612a35565b9250612aa760208501612a35565b9150604084013590509250925092565b600060208284031215612ac957600080fd5b5035919050565b600060208284031215612ae257600080fd5b612a2e82612a35565b60008083601f840112612afd57600080fd5b50813567ffffffffffffffff811115612b1557600080fd5b602083019150836020828501011115612b2d57600080fd5b9250929050565b600080600060408486031215612b4957600080fd5b833567ffffffffffffffff811115612b6057600080fd5b612b6c86828701612aeb565b909790965060209590950135949350505050565b60ff60f81b881681526000602060e06020840152612ba160e084018a6129d5565b8381036040850152612bb3818a6129d5565b606085018990526001600160a01b038816608086015260a0850187905284810360c08601528551808252602080880193509091019060005b81811015612c0757835183529284019291840191600101612beb565b50909c9b505050505050505050505050565b60008060008060608587031215612c2f57600080fd5b843567ffffffffffffffff811115612c4657600080fd5b612c5287828801612aeb565b90989097506020870135966040013595509350505050565b600080600080600080600060e0888a031215612c8557600080fd5b612c8e88612a35565b9650612c9c60208901612a35565b95506040880135945060608801359350608088013560ff81168114612cc057600080fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215612cf057600080fd5b612cf983612a35565b9150612d0760208401612a35565b90509250929050565b600181811c90821680612d2457607f821691505b602082108103612d4457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610c3957610c39612d4a565b80820180821115610c3957610c39612d4a565b8183823760009101908152919050565b634e487b7160e01b600052601260045260246000fd5b600082612dbb57612dbb612d96565b500490565b60ff8181168382160290811690818114612ddc57612ddc612d4a565b5092915050565b600181815b80851115612e1e578160001904821115612e0457612e04612d4a565b80851615612e1157918102915b93841c9390800290612de8565b509250929050565b600082612e3557506001610c39565b81612e4257506000610c39565b8160018114612e585760028114612e6257612e7e565b6001915050610c39565b60ff841115612e7357612e73612d4a565b50506001821b610c39565b5060208310610133831016604e8410600b8410161715612ea1575081810a610c39565b612eab8383612de3565b8060001904821115612ebf57612ebf612d4a565b029392505050565b6000612a2e60ff841683612e26565b600060208284031215612ee857600080fd5b5051919050565b8082028115828204841417610c3957610c39612d4a565b805169ffffffffffffffffffff81168114612a4c57600080fd5b600080600080600060a08688031215612f3857600080fd5b612f4186612f06565b9450602086015193506040860151925060608601519150612f6460808701612f06565b90509295509295909350565b600082612f7f57612f7f612d96565b600160ff1b821460001984141615612f9957612f99612d4a565b500590565b8381528215156020820152606060408201526000612fbf60608301846129d5565b95945050505050565b600080600060608486031215612fdd57600080fd5b8351925060208401519150604084015190509250925092565b634e487b7160e01b600052603260045260246000fd5b600060a08201878352602087602085015260a0604085015281875180845260c08601915060208901935060005b8181101561305e5784516001600160a01b031683529383019391830191600101613039565b50506001600160a01b03969096166060850152505050608001529392505050565b634e487b7160e01b600052602160045260246000fdfea26469706673582212205fe089d1c9f6ce5b1d4d0847855a0da525d134451c9385c715b8e4e935106aca64736f6c63430008170033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
d8afe1c66252cc93792010b8432e17501ccecb68d6d68c7e1008a02c4fad6208
-----Decoded View---------------
Arg [0] : _KECCAK_SEED (uint256): 98010331771673891287002603397775489607980798998570004240134557085353405932040
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : d8afe1c66252cc93792010b8432e17501ccecb68d6d68c7e1008a02c4fad6208
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.