Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- BSKR
- Optimization enabled
- true
- Compiler version
- v0.8.19+commit.7dd6d404
- Optimization runs
- 200
- Verified at
- 2023-04-22T13:01:26.831800Z
contracts/BSKR.sol
/**
*
* @title BSKR - Brings Serenity, Knowledge and Richness
* @author Ra Murd <pulselorian@gmail.com>
* @notice website: https://pulselorian.com/
* @notice telegram: https://t.me/ThePulselorian
* @notice twitter: https://twitter.com/ThePulseLorian
*
* BSKR is our attempt to develop a better internet currency
* It's deflationary, burns some fees, reflects some fees and adds some fees to liquidity pool
* It may also pay quarterly bonus to net buyers
*
* - BSKR audit
* <TODO Audit report link to be added here>
*
*
* ( ( ( ( ( (( ( . ( ( (( ( ((
* )\ )\ )\ )\ )\ (\())\ . )\ )\ ))\)\ ))\
* ((_)((_)(_)(_) ((_))(_)(_) ((_)((_)(((_)_()((_)))
* | _ \ | | | | / __| __| | / _ \| _ \_ _| \ \| |
* | _/ |_| | |__\__ \ _|| |__| (_) | /| || - | . |
* |_| \___/|____|___/___|____|\___/|_|_\___|_|_|_|\_|
*
* Tokenomics:
*
* Reflection 2.0% 36.36%
* Burn 1.5% 27.27%
* Growth 1.0% 18.18%
* Liquidity 0.5% 9.09%
* Payday 0.5% 9.09%
*/
/*
* SPDX-License-Identifier: MIT
*/
// TODO Replace all fee transfer events with a single fee event
// TODO Replace require with errors where possible
// TODO Explore fee in ETH
// TODO Explore passing a token/field in transaction to handle hops between pairs
//
pragma solidity ^0.8.19;
import "./imports/BaseBSKR.sol";
contract BSKR is BaseBSKR {
enum Field {
tTransferAmount,
rAmount,
rTransferAmount,
tRfiFee,
tBurnFee,
tOtherFees, // Growth1, Growth2, Payday & LP fees are all 0.5%
rRfiFee,
rBurnFee,
rOtherFees
}
enum Fees {
RfiFee, // 200 or 2.0%
BurnFee, // 150 or 1.5%
OtherFees, // 50 * 4 or 0.5% * 4
GrossFees // 550 or 5.5%
}
address private _LBSKRAddr; // needs this address to provide discounts
address private _ammBSKRPair; // BSKR-ETH pair address
address private _paydayAddress;
address[] private _noRfi;
bool private _addLPEnabled;
bool private _addingLiquidity;
mapping(address => bool) private _getsNoRfi;
mapping(address => bool) private _isMyTokensPair;
mapping(address => uint256) private _rBalances;
uint256 private _rTotal; // 100 bits
uint256 private _max_tx_amount; // 40 billion - 4% of the total supply // 96 bits
uint256 private _num_tokens_for_lp; // 1 billion - 0.1% of the total supply // 90 bits
uint256 private totalReflection; // 100 bits
uint64[4] private _currFees; // 16x6 bits
// event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
event FeeTransfers(
uint256 Reflected,
uint256 Burnt,
uint256 Growth,
uint256 AutoLiquity,
uint256 Payday
);
event AddLPEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
/**
* @notice Initializes BSKR contract with first implementation version
* @param nameA Token name
* @param symbolA Token symbol
* @param growth1AddressA Growth address 1
* @param growth2AddressA Growth address 2
* @param paydayAddressA Payday address
* @param lbskrAddrA LBSKR address
* @param sisterOAsA Sister OA addresses
*/
function __BSKR_init(
string calldata nameA,
string calldata symbolA,
address growth1AddressA,
address growth2AddressA,
address paydayAddressA,
address lbskrAddrA,
address[5] memory sisterOAsA
) external initializer {
__Ownable_init_unchained();
__Pausable_init_unchained();
__Manageable_init_unchained();
__BaseBSKR_init_unchained(
nameA,
symbolA,
growth1AddressA,
growth2AddressA,
sisterOAsA
);
__BSKR_init_unchained(paydayAddressA, lbskrAddrA);
}
function __BSKR_init_unchained(
address paydayAddressA,
address lbskrAddrA
) internal onlyInitializing {
if (block.chainid == 941 || block.chainid == 942) {
// PLS Testnet V2B
_max_tx_amount = 40_000_000_000_000_000_000_000_000_000_000; // 40 billion
_num_tokens_for_lp = 1_000_000_000_000_000_000_000_000_000_000; // 1 billion
} else {
_max_tx_amount = 40_000_000_000_000_000_000_000_000_000; // 40 million
_num_tokens_for_lp = 1_000_000_000_000_000_000_000_000_000; // 1 million
}
_addLPEnabled = true;
_rTotal = (type(uint256).max - (type(uint256).max % _totalSupply));
_currFees = [200, 150, 50, 550];
_paydayAddress = paydayAddressA;
_LBSKRAddr = lbskrAddrA;
_rBalances[_msgSender()] = _rTotal;
_balances[_msgSender()] = _totalSupply;
_ammBSKRPair = _dexFactoryV2.createPair(address(this), wethAddr);
_approve(_ammBSKRPair, _ammBSKRPair, type(uint256).max);
_isAMMPair[_ammBSKRPair] = true;
_setNoRfi(_ammBSKRPair);
address _ammLBSKRPair = _dexFactoryV2.createPair(
address(this),
_LBSKRAddr
);
_approve(_ammLBSKRPair, _ammLBSKRPair, type(uint256).max);
_isAMMPair[_ammLBSKRPair] = true;
_setNoRfi(_ammLBSKRPair);
for (uint256 index = 0; index < _sisterOAs.length; ++index) {
_paysNoFee[_sisterOAs[index]] = true;
_setNoRfi(_sisterOAs[index]);
}
_setNoRfi(_msgSender());
_setNoRfi(address(this));
_setNoRfi(_paydayAddress);
_setNoRfi(_ammBSKRPair);
_setNoRfi(_ammLBSKRPair);
_setNoRfi(address(0));
emit Transfer(address(0), _msgSender(), _totalSupply);
}
function _airdropTokens(address to, uint256 amount) internal override {
_transferTokens(
owner(),
to,
amount,
false,
true, // owner does not get Rfi
_getsNoRfi[to]
);
}
function _getRate() private view returns (uint256) {
uint256 rSupply = _rTotal;
uint256 tSupply = _totalSupply;
for (uint256 index = 0; index < _noRfi.length; ++index) {
if (
_rBalances[_noRfi[index]] > rSupply ||
_balances[_noRfi[index]] > tSupply
) return (_rTotal / _totalSupply);
rSupply -= _rBalances[_noRfi[index]];
tSupply -= _balances[_noRfi[index]];
}
if (rSupply < _rTotal / _totalSupply) return (_rTotal / _totalSupply);
return rSupply / tSupply;
}
function _getValues(
uint256 tAmount,
uint256 feeMultiplier
) private view returns (uint256[9] memory response) {
uint256 currentRate = _getRate();
response[uint256(Field.rAmount)] = (tAmount * currentRate);
if (feeMultiplier == 0) {
response[uint256(Field.tTransferAmount)] = tAmount;
response[uint256(Field.rTransferAmount)] = tAmount * currentRate;
} else {
response[uint256(Field.tRfiFee)] =
(((tAmount * _currFees[uint256(Fees.RfiFee)]) / _BIPS) *
feeMultiplier) /
10;
response[uint256(Field.tBurnFee)] =
(((tAmount * _currFees[uint256(Fees.BurnFee)]) / _BIPS) *
feeMultiplier) /
10;
response[uint256(Field.tOtherFees)] =
(((tAmount * _currFees[uint256(Fees.OtherFees)]) / _BIPS) *
feeMultiplier) /
10;
response[uint256(Field.tTransferAmount)] =
tAmount -
((((tAmount * _currFees[uint256(Fees.GrossFees)]) / _BIPS) *
feeMultiplier) / 10);
response[uint256(Field.rRfiFee)] = (response[
uint256(Field.tRfiFee)
] * currentRate);
response[uint256(Field.rBurnFee)] = (response[
uint256(Field.tBurnFee)
] * currentRate);
response[uint256(Field.rOtherFees)] = (response[
uint256(Field.tOtherFees)
] * currentRate);
response[uint256(Field.rTransferAmount)] = (response[
uint256(Field.tTransferAmount)
] * currentRate);
}
return (response);
}
function _isLBSKRPair(address target) internal returns (bool) {
if (_isAMMPair[target]) {
if (_isMyTokensPair[target]) {
return true;
}
address token0 = _getToken0(target);
if (token0 == _LBSKRAddr) {
_isMyTokensPair[target] = true;
return true;
}
address token1 = _getToken1(target);
if (token1 == _LBSKRAddr) {
_isMyTokensPair[target] = true;
return true;
}
}
return false;
}
function _setNoRfi(address wallet) private {
if (!_getsNoRfi[wallet]) {
_getsNoRfi[wallet] = true;
_noRfi.push(wallet);
}
}
function _takeFee(address target, uint256 tFee, uint256 rFee) private {
_rBalances[target] += rFee;
if (_getsNoRfi[target]) _balances[target] += tFee;
}
function _transfer(
address from,
address to,
uint256 amount
) internal override whenNotPaused {
require(from != address(0), "B: From 0 addr");
require(to != address(0), "B: To 0 addr");
require(amount != 0, "B: 0 amount");
if (from != owner() && to != owner()) {
require(amount <= _max_tx_amount, "B: Exceeds max tx");
}
if (!isV3Enabled) {
require(!v3PairInvolved(from, to), "B: UniV3 not supported!");
}
_checkIfAMMPair(from);
if (_isAMMPair[from]) {
_setNoRfi(from);
}
_checkIfAMMPair(to);
if (_isAMMPair[to]) {
_setNoRfi(to);
}
uint256 contractTokenBalance = balanceOf(address(this));
/* is the token balance of this contract address over the min number of
* tokens that we need to initiate a swap + liquidity lock?
* also, don't get caught in a circular liquidity event.
* also, don't swap & liquify if sender is uniswap pair (Buy transaction).
*/
if (
(contractTokenBalance >= _num_tokens_for_lp) &&
!_addingLiquidity &&
from != _ammBSKRPair &&
_addLPEnabled
) {
_addingLiquidity = true;
/* split the contract balance into halves */
uint256 amount2Eth = _num_tokens_for_lp >> 1; // divide by 2
uint256 tokenAmount = _num_tokens_for_lp - amount2Eth;
/* Check balance before swap */
uint256 initialBalance = address(this).balance;
/* swap tokens for ETH */
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = wethAddr;
_approve(address(this), address(this), amount2Eth); // allow address(this) to spend its tokens
_approve(address(this), address(_dexRouterV2), amount2Eth);
_dexRouterV2.swapExactTokensForETHSupportingFeeOnTransferTokens(
amount2Eth,
0, // accept any amount of ETH // TODO - tighten this
path,
address(this),
block.timestamp + 15
);
/* Determine ETH from the swap */
uint256 ethAmount = address(this).balance - initialBalance;
/* add liquidity to uniswap */
_approve(address(this), address(_dexRouterV2), tokenAmount);
_dexRouterV2.addLiquidityETH{value: ethAmount}(
address(this),
tokenAmount,
0, // slippage is unavoidable
0, // slippage is unavoidable
_getOriginAddress(),
block.timestamp + 15
);
// Prevent ETH dust from getting locked in the contract forever
(bool success, ) = owner().call{value: address(this).balance}("");
if (success) {
// do nothing - it's not a must that transfer succeeds
}
emit SwapAndLiquify(amount2Eth, ethAmount, tokenAmount);
_num_tokens_for_lp = _totalSupply - balanceOf(address(0));
_addingLiquidity = false;
}
//indicates if fee should be deducted from transfer
bool takeFee = true;
//if any wallet belongs to _paysNoFee wallet then remove the fee
if (_paysNoFee[from] || _paysNoFee[to]) {
takeFee = false;
}
if (!_isAMMPair[from] && !_isAMMPair[to]) {
// simple transfer not buy/sell, take no fees
takeFee = false;
}
//transfer amount, it will take tax, burn, liquidity fee
_transferTokens(
from,
to,
amount,
takeFee,
_getsNoRfi[from],
_getsNoRfi[to]
);
}
function _transferTokens(
address sender,
address recipient,
uint256 tAmount,
bool takeFee,
bool senderExcluded,
bool recipientExcluded
) private {
uint256 reducedFees = 10;
if (!takeFee) {
reducedFees = 0;
} else if (_isLBSKRPair(sender) || _isLBSKRPair(recipient)) {
reducedFees = 5;
}
uint256[9] memory response = _getValues(tAmount, reducedFees);
if (senderExcluded) {
_balances[sender] -= tAmount;
}
_rBalances[sender] -= response[uint256(Field.rAmount)];
if (recipientExcluded) {
_balances[recipient] += response[uint256(Field.tTransferAmount)];
}
_rBalances[recipient] += response[uint256(Field.rTransferAmount)];
uint256 _tRfiFee_ = response[uint256(Field.tRfiFee)];
if (_tRfiFee_ != 0) {
_rTotal -= _tRfiFee_;
totalReflection += _tRfiFee_;
// cannot emit transfer event
// }
uint256 _tBurnFee_ = response[uint256(Field.tBurnFee)];
// if (_tBurnFee_ != 0) {
_takeFee(address(0), _tBurnFee_, response[uint256(Field.rBurnFee)]);
// emit Transfer(sender, address(0), _tBurnFee_);
// }
uint256 _tOtherFees_ = response[uint256(Field.tOtherFees)];
// if (_tOtherFees_ != 0) {
uint256 _rOtherFees_ = response[uint256(Field.rOtherFees)];
_takeFee(_growth1Address, _tOtherFees_, _rOtherFees_); // Half Growth Fee
// emit Transfer(sender, _growth1Address, _tOtherFees_);
_takeFee(_growth2Address, _tOtherFees_, _rOtherFees_); // Half Growth Fee
// emit Transfer(sender, _growth2Address, _tOtherFees_);
_takeFee(_paydayAddress, _tOtherFees_, _rOtherFees_); // Payday Fee
// emit Transfer(sender, _paydayAddress, _tOtherFees_);
_takeFee(address(this), _tOtherFees_, _rOtherFees_); // LP Fee
// emit Transfer(sender, address(this), _tOtherFees_);
emit FeeTransfers(
_tRfiFee_,
_tBurnFee_,
(_rOtherFees_ + _rOtherFees_),
_rOtherFees_,
_rOtherFees_
);
}
emit Transfer(
sender,
recipient,
response[uint256(Field.tTransferAmount)]
);
}
/**
* Calculates the wallet balance taking into wallet Rfi received
* @param wallet user address
* @return uint256 user's token balance
*/
function balanceOf(address wallet) public view override returns (uint256) {
if (_getsNoRfi[wallet]) return _balances[wallet];
require(_rBalances[wallet] <= _rTotal, "B: Amount too large");
uint256 currentRate = _getRate();
return _rBalances[wallet] / currentRate;
}
/**
* @notice Gift reflection to the BSKR community
* @param tAmount amount to gift
*/
function giftReflection(uint256 tAmount) external whenNotPaused {
require(tAmount != 0, "B: Zero gift amount");
address sender = _msgSender();
require(!_getsNoRfi[sender], "B: Excluded wallet");
uint256[9] memory response = _getValues(tAmount, 10);
require(
_rBalances[sender] > response[uint256(Field.rAmount)],
"B: Gift too large"
);
_rBalances[sender] -= response[uint256(Field.rAmount)];
_rTotal -= response[uint256(Field.rAmount)];
totalReflection += tAmount;
}
/**
* @notice Enable or disable auto liquidity feature - for manager only in case of issues
* @param _enabled true/false to enable or disable swap and liquify
*/
function setSwapAndLiquifyEnabled(bool _enabled) external onlyManager {
_addLPEnabled = _enabled;
emit AddLPEnabledUpdated(_enabled);
}
/**
* @notice Transfer the unstaked token while unstaking.
* @param from Sender address
* @param to Receiver address
* @param amount Amount to transfer
* @return bool flag indicating that transfer completed
* Only LBSKR contract may call this function
*/
function stakeTransfer(
address from,
address to,
uint256 amount
) external returns (bool) {
require(msg.sender == _LBSKRAddr);
_transferTokens(
from,
to,
amount,
false,
_getsNoRfi[from],
_getsNoRfi[to]
);
return true;
}
/**
* @notice This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}
contracts/imports/BaseBSKR.sol
/*
* SPDX-License-Identifier: MIT
*/
pragma solidity ^0.8.19;
import "../lib/Utils.sol";
import "../oz_upgradable/access/OwnableUpgradeable.sol";
import "../oz_upgradable/proxy/utils/UUPSUpgradeable.sol";
import "../oz_upgradable/security/PausableUpgradeable.sol";
import "../oz_upgradable/token/ERC20/IERC20Upgradeable.sol";
import "../uniswap/v2-core/interfaces/IUniswapV2Factory.sol";
import "../uniswap/v2-core/interfaces/IUniswapV2Pair.sol";
import "../uniswap/v2-periphery/interfaces/IUniswapV2Router02.sol";
import "../uniswap/v3-core/interfaces/IUniswapV3Factory.sol";
import "../uniswap/v3-core/interfaces/IUniswapV3Pool.sol";
import "./Manageable.sol";
// PLS
// Wrapped PLS: 0x8a810ea8B121d08342E9e7696f4a9915cBE494B7
// PulseXRouter03: 0xb4A7633D8932de086c9264D5eb39a8399d7C0E3A
// PulseXFactory02: 0xb242aA8A863CfcE9fcBa2b9a6B00b4cd62343f27
// MasterChef: 0xB635be96898552bBe80043239c57ea864223fdC1
abstract contract BaseBSKR is
Utils,
OwnableUpgradeable,
UUPSUpgradeable,
PausableUpgradeable,
IERC20Upgradeable,
Manageable
{
struct Airdrop {
address user;
uint256 amount;
}
IUniswapV2Factory internal _dexFactoryV2;
IUniswapV2Router02 internal _dexRouterV2;
address internal _growth1Address;
address internal _growth2Address;
// address internal _nftStakingContract;
address internal wethAddr;
address[5] internal _sisterOAs;
bool internal isV3Enabled;
mapping(address => bool) internal _isAMMPair;
mapping(address => bool) internal _paysNoFee;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => uint256) internal _balances;
string private _name;
string private _symbol;
uint256 internal _oaIndex; // 5 bits
uint256 internal _totalSupply; // 1 billion for Goerli and 1 trillion (0xC9F2C9CD04674EDEA40000000) for PulseChain - 40 bits
uint256 internal constant _BIPS = 10000; // bips or basis point divisor - 14 bits
uint256 private constant _DECIMALS = 18; // 5 bits
function __BaseBSKR_init(
string calldata nameA,
string calldata symbolA,
address growth1AddressA,
address growth2AddressA,
address[5] memory sisterOAsA
) internal onlyInitializing {
__Ownable_init_unchained();
__Pausable_init_unchained();
__Manageable_init_unchained();
__BaseBSKR_init_unchained(
nameA,
symbolA,
growth1AddressA,
growth2AddressA,
sisterOAsA
);
}
function __BaseBSKR_init_unchained(
string calldata nameA,
string calldata symbolA,
address growth1AddressA,
address growth2AddressA,
address[5] memory sisterOAsA
) internal onlyInitializing {
_name = nameA;
_symbol = symbolA;
_growth1Address = growth1AddressA;
_growth2Address = growth2AddressA;
_sisterOAs = sisterOAsA;
if (block.chainid == 941) {
// PLS Testnet V2B
_totalSupply = 1_000_000_000_000_000_000_000_000_000_000;
_dexRouterV2 = IUniswapV2Router02(
0xb4A7633D8932de086c9264D5eb39a8399d7C0E3A
);
} else if (block.chainid == 942) {
// PLS Testnet V2B
_totalSupply = 1_000_000_000_000_000_000_000_000_000_000;
_dexRouterV2 = IUniswapV2Router02(
0xDaE9dd3d1A52CfCe9d5F2fAC7fDe164D500E50f7
);
} else if (block.chainid == 11155111) {
// Sepolia
_totalSupply = 1_000_000_000_000_000_000_000_000_000;
_dexRouterV2 = IUniswapV2Router02(
0x01a93b7153Ee160F3176af0B0F31121DF9f0FFA5
);
} else {
// 1, 5, 31337
_totalSupply = 1_000_000_000_000_000_000_000_000_000;
_dexRouterV2 = IUniswapV2Router02(
0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
);
}
_dexFactoryV2 = IUniswapV2Factory(_dexRouterV2.factory());
if (block.chainid == 941 || block.chainid == 942) {
wethAddr = _dexRouterV2.WPLS();
} else {
wethAddr = _dexRouterV2.WETH();
}
_paysNoFee[_msgSender()] = true;
_paysNoFee[address(this)] = true;
_paysNoFee[address(_dexRouterV2)] = true; // may not be needed
}
//to recieve ETH from _dexRouterV2 when swaping
receive() external payable {}
fallback() external payable {}
function __v3PairInvolved(address target) internal view returns (bool) {
if (target == address(_dexRouterV2)) return false; // to avoid orange reverts
// if (target == address(_nftStakingContract)) return false; // to avoid orange reverts
if (target == wethAddr) return false; // to avoid orange reverts
if (_isAMMPair[target]) {
return false; // if V3 is disabled, only V2 pairs are registered
}
address token0 = _getToken0(target);
if (token0 == address(0)) {
return false;
}
address token1 = _getToken1(target);
if (token1 == address(0)) {
return false;
}
uint24 fee = _getFee(target);
if (fee != 0) {
return true;
}
return false;
}
function _airdropTokens(address to, uint256 amount) internal virtual;
/**
* @notice Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal {
require(owner != address(0), "BB: From 0 addr");
require(spender != address(0), "BB: To 0 addr");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
function _authorizeUpgrade(address) internal override onlyOwner {}
function _checkIfAMMPair(address target) internal {
if (target.code.length == 0) return;
if (target == address(_dexRouterV2)) return; // to avoid orange reverts
// if (target == address(_nftStakingContract)) return; // to avoid orange reverts
if (target == wethAddr) return; // to avoid orange reverts
if (!_isAMMPair[target]) {
address token0 = _getToken0(target);
if (token0 == address(0)) {
return;
}
address token1 = _getToken1(target);
if (token1 == address(0)) {
return;
}
_approve(target, target, type(uint256).max);
_isAMMPair[target] = true;
}
}
function _getOriginAddress() internal returns (address) {
if (_oaIndex < (_sisterOAs.length - 1)) {
_oaIndex = _oaIndex + 1;
} else {
_oaIndex = 0;
}
return _sisterOAs[_oaIndex];
}
function _transfer(
address owner,
address to,
uint256 amount
) internal virtual;
/**
* Airdrop BSKR to sacrificers, deducted from owner's wallet
*/
function airdrop(Airdrop[] calldata receivers) external onlyOwner {
for (uint256 index; index < receivers.length; ++index) {
if (
receivers[index].user != address(0) &&
receivers[index].amount != 0
) {
_airdropTokens(receivers[index].user, receivers[index].amount * 1_00_000_000_000_000_000);
}
}
}
/**
* @notice Get allowance for a spender to spend owner's tokens
* @param owner owner address
* @param spender spender address
* @return uint256 allowance value
*/
function allowance(
address owner,
address spender
) public view override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @notice Sets allowance for spender to use msgsender's tokens
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(
address spender,
uint256 amount
) external override returns (bool) {
address owner = _msgSender();
_approve(owner, spender, amount);
return true;
}
/**
* @notice Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*/
function decimals() external pure returns (uint256) {
return _DECIMALS;
}
/**
* @notice Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(
address spender,
uint256 subtractedValue
) external returns (bool) {
address owner = _msgSender();
uint256 currentAllowance = allowance(owner, spender);
require(currentAllowance >= subtractedValue, "BSKR: Decreases below 0");
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @notice Disables UniswapV3
*/
function disableUniswapV3() external onlyManager {
isV3Enabled = false;
}
/**
* @notice Enables UniswapV3
*/
function enableUniswapV3() external onlyManager {
isV3Enabled = true;
}
/**
* @notice Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(
address spender,
uint256 addedValue
) external returns (bool) {
address owner = _msgSender();
_approve(owner, spender, allowance(owner, spender) + addedValue);
return true;
}
/**
* @notice Returns the name of the token.
*/
function name() external view returns (string memory) {
return _name;
}
/**
* @notice Pauses this contract features
*/
function pauseContract() external onlyManager {
_pause();
}
/*
* @notice Sets the BSKR contract address
*/
// function setNFTStakingContract(address newNFTStkCntrct) external onlyOwner {
// _nftStakingContract = newNFTStkCntrct;
// }
/**
* @notice Returns the symbol of the token
*/
function symbol() external view returns (string memory) {
return _symbol;
}
/**
* @notice Returns the amount of tokens in existence.
*/
function totalSupply() external view override returns (uint256) {
return _totalSupply;
}
/**
* @notice See {IERC20-transfer}. TODO add description
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(
address to,
uint256 amount
) external override returns (bool) {
address owner = _msgSender();
_transfer(owner, to, amount);
return true;
}
/**
* @notice Transfers tokens 'from' to 'to' address provided there is enough allowance
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external override returns (bool) {
address spender = _msgSender();
uint256 currentAllowance = allowance(from, spender);
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "BB: Insufficient allowance");
unchecked {
_approve(from, spender, currentAllowance - amount);
}
}
_transfer(from, to, amount);
return true;
}
/**
* @notice Unpauses the contract's features
*/
function unPauseContract() external onlyManager {
_unpause();
}
// to rename with _ prefix
function v3PairInvolved(
address from,
address to
) internal view returns (bool) {
return (__v3PairInvolved(from) || __v3PairInvolved(to));
}
/**
* @notice This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}
contracts/uniswap/v2-periphery/interfaces/IUniswapV2Router01.sol
/*
* SPDX-License-Identifier: MIT
*/
pragma solidity ^0.8.19;
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function WPLS() 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);
}
contracts/imports/Manageable.sol
/*
* SPDX-License-Identifier: MIT
*/
pragma solidity ^0.8.19;
import "../oz_upgradable/utils/ContextUpgradeable.sol";
abstract contract Manageable is ContextUpgradeable {
address private _manager;
event ManagementTransferred(
address indexed previousManager,
address indexed newManager
);
function __Manageable_init() internal onlyInitializing {
__Manageable_init_unchained();
}
function __Manageable_init_unchained() internal onlyInitializing {
_manager = _msgSender();
emit ManagementTransferred(address(0), _msgSender());
}
function _checkManager() private view {
require(_manager == _msgSender(), "M: Caller not manager");
}
function manager() external view returns (address) {
return _manager;
}
modifier onlyManager() {
_checkManager();
_;
}
/**
* @notice Transfers the management of the contract to a new manager
*/
function transferManagement(address newManager) external onlyManager {
emit ManagementTransferred(_manager, newManager);
_manager = newManager;
}
}
contracts/lib/Utils.sol
/*
* SPDX-License-Identifier: MIT
*/
pragma solidity ^0.8.19;
contract Utils {
uint24 private constant _SECS_IN_FOUR_WEEKS = 2419200; // 3600 * 24 * 7 * 4
function _callAndParseAddressReturn(
address token,
bytes4 selector
) internal view returns (address) {
(bool success, bytes memory data) = token.staticcall(
abi.encodeWithSelector(selector)
);
// if not implemented, or returns empty data, return empty string
if (!success || data.length == 0) {
return address(0);
}
// if implemented, or returns data, return decoded int24 else return 0
if (data.length == 32) {
return abi.decode(data, (address));
}
return address(0);
}
function _callAndParseUint24Return(
address token,
bytes4 selector
) internal view returns (uint24) {
(bool success, bytes memory data) = token.staticcall(
abi.encodeWithSelector(selector)
);
// if not implemented, or returns empty data, return empty string
if (!success || data.length == 0) {
return 0;
}
// if implemented, or returns data, return decoded int24 else return 0
if (data.length == 32) {
return abi.decode(data, (uint24));
}
return 0;
}
function _getFee(address target) internal view returns (uint24 targetFee) {
targetFee = _callAndParseUint24Return(
target,
hex"ddca3f43" // fee()
);
return targetFee;
}
function _getToken0(
address target
) internal view returns (address targetToken0) {
targetToken0 = _callAndParseAddressReturn(
target,
hex"0dfe1681" // token0()
);
return targetToken0;
}
function _getToken1(
address target
) internal view returns (address targetToken1) {
targetToken1 = _callAndParseAddressReturn(
target,
hex"d21220a7" // token1()
);
return targetToken1;
}
/**
* @notice Calculates penalty basis points for given from and to timestamps in seconds since epoch
*/
function _penaltyFor(
uint256 fromTimestamp,
uint256 toTimestamp
) internal pure returns (uint256 penaltyBasis) {
// penaltyBasis = 0;
if (fromTimestamp + 52 weeks > toTimestamp) {
uint256 fourWeeksElapsed = (toTimestamp - fromTimestamp) /
_SECS_IN_FOUR_WEEKS;
if (fourWeeksElapsed < 13) {
penaltyBasis = ((13 - fourWeeksElapsed) * 100); // If one four weeks have elapsed - penalty is 12% or 1200/10000
}
}
return penaltyBasis;
}
}
contracts/oz_upgradable/access/OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function __Ownable_init() internal onlyInitializing {
__Ownable_init_unchained();
}
function __Ownable_init_unchained() internal onlyInitializing {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing 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 {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_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);
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}
contracts/oz_upgradable/interfaces/IERC1967Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.3) (interfaces/IERC1967.sol)
pragma solidity ^0.8.0;
/**
* @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.
*
* _Available since v4.9._
*/
interface IERC1967Upgradeable {
/**
* @dev Emitted when the implementation is upgraded.
*/
event Upgraded(address indexed implementation);
/**
* @dev Emitted when the admin account has changed.
*/
event AdminChanged(address previousAdmin, address newAdmin);
/**
* @dev Emitted when the beacon is changed.
*/
event BeaconUpgraded(address indexed beacon);
}
contracts/oz_upgradable/interfaces/draft-IERC1822Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)
pragma solidity ^0.8.0;
/**
* @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
* proxy whose upgrades are fully controlled by the current implementation.
*/
interface IERC1822ProxiableUpgradeable {
/**
* @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation
* address.
*
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
* function revert if invoked through a proxy.
*/
function proxiableUUID() external view returns (bytes32);
}
contracts/oz_upgradable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.3) (proxy/ERC1967/ERC1967Upgrade.sol)
pragma solidity ^0.8.2;
import "../beacon/IBeaconUpgradeable.sol";
import "../../interfaces/IERC1967Upgradeable.sol";
import "../../interfaces/draft-IERC1822Upgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/StorageSlotUpgradeable.sol";
import "../utils/Initializable.sol";
/**
* @dev This abstract contract provides getters and event emitting update functions for
* https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.
*
* _Available since v4.1._
*
* @custom:oz-upgrades-unsafe-allow delegatecall
*/
abstract contract ERC1967UpgradeUpgradeable is Initializable, IERC1967Upgradeable {
function __ERC1967Upgrade_init() internal onlyInitializing {
}
function __ERC1967Upgrade_init_unchained() internal onlyInitializing {
}
// This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1
bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;
/**
* @dev Storage slot with the address of the current implementation.
* This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
/**
* @dev Returns the current implementation address.
*/
function _getImplementation() internal view returns (address) {
return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;
}
/**
* @dev Stores a new address in the EIP1967 implementation slot.
*/
function _setImplementation(address newImplementation) private {
require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract");
StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
}
/**
* @dev Perform implementation upgrade
*
* Emits an {Upgraded} event.
*/
function _upgradeTo(address newImplementation) internal {
_setImplementation(newImplementation);
emit Upgraded(newImplementation);
}
/**
* @dev Perform implementation upgrade with additional setup call.
*
* Emits an {Upgraded} event.
*/
function _upgradeToAndCall(
address newImplementation,
bytes memory data,
bool forceCall
) internal {
_upgradeTo(newImplementation);
if (data.length > 0 || forceCall) {
_functionDelegateCall(newImplementation, data);
}
}
/**
* @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.
*
* Emits an {Upgraded} event.
*/
function _upgradeToAndCallUUPS(
address newImplementation,
bytes memory data,
bool forceCall
) internal {
// Upgrades from old implementations will perform a rollback test. This test requires the new
// implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing
// this special case will break upgrade paths from old UUPS implementation to new ones.
if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {
_setImplementation(newImplementation);
} else {
try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {
require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID");
} catch {
revert("ERC1967Upgrade: new implementation is not UUPS");
}
_upgradeToAndCall(newImplementation, data, forceCall);
}
}
/**
* @dev Storage slot with the admin of the contract.
* This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
/**
* @dev Returns the current admin.
*/
function _getAdmin() internal view returns (address) {
return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;
}
/**
* @dev Stores a new address in the EIP1967 admin slot.
*/
function _setAdmin(address newAdmin) private {
require(newAdmin != address(0), "ERC1967: new admin is the zero address");
StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;
}
/**
* @dev Changes the admin of the proxy.
*
* Emits an {AdminChanged} event.
*/
function _changeAdmin(address newAdmin) internal {
emit AdminChanged(_getAdmin(), newAdmin);
_setAdmin(newAdmin);
}
/**
* @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
* This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.
*/
bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;
/**
* @dev Returns the current beacon.
*/
function _getBeacon() internal view returns (address) {
return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;
}
/**
* @dev Stores a new beacon in the EIP1967 beacon slot.
*/
function _setBeacon(address newBeacon) private {
require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract");
require(
AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),
"ERC1967: beacon implementation is not a contract"
);
StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;
}
/**
* @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does
* not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).
*
* Emits a {BeaconUpgraded} event.
*/
function _upgradeBeaconToAndCall(
address newBeacon,
bytes memory data,
bool forceCall
) internal {
_setBeacon(newBeacon);
emit BeaconUpgraded(newBeacon);
if (data.length > 0 || forceCall) {
_functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);
}
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) {
require(AddressUpgradeable.isContract(target), "Address: delegate call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.delegatecall(data);
return AddressUpgradeable.verifyCallResult(success, returndata, "Address: low-level delegate call failed");
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}
contracts/oz_upgradable/proxy/beacon/IBeaconUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)
pragma solidity ^0.8.0;
/**
* @dev This is the interface that {BeaconProxy} expects of its beacon.
*/
interface IBeaconUpgradeable {
/**
* @dev Must return an address that can be used as a delegate call target.
*
* {BeaconProxy} will check that this address is a contract.
*/
function implementation() external view returns (address);
}
contracts/oz_upgradable/proxy/utils/Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.1) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.2;
import "../../utils/AddressUpgradeable.sol";
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
* @custom:oz-retyped-from bool
*/
uint8 private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint8 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts.
*
* Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
* constructor.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
bool isTopLevelCall = !_initializing;
require(
(isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
"Initializable: contract is already initialized"
);
_initialized = 1;
if (isTopLevelCall) {
_initializing = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* A reinitializer may be used after the original initialization step. This is essential to configure modules that
* are added through upgrades and that require initialization.
*
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
* cannot be nested. If one is invoked in the context of another, execution will revert.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*
* WARNING: setting the version to 255 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint8 version) {
require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
_initialized = version;
_initializing = true;
_;
_initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
require(_initializing, "Initializable: contract is not initializing");
_;
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers() internal virtual {
require(!_initializing, "Initializable: contract is initializing");
if (_initialized < type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint8) {
return _initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _initializing;
}
}
contracts/oz_upgradable/proxy/utils/UUPSUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/UUPSUpgradeable.sol)
pragma solidity ^0.8.0;
import "../../interfaces/draft-IERC1822Upgradeable.sol";
import "../ERC1967/ERC1967UpgradeUpgradeable.sol";
import "./Initializable.sol";
/**
* @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an
* {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.
*
* A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is
* reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing
* `UUPSUpgradeable` with a custom implementation of upgrades.
*
* The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.
*
* _Available since v4.1._
*/
abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {
function __UUPSUpgradeable_init() internal onlyInitializing {
}
function __UUPSUpgradeable_init_unchained() internal onlyInitializing {
}
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment
address private immutable __self = address(this);
/**
* @dev Check that the execution is being performed through a delegatecall call and that the execution context is
* a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case
* for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a
* function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to
* fail.
*/
modifier onlyProxy() {
require(address(this) != __self, "Function must be called through delegatecall");
require(_getImplementation() == __self, "Function must be called through active proxy");
_;
}
/**
* @dev Check that the execution is not being performed through a delegate call. This allows a function to be
* callable on the implementing contract but not through proxies.
*/
modifier notDelegated() {
require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall");
_;
}
/**
* @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the
* implementation. It is used to validate the implementation's compatibility when performing an upgrade.
*
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
* function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.
*/
function proxiableUUID() external view virtual override notDelegated returns (bytes32) {
return _IMPLEMENTATION_SLOT;
}
/**
* @dev Upgrade the implementation of the proxy to `newImplementation`.
*
* Calls {_authorizeUpgrade}.
*
* Emits an {Upgraded} event.
*/
function upgradeTo(address newImplementation) external virtual onlyProxy {
_authorizeUpgrade(newImplementation);
_upgradeToAndCallUUPS(newImplementation, new bytes(0), false);
}
/**
* @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call
* encoded in `data`.
*
* Calls {_authorizeUpgrade}.
*
* Emits an {Upgraded} event.
*/
function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {
_authorizeUpgrade(newImplementation);
_upgradeToAndCallUUPS(newImplementation, data, true);
}
/**
* @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by
* {upgradeTo} and {upgradeToAndCall}.
*
* Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
*
* ```solidity
* function _authorizeUpgrade(address) internal override onlyOwner {}
* ```
*/
function _authorizeUpgrade(address newImplementation) internal virtual;
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}
contracts/oz_upgradable/security/PausableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)
pragma solidity ^0.8.0;
import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract PausableUpgradeable is Initializable, ContextUpgradeable {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
function __Pausable_init() internal onlyInitializing {
__Pausable_init_unchained();
}
function __Pausable_init_unchained() internal onlyInitializing {
_paused = false;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
_requireNotPaused();
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
_requirePaused();
_;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Throws if the contract is paused.
*/
function _requireNotPaused() internal view virtual {
require(!paused(), "Pausable: paused");
}
/**
* @dev Throws if the contract is not paused.
*/
function _requirePaused() internal view virtual {
require(paused(), "Pausable: not paused");
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}
contracts/oz_upgradable/token/ERC20/IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20Upgradeable {
/**
* @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 amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
contracts/oz_upgradable/utils/AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library AddressUpgradeable {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
contracts/oz_upgradable/utils/ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract ContextUpgradeable is Initializable {
function __Context_init() internal onlyInitializing {
}
function __Context_init_unchained() internal onlyInitializing {
}
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}
contracts/oz_upgradable/utils/StorageSlotUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)
pragma solidity ^0.8.0;
/**
* @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:
* ```
* 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(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*
* _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._
*/
library StorageSlotUpgradeable {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 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
}
}
}
contracts/uniswap/v2-core/interfaces/IUniswapV2Factory.sol
/*
* SPDX-License-Identifier: MIT
*/
pragma solidity ^0.8.19;
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;
}
contracts/uniswap/v2-core/interfaces/IUniswapV2Pair.sol
/*
* SPDX-License-Identifier: MIT
*/
pragma solidity ^0.8.19;
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(
address owner,
address spender
) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(
address from,
address to,
uint value
) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(
address owner,
address spender,
uint value,
uint deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(
address indexed sender,
uint amount0,
uint amount1,
address indexed to
);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves()
external
view
returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(
uint amount0Out,
uint amount1Out,
address to,
bytes calldata data
) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
contracts/uniswap/v2-periphery/interfaces/IUniswapV2Router02.sol
/*
* SPDX-License-Identifier: MIT
*/
pragma solidity ^0.8.19;
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;
}
contracts/uniswap/v3-core/interfaces/IUniswapV3Factory.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.19;
/// @title The interface for the Uniswap V3 Factory
/// @notice The Uniswap V3 Factory facilitates creation of Uniswap V3 pools and control over the protocol fees
interface IUniswapV3Factory {
/// @notice Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist
/// @dev tokenA and tokenB may be passed in either token0/token1 or token1/token0 order
/// @param tokenA The contract address of either token0 or token1
/// @param tokenB The contract address of the other token
/// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip
/// @return pool The pool address
function getPool(
address tokenA,
address tokenB,
uint24 fee
) external view returns (address pool);
}
contracts/uniswap/v3-core/interfaces/IUniswapV3Pool.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.19;
import "./pool/IUniswapV3PoolImmutables.sol";
/// @title The interface for a Uniswap V3 Pool
/// @notice A Uniswap pool facilitates swapping and automated market making between any two assets that strictly conform
/// to the ERC20 specification
/// @dev The pool interface is broken up into many smaller pieces
interface IUniswapV3Pool is IUniswapV3PoolImmutables {
}
contracts/uniswap/v3-core/interfaces/pool/IUniswapV3PoolImmutables.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.19;
/// @title Pool state that never changes
/// @notice These parameters are fixed for a pool forever, i.e., the methods will always return the same values
interface IUniswapV3PoolImmutables {
/// @notice The first of the two tokens of the pool, sorted by address
/// @return The token contract address
function token0() external view returns (address);
/// @notice The second of the two tokens of the pool, sorted by address
/// @return The token contract address
function token1() external view returns (address);
/// @notice The pool's fee in hundredths of a bip, i.e. 1e-6
/// @return The fee
function fee() external view returns (uint24);
}
Compiler Settings
{"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata","storageLayout"],"":["ast"]}},"optimizer":{"runs":200,"enabled":true},"libraries":{}}
Contract ABI
[{"type":"event","name":"AddLPEnabledUpdated","inputs":[{"type":"bool","name":"enabled","internalType":"bool","indexed":false}],"anonymous":false},{"type":"event","name":"AdminChanged","inputs":[{"type":"address","name":"previousAdmin","internalType":"address","indexed":false},{"type":"address","name":"newAdmin","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"spender","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"BeaconUpgraded","inputs":[{"type":"address","name":"beacon","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"FeeTransfers","inputs":[{"type":"uint256","name":"Reflected","internalType":"uint256","indexed":false},{"type":"uint256","name":"Burnt","internalType":"uint256","indexed":false},{"type":"uint256","name":"Growth","internalType":"uint256","indexed":false},{"type":"uint256","name":"AutoLiquity","internalType":"uint256","indexed":false},{"type":"uint256","name":"Payday","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Initialized","inputs":[{"type":"uint8","name":"version","internalType":"uint8","indexed":false}],"anonymous":false},{"type":"event","name":"ManagementTransferred","inputs":[{"type":"address","name":"previousManager","internalType":"address","indexed":true},{"type":"address","name":"newManager","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Paused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"SwapAndLiquify","inputs":[{"type":"uint256","name":"tokensSwapped","internalType":"uint256","indexed":false},{"type":"uint256","name":"ethReceived","internalType":"uint256","indexed":false},{"type":"uint256","name":"tokensIntoLiqudity","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Unpaused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"Upgraded","inputs":[{"type":"address","name":"implementation","internalType":"address","indexed":true}],"anonymous":false},{"type":"fallback","stateMutability":"payable"},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"__BSKR_init","inputs":[{"type":"string","name":"nameA","internalType":"string"},{"type":"string","name":"symbolA","internalType":"string"},{"type":"address","name":"growth1AddressA","internalType":"address"},{"type":"address","name":"growth2AddressA","internalType":"address"},{"type":"address","name":"paydayAddressA","internalType":"address"},{"type":"address","name":"lbskrAddrA","internalType":"address"},{"type":"address[5]","name":"sisterOAsA","internalType":"address[5]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"airdrop","inputs":[{"type":"tuple[]","name":"receivers","internalType":"struct BaseBSKR.Airdrop[]","components":[{"type":"address","name":"user","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allowance","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"spender","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approve","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"wallet","internalType":"address"}]},{"type":"function","stateMutability":"pure","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"decimals","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"decreaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"subtractedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"disableUniswapV3","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"enableUniswapV3","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"giftReflection","inputs":[{"type":"uint256","name":"tAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"increaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"addedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"manager","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"pauseContract","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"paused","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"proxiableUUID","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setSwapAndLiquifyEnabled","inputs":[{"type":"bool","name":"_enabled","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"stakeTransfer","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transfer","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferManagement","inputs":[{"type":"address","name":"newManager","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unPauseContract","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"upgradeTo","inputs":[{"type":"address","name":"newImplementation","internalType":"address"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"upgradeToAndCall","inputs":[{"type":"address","name":"newImplementation","internalType":"address"},{"type":"bytes","name":"data","internalType":"bytes"}]},{"type":"receive","stateMutability":"payable"}]
Contract Creation Code
0x60a06040523060805234801561001457600080fd5b50608051613be361004c6000396000818161065f0152818161069f01528181610772015281816107b201526108450152613be36000f3fe6080604052600436106101ae5760003560e01c806370a08231116100eb578063bac152031161008f578063e0c9ffc611610061578063e0c9ffc614610494578063e4edf852146104b4578063f2fde38b146104d4578063f66897f8146104f457005b8063bac152031461042a578063c49b9a801461043f578063d5f954241461045f578063dd62ed3e1461047457005b80638da5cb5b116100c85780638da5cb5b146103b757806395d89b41146103d5578063a457c2d7146103ea578063a9059cbb1461040a57005b806370a0823114610362578063715018a6146103825780638439f1ed1461039757005b8063439766ce1161015257806352d1902d1161012f57806352d1902d146103005780635c975abb14610315578063664f73311461032d5780636c74dd511461034257005b8063439766ce146102a6578063481c6a75146102bb5780634f1ef286146102ed57005b806323b872dd1161018b57806323b872dd14610232578063313ce567146102525780633659cfe614610266578063395093511461028657005b806306fdde03146101b7578063095ea7b3146101e257806318160ddd1461021257005b366101b557005b005b3480156101c357600080fd5b506101cc610514565b6040516101d9919061333f565b60405180910390f35b3480156101ee57600080fd5b506102026101fd366004613387565b6105a7565b60405190151581526020016101d9565b34801561021e57600080fd5b5061010e545b6040519081526020016101d9565b34801561023e57600080fd5b5061020261024d3660046133b3565b6105c1565b34801561025e57600080fd5b506012610224565b34801561027257600080fd5b506101b56102813660046133f4565b610655565b34801561029257600080fd5b506102026102a1366004613387565b610734565b3480156102b257600080fd5b506101b5610756565b3480156102c757600080fd5b5060fb546001600160a01b03165b6040516001600160a01b0390911681526020016101d9565b6101b56102fb366004613458565b610768565b34801561030c57600080fd5b50610224610838565b34801561032157600080fd5b5060c95460ff16610202565b34801561033957600080fd5b506101b56108eb565b34801561034e57600080fd5b5061020261035d3660046133b3565b610903565b34801561036e57600080fd5b5061022461037d3660046133f4565b610962565b34801561038e57600080fd5b506101b5610a35565b3480156103a357600080fd5b506101b56103b2366004613549565b610a47565b3480156103c357600080fd5b506033546001600160a01b03166102d5565b3480156103e157600080fd5b506101cc610b8a565b3480156103f657600080fd5b50610202610405366004613387565b610b9a565b34801561041657600080fd5b50610202610425366004613387565b610c12565b34801561043657600080fd5b506101b5610c20565b34801561044b57600080fd5b506101b561045a36600461367c565b610c30565b34801561046b57600080fd5b506101b5610c80565b34801561048057600080fd5b5061022461048f36600461369e565b610c95565b3480156104a057600080fd5b506101b56104af3660046136d7565b610cc1565b3480156104c057600080fd5b506101b56104cf3660046133f4565b610daa565b3480156104e057600080fd5b506101b56104ef3660046133f4565b610e0e565b34801561050057600080fd5b506101b561050f36600461374c565b610e84565b606061010b805461052490613765565b80601f016020809104026020016040519081016040528092919081815260200182805461055090613765565b801561059d5780601f106105725761010080835404028352916020019161059d565b820191906000526020600020905b81548152906001019060200180831161058057829003601f168201915b5050505050905090565b6000336105b581858561100b565b60019150505b92915050565b600033816105cf8683610c95565b9050600019811461063c578381101561062f5760405162461bcd60e51b815260206004820152601a60248201527f42423a20496e73756666696369656e7420616c6c6f77616e636500000000000060448201526064015b60405180910390fd5b61063c868386840361100b565b6106478686866110fc565b6001925050505b9392505050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016300361069d5760405162461bcd60e51b81526004016106269061379f565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166106e6600080516020613b67833981519152546001600160a01b031690565b6001600160a01b03161461070c5760405162461bcd60e51b8152600401610626906137eb565b6107158161174f565b6040805160008082526020820190925261073191839190611757565b50565b6000336105b58185856107478383610c95565b610751919061384d565b61100b565b61075e6118c2565b610766611914565b565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036107b05760405162461bcd60e51b81526004016106269061379f565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166107f9600080516020613b67833981519152546001600160a01b031690565b6001600160a01b03161461081f5760405162461bcd60e51b8152600401610626906137eb565b6108288261174f565b61083482826001611757565b5050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108d85760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610626565b50600080516020613b6783398151915290565b6108f36118c2565b610106805460ff19166001179055565b610141546000906001600160a01b0316331461091e57600080fd5b6001600160a01b03808516600090815261014660205260408082205492861682528120546109589287928792879260ff908116911661196e565b5060019392505050565b6001600160a01b0381166000908152610146602052604081205460ff16156109a157506001600160a01b0316600090815261010a602052604090205490565b610149546001600160a01b038316600090815261014860205260409020541115610a035760405162461bcd60e51b8152602060048201526013602482015272423a20416d6f756e7420746f6f206c6172676560681b6044820152606401610626565b6000610a0d611bdf565b6001600160a01b0384166000908152610148602052604090205490915061064e908290613876565b610a3d611d7f565b6107666000611dd9565b600054610100900460ff1615808015610a675750600054600160ff909116105b80610a815750303b158015610a81575060005460ff166001145b610ae45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610626565b6000805460ff191660011790558015610b07576000805461ff0019166101001790555b610b0f611e2b565b610b17611e5b565b610b1f611e8e565b610b2e8a8a8a8a8a8a88611ef7565b610b3884846122bb565b8015610b7e576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050505050565b606061010c805461052490613765565b60003381610ba88286610c95565b905083811015610bfa5760405162461bcd60e51b815260206004820152601760248201527f42534b523a204465637265617365732062656c6f7720300000000000000000006044820152606401610626565b610c07828686840361100b565b506001949350505050565b6000336105b58185856110fc565b610c286118c2565b6107666126df565b610c386118c2565b610145805460ff19168215159081179091556040519081527f91c8e5d8409e58da1d940ede98e9b35e17b453932366ea0a790416ab922ca4129060200160405180910390a150565b610c886118c2565b610106805460ff19169055565b6001600160a01b0391821660009081526101096020908152604080832093909416825291909152205490565b610cc9611d7f565b60005b81811015610da5576000838383818110610ce857610ce861388a565b610cfe92602060409092020190810191506133f4565b6001600160a01b031614158015610d315750828282818110610d2257610d2261388a565b90506040020160200135600014155b15610d9557610d95838383818110610d4b57610d4b61388a565b610d6192602060409092020190810191506133f4565b848484818110610d7357610d7361388a565b9050604002016020013567016345785d8a0000610d9091906138a0565b612718565b610d9e816138b7565b9050610ccc565b505050565b610db26118c2565b60fb546040516001600160a01b038084169216907f80f15e9dbc60884fdb59fb8ed4fc48a9a689e028f055e893ed45ca5be67c5c8590600090a360fb80546001600160a01b0319166001600160a01b0392909216919091179055565b610e16611d7f565b6001600160a01b038116610e7b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610626565b61073181611dd9565b610e8c612756565b80600003610ed25760405162461bcd60e51b8152602060048201526013602482015272108e8816995c9bc819da599d08185b5bdd5b9d606a1b6044820152606401610626565b336000818152610146602052604090205460ff1615610f285760405162461bcd60e51b8152602060048201526012602482015271108e88115e18db1d591959081dd85b1b195d60721b6044820152606401610626565b6000610f3583600a61279c565b6020808201516001600160a01b038516600090815261014890925260409091205491925010610f9a5760405162461bcd60e51b8152602060048201526011602482015270423a204769667420746f6f206c6172676560781b6044820152606401610626565b6020808201516001600160a01b038416600090815261014890925260408220805491929091610fca9084906138d0565b909155505060208101516101498054600090610fe79084906138d0565b925050819055508261014c6000828254611001919061384d565b9091555050505050565b6001600160a01b0383166110535760405162461bcd60e51b815260206004820152600f60248201526e21211d10233937b690181030b2323960891b6044820152606401610626565b6001600160a01b0382166110995760405162461bcd60e51b815260206004820152600d60248201526c21211d102a3790181030b2323960991b6044820152606401610626565b6001600160a01b038381166000818152610109602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b611104612756565b6001600160a01b03831661114b5760405162461bcd60e51b815260206004820152600e60248201526d211d10233937b690181030b2323960911b6044820152606401610626565b6001600160a01b0382166111905760405162461bcd60e51b815260206004820152600c60248201526b211d102a3790181030b2323960a11b6044820152606401610626565b806000036111ce5760405162461bcd60e51b815260206004820152600b60248201526a108e880c08185b5bdd5b9d60aa1b6044820152606401610626565b6033546001600160a01b038481169116148015906111fa57506033546001600160a01b03838116911614155b156112465761014a548111156112465760405162461bcd60e51b815260206004820152601160248201527008474408af0c6cacac8e640dac2f040e8f607b1b6044820152606401610626565b6101065460ff166112a85761125b838361296a565b156112a85760405162461bcd60e51b815260206004820152601760248201527f423a20556e695633206e6f7420737570706f72746564210000000000000000006044820152606401610626565b6112b183612984565b6001600160a01b0383166000908152610107602052604090205460ff16156112dc576112dc83612a62565b6112e582612984565b6001600160a01b0382166000908152610107602052604090205460ff16156113105761131082612a62565b600061131b30610962565b905061014b548110158015611339575061014554610100900460ff16155b80156113545750610142546001600160a01b03858116911614155b801561136357506101455460ff165b1561167257610145805461ff00191661010017905561014b54600181901c906000906113909083906138d0565b604080516002808252606082018352929350479260009260208301908036833701905050905030816000815181106113ca576113ca61388a565b6001600160a01b039283166020918202929092010152610100548251911690829060019081106113fc576113fc61388a565b60200260200101906001600160a01b031690816001600160a01b03168152505061142730308661100b565b60fd5461143f9030906001600160a01b03168661100b565b60fd546001600160a01b031663791ac947856000843061146042600f61384d565b6040518663ffffffff1660e01b81526004016114809594939291906138e3565b600060405180830381600087803b15801561149a57600080fd5b505af11580156114ae573d6000803e3d6000fd5b50505050600082476114c091906138d0565b60fd549091506114db9030906001600160a01b03168661100b565b60fd546001600160a01b031663f305d7198230876000806114fa612aeb565b61150542600f61384d565b60405160e089901b6001600160e01b03191681526001600160a01b039687166004820152602481019590955260448501939093526064840191909152909216608482015260a481019190915260c40160606040518083038185885af1158015611572573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906115979190613954565b50505060006115ae6033546001600160a01b031690565b6001600160a01b03164760405160006040518083038185875af1925050503d80600081146115f8576040519150601f19603f3d011682016040523d82523d6000602084013e6115fd565b606091505b505060408051888152602081018590529081018790529091507f17bbfb9a6069321b6ded73bd96327c9e6b7212a5cd51ff219cd61370acafb5619060600160405180910390a161164d6000610962565b61010e5461165b91906138d0565b61014b555050610145805461ff0019169055505050505b6001600160a01b0384166000908152610108602052604090205460019060ff16806116b657506001600160a01b0384166000908152610108602052604090205460ff165b156116bf575060005b6001600160a01b0385166000908152610107602052604090205460ff1615801561170357506001600160a01b0384166000908152610107602052604090205460ff16155b1561170c575060005b6001600160a01b038086166000908152610146602052604080822054928716825290205461174891879187918791869160ff908116911661196e565b5050505050565b610731611d7f565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff161561178a57610da583612b49565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156117e4575060408051601f3d908101601f191682019092526117e191810190613982565b60015b6118475760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610626565b600080516020613b6783398151915281146118b65760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610626565b50610da5838383612be5565b60fb546001600160a01b031633146107665760405162461bcd60e51b8152602060048201526015602482015274269d1021b0b63632b9103737ba1036b0b730b3b2b960591b6044820152606401610626565b61191c612756565b60c9805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586119513390565b6040516001600160a01b03909116815260200160405180910390a1565b600a8361197d5750600061199e565b61198687612c10565b80611995575061199586612c10565b1561199e575060055b60006119aa868361279c565b905083156119e1576001600160a01b038816600090815261010a6020526040812080548892906119db9084906138d0565b90915550505b6020808201516001600160a01b038a16600090815261014890925260408220805491929091611a119084906138d0565b90915550508215611a4d5780516001600160a01b038816600090815261010a602052604081208054909190611a4790849061384d565b90915550505b6040808201516001600160a01b0389166000908152610148602052918220805491929091611a7c90849061384d565b909155505060608101518015611b8f57806101496000828254611a9f91906138d0565b925050819055508061014c6000828254611ab9919061384d565b9091555050608082015160e0830151611ad6906000908390612d08565b60a083015161010084015160fe54611af8906001600160a01b03168383612d08565b60ff54611b0f906001600160a01b03168383612d08565b61014354611b27906001600160a01b03168383612d08565b611b32308383612d08565b7f3211a46f177ad9fa6c08ccb99f0f58f3d27b33e542b80d53c11bf8e1337bf4ec8484611b5f848061384d565b60408051938452602084019290925290820152606081018390526080810183905260a00160405180910390a15050505b81516040519081526001600160a01b0389811691908b16907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050505050505050565b6101495461010e5460009190825b61014454811015611d42578261014860006101448481548110611c1257611c1261388a565b60009182526020808320909101546001600160a01b031683528201929092526040019020541180611c7f57508161010a60006101448481548110611c5857611c5861388a565b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b15611c9e5761010e5461014954611c969190613876565b935050505090565b61014860006101448381548110611cb757611cb761388a565b60009182526020808320909101546001600160a01b03168352820192909252604001902054611ce690846138d0565b925061010a60006101448381548110611d0157611d0161388a565b60009182526020808320909101546001600160a01b03168352820192909252604001902054611d3090836138d0565b9150611d3b816138b7565b9050611bed565b5061010e5461014954611d559190613876565b821015611d755761010e5461014954611d6e9190613876565b9250505090565b611d6e8183613876565b6033546001600160a01b031633146107665760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610626565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16611e525760405162461bcd60e51b81526004016106269061399b565b61076633611dd9565b600054610100900460ff16611e825760405162461bcd60e51b81526004016106269061399b565b60c9805460ff19169055565b600054610100900460ff16611eb55760405162461bcd60e51b81526004016106269061399b565b60fb80546001600160a01b031916339081179091556040516000907f80f15e9dbc60884fdb59fb8ed4fc48a9a689e028f055e893ed45ca5be67c5c85908290a3565b600054610100900460ff16611f1e5760405162461bcd60e51b81526004016106269061399b565b61010b611f2c878983613a34565b5061010c611f3b858783613a34565b5060fe80546001600160a01b038086166001600160a01b03199283161790925560ff805492851692909116919091179055611f7a6101018260056131f2565b50466103ad03611fc1576c0c9f2c9cd04674edea4000000061010e5560fd80546001600160a01b03191673b4a7633d8932de086c9264d5eb39a8399d7c0e3a179055612085565b466103ae03612007576c0c9f2c9cd04674edea4000000061010e5560fd80546001600160a01b03191673dae9dd3d1a52cfce9d5f2fac7fde164d500e50f7179055612085565b4662aa36a70361204d576b033b2e3c9fd0803ce800000061010e5560fd80546001600160a01b0319167301a93b7153ee160f3176af0b0f31121df9f0ffa5179055612085565b6b033b2e3c9fd0803ce800000061010e5560fd80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d1790555b60fd60009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156120d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120fc9190613af4565b60fc80546001600160a01b0319166001600160a01b0392909216919091179055466103ad148061212d5750466103ae145b156121cf5760fd60009054906101000a90046001600160a01b03166001600160a01b031663ef8ef56f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612185573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121a99190613af4565b61010080546001600160a01b0319166001600160a01b0392909216919091179055612268565b60fd60009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015612222573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122469190613af4565b61010080546001600160a01b0319166001600160a01b03929092169190911790555b505033600090815261010860205260408082208054600160ff199182168117909255308452828420805482168317905560fd546001600160a01b0316845291909220805490911690911790555050505050565b600054610100900460ff166122e25760405162461bcd60e51b81526004016106269061399b565b466103ad14806122f35750466103ae145b15612322576d01f8def8808b02452c9a0000000061014a556c0c9f2c9cd04674edea4000000061014b55612345565b6b813f3978f89409844000000061014a556b033b2e3c9fd0803ce800000061014b555b610145805460ff1916600117905561010e5461236390600019613b11565b61236f906000196138d0565b610149556040805160808101825260c881526096602082015260329181019190915261022660608201526123a89061014d90600461324a565b5061014380546001600160a01b038085166001600160a01b0319928316179092556101418054928416929091169190911790556101495461014860006123eb3390565b6001600160a01b03166001600160a01b031681526020019081526020016000208190555061010e5461010a600061241f3390565b6001600160a01b039081168252602082019290925260409081016000209290925560fc546101005492516364e329cb60e11b81523060048201529282166024840152169063c9c65396906044016020604051808303816000875af115801561248b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124af9190613af4565b61014280546001600160a01b0319166001600160a01b039290921691821790556124dc908060001961100b565b61014280546001600160a01b03908116600090815261010760205260409020805460ff1916600117905590546125129116612a62565b60fc54610141546040516364e329cb60e11b81523060048201526001600160a01b039182166024820152600092919091169063c9c65396906044016020604051808303816000875af115801561256c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125909190613af4565b905061259f818260001961100b565b6001600160a01b038116600090815261010760205260409020805460ff191660011790556125cc81612a62565b60005b6005811015612654576001610108600061010184600581106125f3576125f361388a565b01546001600160a01b031681526020810191909152604001600020805460ff191691151591909117905561264461010182600581106126345761263461388a565b01546001600160a01b0316612a62565b61264d816138b7565b90506125cf565b5061265e33612a62565b61266730612a62565b6101435461267d906001600160a01b0316612a62565b61014254612693906001600160a01b0316612a62565b61269c81612a62565b6126a66000612a62565b61010e5460405190815233906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020016110ef565b6126e7612d81565b60c9805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611951565b61083461272d6033546001600160a01b031690565b6001600160a01b038416600090815261014660205260408120548591859160019060ff1661196e565b60c95460ff16156107665760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610626565b6127a46132e7565b60006127ae611bdf565b90506127ba81856138a0565b602083015260008390036127df578382526127d581856138a0565b6040830152612963565b61014d54600a908490612710906128009067ffffffffffffffff16886138a0565b61280a9190613876565b61281491906138a0565b61281e9190613876565b606083015261014d54600a908490612710906128509068010000000000000000900467ffffffffffffffff16886138a0565b61285a9190613876565b61286491906138a0565b61286e9190613876565b608083015261014d54600a9084906127109061289b90600160801b900467ffffffffffffffff16886138a0565b6128a59190613876565b6128af91906138a0565b6128b99190613876565b60a083015261014d54600a908490612710906128e690600160c01b900467ffffffffffffffff16886138a0565b6128f09190613876565b6128fa91906138a0565b6129049190613876565b61290e90856138d0565b825260608201516129209082906138a0565b60c083015260808201516129359082906138a0565b60e083015260a082015161294a9082906138a0565b610100830152815161295d9082906138a0565b60408301525b5092915050565b600061297583612dca565b8061064e575061064e82612dca565b806001600160a01b03163b6000036129995750565b60fd546001600160a01b03908116908216036129b25750565b610100546001600160a01b03908116908216036129cc5750565b6001600160a01b0381166000908152610107602052604090205460ff166107315760006129f882612eab565b90506001600160a01b038116612a0c575050565b6000612a1783612ebe565b90506001600160a01b038116612a2c57505050565b612a39838460001961100b565b50506001600160a01b038116600090815261010760205260409020805460ff1916600117905550565b6001600160a01b0381166000908152610146602052604090205460ff16610731576001600160a01b0316600081815261014660205260408120805460ff19166001908117909155610144805491820181559091527fc4c2ef8194275e8aa8ec1118b6dc4bc43d1e218201f213c08c87ae45e7ea63d60180546001600160a01b0319169091179055565b6000612af9600160056138d0565b61010d541015612b1b5761010d54612b1290600161384d565b61010d55612b22565b600061010d555b61010161010d5460058110612b3957612b3961388a565b01546001600160a01b0316919050565b6001600160a01b0381163b612bb65760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610626565b600080516020613b6783398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b612bee83612ed1565b600082511180612bfb5750805b15610da557612c0a8383612f11565b50505050565b6001600160a01b0381166000908152610107602052604081205460ff1615612d00576001600160a01b0382166000908152610147602052604090205460ff1615612c5c57506001919050565b6000612c6783612eab565b610141549091506001600160a01b0390811690821603612cac5750506001600160a01b0316600090815261014760205260409020805460ff1916600190811790915590565b6000612cb784612ebe565b610141549091506001600160a01b0390811690821603612cfd575050506001600160a01b0316600090815261014760205260409020805460ff1916600190811790915590565b50505b506000919050565b6001600160a01b0383166000908152610148602052604081208054839290612d3190849061384d565b90915550506001600160a01b0383166000908152610146602052604090205460ff1615610da5576001600160a01b038316600090815261010a60205260408120805484929061100190849061384d565b60c95460ff166107665760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610626565b60fd546000906001600160a01b0390811690831603612deb57506000919050565b610100546001600160a01b0390811690831603612e0a57506000919050565b6001600160a01b0382166000908152610107602052604090205460ff1615612e3457506000919050565b6000612e3f83612eab565b90506001600160a01b038116612e585750600092915050565b6000612e6384612ebe565b90506001600160a01b038116612e7d575060009392505050565b6000612e8885613005565b905062ffffff811615612ea057506001949350505050565b506000949350505050565b60006105bb82630dfe168160e01b613018565b60006105bb8263d21220a760e01b613018565b612eda81612b49565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b612f795760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610626565b600080846001600160a01b031684604051612f949190613b25565b600060405180830381855af49150503d8060008114612fcf576040519150601f19603f3d011682016040523d82523d6000602084013e612fd4565b606091505b5091509150612ffc8282604051806060016040528060278152602001613b87602791396130e8565b95945050505050565b60006105bb8263ddca3f4360e01b613101565b60408051600481526024810182526020810180516001600160e01b03166001600160e01b031985161790529051600091829182916001600160a01b038716916130619190613b25565b600060405180830381855afa9150503d806000811461309c576040519150601f19603f3d011682016040523d82523d6000602084013e6130a1565b606091505b50915091508115806130b257508051155b156130c2576000925050506105bb565b8051602003612ea057808060200190518101906130df9190613af4565b925050506105bb565b606083156130f757508161064e565b61064e83836131c8565b60408051600481526024810182526020810180516001600160e01b03166001600160e01b031985161790529051600091829182916001600160a01b0387169161314a9190613b25565b600060405180830381855afa9150503d8060008114613185576040519150601f19603f3d011682016040523d82523d6000602084013e61318a565b606091505b509150915081158061319b57508051155b156131ab576000925050506105bb565b8051602003612ea057808060200190518101906130df9190613b41565b8151156131d85781518083602001fd5b8060405162461bcd60e51b8152600401610626919061333f565b826005810192821561323a579160200282015b8281111561323a57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190613205565b50613246929150613306565b5090565b60018301918390821561323a5791602002820160005b838211156132a657835183826101000a81548167ffffffffffffffff021916908361ffff1602179055509260200192600801602081600701049283019260010302613260565b80156132da5782816101000a81549067ffffffffffffffff02191690556008016020816007010492830192600103026132a6565b5050613246929150613306565b6040518061012001604052806009906020820280368337509192915050565b5b808211156132465760008155600101613307565b60005b8381101561333657818101518382015260200161331e565b50506000910152565b602081526000825180602084015261335e81604085016020870161331b565b601f01601f19169190910160400192915050565b6001600160a01b038116811461073157600080fd5b6000806040838503121561339a57600080fd5b82356133a581613372565b946020939093013593505050565b6000806000606084860312156133c857600080fd5b83356133d381613372565b925060208401356133e381613372565b929592945050506040919091013590565b60006020828403121561340657600080fd5b813561064e81613372565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561345057613450613411565b604052919050565b6000806040838503121561346b57600080fd5b823561347681613372565b915060208381013567ffffffffffffffff8082111561349457600080fd5b818601915086601f8301126134a857600080fd5b8135818111156134ba576134ba613411565b6134cc601f8201601f19168501613427565b915080825287848285010111156134e257600080fd5b80848401858401376000848284010152508093505050509250929050565b60008083601f84011261351257600080fd5b50813567ffffffffffffffff81111561352a57600080fd5b60208301915083602082850101111561354257600080fd5b9250929050565b6000806000806000806000806000610160808b8d03121561356957600080fd5b8a3567ffffffffffffffff8082111561358157600080fd5b61358d8e838f01613500565b909c509a5060208d01359150808211156135a657600080fd5b6135b28e838f01613500565b909a50985060408d013591506135c782613372565b90965060608c0135906135d982613372565b90955060808c0135906135eb82613372565b90945060a08c0135906135fd82613372565b8194508d60df8e011261360f57600080fd5b604051915060a08201828110828211171561362c5761362c613411565b60405250908b0190808d83111561364257600080fd5b60c08d015b8381101561366857803561365a81613372565b825260209182019101613647565b505080925050509295985092959850929598565b60006020828403121561368e57600080fd5b8135801515811461064e57600080fd5b600080604083850312156136b157600080fd5b82356136bc81613372565b915060208301356136cc81613372565b809150509250929050565b600080602083850312156136ea57600080fd5b823567ffffffffffffffff8082111561370257600080fd5b818501915085601f83011261371657600080fd5b81358181111561372557600080fd5b8660208260061b850101111561373a57600080fd5b60209290920196919550909350505050565b60006020828403121561375e57600080fd5b5035919050565b600181811c9082168061377957607f821691505b60208210810361379957634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156105bb576105bb613837565b634e487b7160e01b600052601260045260246000fd5b60008261388557613885613860565b500490565b634e487b7160e01b600052603260045260246000fd5b80820281158282048414176105bb576105bb613837565b6000600182016138c9576138c9613837565b5060010190565b818103818111156105bb576105bb613837565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156139335784516001600160a01b03168352938301939183019160010161390e565b50506001600160a01b03969096166060850152505050608001529392505050565b60008060006060848603121561396957600080fd5b8351925060208401519150604084015190509250925092565b60006020828403121561399457600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b601f821115610da557600081815260208120601f850160051c81016020861015613a0d5750805b601f850160051c820191505b81811015613a2c57828155600101613a19565b505050505050565b67ffffffffffffffff831115613a4c57613a4c613411565b613a6083613a5a8354613765565b836139e6565b6000601f841160018114613a945760008515613a7c5750838201355b600019600387901b1c1916600186901b178355611748565b600083815260209020601f19861690835b82811015613ac55786850135825560209485019460019092019101613aa5565b5086821015613ae25760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b600060208284031215613b0657600080fd5b815161064e81613372565b600082613b2057613b20613860565b500690565b60008251613b3781846020870161331b565b9190910192915050565b600060208284031215613b5357600080fd5b815162ffffff8116811461064e57600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212209fadb9e872753faa7180dc077aaa2cd40f5c3533c4f1dd9bc7f87b4d199a0f7e64736f6c63430008130033
Deployed ByteCode
0x6080604052600436106101ae5760003560e01c806370a08231116100eb578063bac152031161008f578063e0c9ffc611610061578063e0c9ffc614610494578063e4edf852146104b4578063f2fde38b146104d4578063f66897f8146104f457005b8063bac152031461042a578063c49b9a801461043f578063d5f954241461045f578063dd62ed3e1461047457005b80638da5cb5b116100c85780638da5cb5b146103b757806395d89b41146103d5578063a457c2d7146103ea578063a9059cbb1461040a57005b806370a0823114610362578063715018a6146103825780638439f1ed1461039757005b8063439766ce1161015257806352d1902d1161012f57806352d1902d146103005780635c975abb14610315578063664f73311461032d5780636c74dd511461034257005b8063439766ce146102a6578063481c6a75146102bb5780634f1ef286146102ed57005b806323b872dd1161018b57806323b872dd14610232578063313ce567146102525780633659cfe614610266578063395093511461028657005b806306fdde03146101b7578063095ea7b3146101e257806318160ddd1461021257005b366101b557005b005b3480156101c357600080fd5b506101cc610514565b6040516101d9919061333f565b60405180910390f35b3480156101ee57600080fd5b506102026101fd366004613387565b6105a7565b60405190151581526020016101d9565b34801561021e57600080fd5b5061010e545b6040519081526020016101d9565b34801561023e57600080fd5b5061020261024d3660046133b3565b6105c1565b34801561025e57600080fd5b506012610224565b34801561027257600080fd5b506101b56102813660046133f4565b610655565b34801561029257600080fd5b506102026102a1366004613387565b610734565b3480156102b257600080fd5b506101b5610756565b3480156102c757600080fd5b5060fb546001600160a01b03165b6040516001600160a01b0390911681526020016101d9565b6101b56102fb366004613458565b610768565b34801561030c57600080fd5b50610224610838565b34801561032157600080fd5b5060c95460ff16610202565b34801561033957600080fd5b506101b56108eb565b34801561034e57600080fd5b5061020261035d3660046133b3565b610903565b34801561036e57600080fd5b5061022461037d3660046133f4565b610962565b34801561038e57600080fd5b506101b5610a35565b3480156103a357600080fd5b506101b56103b2366004613549565b610a47565b3480156103c357600080fd5b506033546001600160a01b03166102d5565b3480156103e157600080fd5b506101cc610b8a565b3480156103f657600080fd5b50610202610405366004613387565b610b9a565b34801561041657600080fd5b50610202610425366004613387565b610c12565b34801561043657600080fd5b506101b5610c20565b34801561044b57600080fd5b506101b561045a36600461367c565b610c30565b34801561046b57600080fd5b506101b5610c80565b34801561048057600080fd5b5061022461048f36600461369e565b610c95565b3480156104a057600080fd5b506101b56104af3660046136d7565b610cc1565b3480156104c057600080fd5b506101b56104cf3660046133f4565b610daa565b3480156104e057600080fd5b506101b56104ef3660046133f4565b610e0e565b34801561050057600080fd5b506101b561050f36600461374c565b610e84565b606061010b805461052490613765565b80601f016020809104026020016040519081016040528092919081815260200182805461055090613765565b801561059d5780601f106105725761010080835404028352916020019161059d565b820191906000526020600020905b81548152906001019060200180831161058057829003601f168201915b5050505050905090565b6000336105b581858561100b565b60019150505b92915050565b600033816105cf8683610c95565b9050600019811461063c578381101561062f5760405162461bcd60e51b815260206004820152601a60248201527f42423a20496e73756666696369656e7420616c6c6f77616e636500000000000060448201526064015b60405180910390fd5b61063c868386840361100b565b6106478686866110fc565b6001925050505b9392505050565b6001600160a01b037f000000000000000000000000d14aefa0365fa54d600ee1e9dfd2240338d246fc16300361069d5760405162461bcd60e51b81526004016106269061379f565b7f000000000000000000000000d14aefa0365fa54d600ee1e9dfd2240338d246fc6001600160a01b03166106e6600080516020613b67833981519152546001600160a01b031690565b6001600160a01b03161461070c5760405162461bcd60e51b8152600401610626906137eb565b6107158161174f565b6040805160008082526020820190925261073191839190611757565b50565b6000336105b58185856107478383610c95565b610751919061384d565b61100b565b61075e6118c2565b610766611914565b565b6001600160a01b037f000000000000000000000000d14aefa0365fa54d600ee1e9dfd2240338d246fc1630036107b05760405162461bcd60e51b81526004016106269061379f565b7f000000000000000000000000d14aefa0365fa54d600ee1e9dfd2240338d246fc6001600160a01b03166107f9600080516020613b67833981519152546001600160a01b031690565b6001600160a01b03161461081f5760405162461bcd60e51b8152600401610626906137eb565b6108288261174f565b61083482826001611757565b5050565b6000306001600160a01b037f000000000000000000000000d14aefa0365fa54d600ee1e9dfd2240338d246fc16146108d85760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610626565b50600080516020613b6783398151915290565b6108f36118c2565b610106805460ff19166001179055565b610141546000906001600160a01b0316331461091e57600080fd5b6001600160a01b03808516600090815261014660205260408082205492861682528120546109589287928792879260ff908116911661196e565b5060019392505050565b6001600160a01b0381166000908152610146602052604081205460ff16156109a157506001600160a01b0316600090815261010a602052604090205490565b610149546001600160a01b038316600090815261014860205260409020541115610a035760405162461bcd60e51b8152602060048201526013602482015272423a20416d6f756e7420746f6f206c6172676560681b6044820152606401610626565b6000610a0d611bdf565b6001600160a01b0384166000908152610148602052604090205490915061064e908290613876565b610a3d611d7f565b6107666000611dd9565b600054610100900460ff1615808015610a675750600054600160ff909116105b80610a815750303b158015610a81575060005460ff166001145b610ae45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610626565b6000805460ff191660011790558015610b07576000805461ff0019166101001790555b610b0f611e2b565b610b17611e5b565b610b1f611e8e565b610b2e8a8a8a8a8a8a88611ef7565b610b3884846122bb565b8015610b7e576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050505050565b606061010c805461052490613765565b60003381610ba88286610c95565b905083811015610bfa5760405162461bcd60e51b815260206004820152601760248201527f42534b523a204465637265617365732062656c6f7720300000000000000000006044820152606401610626565b610c07828686840361100b565b506001949350505050565b6000336105b58185856110fc565b610c286118c2565b6107666126df565b610c386118c2565b610145805460ff19168215159081179091556040519081527f91c8e5d8409e58da1d940ede98e9b35e17b453932366ea0a790416ab922ca4129060200160405180910390a150565b610c886118c2565b610106805460ff19169055565b6001600160a01b0391821660009081526101096020908152604080832093909416825291909152205490565b610cc9611d7f565b60005b81811015610da5576000838383818110610ce857610ce861388a565b610cfe92602060409092020190810191506133f4565b6001600160a01b031614158015610d315750828282818110610d2257610d2261388a565b90506040020160200135600014155b15610d9557610d95838383818110610d4b57610d4b61388a565b610d6192602060409092020190810191506133f4565b848484818110610d7357610d7361388a565b9050604002016020013567016345785d8a0000610d9091906138a0565b612718565b610d9e816138b7565b9050610ccc565b505050565b610db26118c2565b60fb546040516001600160a01b038084169216907f80f15e9dbc60884fdb59fb8ed4fc48a9a689e028f055e893ed45ca5be67c5c8590600090a360fb80546001600160a01b0319166001600160a01b0392909216919091179055565b610e16611d7f565b6001600160a01b038116610e7b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610626565b61073181611dd9565b610e8c612756565b80600003610ed25760405162461bcd60e51b8152602060048201526013602482015272108e8816995c9bc819da599d08185b5bdd5b9d606a1b6044820152606401610626565b336000818152610146602052604090205460ff1615610f285760405162461bcd60e51b8152602060048201526012602482015271108e88115e18db1d591959081dd85b1b195d60721b6044820152606401610626565b6000610f3583600a61279c565b6020808201516001600160a01b038516600090815261014890925260409091205491925010610f9a5760405162461bcd60e51b8152602060048201526011602482015270423a204769667420746f6f206c6172676560781b6044820152606401610626565b6020808201516001600160a01b038416600090815261014890925260408220805491929091610fca9084906138d0565b909155505060208101516101498054600090610fe79084906138d0565b925050819055508261014c6000828254611001919061384d565b9091555050505050565b6001600160a01b0383166110535760405162461bcd60e51b815260206004820152600f60248201526e21211d10233937b690181030b2323960891b6044820152606401610626565b6001600160a01b0382166110995760405162461bcd60e51b815260206004820152600d60248201526c21211d102a3790181030b2323960991b6044820152606401610626565b6001600160a01b038381166000818152610109602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b611104612756565b6001600160a01b03831661114b5760405162461bcd60e51b815260206004820152600e60248201526d211d10233937b690181030b2323960911b6044820152606401610626565b6001600160a01b0382166111905760405162461bcd60e51b815260206004820152600c60248201526b211d102a3790181030b2323960a11b6044820152606401610626565b806000036111ce5760405162461bcd60e51b815260206004820152600b60248201526a108e880c08185b5bdd5b9d60aa1b6044820152606401610626565b6033546001600160a01b038481169116148015906111fa57506033546001600160a01b03838116911614155b156112465761014a548111156112465760405162461bcd60e51b815260206004820152601160248201527008474408af0c6cacac8e640dac2f040e8f607b1b6044820152606401610626565b6101065460ff166112a85761125b838361296a565b156112a85760405162461bcd60e51b815260206004820152601760248201527f423a20556e695633206e6f7420737570706f72746564210000000000000000006044820152606401610626565b6112b183612984565b6001600160a01b0383166000908152610107602052604090205460ff16156112dc576112dc83612a62565b6112e582612984565b6001600160a01b0382166000908152610107602052604090205460ff16156113105761131082612a62565b600061131b30610962565b905061014b548110158015611339575061014554610100900460ff16155b80156113545750610142546001600160a01b03858116911614155b801561136357506101455460ff165b1561167257610145805461ff00191661010017905561014b54600181901c906000906113909083906138d0565b604080516002808252606082018352929350479260009260208301908036833701905050905030816000815181106113ca576113ca61388a565b6001600160a01b039283166020918202929092010152610100548251911690829060019081106113fc576113fc61388a565b60200260200101906001600160a01b031690816001600160a01b03168152505061142730308661100b565b60fd5461143f9030906001600160a01b03168661100b565b60fd546001600160a01b031663791ac947856000843061146042600f61384d565b6040518663ffffffff1660e01b81526004016114809594939291906138e3565b600060405180830381600087803b15801561149a57600080fd5b505af11580156114ae573d6000803e3d6000fd5b50505050600082476114c091906138d0565b60fd549091506114db9030906001600160a01b03168661100b565b60fd546001600160a01b031663f305d7198230876000806114fa612aeb565b61150542600f61384d565b60405160e089901b6001600160e01b03191681526001600160a01b039687166004820152602481019590955260448501939093526064840191909152909216608482015260a481019190915260c40160606040518083038185885af1158015611572573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906115979190613954565b50505060006115ae6033546001600160a01b031690565b6001600160a01b03164760405160006040518083038185875af1925050503d80600081146115f8576040519150601f19603f3d011682016040523d82523d6000602084013e6115fd565b606091505b505060408051888152602081018590529081018790529091507f17bbfb9a6069321b6ded73bd96327c9e6b7212a5cd51ff219cd61370acafb5619060600160405180910390a161164d6000610962565b61010e5461165b91906138d0565b61014b555050610145805461ff0019169055505050505b6001600160a01b0384166000908152610108602052604090205460019060ff16806116b657506001600160a01b0384166000908152610108602052604090205460ff165b156116bf575060005b6001600160a01b0385166000908152610107602052604090205460ff1615801561170357506001600160a01b0384166000908152610107602052604090205460ff16155b1561170c575060005b6001600160a01b038086166000908152610146602052604080822054928716825290205461174891879187918791869160ff908116911661196e565b5050505050565b610731611d7f565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff161561178a57610da583612b49565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156117e4575060408051601f3d908101601f191682019092526117e191810190613982565b60015b6118475760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610626565b600080516020613b6783398151915281146118b65760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610626565b50610da5838383612be5565b60fb546001600160a01b031633146107665760405162461bcd60e51b8152602060048201526015602482015274269d1021b0b63632b9103737ba1036b0b730b3b2b960591b6044820152606401610626565b61191c612756565b60c9805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586119513390565b6040516001600160a01b03909116815260200160405180910390a1565b600a8361197d5750600061199e565b61198687612c10565b80611995575061199586612c10565b1561199e575060055b60006119aa868361279c565b905083156119e1576001600160a01b038816600090815261010a6020526040812080548892906119db9084906138d0565b90915550505b6020808201516001600160a01b038a16600090815261014890925260408220805491929091611a119084906138d0565b90915550508215611a4d5780516001600160a01b038816600090815261010a602052604081208054909190611a4790849061384d565b90915550505b6040808201516001600160a01b0389166000908152610148602052918220805491929091611a7c90849061384d565b909155505060608101518015611b8f57806101496000828254611a9f91906138d0565b925050819055508061014c6000828254611ab9919061384d565b9091555050608082015160e0830151611ad6906000908390612d08565b60a083015161010084015160fe54611af8906001600160a01b03168383612d08565b60ff54611b0f906001600160a01b03168383612d08565b61014354611b27906001600160a01b03168383612d08565b611b32308383612d08565b7f3211a46f177ad9fa6c08ccb99f0f58f3d27b33e542b80d53c11bf8e1337bf4ec8484611b5f848061384d565b60408051938452602084019290925290820152606081018390526080810183905260a00160405180910390a15050505b81516040519081526001600160a01b0389811691908b16907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050505050505050565b6101495461010e5460009190825b61014454811015611d42578261014860006101448481548110611c1257611c1261388a565b60009182526020808320909101546001600160a01b031683528201929092526040019020541180611c7f57508161010a60006101448481548110611c5857611c5861388a565b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b15611c9e5761010e5461014954611c969190613876565b935050505090565b61014860006101448381548110611cb757611cb761388a565b60009182526020808320909101546001600160a01b03168352820192909252604001902054611ce690846138d0565b925061010a60006101448381548110611d0157611d0161388a565b60009182526020808320909101546001600160a01b03168352820192909252604001902054611d3090836138d0565b9150611d3b816138b7565b9050611bed565b5061010e5461014954611d559190613876565b821015611d755761010e5461014954611d6e9190613876565b9250505090565b611d6e8183613876565b6033546001600160a01b031633146107665760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610626565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16611e525760405162461bcd60e51b81526004016106269061399b565b61076633611dd9565b600054610100900460ff16611e825760405162461bcd60e51b81526004016106269061399b565b60c9805460ff19169055565b600054610100900460ff16611eb55760405162461bcd60e51b81526004016106269061399b565b60fb80546001600160a01b031916339081179091556040516000907f80f15e9dbc60884fdb59fb8ed4fc48a9a689e028f055e893ed45ca5be67c5c85908290a3565b600054610100900460ff16611f1e5760405162461bcd60e51b81526004016106269061399b565b61010b611f2c878983613a34565b5061010c611f3b858783613a34565b5060fe80546001600160a01b038086166001600160a01b03199283161790925560ff805492851692909116919091179055611f7a6101018260056131f2565b50466103ad03611fc1576c0c9f2c9cd04674edea4000000061010e5560fd80546001600160a01b03191673b4a7633d8932de086c9264d5eb39a8399d7c0e3a179055612085565b466103ae03612007576c0c9f2c9cd04674edea4000000061010e5560fd80546001600160a01b03191673dae9dd3d1a52cfce9d5f2fac7fde164d500e50f7179055612085565b4662aa36a70361204d576b033b2e3c9fd0803ce800000061010e5560fd80546001600160a01b0319167301a93b7153ee160f3176af0b0f31121df9f0ffa5179055612085565b6b033b2e3c9fd0803ce800000061010e5560fd80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d1790555b60fd60009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156120d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120fc9190613af4565b60fc80546001600160a01b0319166001600160a01b0392909216919091179055466103ad148061212d5750466103ae145b156121cf5760fd60009054906101000a90046001600160a01b03166001600160a01b031663ef8ef56f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612185573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121a99190613af4565b61010080546001600160a01b0319166001600160a01b0392909216919091179055612268565b60fd60009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015612222573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122469190613af4565b61010080546001600160a01b0319166001600160a01b03929092169190911790555b505033600090815261010860205260408082208054600160ff199182168117909255308452828420805482168317905560fd546001600160a01b0316845291909220805490911690911790555050505050565b600054610100900460ff166122e25760405162461bcd60e51b81526004016106269061399b565b466103ad14806122f35750466103ae145b15612322576d01f8def8808b02452c9a0000000061014a556c0c9f2c9cd04674edea4000000061014b55612345565b6b813f3978f89409844000000061014a556b033b2e3c9fd0803ce800000061014b555b610145805460ff1916600117905561010e5461236390600019613b11565b61236f906000196138d0565b610149556040805160808101825260c881526096602082015260329181019190915261022660608201526123a89061014d90600461324a565b5061014380546001600160a01b038085166001600160a01b0319928316179092556101418054928416929091169190911790556101495461014860006123eb3390565b6001600160a01b03166001600160a01b031681526020019081526020016000208190555061010e5461010a600061241f3390565b6001600160a01b039081168252602082019290925260409081016000209290925560fc546101005492516364e329cb60e11b81523060048201529282166024840152169063c9c65396906044016020604051808303816000875af115801561248b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124af9190613af4565b61014280546001600160a01b0319166001600160a01b039290921691821790556124dc908060001961100b565b61014280546001600160a01b03908116600090815261010760205260409020805460ff1916600117905590546125129116612a62565b60fc54610141546040516364e329cb60e11b81523060048201526001600160a01b039182166024820152600092919091169063c9c65396906044016020604051808303816000875af115801561256c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125909190613af4565b905061259f818260001961100b565b6001600160a01b038116600090815261010760205260409020805460ff191660011790556125cc81612a62565b60005b6005811015612654576001610108600061010184600581106125f3576125f361388a565b01546001600160a01b031681526020810191909152604001600020805460ff191691151591909117905561264461010182600581106126345761263461388a565b01546001600160a01b0316612a62565b61264d816138b7565b90506125cf565b5061265e33612a62565b61266730612a62565b6101435461267d906001600160a01b0316612a62565b61014254612693906001600160a01b0316612a62565b61269c81612a62565b6126a66000612a62565b61010e5460405190815233906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020016110ef565b6126e7612d81565b60c9805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611951565b61083461272d6033546001600160a01b031690565b6001600160a01b038416600090815261014660205260408120548591859160019060ff1661196e565b60c95460ff16156107665760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610626565b6127a46132e7565b60006127ae611bdf565b90506127ba81856138a0565b602083015260008390036127df578382526127d581856138a0565b6040830152612963565b61014d54600a908490612710906128009067ffffffffffffffff16886138a0565b61280a9190613876565b61281491906138a0565b61281e9190613876565b606083015261014d54600a908490612710906128509068010000000000000000900467ffffffffffffffff16886138a0565b61285a9190613876565b61286491906138a0565b61286e9190613876565b608083015261014d54600a9084906127109061289b90600160801b900467ffffffffffffffff16886138a0565b6128a59190613876565b6128af91906138a0565b6128b99190613876565b60a083015261014d54600a908490612710906128e690600160c01b900467ffffffffffffffff16886138a0565b6128f09190613876565b6128fa91906138a0565b6129049190613876565b61290e90856138d0565b825260608201516129209082906138a0565b60c083015260808201516129359082906138a0565b60e083015260a082015161294a9082906138a0565b610100830152815161295d9082906138a0565b60408301525b5092915050565b600061297583612dca565b8061064e575061064e82612dca565b806001600160a01b03163b6000036129995750565b60fd546001600160a01b03908116908216036129b25750565b610100546001600160a01b03908116908216036129cc5750565b6001600160a01b0381166000908152610107602052604090205460ff166107315760006129f882612eab565b90506001600160a01b038116612a0c575050565b6000612a1783612ebe565b90506001600160a01b038116612a2c57505050565b612a39838460001961100b565b50506001600160a01b038116600090815261010760205260409020805460ff1916600117905550565b6001600160a01b0381166000908152610146602052604090205460ff16610731576001600160a01b0316600081815261014660205260408120805460ff19166001908117909155610144805491820181559091527fc4c2ef8194275e8aa8ec1118b6dc4bc43d1e218201f213c08c87ae45e7ea63d60180546001600160a01b0319169091179055565b6000612af9600160056138d0565b61010d541015612b1b5761010d54612b1290600161384d565b61010d55612b22565b600061010d555b61010161010d5460058110612b3957612b3961388a565b01546001600160a01b0316919050565b6001600160a01b0381163b612bb65760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610626565b600080516020613b6783398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b612bee83612ed1565b600082511180612bfb5750805b15610da557612c0a8383612f11565b50505050565b6001600160a01b0381166000908152610107602052604081205460ff1615612d00576001600160a01b0382166000908152610147602052604090205460ff1615612c5c57506001919050565b6000612c6783612eab565b610141549091506001600160a01b0390811690821603612cac5750506001600160a01b0316600090815261014760205260409020805460ff1916600190811790915590565b6000612cb784612ebe565b610141549091506001600160a01b0390811690821603612cfd575050506001600160a01b0316600090815261014760205260409020805460ff1916600190811790915590565b50505b506000919050565b6001600160a01b0383166000908152610148602052604081208054839290612d3190849061384d565b90915550506001600160a01b0383166000908152610146602052604090205460ff1615610da5576001600160a01b038316600090815261010a60205260408120805484929061100190849061384d565b60c95460ff166107665760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610626565b60fd546000906001600160a01b0390811690831603612deb57506000919050565b610100546001600160a01b0390811690831603612e0a57506000919050565b6001600160a01b0382166000908152610107602052604090205460ff1615612e3457506000919050565b6000612e3f83612eab565b90506001600160a01b038116612e585750600092915050565b6000612e6384612ebe565b90506001600160a01b038116612e7d575060009392505050565b6000612e8885613005565b905062ffffff811615612ea057506001949350505050565b506000949350505050565b60006105bb82630dfe168160e01b613018565b60006105bb8263d21220a760e01b613018565b612eda81612b49565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b612f795760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610626565b600080846001600160a01b031684604051612f949190613b25565b600060405180830381855af49150503d8060008114612fcf576040519150601f19603f3d011682016040523d82523d6000602084013e612fd4565b606091505b5091509150612ffc8282604051806060016040528060278152602001613b87602791396130e8565b95945050505050565b60006105bb8263ddca3f4360e01b613101565b60408051600481526024810182526020810180516001600160e01b03166001600160e01b031985161790529051600091829182916001600160a01b038716916130619190613b25565b600060405180830381855afa9150503d806000811461309c576040519150601f19603f3d011682016040523d82523d6000602084013e6130a1565b606091505b50915091508115806130b257508051155b156130c2576000925050506105bb565b8051602003612ea057808060200190518101906130df9190613af4565b925050506105bb565b606083156130f757508161064e565b61064e83836131c8565b60408051600481526024810182526020810180516001600160e01b03166001600160e01b031985161790529051600091829182916001600160a01b0387169161314a9190613b25565b600060405180830381855afa9150503d8060008114613185576040519150601f19603f3d011682016040523d82523d6000602084013e61318a565b606091505b509150915081158061319b57508051155b156131ab576000925050506105bb565b8051602003612ea057808060200190518101906130df9190613b41565b8151156131d85781518083602001fd5b8060405162461bcd60e51b8152600401610626919061333f565b826005810192821561323a579160200282015b8281111561323a57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190613205565b50613246929150613306565b5090565b60018301918390821561323a5791602002820160005b838211156132a657835183826101000a81548167ffffffffffffffff021916908361ffff1602179055509260200192600801602081600701049283019260010302613260565b80156132da5782816101000a81549067ffffffffffffffff02191690556008016020816007010492830192600103026132a6565b5050613246929150613306565b6040518061012001604052806009906020820280368337509192915050565b5b808211156132465760008155600101613307565b60005b8381101561333657818101518382015260200161331e565b50506000910152565b602081526000825180602084015261335e81604085016020870161331b565b601f01601f19169190910160400192915050565b6001600160a01b038116811461073157600080fd5b6000806040838503121561339a57600080fd5b82356133a581613372565b946020939093013593505050565b6000806000606084860312156133c857600080fd5b83356133d381613372565b925060208401356133e381613372565b929592945050506040919091013590565b60006020828403121561340657600080fd5b813561064e81613372565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561345057613450613411565b604052919050565b6000806040838503121561346b57600080fd5b823561347681613372565b915060208381013567ffffffffffffffff8082111561349457600080fd5b818601915086601f8301126134a857600080fd5b8135818111156134ba576134ba613411565b6134cc601f8201601f19168501613427565b915080825287848285010111156134e257600080fd5b80848401858401376000848284010152508093505050509250929050565b60008083601f84011261351257600080fd5b50813567ffffffffffffffff81111561352a57600080fd5b60208301915083602082850101111561354257600080fd5b9250929050565b6000806000806000806000806000610160808b8d03121561356957600080fd5b8a3567ffffffffffffffff8082111561358157600080fd5b61358d8e838f01613500565b909c509a5060208d01359150808211156135a657600080fd5b6135b28e838f01613500565b909a50985060408d013591506135c782613372565b90965060608c0135906135d982613372565b90955060808c0135906135eb82613372565b90945060a08c0135906135fd82613372565b8194508d60df8e011261360f57600080fd5b604051915060a08201828110828211171561362c5761362c613411565b60405250908b0190808d83111561364257600080fd5b60c08d015b8381101561366857803561365a81613372565b825260209182019101613647565b505080925050509295985092959850929598565b60006020828403121561368e57600080fd5b8135801515811461064e57600080fd5b600080604083850312156136b157600080fd5b82356136bc81613372565b915060208301356136cc81613372565b809150509250929050565b600080602083850312156136ea57600080fd5b823567ffffffffffffffff8082111561370257600080fd5b818501915085601f83011261371657600080fd5b81358181111561372557600080fd5b8660208260061b850101111561373a57600080fd5b60209290920196919550909350505050565b60006020828403121561375e57600080fd5b5035919050565b600181811c9082168061377957607f821691505b60208210810361379957634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156105bb576105bb613837565b634e487b7160e01b600052601260045260246000fd5b60008261388557613885613860565b500490565b634e487b7160e01b600052603260045260246000fd5b80820281158282048414176105bb576105bb613837565b6000600182016138c9576138c9613837565b5060010190565b818103818111156105bb576105bb613837565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156139335784516001600160a01b03168352938301939183019160010161390e565b50506001600160a01b03969096166060850152505050608001529392505050565b60008060006060848603121561396957600080fd5b8351925060208401519150604084015190509250925092565b60006020828403121561399457600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b601f821115610da557600081815260208120601f850160051c81016020861015613a0d5750805b601f850160051c820191505b81811015613a2c57828155600101613a19565b505050505050565b67ffffffffffffffff831115613a4c57613a4c613411565b613a6083613a5a8354613765565b836139e6565b6000601f841160018114613a945760008515613a7c5750838201355b600019600387901b1c1916600186901b178355611748565b600083815260209020601f19861690835b82811015613ac55786850135825560209485019460019092019101613aa5565b5086821015613ae25760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b600060208284031215613b0657600080fd5b815161064e81613372565b600082613b2057613b20613860565b500690565b60008251613b3781846020870161331b565b9190910192915050565b600060208284031215613b5357600080fd5b815162ffffff8116811461064e57600080fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212209fadb9e872753faa7180dc077aaa2cd40f5c3533c4f1dd9bc7f87b4d199a0f7e64736f6c63430008130033