Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- RedeemBurnRateCalculator
- Optimization enabled
- true
- Compiler version
- v0.8.17+commit.8df45f5f
- Optimization runs
- 200
- EVM Version
- default
- Verified at
- 2024-07-26T17:53:07.040272Z
Constructor Arguments
0x000000000000000000000000440602f459d7dd500a74528003e6a20a46d6e2a6000000000000000000000000e6505f92583103af7ed9974dec451a7af4e3a3be000000000000000000000000d38220cff996a73e9110aaca64e02d581b83a0cd0000000000000000000000001d80c49bbbcd1c0911346656b529df9e5c2f783d0000000000000000000000000000000000000000000069e10de76676d08000000000000000000000000000003daabdd029879fe3316c092364156a04fff868e4000000000000000000000000000000000000000000000000000000000000000100000000000000000000000067f6506eda989b1ad6ae7706f5d1e75dec219c7f
Arg [0] (address) : 0x440602f459d7dd500a74528003e6a20a46d6e2a6
Arg [1] (address) : 0xe6505f92583103af7ed9974dec451a7af4e3a3be
Arg [2] (address) : 0xd38220cff996a73e9110aaca64e02d581b83a0cd
Arg [3] (address) : 0x1d80c49bbbcd1c0911346656b529df9e5c2f783d
Arg [4] (uint256) : 500000000000000000000000
Arg [5] (address) : 0x3daabdd029879fe3316c092364156a04fff868e4
Arg [6] (bool) : true
Arg [7] (address) : 0x67f6506eda989b1ad6ae7706f5d1e75dec219c7f
contracts/Tokenomics/RedeemBurnRateCalculator.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8; import "./IRedeemBurnRateCalculator.sol"; import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol'; import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol'; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/access/Ownable2Step.sol"; interface PriceOracleV2{ /** * @notice Get the price of a token asset * @param token The token to get the price of * @return The asset price mantissa (scaled by 1e18). * Zero means the price is unavailable. */ function getPrice(address token) external view returns (uint); } interface IUniV2Oracle{ function consult(address token, uint amountIn, uint32 age) external view returns (uint amountOut, uint32 timestamp); function update() external; function PERIOD() external view returns (uint32); } contract RedeemBurnRateCalculator is IRedeemBurnRateCalculator, Ownable2Step { using EnumerableSet for EnumerableSet.AddressSet; /// @notice UniV2 DEX factory address IUniswapV2Factory public uniV2Factory; /// @notice UniV2 Oracle IUniV2Oracle public uniV2Oracle; /// @notice UniV2 Oracle maximum period without update uint32 public uniV2OracleStalePeriod; /// @notice Protocol token IERC20Metadata public protocolToken; /// @notice Protocol token decimals uint8 public protocolTokenDecimals; /// @notice esProtocol token IERC20Metadata public esProtocolToken; /// @notice esProtocol token decimals uint8 public esProtocolTokenDecimals; /// @notice Wrapped Native token IERC20Metadata public wNative; /// @notice Wrapped Native token decimals uint8 public wNativeDecimals; /// @notice Protocol token x wNative swap path address[] public protocolTokenToWNativeSwapPath; /// @notice Burn rate Threshold in USD uint public burnRateThresholdUSD; /// @notice Price Oracle PriceOracleV2 public priceOracle; /// @notice Use the price Oracle price for the Protocol Token bool public useOraclePrice; /// @notice The addresses that are excluded from USD balance check EnumerableSet.AddressSet internal _exclusionListedAddresses; /// @notice Emitted when an address is allowed to check the USD balance event AddressAllowed(address address_); /// @notice Emitted when an address is disallowed to check the USD balance event AddressDisallowed(address address_); constructor(IUniswapV2Factory _uniV2Factory, IERC20Metadata _protocolToken, IERC20Metadata _esProtocolToken, IERC20Metadata _wNative, uint _burnRateThresholdUSD, PriceOracleV2 _priceOracle, bool _useOraclePrice, IUniV2Oracle _uniV2Oracle) { // sanity check _uniV2Factory.allPairsLength(); uniV2Factory = _uniV2Factory; protocolToken = _protocolToken; protocolTokenDecimals = protocolToken.decimals(); require(protocolTokenDecimals == 18, 'invalid protocolToken decimals'); esProtocolToken = _esProtocolToken; esProtocolTokenDecimals = esProtocolToken.decimals(); require(esProtocolTokenDecimals == 18, 'invalid esProtocolToken decimals'); wNative = _wNative; wNativeDecimals = wNative.decimals(); require(wNativeDecimals == 18, 'invalid wNative decimals'); protocolTokenToWNativeSwapPath = new address[](2); protocolTokenToWNativeSwapPath[0] = address(protocolToken); protocolTokenToWNativeSwapPath[1] = address(wNative); burnRateThresholdUSD = _burnRateThresholdUSD; require(burnRateThresholdUSD > 0, 'invalid burn rate threshold'); useOraclePrice = _useOraclePrice; // sanity check _priceOracle.getPrice(address(wNative)); priceOracle = _priceOracle; uniV2OracleStalePeriod = (_uniV2Oracle.PERIOD() * 2) + 10 minutes; uniV2Oracle = _uniV2Oracle; } /** * @notice Remove address from the exclusion list */ function allow(address address_) external onlyOwner { require(_exclusionListedAddresses.contains(address_), 'address already allowed'); emit AddressAllowed(address_); _exclusionListedAddresses.remove(address_); } /** * @notice Add address to the exclusion list */ function disallow(address address_) external onlyOwner { require(!_exclusionListedAddresses.contains(address_), 'address already disallowed'); emit AddressDisallowed(address_); _exclusionListedAddresses.add(address_); } /** * @dev returns length of _exclusionListedAddresses array */ function exclusionListedAddressesLength() external view returns (uint256) { return _exclusionListedAddresses.length(); } /** * @dev returns _exclusionListedAddresses array item's address for "index" */ function exclusionListedAddressAt(uint256 index) external view returns (address) { return _exclusionListedAddresses.at(index); } /** * @dev Check if a address is in the exclusion list */ function exclusionListedAddress(address user) external view returns (bool) { return _exclusionListedAddresses.contains(user); } function shouldSkipBurnRate( address user, uint256 /*amount*/ ) external override returns (bool) { if (_exclusionListedAddresses.contains(user)) return false; if (useOraclePrice) { uint256 price = priceOracle.getPrice(address(protocolToken)); return ((price * esProtocolToken.balanceOf(user) / (10**esProtocolTokenDecimals)) > burnRateThresholdUSD); } address pair = uniV2Factory.getPair(address(protocolToken), address(wNative)); uint amountOut; if(pair == address(0)) return false; amountOut = getAmountOut(); uint esProtocolWNativePrice = amountOut * esProtocolToken.balanceOf(user) / (10**esProtocolTokenDecimals); uint wNativePrice = priceOracle.getPrice(address(wNative)); esProtocolWNativePrice = esProtocolWNativePrice * wNativePrice / (10**wNativeDecimals); return esProtocolWNativePrice > burnRateThresholdUSD; } function getAmountOut() internal returns (uint amountOut){ uniV2Oracle.update(); (amountOut,) = uniV2Oracle.consult(address(protocolToken), 10**protocolTokenDecimals, uniV2OracleStalePeriod); } }
@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol
pragma solidity >=0.5.0; interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; }
contracts/Tokenomics/IRedeemBurnRateCalculator.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8; interface IRedeemBurnRateCalculator{ function shouldSkipBurnRate(address user, uint256 amount) external returns (bool); }
@openzeppelin/contracts/access/Ownable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * 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 Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _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. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { 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); } }
@openzeppelin/contracts/access/Ownable2Step.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol) pragma solidity ^0.8.0; import "./Ownable.sol"; /** * @dev Contract module which provides 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} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions * from parent (Ownable). */ abstract contract Ownable2Step is Ownable { address private _pendingOwner; event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { return _pendingOwner; } /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual override onlyOwner { _pendingOwner = newOwner; emit OwnershipTransferStarted(owner(), newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual override { delete _pendingOwner; super._transferOwnership(newOwner); } /** * @dev The new owner accepts the ownership transfer. */ function acceptOwnership() public virtual { address sender = _msgSender(); require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner"); _transferOwnership(sender); } }
@openzeppelin/contracts/token/ERC20/IERC20.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the 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); }
@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
@openzeppelin/contracts/utils/Context.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
@openzeppelin/contracts/utils/structs/EnumerableSet.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ```solidity * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol
pragma solidity >=0.5.0; interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; }
Compiler Settings
{"outputSelection":{"*":{"*":["*"],"":["*"]}},"optimizer":{"runs":200,"enabled":true},"libraries":{}}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_uniV2Factory","internalType":"contract IUniswapV2Factory"},{"type":"address","name":"_protocolToken","internalType":"contract IERC20Metadata"},{"type":"address","name":"_esProtocolToken","internalType":"contract IERC20Metadata"},{"type":"address","name":"_wNative","internalType":"contract IERC20Metadata"},{"type":"uint256","name":"_burnRateThresholdUSD","internalType":"uint256"},{"type":"address","name":"_priceOracle","internalType":"contract PriceOracleV2"},{"type":"bool","name":"_useOraclePrice","internalType":"bool"},{"type":"address","name":"_uniV2Oracle","internalType":"contract IUniV2Oracle"}]},{"type":"event","name":"AddressAllowed","inputs":[{"type":"address","name":"address_","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"AddressDisallowed","inputs":[{"type":"address","name":"address_","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferStarted","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","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":"function","stateMutability":"nonpayable","outputs":[],"name":"acceptOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"allow","inputs":[{"type":"address","name":"address_","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"burnRateThresholdUSD","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"disallow","inputs":[{"type":"address","name":"address_","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20Metadata"}],"name":"esProtocolToken","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"esProtocolTokenDecimals","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"exclusionListedAddress","inputs":[{"type":"address","name":"user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"exclusionListedAddressAt","inputs":[{"type":"uint256","name":"index","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"exclusionListedAddressesLength","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"pendingOwner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract PriceOracleV2"}],"name":"priceOracle","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20Metadata"}],"name":"protocolToken","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"protocolTokenDecimals","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"protocolTokenToWNativeSwapPath","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"shouldSkipBurnRate","inputs":[{"type":"address","name":"user","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IUniswapV2Factory"}],"name":"uniV2Factory","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IUniV2Oracle"}],"name":"uniV2Oracle","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint32","name":"","internalType":"uint32"}],"name":"uniV2OracleStalePeriod","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"useOraclePrice","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20Metadata"}],"name":"wNative","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"wNativeDecimals","inputs":[]}]
Contract Creation Code
0x60806040523480156200001157600080fd5b506040516200188538038062001885833981016040819052620000349162000736565b6200003f3362000625565b876001600160a01b031663574f2ba36040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200007e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000a49190620007ef565b50600280546001600160a01b03808b166001600160a01b03199283161790925560048054928a1692909116821781556040805163313ce56760e01b8152905163313ce567928281019260209291908290030181865afa1580156200010c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000132919062000809565b6004805460ff60a01b1916600160a01b60ff93841681029190911791829055900416601214620001a95760405162461bcd60e51b815260206004820152601e60248201527f696e76616c69642070726f746f636f6c546f6b656e20646563696d616c73000060448201526064015b60405180910390fd5b600580546001600160a01b0319166001600160a01b0388169081179091556040805163313ce56760e01b8152905163313ce567916004808201926020929091908290030181865afa15801562000203573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000229919062000809565b6005805460ff60a01b1916600160a01b60ff938416810291909117918290559004166012146200029c5760405162461bcd60e51b815260206004820181905260248201527f696e76616c696420657350726f746f636f6c546f6b656e20646563696d616c736044820152606401620001a0565b600680546001600160a01b0319166001600160a01b0387169081179091556040805163313ce56760e01b8152905163313ce567916004808201926020929091908290030181865afa158015620002f6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200031c919062000809565b6006805460ff60a01b1916600160a01b60ff938416810291909117918290559004166012146200038f5760405162461bcd60e51b815260206004820152601860248201527f696e76616c696420774e617469766520646563696d616c7300000000000000006044820152606401620001a0565b604080516002808252606082018352909160208301908036833750508151620003c09260079250602001906200069f565b50600454600780546001600160a01b0390921691600090620003e657620003e662000835565b600091825260209091200180546001600160a01b0319166001600160a01b039283161790556006546007805491909216919060019081106200042c576200042c62000835565b600091825260209091200180546001600160a01b0319166001600160a01b0392909216919091179055600884905583620004a95760405162461bcd60e51b815260206004820152601b60248201527f696e76616c6964206275726e2072617465207468726573686f6c6400000000006044820152606401620001a0565b6009805460ff60a01b1916600160a01b841515021790556006546040516341976e0960e01b81526001600160a01b039182166004820152908416906341976e0990602401602060405180830381865afa1580156200050b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005319190620007ef565b5082600960006101000a8154816001600160a01b0302191690836001600160a01b03160217905550806001600160a01b031663b4d1d7956040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000598573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005be91906200084b565b620005cb90600262000889565b620005d990610258620008b4565b600380546001600160a01b039093166001600160a01b031963ffffffff93909316600160a01b02929092166001600160c01b03199093169290921717905550620008db95505050505050565b600180546001600160a01b03191690556200064c816200064f602090811b6200095117901c565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b828054828255906000526020600020908101928215620006f7579160200282015b82811115620006f757825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620006c0565b506200070592915062000709565b5090565b5b808211156200070557600081556001016200070a565b6001600160a01b03811681146200064c57600080fd5b600080600080600080600080610100898b0312156200075457600080fd5b8851620007618162000720565b60208a0151909850620007748162000720565b60408a0151909750620007878162000720565b60608a01519096506200079a8162000720565b60808a015160a08b01519196509450620007b48162000720565b60c08a01519093508015158114620007cb57600080fd5b60e08a0151909250620007de8162000720565b809150509295985092959890939650565b6000602082840312156200080257600080fd5b5051919050565b6000602082840312156200081c57600080fd5b815160ff811681146200082e57600080fd5b9392505050565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156200085e57600080fd5b815163ffffffff811681146200082e57600080fd5b634e487b7160e01b600052601160045260246000fd5b63ffffffff818116838216028082169190828114620008ac57620008ac62000873565b505092915050565b63ffffffff818116838216019080821115620008d457620008d462000873565b5092915050565b610f9a80620008eb6000396000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c8063715018a6116100c35780639d4186011161007c5780639d418601146102fd578063a9ed9cb814610310578063e30c397814610323578063f2fde38b14610334578063ff9913e814610347578063ffab692f1461035a57600080fd5b8063715018a61461029f578063749a1138146102a957806379ba5097146102bd5780638da5cb5b146102c55780639ad8eb4c146102d65780639b58a1e4146102ea57600080fd5b80633209afd0116101155780633209afd0146102035780633da04b8714610216578063481ea2ed1461022957806348e5aab41461024c578063505f0dc51461025f5780637010dd121461027357600080fd5b806313e0bd9d1461015d5780631a465fe11461018d578063212e3792146101a05780632630c12f146101c65780632d68efc9146101d95780632ec4491f146101ec575b600080fd5b600354610170906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b600454610170906001600160a01b031681565b6004546101b490600160a01b900460ff1681565b60405160ff9091168152602001610184565b600954610170906001600160a01b031681565b600654610170906001600160a01b031681565b6101f560085481565b604051908152602001610184565b610170610211366004610cfd565b610362565b600254610170906001600160a01b031681565b61023c610237366004610d2b565b61038c565b6040519015158152602001610184565b61017061025a366004610cfd565b6106d1565b60095461023c90600160a01b900460ff1681565b60035461028a90600160a01b900463ffffffff1681565b60405163ffffffff9091168152602001610184565b6102a76106de565b005b6006546101b490600160a01b900460ff1681565b6102a76106f2565b6000546001600160a01b0316610170565b6005546101b490600160a01b900460ff1681565b600554610170906001600160a01b031681565b61023c61030b366004610d57565b610771565b6102a761031e366004610d57565b61077e565b6001546001600160a01b0316610170565b6102a7610342366004610d57565b610829565b6102a7610355366004610d57565b61089a565b6101f5610940565b6007818154811061037257600080fd5b6000918252602090912001546001600160a01b0316905081565b6000610399600a846109a1565b156103a6575060006106cb565b600954600160a01b900460ff16156104d757600954600480546040516341976e0960e01b81526001600160a01b039182169281019290925260009216906341976e0990602401602060405180830381865afa158015610409573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061042d9190610d74565b6008546005549192509061044c90600160a01b900460ff16600a610e87565b6005546040516370a0823160e01b81526001600160a01b038881166004830152909116906370a0823190602401602060405180830381865afa158015610496573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ba9190610d74565b6104c49084610e96565b6104ce9190610ead565b119150506106cb565b6002546004805460065460405163e6a4390560e01b81526001600160a01b039283169381019390935281166024830152600092169063e6a4390590604401602060405180830381865afa158015610532573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105569190610ecf565b905060006001600160a01b038216610573576000925050506106cb565b61057b6109c6565b60055490915060009061059990600160a01b900460ff16600a610e87565b6005546040516370a0823160e01b81526001600160a01b038981166004830152909116906370a0823190602401602060405180830381865afa1580156105e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106079190610d74565b6106119084610e96565b61061b9190610ead565b6009546006546040516341976e0960e01b81526001600160a01b0391821660048201529293506000929116906341976e0990602401602060405180830381865afa15801561066d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106919190610d74565b6006549091506106ac90600160a01b900460ff16600a610e87565b6106b68284610e96565b6106c09190610ead565b600854109450505050505b92915050565b60006106cb600a83610ade565b6106e6610aea565b6106f06000610b44565b565b60015433906001600160a01b031681146107655760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b60648201526084015b60405180910390fd5b61076e81610b44565b50565b60006106cb600a836109a1565b610786610aea565b610791600a826109a1565b156107de5760405162461bcd60e51b815260206004820152601a60248201527f6164647265737320616c726561647920646973616c6c6f776564000000000000604482015260640161075c565b6040516001600160a01b03821681527f5f1b0fa787087c297cc2ee3a7641860058ab750c330ac3ea5d6d5b9b777f353d9060200160405180910390a1610825600a82610b5d565b5050565b610831610aea565b600180546001600160a01b0383166001600160a01b031990911681179091556108626000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6108a2610aea565b6108ad600a826109a1565b6108f95760405162461bcd60e51b815260206004820152601760248201527f6164647265737320616c726561647920616c6c6f776564000000000000000000604482015260640161075c565b6040516001600160a01b03821681527f5d20d7597e8195aa92d4ad63482761cfbbe7c4afdef190f27182702924c9af779060200160405180910390a1610825600a82610b72565b600061094c600a610b87565b905090565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b6003546040805163a2e6204560e01b815290516000926001600160a01b03169163a2e62045916004808301928692919082900301818387803b158015610a0b57600080fd5b505af1158015610a1f573d6000803e3d6000fd5b50506003546004546001600160a01b03918216935063f73a815d925090811690610a5490600160a01b900460ff16600a610e87565b60035460405160e085901b6001600160e01b03191681526001600160a01b0390931660048401526024830191909152600160a01b900463ffffffff1660448201526064016040805180830381865afa158015610ab4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad89190610eec565b50919050565b60006109bf8383610b91565b6000546001600160a01b031633146106f05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161075c565b600180546001600160a01b031916905561076e81610951565b60006109bf836001600160a01b038416610bbb565b60006109bf836001600160a01b038416610c0a565b60006106cb825490565b6000826000018281548110610ba857610ba8610f25565b9060005260206000200154905092915050565b6000818152600183016020526040812054610c02575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556106cb565b5060006106cb565b60008181526001830160205260408120548015610cf3576000610c2e600183610f3b565b8554909150600090610c4290600190610f3b565b9050818114610ca7576000866000018281548110610c6257610c62610f25565b9060005260206000200154905080876000018481548110610c8557610c85610f25565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610cb857610cb8610f4e565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506106cb565b60009150506106cb565b600060208284031215610d0f57600080fd5b5035919050565b6001600160a01b038116811461076e57600080fd5b60008060408385031215610d3e57600080fd5b8235610d4981610d16565b946020939093013593505050565b600060208284031215610d6957600080fd5b81356109bf81610d16565b600060208284031215610d8657600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115610dde578160001904821115610dc457610dc4610d8d565b80851615610dd157918102915b93841c9390800290610da8565b509250929050565b600082610df5575060016106cb565b81610e02575060006106cb565b8160018114610e185760028114610e2257610e3e565b60019150506106cb565b60ff841115610e3357610e33610d8d565b50506001821b6106cb565b5060208310610133831016604e8410600b8410161715610e61575081810a6106cb565b610e6b8383610da3565b8060001904821115610e7f57610e7f610d8d565b029392505050565b60006109bf60ff841683610de6565b80820281158282048414176106cb576106cb610d8d565b600082610eca57634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215610ee157600080fd5b81516109bf81610d16565b60008060408385031215610eff57600080fd5b82519150602083015163ffffffff81168114610f1a57600080fd5b809150509250929050565b634e487b7160e01b600052603260045260246000fd5b818103818111156106cb576106cb610d8d565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220be070f6c1884c80c21501ca3d47dbbd411ba1050d4d16b490343233d1d9d4c1164736f6c63430008110033000000000000000000000000440602f459d7dd500a74528003e6a20a46d6e2a6000000000000000000000000e6505f92583103af7ed9974dec451a7af4e3a3be000000000000000000000000d38220cff996a73e9110aaca64e02d581b83a0cd0000000000000000000000001d80c49bbbcd1c0911346656b529df9e5c2f783d0000000000000000000000000000000000000000000069e10de76676d08000000000000000000000000000003daabdd029879fe3316c092364156a04fff868e4000000000000000000000000000000000000000000000000000000000000000100000000000000000000000067f6506eda989b1ad6ae7706f5d1e75dec219c7f
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106101585760003560e01c8063715018a6116100c35780639d4186011161007c5780639d418601146102fd578063a9ed9cb814610310578063e30c397814610323578063f2fde38b14610334578063ff9913e814610347578063ffab692f1461035a57600080fd5b8063715018a61461029f578063749a1138146102a957806379ba5097146102bd5780638da5cb5b146102c55780639ad8eb4c146102d65780639b58a1e4146102ea57600080fd5b80633209afd0116101155780633209afd0146102035780633da04b8714610216578063481ea2ed1461022957806348e5aab41461024c578063505f0dc51461025f5780637010dd121461027357600080fd5b806313e0bd9d1461015d5780631a465fe11461018d578063212e3792146101a05780632630c12f146101c65780632d68efc9146101d95780632ec4491f146101ec575b600080fd5b600354610170906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b600454610170906001600160a01b031681565b6004546101b490600160a01b900460ff1681565b60405160ff9091168152602001610184565b600954610170906001600160a01b031681565b600654610170906001600160a01b031681565b6101f560085481565b604051908152602001610184565b610170610211366004610cfd565b610362565b600254610170906001600160a01b031681565b61023c610237366004610d2b565b61038c565b6040519015158152602001610184565b61017061025a366004610cfd565b6106d1565b60095461023c90600160a01b900460ff1681565b60035461028a90600160a01b900463ffffffff1681565b60405163ffffffff9091168152602001610184565b6102a76106de565b005b6006546101b490600160a01b900460ff1681565b6102a76106f2565b6000546001600160a01b0316610170565b6005546101b490600160a01b900460ff1681565b600554610170906001600160a01b031681565b61023c61030b366004610d57565b610771565b6102a761031e366004610d57565b61077e565b6001546001600160a01b0316610170565b6102a7610342366004610d57565b610829565b6102a7610355366004610d57565b61089a565b6101f5610940565b6007818154811061037257600080fd5b6000918252602090912001546001600160a01b0316905081565b6000610399600a846109a1565b156103a6575060006106cb565b600954600160a01b900460ff16156104d757600954600480546040516341976e0960e01b81526001600160a01b039182169281019290925260009216906341976e0990602401602060405180830381865afa158015610409573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061042d9190610d74565b6008546005549192509061044c90600160a01b900460ff16600a610e87565b6005546040516370a0823160e01b81526001600160a01b038881166004830152909116906370a0823190602401602060405180830381865afa158015610496573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ba9190610d74565b6104c49084610e96565b6104ce9190610ead565b119150506106cb565b6002546004805460065460405163e6a4390560e01b81526001600160a01b039283169381019390935281166024830152600092169063e6a4390590604401602060405180830381865afa158015610532573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105569190610ecf565b905060006001600160a01b038216610573576000925050506106cb565b61057b6109c6565b60055490915060009061059990600160a01b900460ff16600a610e87565b6005546040516370a0823160e01b81526001600160a01b038981166004830152909116906370a0823190602401602060405180830381865afa1580156105e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106079190610d74565b6106119084610e96565b61061b9190610ead565b6009546006546040516341976e0960e01b81526001600160a01b0391821660048201529293506000929116906341976e0990602401602060405180830381865afa15801561066d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106919190610d74565b6006549091506106ac90600160a01b900460ff16600a610e87565b6106b68284610e96565b6106c09190610ead565b600854109450505050505b92915050565b60006106cb600a83610ade565b6106e6610aea565b6106f06000610b44565b565b60015433906001600160a01b031681146107655760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b60648201526084015b60405180910390fd5b61076e81610b44565b50565b60006106cb600a836109a1565b610786610aea565b610791600a826109a1565b156107de5760405162461bcd60e51b815260206004820152601a60248201527f6164647265737320616c726561647920646973616c6c6f776564000000000000604482015260640161075c565b6040516001600160a01b03821681527f5f1b0fa787087c297cc2ee3a7641860058ab750c330ac3ea5d6d5b9b777f353d9060200160405180910390a1610825600a82610b5d565b5050565b610831610aea565b600180546001600160a01b0383166001600160a01b031990911681179091556108626000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6108a2610aea565b6108ad600a826109a1565b6108f95760405162461bcd60e51b815260206004820152601760248201527f6164647265737320616c726561647920616c6c6f776564000000000000000000604482015260640161075c565b6040516001600160a01b03821681527f5d20d7597e8195aa92d4ad63482761cfbbe7c4afdef190f27182702924c9af779060200160405180910390a1610825600a82610b72565b600061094c600a610b87565b905090565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b6003546040805163a2e6204560e01b815290516000926001600160a01b03169163a2e62045916004808301928692919082900301818387803b158015610a0b57600080fd5b505af1158015610a1f573d6000803e3d6000fd5b50506003546004546001600160a01b03918216935063f73a815d925090811690610a5490600160a01b900460ff16600a610e87565b60035460405160e085901b6001600160e01b03191681526001600160a01b0390931660048401526024830191909152600160a01b900463ffffffff1660448201526064016040805180830381865afa158015610ab4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad89190610eec565b50919050565b60006109bf8383610b91565b6000546001600160a01b031633146106f05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161075c565b600180546001600160a01b031916905561076e81610951565b60006109bf836001600160a01b038416610bbb565b60006109bf836001600160a01b038416610c0a565b60006106cb825490565b6000826000018281548110610ba857610ba8610f25565b9060005260206000200154905092915050565b6000818152600183016020526040812054610c02575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556106cb565b5060006106cb565b60008181526001830160205260408120548015610cf3576000610c2e600183610f3b565b8554909150600090610c4290600190610f3b565b9050818114610ca7576000866000018281548110610c6257610c62610f25565b9060005260206000200154905080876000018481548110610c8557610c85610f25565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610cb857610cb8610f4e565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506106cb565b60009150506106cb565b600060208284031215610d0f57600080fd5b5035919050565b6001600160a01b038116811461076e57600080fd5b60008060408385031215610d3e57600080fd5b8235610d4981610d16565b946020939093013593505050565b600060208284031215610d6957600080fd5b81356109bf81610d16565b600060208284031215610d8657600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115610dde578160001904821115610dc457610dc4610d8d565b80851615610dd157918102915b93841c9390800290610da8565b509250929050565b600082610df5575060016106cb565b81610e02575060006106cb565b8160018114610e185760028114610e2257610e3e565b60019150506106cb565b60ff841115610e3357610e33610d8d565b50506001821b6106cb565b5060208310610133831016604e8410600b8410161715610e61575081810a6106cb565b610e6b8383610da3565b8060001904821115610e7f57610e7f610d8d565b029392505050565b60006109bf60ff841683610de6565b80820281158282048414176106cb576106cb610d8d565b600082610eca57634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215610ee157600080fd5b81516109bf81610d16565b60008060408385031215610eff57600080fd5b82519150602083015163ffffffff81168114610f1a57600080fd5b809150509250929050565b634e487b7160e01b600052603260045260246000fd5b818103818111156106cb576106cb610d8d565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220be070f6c1884c80c21501ca3d47dbbd411ba1050d4d16b490343233d1d9d4c1164736f6c63430008110033