Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60a06040 | 18370963 | 354 days ago | IN | 0 ETH | 0.05944033 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
XPERP
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 10000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.21; // xperp Token // ____ _____ ____ ____ // __ _| _ \| ____| _ \| _ \ // \ \/ / |_) | _| | |_) | |_) | // > <| __/| |___| _ <| __/ // /_/\_\_| |_____|_| \_\_| // Go long or short with leverage on @friendtech keys via Telegram // ===================================== // https://twitter.com/xperptech // https://xperp.tech // ===================================== // - Tokenomics: 35% in LP, 10% to Team, 5% to Collateral Partners, 49% for future airdrops // - Partnership: 1% has been sold to Handz of Gods. // - Supply: 1M tokens // - Tax: 3.5% tax on xperp traded (1.5% to revenue share, 2% to team and operating expenses). // - Revenue Sharing: 30% of trading revenue goes to holders. // - Eligibility: Holders of xperp tokens are entitled to revenue sharing. import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol"; import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; import "@oz-upgradeable/access/extensions/AccessControlEnumerableUpgradeable.sol"; import "@oz-upgradeable/utils/PausableUpgradeable.sol"; import "@oz-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import "@oz-upgradeable/utils/ReentrancyGuardUpgradeable.sol"; import "@oz-upgradeable/token/ERC20/ERC20Upgradeable.sol"; contract XPERP is ERC20Upgradeable, PausableUpgradeable, AccessControlEnumerableUpgradeable, ReentrancyGuardUpgradeable, UUPSUpgradeable { // 1 Million is totalsuppy uint256 public constant oneMillion = 1_000_000 * 1 ether; // precision mitigation value, 100x100 uint256 public constant hundredPercent = 10_000; IUniswapV2Router02 public constant uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); // 1% of total supply, max tranfer amount possible uint256 public walletBalanceLimit; uint256 public sellLimit; // Taxation uint256 public totalTax; uint256 public teamWalletTax; bool public isTaxActive; // Claiming vs Airdropping bool public isAirDropActive; // address of the uniswap pair address public uniswapV2Pair; // team wallet address payable public teamWallet; /// @dev Enable trading on Uniswap bool public isTradingEnabled; // total swap tax collected, completely distributed among token holders, for analytical purposes only uint256 public swapTaxCollectedTotalXPERP; // revenue sharing tax collected for the distribution in the current snapshot (total tax less liquidity shares) uint256 public revShareAndTeamCurrentEpochXPERP; // revenue sharing tax collected, completely distributed among token holders, for analytical purposes only uint256 public tradingRevenueDistributedTotalETH; // Revenue sharing distribution info, 1 is the first epoch. struct EpochInfo { // Snapshot time uint256 epochTimestamp; // Snapshot supply uint256 epochCirculatingSupply; // ETH collected for rewards for re-investors uint256 epochRevenueFromSwapTaxCollectedXPERP; // Same in ETH uint256 epochSwapRevenueETH; // Injected 30% revenue from trading uint256 epochTradingRevenueETH; // Used to calculate holder balances at the time of snapshot mapping(address => uint256) depositedInEpoch; mapping(address => uint256) withdrawnInEpoch; } // Epochs array, each epoch contains the snapshot info, // 1 is the first epoch, // the current value (length-1) is the epoch currently in progress - not snapshotted yet // the previous value (length-2) is the last snapshotted epoch EpochInfo[] public epochs; // Claimed Epochs mapping(address => uint256) public lastClaimedEpochs; // ========== Events ========== event TradingOnUniSwapEnabled(); event TradingOnUniSwapDisabled(); event Snapshot(uint256 epoch, uint256 circulatingSupply, uint256 swapTaxCollected, uint256 tradingRevenueCollected); event SwappedToEth(uint256 amount, uint256 ethAmount); event SwappedToXperp(uint256 amount, uint256 ethAmount); event Claimed(address indexed user, uint256 amount); event ReceivedEther(address indexed from, uint256 amount); event TaxChanged(uint256 tax, uint256 teamWalletTax); event TaxActiveChanged(bool isActive); event WalletBalanceLimitChanged(uint256 walletBalanceLimit, uint256 sellLimit); event TeamWalletUpdated(address teamWallet); event AirDropToggled(bool isActive); event Taxed(address indexed from, uint256 amountXperp); // =========== Constants ======= /// @notice Admin role for upgrading, fees, and paused state bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); /// @notice Snapshot role for taking snapshots bytes32 public constant SNAPSHOT_ROLE = keccak256("SNAPSHOT_ROLE"); /// @notice Rescue role for rescuing tokens and Eth from the contract bytes32 public constant RESCUE_ROLE = keccak256("RESCUE_ROLE"); /// @notice WhiteList role for listing vesting and other addresses that should be excluded from circulaing supply to not lower the revenue share for participants bytes32 public constant EXCLUDED_FROM_CIRCULATION_ROLE = keccak256("EXCLUDED_FROM_CIRCULATION_ROLE"); /// @notice WhiteList role for untaxed transfer for funding, vesting, and airdrops bytes32 public constant EXCLUDED_FROM_TAXATION_ROLE = keccak256("EXCLUDED_FROM_TAXATION_ROLE"); // =========== Errors ========== error ZeroAddress(); // ========== Proxy ========== constructor() { _disableInitializers(); } function initialize(address payable _teamWallet) public initializer { if (_teamWallet == address(0)) revert ZeroAddress(); __ERC20_init("xperp", "xperp"); __AccessControlEnumerable_init(); __Pausable_init(); __UUPSUpgradeable_init(); __ReentrancyGuard_init(); teamWallet = _teamWallet; totalTax = 350; teamWalletTax = 150; isTaxActive = true; isTradingEnabled = false; walletBalanceLimit = 10_000 * 1 ether; sellLimit = 10_000 * 1 ether; isAirDropActive = false; // Grant admin role to owner _setRoleAdmin(DEFAULT_ADMIN_ROLE, DEFAULT_ADMIN_ROLE); _setRoleAdmin(ADMIN_ROLE, ADMIN_ROLE); _setRoleAdmin(EXCLUDED_FROM_CIRCULATION_ROLE, ADMIN_ROLE); _setRoleAdmin(EXCLUDED_FROM_TAXATION_ROLE, ADMIN_ROLE); _setRoleAdmin(SNAPSHOT_ROLE, SNAPSHOT_ROLE); _setRoleAdmin(RESCUE_ROLE, ADMIN_ROLE); _grantRole(ADMIN_ROLE, msg.sender); _grantRole(EXCLUDED_FROM_CIRCULATION_ROLE, msg.sender); _grantRole(EXCLUDED_FROM_TAXATION_ROLE, msg.sender); _grantRole(SNAPSHOT_ROLE, msg.sender); _grantRole(RESCUE_ROLE, msg.sender); _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); epochs.push(); epochs.push(); _mint(msg.sender, oneMillion); } function initPair() public onlyRole(ADMIN_ROLE) { uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair( address(this), uniswapV2Router.WETH() ); // approving uniswap router to spend xperp on behalf of the contract _approve(address(this), address(uniswapV2Router), type(uint256).max); } function pause() public onlyRole(ADMIN_ROLE) { _pause(); } function unpause() public onlyRole(ADMIN_ROLE) { _unpause(); } function _authorizeUpgrade(address newImplementation) internal override onlyRole(DEFAULT_ADMIN_ROLE) {} // ========== Configuration ========== /// @notice This function is used to set tax on transfers to and from the uniswap pair, xperp is swapped to ETH and prepared for snapshot distribution /// @param _tax The amount of totalTax to be applied on transfers to and from the U`niswap pair. /// @param _teamWalletTax The amount of tax sent to tresure, the rest (_tax - _teamWalletTax) is the holders' revenue share. function setTax(uint256 _tax, uint256 _teamWalletTax) external onlyRole(ADMIN_ROLE) { require(_tax <= 10000 && _teamWalletTax >= 0 && _teamWalletTax <= 10000, "Invalid tax"); totalTax = _tax; teamWalletTax = _teamWalletTax; emit TaxChanged(_tax, _teamWalletTax); } /// @notice This function is used to enable or disable tax on transfers to and from the uniswap pair /// @param _isTaxActive The new boolean value of isTaxActive function setTaxActive(bool _isTaxActive) external onlyRole(ADMIN_ROLE) { isTaxActive = _isTaxActive; emit TaxActiveChanged(_isTaxActive); } /// This function is used to set the wallet balance limit /// @param _walletBalanceLimit The new wallet balance limit, maximum allowed amount of tokens in a wallet, transfers are not prohibited function setWalletBalanceLimit(uint256 _walletBalanceLimit) external onlyRole(ADMIN_ROLE) { require(_walletBalanceLimit >= 0 && _walletBalanceLimit <= oneMillion, "Invalid wallet balance limit"); walletBalanceLimit = _walletBalanceLimit; emit WalletBalanceLimitChanged(_walletBalanceLimit, sellLimit); } /// This function is used to set the sell limit /// @param _sellLimit The new sell limit, maximum allowed amount of tokens to be sold in a single transaction function setSellLimit(uint256 _sellLimit) external onlyRole(ADMIN_ROLE) { require(_sellLimit >= 0 && _sellLimit <= oneMillion, "Invalid sell balance limit"); sellLimit = _sellLimit; emit WalletBalanceLimitChanged(walletBalanceLimit, _sellLimit); } /// @notice This function is used to set the team wallet /// @param _teamWallet The new team wallet getting the _teamWalletTax share from the swaps and trading revenue function updateTeamWallet(address payable _teamWallet) external onlyRole(ADMIN_ROLE) { require(_teamWallet != address(0), "Invalid team wallet"); teamWallet = _teamWallet; emit TeamWalletUpdated(_teamWallet); } /// @notice This function is used to enable trading on Uniswap function EnableTradingOnUniSwap() external onlyRole(ADMIN_ROLE) { isTradingEnabled = true; emit TradingOnUniSwapEnabled(); } /// @notice This function is used to disable trading on Uniswap function DisableTradingOnUniSwap() external onlyRole(ADMIN_ROLE) { isTradingEnabled = false; emit TradingOnUniSwapDisabled(); } /// @notice Toggles airdrop mode vs claim by holders function toggleAirDrop() external onlyRole(SNAPSHOT_ROLE) { isAirDropActive = !isAirDropActive; emit AirDropToggled(isAirDropActive); } // ========== ERC20 Overrides ========== /// @notice overriden ERC20 transfer to tax on transfers to and from the uniswap pair, xperp is swapped to ETH and prepared for snapshot distribution function _update(address from, address to, uint256 amount) internal override { bool isTradingTransfer = (from == uniswapV2Pair || to == uniswapV2Pair) && msg.sender != address(uniswapV2Router) && from != address(this) && to != address(this) && !hasRole(EXCLUDED_FROM_TAXATION_ROLE, from) && !hasRole(EXCLUDED_FROM_TAXATION_ROLE, to); require(isTradingEnabled || !isTradingTransfer, "Trading is not enabled yet"); // if trading is enabled, only allow transfers to and from the Uniswap pair uint256 amountAfterTax = amount; // calculate 5% swap tax // owner() is an exception to fund the liquidity pair and revenueDistributionBot as well to fund the revenue distribution to holders if (isTradingTransfer) { require(isTradingEnabled, "Trading is not enabled yet"); // Buying tokens if (from == uniswapV2Pair && walletBalanceLimit > 0) { require(balanceOf(to) + amount <= walletBalanceLimit, "Holding amount after buying exceeds maximum allowed tokens."); } // Selling tokens if (to == uniswapV2Pair && sellLimit > 0) { require(amount <= sellLimit, "Selling amount exceeds maximum allowed tokens."); } // 5% total tax on xperp traded (1% to LP, 2% to revenue share, 2% to team and operating expenses). if (isTaxActive) { uint256 taxAmountXPERP = (amount * totalTax) / hundredPercent; _transfer(from, address(this), taxAmountXPERP); emit Taxed(from, taxAmountXPERP); amountAfterTax -= taxAmountXPERP; swapTaxCollectedTotalXPERP += taxAmountXPERP; revShareAndTeamCurrentEpochXPERP += taxAmountXPERP; } } uint256 currentEpoch = epochs.length - 1; epochs[currentEpoch].depositedInEpoch[to] += amountAfterTax; epochs[currentEpoch].withdrawnInEpoch[from] += amount; super._update(from, to, amountAfterTax); } // ========== Revenue Sharing ========== /// @notice Function called by the revenue distribution bot to snapshot the state function snapshot() external payable onlyRole(SNAPSHOT_ROLE) nonReentrant { EpochInfo storage epoch = epochs[epochs.length - 1]; epoch.epochTimestamp = block.timestamp; uint256 _circulatingSupply = circulatingSupply(); uint256 xperpToSwap = revShareAndTeamCurrentEpochXPERP; require(xperpToSwap > 0 || msg.value > 0, "No tax collected yet and no ETH sent"); require(balanceOf(address(this)) >= xperpToSwap, "Balance less than required"); uint256 revAndTeamETH = xperpToSwap > 0 ? swapXPERPToETH(xperpToSwap) : 0; // 1.5% to team and operating expenses distributed immediately uint256 teamWalletTaxAmountETH = (revAndTeamETH * teamWalletTax) / totalTax; uint256 epochSwapRevenueETH = revAndTeamETH - teamWalletTaxAmountETH; teamWallet.transfer(teamWalletTaxAmountETH); // the rest in ETH is kept on the contract for revenue share distribution epoch.epochCirculatingSupply = _circulatingSupply; epoch.epochTradingRevenueETH = msg.value; epoch.epochRevenueFromSwapTaxCollectedXPERP = xperpToSwap; epoch.epochSwapRevenueETH = epochSwapRevenueETH; emit Snapshot(epochs.length, _circulatingSupply, epochSwapRevenueETH, msg.value); epochs.push(); revShareAndTeamCurrentEpochXPERP = 0; } /// @notice Function called by holders to claim their revenue share function claimAll() public nonReentrant { require(!isAirDropActive, "Airdrop is active instead of claiming"); uint256 holderShare = getClaimableOf(msg.sender); require(holderShare > 0, "Nothing to claim"); lastClaimedEpochs[msg.sender] = epochs.length - 2; require(address(this).balance >= holderShare, "Insufficient contract balance"); payable(msg.sender).transfer(holderShare); emit Claimed(msg.sender, holderShare); } // ========== Internal Functions ========== function swapXPERPToETH(uint256 _amount) internal returns (uint256) { if (_amount == 0) return 0; address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); uint256 initialETHBalance = address(this).balance; uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( _amount, 0, path, address(this), block.timestamp ); uint256 finalETHBalance = address(this).balance; uint256 ETHReceived = finalETHBalance - initialETHBalance; emit SwappedToEth(_amount, ETHReceived); return ETHReceived; } // ========== Rescue Functions ========== function rescueETH(uint256 _weiAmount) external onlyRole(RESCUE_ROLE) { payable(msg.sender).transfer(_weiAmount); } function rescueERC20(address _tokenAdd, uint256 _amount) external onlyRole(RESCUE_ROLE) { IERC20(_tokenAdd).transfer(msg.sender, _amount); } // ========== Fallbacks ========== receive() external payable { emit ReceivedEther(msg.sender, msg.value); } // ========== View functions ========== function getBalanceForEpochOf(address _user, uint256 _epoch) public view returns (uint256) { if (_epoch >= epochs.length) return 0; uint256 currentBalance = balanceOf(_user); if (epochs.length >= 1) { uint256 e = epochs.length - 1; while (true) { currentBalance += epochs[e].withdrawnInEpoch[_user]; currentBalance -= epochs[e].depositedInEpoch[_user]; if (e == _epoch + 1 || e == 0) { break; } e--; } } return currentBalance; } function getBalanceForEpoch(uint256 _epoch) public view returns (uint256) { return getBalanceForEpochOf(msg.sender, _epoch); } function getClaimableOf(address _user) public view returns (uint256) { require(epochs.length > 1, "No epochs yet"); if (hasRole(EXCLUDED_FROM_CIRCULATION_ROLE, _user)) return 0; uint256 holderShare = 0; for (uint256 i = lastClaimedEpochs[_user] + 1; i < epochs.length - 1; i++) holderShare += getClaimableForEpochOf(_user, i); return holderShare; } function getClaimableForEpochOf(address _user, uint256 _epoch) public view returns (uint256) { if (epochs.length < 1 || epochs.length <= _epoch) return 0; EpochInfo storage epoch = epochs[_epoch]; if (_epoch <= lastClaimedEpochs[_user] || epoch.epochCirculatingSupply == 0) return 0; else return (getBalanceForEpochOf(_user, _epoch) * (epoch.epochSwapRevenueETH + epoch.epochTradingRevenueETH)) / epoch.epochCirculatingSupply; } function circulatingSupply() public view returns (uint256) { uint256 count = getRoleMemberCount(EXCLUDED_FROM_CIRCULATION_ROLE); uint256 excludedBalance = 0; for (uint256 i = 0; i < count; i++) { excludedBalance += balanceOf(getRoleMember(EXCLUDED_FROM_CIRCULATION_ROLE, i)); } excludedBalance += balanceOf(address(this)); excludedBalance += balanceOf(uniswapV2Pair); return totalSupply() - excludedBalance; } function getEpochsPassed() public view returns (uint256) { return epochs.length; } function getDepositedInEpoch(uint256 epochIndex, address userAddress) public view returns (uint256) { require(epochIndex < epochs.length, "Invalid epoch index"); return epochs[epochIndex].depositedInEpoch[userAddress]; } function getWithdrawnInEpoch(uint256 epochIndex, address userAddress) public view returns (uint256) { require(epochIndex < epochs.length, "Invalid epoch index"); return epochs[epochIndex].withdrawnInEpoch[userAddress]; } }
pragma solidity >=0.6.2; import './IUniswapV2Router01.sol'; interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; }
pragma solidity >=0.5.0; interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; }
pragma solidity >=0.5.0; interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/extensions/AccessControlEnumerable.sol) pragma solidity ^0.8.20; import {IAccessControlEnumerable} from "@openzeppelin/contracts/access/extensions/IAccessControlEnumerable.sol"; import {AccessControlUpgradeable} from "../AccessControlUpgradeable.sol"; import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import {Initializable} from "../../proxy/utils/Initializable.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerable, AccessControlUpgradeable { using EnumerableSet for EnumerableSet.AddressSet; /// @custom:storage-location erc7201:openzeppelin.storage.AccessControlEnumerable struct AccessControlEnumerableStorage { mapping(bytes32 role => EnumerableSet.AddressSet) _roleMembers; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccessControlEnumerable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant AccessControlEnumerableStorageLocation = 0xc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e82371705932000; function _getAccessControlEnumerableStorage() private pure returns (AccessControlEnumerableStorage storage $) { assembly { $.slot := AccessControlEnumerableStorageLocation } } function __AccessControlEnumerable_init() internal onlyInitializing { } function __AccessControlEnumerable_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view virtual returns (address) { AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage(); return $._roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view virtual returns (uint256) { AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage(); return $._roleMembers[role].length(); } /** * @dev Overload {AccessControl-_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override returns (bool) { AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage(); bool granted = super._grantRole(role, account); if (granted) { $._roleMembers[role].add(account); } return granted; } /** * @dev Overload {AccessControl-_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override returns (bool) { AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage(); bool revoked = super._revokeRole(role, account); if (revoked) { $._roleMembers[role].remove(account); } return revoked; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol) pragma solidity ^0.8.20; import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; import {Initializable} from "../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 { /// @custom:storage-location erc7201:openzeppelin.storage.Pausable struct PausableStorage { bool _paused; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Pausable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant PausableStorageLocation = 0xcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300; function _getPausableStorage() private pure returns (PausableStorage storage $) { assembly { $.slot := PausableStorageLocation } } /** * @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); /** * @dev The operation failed because the contract is paused. */ error EnforcedPause(); /** * @dev The operation failed because the contract is not paused. */ error ExpectedPause(); /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { PausableStorage storage $ = _getPausableStorage(); $._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) { PausableStorage storage $ = _getPausableStorage(); return $._paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { if (paused()) { revert EnforcedPause(); } } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { if (!paused()) { revert ExpectedPause(); } } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { PausableStorage storage $ = _getPausableStorage(); $._paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { PausableStorage storage $ = _getPausableStorage(); $._paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/UUPSUpgradeable.sol) pragma solidity ^0.8.20; import {IERC1822Proxiable} from "@openzeppelin/contracts/interfaces/draft-IERC1822.sol"; import {ERC1967Utils} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol"; import {Initializable} from "./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. */ abstract contract UUPSUpgradeable is Initializable, IERC1822Proxiable { /// @custom:oz-upgrades-unsafe-allow state-variable-immutable address private immutable __self = address(this); /** * @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgradeTo(address)` * and `upgradeToAndCall(address,bytes)` are present, and `upgradeTo` must be used if no function should be called, * while `upgradeToAndCall` will invoke the `receive` function if the second argument is the empty byte string. * If the getter returns `"5.0.0"`, only `upgradeToAndCall(address,bytes)` is present, and the second argument must * be the empty byte string if no function should be called, making it impossible to invoke the `receive` function * during an upgrade. */ string public constant UPGRADE_INTERFACE_VERSION = "5.0.0"; /** * @dev The call is from an unauthorized context. */ error UUPSUnauthorizedCallContext(); /** * @dev The storage `slot` is unsupported as a UUID. */ error UUPSUnsupportedProxiableUUID(bytes32 slot); /** * @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() { _checkProxy(); _; } /** * @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() { _checkNotDelegated(); _; } function __UUPSUpgradeable_init() internal onlyInitializing { } function __UUPSUpgradeable_init_unchained() internal onlyInitializing { } /** * @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 notDelegated returns (bytes32) { return ERC1967Utils.IMPLEMENTATION_SLOT; } /** * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call * encoded in `data`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. * * @custom:oz-upgrades-unsafe-allow-reachable delegatecall */ function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, data); } /** * @dev Reverts if the execution is not performed via delegatecall or the execution * context is not of a proxy with an ERC1967-compliant implementation pointing to self. * See {_onlyProxy}. */ function _checkProxy() internal view virtual { if ( address(this) == __self || // Must be called through delegatecall ERC1967Utils.getImplementation() != __self // Must be called through an active proxy ) { revert UUPSUnauthorizedCallContext(); } } /** * @dev Reverts if the execution is performed via delegatecall. * See {notDelegated}. */ function _checkNotDelegated() internal view virtual { if (address(this) != __self) { // Must not be called through delegatecall revert UUPSUnauthorizedCallContext(); } } /** * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by * {upgradeToAndCall}. * * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. * * ```solidity * function _authorizeUpgrade(address) internal onlyOwner {} * ``` */ function _authorizeUpgrade(address newImplementation) internal virtual; /** * @dev Performs an implementation upgrade with a security check for UUPS proxies, and additional setup call. * * As a security check, {proxiableUUID} is invoked in the new implementation, and the return value * is expected to be the implementation slot in ERC1967. * * Emits an {IERC1967-Upgraded} event. */ function _upgradeToAndCallUUPS(address newImplementation, bytes memory data) private { try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) { if (slot != ERC1967Utils.IMPLEMENTATION_SLOT) { revert UUPSUnsupportedProxiableUUID(slot); } ERC1967Utils.upgradeToAndCall(newImplementation, data); } catch { // The implementation is not UUPS revert ERC1967Utils.ERC1967InvalidImplementation(newImplementation); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol) pragma solidity ^0.8.20; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuardUpgradeable is Initializable { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant NOT_ENTERED = 1; uint256 private constant ENTERED = 2; /// @custom:storage-location erc7201:openzeppelin.storage.ReentrancyGuard struct ReentrancyGuardStorage { uint256 _status; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ReentrancyGuard")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant ReentrancyGuardStorageLocation = 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00; function _getReentrancyGuardStorage() private pure returns (ReentrancyGuardStorage storage $) { assembly { $.slot := ReentrancyGuardStorageLocation } } /** * @dev Unauthorized reentrant call. */ error ReentrancyGuardReentrantCall(); function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage(); $._status = NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage(); // On the first call to nonReentrant, _status will be NOT_ENTERED if ($._status == ENTERED) { revert ReentrancyGuardReentrantCall(); } // Any calls to nonReentrant after this point will fail $._status = ENTERED; } function _nonReentrantAfter() private { ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage(); // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) $._status = NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage(); return $._status == ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import {ContextUpgradeable} from "../../utils/ContextUpgradeable.sol"; import {IERC20Errors} from "@openzeppelin/contracts/interfaces/draft-IERC6093.sol"; import {Initializable} from "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. */ abstract contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20, IERC20Metadata, IERC20Errors { /// @custom:storage-location erc7201:openzeppelin.storage.ERC20 struct ERC20Storage { mapping(address account => uint256) _balances; mapping(address account => mapping(address spender => uint256)) _allowances; uint256 _totalSupply; string _name; string _symbol; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC20")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant ERC20StorageLocation = 0x52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00; function _getERC20Storage() private pure returns (ERC20Storage storage $) { assembly { $.slot := ERC20StorageLocation } } /** * @dev Sets the values for {name} and {symbol}. * * All two of these values are immutable: they can only be set once during * construction. */ function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing { __ERC20_init_unchained(name_, symbol_); } function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { ERC20Storage storage $ = _getERC20Storage(); $._name = name_; $._symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { ERC20Storage storage $ = _getERC20Storage(); return $._name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { ERC20Storage storage $ = _getERC20Storage(); return $._symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the default value returned by this function, unless * it's overridden. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual returns (uint256) { ERC20Storage storage $ = _getERC20Storage(); return $._totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual returns (uint256) { ERC20Storage storage $ = _getERC20Storage(); return $._balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `value`. */ function transfer(address to, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _transfer(owner, to, value); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual returns (uint256) { ERC20Storage storage $ = _getERC20Storage(); return $._allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `value` 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 value) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, value); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * 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 `value`. * - the caller must have allowance for ``from``'s tokens of at least * `value`. */ function transferFrom(address from, address to, uint256 value) public virtual returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, value); _transfer(from, to, value); return true; } /** * @dev Moves a `value` amount of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _transfer(address from, address to, uint256 value) internal { if (from == address(0)) { revert ERC20InvalidSender(address(0)); } if (to == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(from, to, value); } /** * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding * this function. * * Emits a {Transfer} event. */ function _update(address from, address to, uint256 value) internal virtual { ERC20Storage storage $ = _getERC20Storage(); if (from == address(0)) { // Overflow check required: The rest of the code assumes that totalSupply never overflows $._totalSupply += value; } else { uint256 fromBalance = $._balances[from]; if (fromBalance < value) { revert ERC20InsufficientBalance(from, fromBalance, value); } unchecked { // Overflow not possible: value <= fromBalance <= totalSupply. $._balances[from] = fromBalance - value; } } if (to == address(0)) { unchecked { // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply. $._totalSupply -= value; } } else { unchecked { // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256. $._balances[to] += value; } } emit Transfer(from, to, value); } /** * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0). * Relies on the `_update` mechanism * * Emits a {Transfer} event with `from` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _mint(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(address(0), account, value); } /** * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply. * Relies on the `_update` mechanism. * * Emits a {Transfer} event with `to` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead */ function _burn(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidSender(address(0)); } _update(account, address(0), value); } /** * @dev Sets `value` 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. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address owner, address spender, uint256 value) internal { _approve(owner, spender, value, true); } /** * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event. * * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any * `Approval` event during `transferFrom` operations. * * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to * true using the following override: * ``` * function _approve(address owner, address spender, uint256 value, bool) internal virtual override { * super._approve(owner, spender, value, true); * } * ``` * * Requirements are the same as {_approve}. */ function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual { ERC20Storage storage $ = _getERC20Storage(); if (owner == address(0)) { revert ERC20InvalidApprover(address(0)); } if (spender == address(0)) { revert ERC20InvalidSpender(address(0)); } $._allowances[owner][spender] = value; if (emitEvent) { emit Approval(owner, spender, value); } } /** * @dev Updates `owner` s allowance for `spender` based on spent `value`. * * Does not update the allowance value in case of infinite allowance. * Revert if not enough allowance is available. * * Does not emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 value) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { if (currentAllowance < value) { revert ERC20InsufficientAllowance(spender, currentAllowance, value); } unchecked { _approve(owner, spender, currentAllowance - value, false); } } } }
pragma solidity >=0.6.2; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/extensions/IAccessControlEnumerable.sol) pragma solidity ^0.8.20; import {IAccessControl} from "../IAccessControl.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerable is IAccessControl { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol) pragma solidity ^0.8.20; import {IAccessControl} from "@openzeppelin/contracts/access/IAccessControl.sol"; import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; import {ERC165Upgradeable} from "../utils/introspection/ERC165Upgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ```solidity * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ```solidity * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} * to enforce additional security measures for this role. */ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControl, ERC165Upgradeable { struct RoleData { mapping(address account => bool) hasRole; bytes32 adminRole; } bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /// @custom:storage-location erc7201:openzeppelin.storage.AccessControl struct AccessControlStorage { mapping(bytes32 role => RoleData) _roles; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccessControl")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant AccessControlStorageLocation = 0x02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800; function _getAccessControlStorage() private pure returns (AccessControlStorage storage $) { assembly { $.slot := AccessControlStorageLocation } } /** * @dev Modifier that checks that an account has a specific role. Reverts * with an {AccessControlUnauthorizedAccount} error including the required role. */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } function __AccessControl_init() internal onlyInitializing { } function __AccessControl_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual returns (bool) { AccessControlStorage storage $ = _getAccessControlStorage(); return $._roles[role].hasRole[account]; } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()` * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier. */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account` * is missing `role`. */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert AccessControlUnauthorizedAccount(account, role); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) { AccessControlStorage storage $ = _getAccessControlStorage(); return $._roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address callerConfirmation) public virtual { if (callerConfirmation != _msgSender()) { revert AccessControlBadConfirmation(); } _revokeRole(role, callerConfirmation); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { AccessControlStorage storage $ = _getAccessControlStorage(); bytes32 previousAdminRole = getRoleAdmin(role); $._roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual returns (bool) { AccessControlStorage storage $ = _getAccessControlStorage(); if (!hasRole(role, account)) { $._roles[role].hasRole[account] = true; emit RoleGranted(role, account, _msgSender()); return true; } else { return false; } } /** * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual returns (bool) { AccessControlStorage storage $ = _getAccessControlStorage(); if (hasRole(role, account)) { $._roles[role].hasRole[account] = false; emit RoleRevoked(role, account, _msgSender()); return true; } else { return false; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.20; /** * @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 is the index of the value in the `values` array plus 1. // Position 0 is used to mean a value is not in the set. mapping(bytes32 value => uint256) _positions; } /** * @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._positions[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 cache the value's position to prevent multiple reads from the same storage slot uint256 position = set._positions[value]; if (position != 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 valueIndex = position - 1; uint256 lastIndex = set._values.length - 1; if (valueIndex != lastIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the lastValue to the index where the value to delete is set._values[valueIndex] = lastValue; // Update the tracked position of the lastValue (that was just moved) set._positions[lastValue] = position; } // Delete the slot where the moved value was stored set._values.pop(); // Delete the tracked position for the deleted slot delete set._positions[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._positions[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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.20; /** * @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] * ```solidity * 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 Storage of the initializable contract. * * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions * when using with upgradeable contracts. * * @custom:storage-location erc7201:openzeppelin.storage.Initializable */ struct InitializableStorage { /** * @dev Indicates that the contract has been initialized. */ uint64 _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool _initializing; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00; /** * @dev The contract is already initialized. */ error InvalidInitialization(); /** * @dev The contract is not initializing. */ error NotInitializing(); /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint64 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 in the context of a constructor an `initializer` may be invoked any * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in * production. * * Emits an {Initialized} event. */ modifier initializer() { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); // Cache values to avoid duplicated sloads bool isTopLevelCall = !$._initializing; uint64 initialized = $._initialized; // Allowed calls: // - initialSetup: the contract is not in the initializing state and no previous version was // initialized // - construction: the contract is initialized at version 1 (no reininitialization) and the // current contract is just being deployed bool initialSetup = initialized == 0 && isTopLevelCall; bool construction = initialized == 1 && address(this).code.length == 0; if (!initialSetup && !construction) { revert InvalidInitialization(); } $._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 2**64 - 1 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint64 version) { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing || $._initialized >= version) { revert InvalidInitialization(); } $._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() { _checkInitializing(); _; } /** * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}. */ function _checkInitializing() internal view virtual { if (!_isInitializing()) { revert NotInitializing(); } } /** * @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 { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing) { revert InvalidInitialization(); } if ($._initialized != type(uint64).max) { $._initialized = type(uint64).max; emit Initialized(type(uint64).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint64) { return _getInitializableStorage()._initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _getInitializableStorage()._initializing; } /** * @dev Returns a pointer to the storage namespace. */ // solhint-disable-next-line var-name-mixedcase function _getInitializableStorage() private pure returns (InitializableStorage storage $) { assembly { $.slot := INITIALIZABLE_STORAGE } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol) pragma solidity ^0.8.20; import {Initializable} from "../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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.20; /** * @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 IERC1822Proxiable { /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/ERC1967/ERC1967Utils.sol) pragma solidity ^0.8.20; import {IBeacon} from "../beacon/IBeacon.sol"; import {Address} from "../../utils/Address.sol"; import {StorageSlot} from "../../utils/StorageSlot.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. */ library ERC1967Utils { // We re-declare ERC-1967 events here because they can't be used directly from IERC1967. // This will be fixed in Solidity 0.8.21. At that point we should remove these events. /** * @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); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1. */ // solhint-disable-next-line private-vars-leading-underscore bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev The `implementation` of the proxy is invalid. */ error ERC1967InvalidImplementation(address implementation); /** * @dev The `admin` of the proxy is invalid. */ error ERC1967InvalidAdmin(address admin); /** * @dev The `beacon` of the proxy is invalid. */ error ERC1967InvalidBeacon(address beacon); /** * @dev An upgrade function sees `msg.value > 0` that may be lost. */ error ERC1967NonPayable(); /** * @dev Returns the current implementation address. */ function getImplementation() internal view returns (address) { return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { if (newImplementation.code.length == 0) { revert ERC1967InvalidImplementation(newImplementation); } StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Performs implementation upgrade with additional setup call if data is nonempty. * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected * to avoid stuck value in the contract. * * Emits an {IERC1967-Upgraded} event. */ function upgradeToAndCall(address newImplementation, bytes memory data) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); if (data.length > 0) { Address.functionDelegateCall(newImplementation, data); } else { _checkNonPayable(); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1. */ // solhint-disable-next-line private-vars-leading-underscore bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Returns the current admin. * * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103` */ function getAdmin() internal view returns (address) { return StorageSlot.getAddressSlot(ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { if (newAdmin == address(0)) { revert ERC1967InvalidAdmin(address(0)); } StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {IERC1967-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 the keccak-256 hash of "eip1967.proxy.beacon" subtracted by 1. */ // solhint-disable-next-line private-vars-leading-underscore bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Returns the current beacon. */ function getBeacon() internal view returns (address) { return StorageSlot.getAddressSlot(BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { if (newBeacon.code.length == 0) { revert ERC1967InvalidBeacon(newBeacon); } StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon; address beaconImplementation = IBeacon(newBeacon).implementation(); if (beaconImplementation.code.length == 0) { revert ERC1967InvalidImplementation(beaconImplementation); } } /** * @dev Change the beacon and trigger a setup call if data is nonempty. * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected * to avoid stuck value in the contract. * * Emits an {IERC1967-BeaconUpgraded} event. * * CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since * it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for * efficiency. */ function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0) { Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data); } else { _checkNonPayable(); } } /** * @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract * if an upgrade doesn't perform an initialization call. */ function _checkNonPayable() private { if (msg.value > 0) { revert ERC1967NonPayable(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol) pragma solidity ^0.8.20; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev The `account` is missing a role. */ error AccessControlUnauthorizedAccount(address account, bytes32 neededRole); /** * @dev The caller of a function is not the expected one. * * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}. */ error AccessControlBadConfirmation(); /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. */ function renounceRole(bytes32 role, address callerConfirmation) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import {Initializable} from "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` */ abstract contract ERC165Upgradeable is Initializable, IERC165 { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.20; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeacon { /** * @dev Must return an address that can be used as a delegate call target. * * {UpgradeableBeacon} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol) pragma solidity ^0.8.20; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error AddressInsufficientBalance(address account); /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedInnerCall(); /** * @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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert AddressInsufficientBalance(address(this)); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert FailedInnerCall(); } } /** * @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 or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {FailedInnerCall} error. * * 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. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @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`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert AddressInsufficientBalance(address(this)); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an * unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {FailedInnerCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}. */ function _revert(bytes memory returndata) 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 FailedInnerCall(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.20; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(newImplementation.code.length > 0); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "remappings": [ "@openzeppelin/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/", "@prb/test/=lib/prb-test/src/", "forge-std/=lib/forge-std/src/", "@oz-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "@std/=lib/forge-std/src/", "@uniswap/v2-core/=lib/v2-core/", "@uniswap/v2-periphery/=lib/v2-periphery/", "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "openzeppelin/=lib/openzeppelin-contracts/contracts/", "prb-test/=lib/prb-test/src/", "v2-core/=lib/v2-core/contracts/", "v2-periphery/=lib/v2-periphery/contracts/" ], "optimizer": { "enabled": true, "runs": 10000 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "none", "appendCBOR": false }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"ERC1967InvalidImplementation","type":"error"},{"inputs":[],"name":"ERC1967NonPayable","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[],"name":"UUPSUnauthorizedCallContext","type":"error"},{"inputs":[{"internalType":"bytes32","name":"slot","type":"bytes32"}],"name":"UUPSUnsupportedProxiableUUID","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isActive","type":"bool"}],"name":"AirDropToggled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ReceivedEther","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"circulatingSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"swapTaxCollected","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tradingRevenueCollected","type":"uint256"}],"name":"Snapshot","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ethAmount","type":"uint256"}],"name":"SwappedToEth","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ethAmount","type":"uint256"}],"name":"SwappedToXperp","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isActive","type":"bool"}],"name":"TaxActiveChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tax","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"teamWalletTax","type":"uint256"}],"name":"TaxChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountXperp","type":"uint256"}],"name":"Taxed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"teamWallet","type":"address"}],"name":"TeamWalletUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"TradingOnUniSwapDisabled","type":"event"},{"anonymous":false,"inputs":[],"name":"TradingOnUniSwapEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"walletBalanceLimit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sellLimit","type":"uint256"}],"name":"WalletBalanceLimitChanged","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DisableTradingOnUniSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"EXCLUDED_FROM_CIRCULATION_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EXCLUDED_FROM_TAXATION_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EnableTradingOnUniSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"RESCUE_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SNAPSHOT_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPGRADE_INTERFACE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"circulatingSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"epochs","outputs":[{"internalType":"uint256","name":"epochTimestamp","type":"uint256"},{"internalType":"uint256","name":"epochCirculatingSupply","type":"uint256"},{"internalType":"uint256","name":"epochRevenueFromSwapTaxCollectedXPERP","type":"uint256"},{"internalType":"uint256","name":"epochSwapRevenueETH","type":"uint256"},{"internalType":"uint256","name":"epochTradingRevenueETH","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_epoch","type":"uint256"}],"name":"getBalanceForEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_epoch","type":"uint256"}],"name":"getBalanceForEpochOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_epoch","type":"uint256"}],"name":"getClaimableForEpochOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getClaimableOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"epochIndex","type":"uint256"},{"internalType":"address","name":"userAddress","type":"address"}],"name":"getDepositedInEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getEpochsPassed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"epochIndex","type":"uint256"},{"internalType":"address","name":"userAddress","type":"address"}],"name":"getWithdrawnInEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hundredPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initPair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_teamWallet","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isAirDropActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isTaxActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isTradingEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastClaimedEpochs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oneMillion","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAdd","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"rescueERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_weiAmount","type":"uint256"}],"name":"rescueETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revShareAndTeamCurrentEpochXPERP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sellLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_sellLimit","type":"uint256"}],"name":"setSellLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tax","type":"uint256"},{"internalType":"uint256","name":"_teamWalletTax","type":"uint256"}],"name":"setTax","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isTaxActive","type":"bool"}],"name":"setTaxActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_walletBalanceLimit","type":"uint256"}],"name":"setWalletBalanceLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"snapshot","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapTaxCollectedTotalXPERP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"teamWallet","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"teamWalletTax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleAirDrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tradingRevenueDistributedTotalETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapV2Pair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapV2Router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_teamWallet","type":"address"}],"name":"updateTeamWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"walletBalanceLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60a0604052306080523480156200001557600080fd5b506200002062000026565b620000da565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff1615620000775760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b0390811614620000d75780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516149476200010460003960008181612cc101528181612cea0152612ebb01526149476000f3fe6080604052600436106104335760003560e01c80637cb332bb11610228578063a9059cbb11610128578063ca15c873116100bb578063d9a553aa1161008a578063e4ef93b81161006f578063e4ef93b814610dd9578063fe85b42b14610df9578063feb1dfcc14610e0f57600080fd5b8063d9a553aa14610d55578063dd62ed3e14610d7457600080fd5b8063ca15c87314610ce0578063cdbafa1014610d00578063d1058e5914610d20578063d547741f14610d3557600080fd5b8063b1316460116100f7578063b131646014610c17578063b1a9f80914610c44578063c4d66de814610c78578063c6b61e4c14610c9857600080fd5b8063a9059cbb14610b6e578063a9bf2c0914610b8e578063aa65c54614610bae578063ad3cb1cc14610bce57600080fd5b80639010d07c116101bb57806395d89b411161018a57806398a0dd091161016f57806398a0dd0914610b1f5780639e252f0014610b39578063a217fddf14610b5957600080fd5b806395d89b4114610b025780639711715a14610b1757600080fd5b80639010d07c14610a4857806390f5fd4b14610a6857806391d1485414610a885780639358928b14610aed57600080fd5b8063853755fc116101f7578063853755fc146109e75780638817f6f1146109fc5780638a9cb36114610a125780638cd4426d14610a2857600080fd5b80637cb332bb1461097d5780637ff976c71461099d57806382b2ed13146109b25780638456cb59146109d257600080fd5b806337c279dc116103335780634f91e48c116102c65780635e9177ae116102955780637028e2cd1161027a5780637028e2cd146108c057806370a08231146108f457806375b238fc1461094957600080fd5b80635e9177ae14610880578063667f6526146108a057600080fd5b80634f91e48c146107fe57806352d1902d1461081457806359927044146108295780635c975abb1461084957600080fd5b806349bd5a5e1161030257806349bd5a5e1461077b57806349cb380f146107a15780634e2fe61f146107b75780634f1ef286146107eb57600080fd5b806337c279dc146107125780633c88c0a3146107285780633f4ba83a14610748578063413e920d1461075d57600080fd5b8063233edfe7116103c65780632f2ff15d116103955780633059f3561161037a5780633059f356146106c0578063313ce567146106d657806336568abe146106f257600080fd5b80632f2ff15d146106805780632ffc1628146106a057600080fd5b8063233edfe7146105c757806323b872dd146105dd578063244519fa146105fd578063248a9ca31461063157600080fd5b8063095ea7b311610402578063095ea7b3146105145780631694505e1461053457806318160ddd146105745780631c73bca4146105b257600080fd5b806301ffc9a71461047457806303c051c3146104a9578063064a59d0146104c057806306fdde03146104f257600080fd5b3661046f5760405134815233907fa419615bc8fda4c87663805ee2a3597a6d71c1d476911d9892f340d965bc7bf19060200160405180910390a2005b600080fd5b34801561048057600080fd5b5061049461048f36600461428f565b610e24565b60405190151581526020015b60405180910390f35b3480156104b557600080fd5b506104be610e80565b005b3480156104cc57600080fd5b506005546104949074010000000000000000000000000000000000000000900460ff1681565b3480156104fe57600080fd5b50610507610efe565b6040516104a091906142f5565b34801561052057600080fd5b5061049461052f36600461435b565b610fd3565b34801561054057600080fd5b5061055c737a250d5630b4cf539739df2c5dacb4c659f2488d81565b6040516001600160a01b0390911681526020016104a0565b34801561058057600080fd5b507f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace02545b6040519081526020016104a0565b3480156105be57600080fd5b506009546105a4565b3480156105d357600080fd5b506105a460075481565b3480156105e957600080fd5b506104946105f8366004614387565b610feb565b34801561060957600080fd5b506105a47fdf112b612e9caae17b7645f3b1b08e97332b1641a13ce63785457f40efa3f27c81565b34801561063d57600080fd5b506105a461064c3660046143c8565b60009081527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015490565b34801561068c57600080fd5b506104be61069b3660046143e1565b611011565b3480156106ac57600080fd5b506104be6106bb36600461441f565b61105b565b3480156106cc57600080fd5b506105a460035481565b3480156106e257600080fd5b50604051601281526020016104a0565b3480156106fe57600080fd5b506104be61070d3660046143e1565b6110ce565b34801561071e57600080fd5b506105a460065481565b34801561073457600080fd5b506105a461074336600461435b565b61111f565b34801561075457600080fd5b506104be61124e565b34801561076957600080fd5b506105a469d3c21bcecceda100000081565b34801561078757600080fd5b5060045461055c906201000090046001600160a01b031681565b3480156107ad57600080fd5b506105a460085481565b3480156107c357600080fd5b506105a47f2bfa5424769abb48caa3faa232f6faec62b33e75ed1d06512252216b523808d681565b6104be6107f936600461446b565b611283565b34801561080a57600080fd5b506105a460015481565b34801561082057600080fd5b506105a46112a2565b34801561083557600080fd5b5060055461055c906001600160a01b031681565b34801561085557600080fd5b507fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff16610494565b34801561088c57600080fd5b506105a461089b3660046143c8565b6112d1565b3480156108ac57600080fd5b506104be6108bb36600461454d565b6112dd565b3480156108cc57600080fd5b506105a47f5fdbd35e8da83ee755d5e62a539e5ed7f47126abede0b8b10f9ea43dc6eed07f81565b34801561090057600080fd5b506105a461090f36600461456f565b6001600160a01b031660009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00602052604090205490565b34801561095557600080fd5b506105a47fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561098957600080fd5b506104be61099836600461456f565b6113be565b3480156109a957600080fd5b506104be6114a4565b3480156109be57600080fd5b506105a46109cd36600461456f565b611539565b3480156109de57600080fd5b506104be611644565b3480156109f357600080fd5b506104be611676565b348015610a0857600080fd5b506105a460005481565b348015610a1e57600080fd5b506105a461271081565b348015610a3457600080fd5b506104be610a4336600461435b565b611720565b348015610a5457600080fd5b5061055c610a6336600461454d565b6117d4565b348015610a7457600080fd5b506105a4610a8336600461435b565b611815565b348015610a9457600080fd5b50610494610aa33660046143e1565b60009182527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602090815260408084206001600160a01b0393909316845291905290205460ff1690565b348015610af957600080fd5b506105a46118e1565b348015610b0e57600080fd5b50610507611a29565b6104be611a7a565b348015610b2b57600080fd5b506004546104949060ff1681565b348015610b4557600080fd5b506104be610b543660046143c8565b611cfb565b348015610b6557600080fd5b506105a4600081565b348015610b7a57600080fd5b50610494610b8936600461435b565b611d52565b348015610b9a57600080fd5b506104be610ba93660046143c8565b611d60565b348015610bba57600080fd5b506105a4610bc93660046143e1565b611e22565b348015610bda57600080fd5b506105076040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b348015610c2357600080fd5b506105a4610c3236600461456f565b600a6020526000908152604090205481565b348015610c5057600080fd5b506105a47fc4c453d647953c0fd35db5a34ee76e60fb4abc3a8fb891a25936b70b38f2925381565b348015610c8457600080fd5b506104be610c9336600461456f565b611eba565b348015610ca457600080fd5b50610cb8610cb33660046143c8565b6123c8565b604080519586526020860194909452928401919091526060830152608082015260a0016104a0565b348015610cec57600080fd5b506105a4610cfb3660046143c8565b612409565b348015610d0c57600080fd5b506105a4610d1b3660046143e1565b612441565b348015610d2c57600080fd5b506104be6124d9565b348015610d4157600080fd5b506104be610d503660046143e1565b6126ba565b348015610d6157600080fd5b5060045461049490610100900460ff1681565b348015610d8057600080fd5b506105a4610d8f36600461458c565b6001600160a01b0391821660009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020908152604080832093909416825291909152205490565b348015610de557600080fd5b506104be610df43660046143c8565b6126fe565b348015610e0557600080fd5b506105a460025481565b348015610e1b57600080fd5b506104be6127c1565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610e7a5750610e7a826129b6565b92915050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610eaa81612a4d565b600580547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690556040517ff6c0da004e5c54863f4e9c53375139d02174b08a4b6d00edcc264f31ce57092d90600090a150565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0380546060917f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0091610f4f906145ba565b80601f0160208091040260200160405190810160405280929190818152602001828054610f7b906145ba565b8015610fc85780601f10610f9d57610100808354040283529160200191610fc8565b820191906000526020600020905b815481529060010190602001808311610fab57829003601f168201915b505050505091505090565b600033610fe1818585612a57565b5060019392505050565b600033610ff9858285612a64565b611004858585612b14565b60019150505b9392505050565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015461104b81612a4d565b6110558383612ba5565b50505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561108581612a4d565b6004805460ff19168315159081179091556040519081527f540a527e51aeab0dddfb9797856930b60ffa5937b1d134ccf4e271a797dbe70a906020015b60405180910390a15050565b6001600160a01b0381163314611110576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61111a8282612bfc565b505050565b600954600090821061113357506000610e7a565b6001600160a01b03831660009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00602052604090205460095460011161100a576009546000906111879060019061463c565b90505b6009818154811061119d5761119d61464f565b600091825260208083206001600160a01b0389168452600660079093020191909101905260409020546111d0908361467e565b9150600981815481106111e5576111e561464f565b600091825260208083206001600160a01b038916845260056007909302019190910190526040902054611218908361463c565b915061122584600161467e565b811480611230575080155b611246578061123e81614691565b91505061118a565b509392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561127881612a4d565b611280612c4a565b50565b61128b612cb6565b61129482612d86565b61129e8282612d91565b5050565b60006112ac612eb0565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b6000610e7a338361111f565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561130781612a4d565b6127108311158015611317575060015b801561132557506127108211155b6113765760405162461bcd60e51b815260206004820152600b60248201527f496e76616c69642074617800000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6002839055600382905560408051848152602081018490527f4ac0d6b0d694ec6c120242feaca94cfb6fbfe646756cd7026301e3a5984f0450910160405180910390a1505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756113e881612a4d565b6001600160a01b03821661143e5760405162461bcd60e51b815260206004820152601360248201527f496e76616c6964207465616d2077616c6c657400000000000000000000000000604482015260640161136d565b600580547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0384169081179091556040519081527ff6215f245bfd24e51265c56ef650fdd856aa4ece6221ee1ef395bbe0a5558010906020016110c2565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756114ce81612a4d565b600580547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790556040517f2d4fd5bae8f53dd83c59664d82f3c9a17a251e2ac3b1af3d85d6bec37d098f9f90600090a150565b60095460009060011061158e5760405162461bcd60e51b815260206004820152600d60248201527f4e6f2065706f6368732079657400000000000000000000000000000000000000604482015260640161136d565b6001600160a01b03821660009081527f943a504c852fc4fd086158e94aaf0770a97cfa81b8009a4886168d053ff1dceb602052604090205460ff16156115d657506000919050565b6001600160a01b0382166000908152600a602052604081205481906115fc90600161467e565b90505b60095461160e9060019061463c565b81101561163d5761161f8482611815565b611629908361467e565b915080611635816146a8565b9150506115ff565b5092915050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561166e81612a4d565b611280612f12565b7f5fdbd35e8da83ee755d5e62a539e5ed7f47126abede0b8b10f9ea43dc6eed07f6116a081612a4d565b6004805460ff61010080830482161581027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff90931692909217928390556040517f406c46ebfaaea47203daefc50a4298117dc2a4d07342d50b54b526c8316b0d8f936117159390049091161515815260200190565b60405180910390a150565b7fc4c453d647953c0fd35db5a34ee76e60fb4abc3a8fb891a25936b70b38f2925361174a81612a4d565b6040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018390526001600160a01b0384169063a9059cbb906044016020604051808303816000875af11580156117b0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105591906146c2565b60008281527fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e8237170593200060208190526040822061180d9084612f6d565b949350505050565b6009546000906001118061182b57506009548210155b1561183857506000610e7a565b60006009838154811061184d5761184d61464f565b90600052602060002090600702019050600a6000856001600160a01b03166001600160a01b03168152602001908152602001600020548311158061189357506001810154155b156118a2576000915050610e7a565b8060010154816004015482600301546118bb919061467e565b6118c5868661111f565b6118cf91906146df565b6118d991906146f6565b915050610e7a565b60008061190d7f2bfa5424769abb48caa3faa232f6faec62b33e75ed1d06512252216b523808d6612409565b90506000805b828110156119665761194861090f7f2bfa5424769abb48caa3faa232f6faec62b33e75ed1d06512252216b523808d6836117d4565b611952908361467e565b91508061195e816146a8565b915050611913565b503060009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0060205260409020546119a0908261467e565b6004546201000090046001600160a01b031660009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0060205260409020549091506119ed908261467e565b905080611a187f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace025490565b611a22919061463c565b9250505090565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0480546060917f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0091610f4f906145ba565b7f5fdbd35e8da83ee755d5e62a539e5ed7f47126abede0b8b10f9ea43dc6eed07f611aa481612a4d565b611aac612f79565b6009805460009190611ac09060019061463c565b81548110611ad057611ad061464f565b600091825260208220426007909202019081559150611aed6118e1565b60075490915080151580611b015750600034115b611b725760405162461bcd60e51b8152602060048201526024808201527f4e6f2074617820636f6c6c65637465642079657420616e64206e6f204554482060448201527f73656e7400000000000000000000000000000000000000000000000000000000606482015260840161136d565b3060009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace006020526040902054811115611bf05760405162461bcd60e51b815260206004820152601a60248201527f42616c616e6365206c657373207468616e207265717569726564000000000000604482015260640161136d565b6000808211611c00576000611c09565b611c0982612ffa565b9050600060025460035483611c1e91906146df565b611c2891906146f6565b90506000611c36828461463c565b6005546040519192506001600160a01b03169083156108fc029084906000818181858888f19350505050158015611c71573d6000803e3d6000fd5b5060018601859055346004870181905560028701859055600387018290556009546040805191825260208201889052810183905260608101919091527f2b7e220b2babc392b7f28bbfb51e48a8ae7ab8d75e59253607e2483dd411edb79060800160405180910390a1505060098054600101815560009081526007555061128092506131e4915050565b7fc4c453d647953c0fd35db5a34ee76e60fb4abc3a8fb891a25936b70b38f29253611d2581612a4d565b604051339083156108fc029084906000818181858888f1935050505015801561111a573d6000803e3d6000fd5b600033610fe1818585612b14565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775611d8a81612a4d565b69d3c21bcecceda1000000821115611de45760405162461bcd60e51b815260206004820152601a60248201527f496e76616c69642073656c6c2062616c616e6365206c696d6974000000000000604482015260640161136d565b600182905560005460408051918252602082018490527f71d2b4d3f228f2d75fd480fb859115900b1af3df7a4f93fdff075e55271d808191016110c2565b6009546000908310611e765760405162461bcd60e51b815260206004820152601360248201527f496e76616c69642065706f636820696e64657800000000000000000000000000604482015260640161136d565b60098381548110611e8957611e8961464f565b600091825260208083206001600160a01b038616845260066007909302019190910190526040902054905092915050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff16600081158015611f055750825b905060008267ffffffffffffffff166001148015611f225750303b155b905081158015611f30575080155b15611f67576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001660011785558315611fc85784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b6001600160a01b038616612008576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61207c6040518060400160405280600581526020017f78706572700000000000000000000000000000000000000000000000000000008152506040518060400160405280600581526020017f787065727000000000000000000000000000000000000000000000000000000081525061320a565b61208461321c565b61208c613224565b61209461321c565b61209c613234565b6005805461015e6002556096600355600480547fffffffffffffffffffffff0000000000000000000000000000000000000000009092166001600160a01b038a161790925569021e19e0c9bab2400000600081815560019182557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909216179091556121289080613244565b6121527fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177580613244565b61219c7f2bfa5424769abb48caa3faa232f6faec62b33e75ed1d06512252216b523808d67fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775613244565b6121e67fdf112b612e9caae17b7645f3b1b08e97332b1641a13ce63785457f40efa3f27c7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775613244565b6122107f5fdbd35e8da83ee755d5e62a539e5ed7f47126abede0b8b10f9ea43dc6eed07f80613244565b61225a7fc4c453d647953c0fd35db5a34ee76e60fb4abc3a8fb891a25936b70b38f292537fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775613244565b6122847fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533612ba5565b506122af7f2bfa5424769abb48caa3faa232f6faec62b33e75ed1d06512252216b523808d633612ba5565b506122da7fdf112b612e9caae17b7645f3b1b08e97332b1641a13ce63785457f40efa3f27c33612ba5565b506123057f5fdbd35e8da83ee755d5e62a539e5ed7f47126abede0b8b10f9ea43dc6eed07f33612ba5565b506123307fc4c453d647953c0fd35db5a34ee76e60fb4abc3a8fb891a25936b70b38f2925333612ba5565b5061233c600033612ba5565b50600980546000829052600201905561235f3369d3c21bcecceda10000006132e8565b83156123c05784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050565b600981815481106123d857600080fd5b6000918252602090912060079091020180546001820154600283015460038401546004909401549294509092909185565b60008181527fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e8237170593200060208190526040822061100a90613337565b60095460009083106124955760405162461bcd60e51b815260206004820152601360248201527f496e76616c69642065706f636820696e64657800000000000000000000000000604482015260640161136d565b600983815481106124a8576124a861464f565b600091825260208083206001600160a01b038616845260056007909302019190910190526040902054905092915050565b6124e1612f79565b600454610100900460ff161561255f5760405162461bcd60e51b815260206004820152602560248201527f41697264726f702069732061637469766520696e7374656164206f6620636c6160448201527f696d696e67000000000000000000000000000000000000000000000000000000606482015260840161136d565b600061256a33611539565b9050600081116125bc5760405162461bcd60e51b815260206004820152601060248201527f4e6f7468696e6720746f20636c61696d00000000000000000000000000000000604482015260640161136d565b6009546125cb9060029061463c565b336000908152600a60205260409020554781111561262b5760405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e7420636f6e74726163742062616c616e6365000000604482015260640161136d565b604051339082156108fc029083906000818181858888f19350505050158015612658573d6000803e3d6000fd5b5060405181815233907fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a9060200160405180910390a2506126b860017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260409020600101546126f481612a4d565b6110558383612bfc565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561272881612a4d565b69d3c21bcecceda10000008211156127825760405162461bcd60e51b815260206004820152601c60248201527f496e76616c69642077616c6c65742062616c616e6365206c696d697400000000604482015260640161136d565b60008290556001546040805184815260208101929092527f71d2b4d3f228f2d75fd480fb859115900b1af3df7a4f93fdff075e55271d808191016110c2565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756127eb81612a4d565b737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561283d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128619190614731565b6001600160a01b031663c9c6539630737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156128c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128e69190614731565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af115801561294b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061296f9190614731565b600460026101000a8154816001600160a01b0302191690836001600160a01b0316021790555061128030737a250d5630b4cf539739df2c5dacb4c659f2488d600019612a57565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610e7a57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610e7a565b6112808133613341565b61111a83838360016133ce565b6001600160a01b0383811660009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace01602090815260408083209386168352929052205460001981146110555781811015612b05576040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602481018290526044810183905260640161136d565b611055848484840360006133ce565b6001600160a01b038316612b57576040517f96c6fd1e0000000000000000000000000000000000000000000000000000000081526000600482015260240161136d565b6001600160a01b038216612b9a576040517fec442f050000000000000000000000000000000000000000000000000000000081526000600482015260240161136d565b61111a8383836134fa565b60007fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e8237170593200081612bd38585613a06565b9050801561180d576000858152602083905260409020612bf39085613ad5565b50949350505050565b60007fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e8237170593200081612c2a8585613aea565b9050801561180d576000858152602083905260409020612bf39085613b90565b612c52613ba5565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300805460ff191681557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b039091168152602001611715565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480612d4f57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316612d437f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614155b156126b8576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061129e81612a4d565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612e09575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252612e069181019061474e565b60015b612e4a576040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526001600160a01b038316600482015260240161136d565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8114612ea6576040517faa1d49a40000000000000000000000000000000000000000000000000000000081526004810182905260240161136d565b61111a8383613c00565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146126b8576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612f1a613c56565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300805460ff191660011781557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833612c9e565b600061100a8383613cb2565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0080547ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01612ff4576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b60008160000361300c57506000919050565b60408051600280825260608201835260009260208301908036833701905050905030816000815181106130415761304161464f565b60200260200101906001600160a01b031690816001600160a01b031681525050737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d79190614731565b816001815181106130ea576130ea61464f565b6001600160a01b03909216602092830291909101909101526040517f791ac9470000000000000000000000000000000000000000000000000000000081524790737a250d5630b4cf539739df2c5dacb4c659f2488d9063791ac9479061315d908790600090879030904290600401614767565b600060405180830381600087803b15801561317757600080fd5b505af115801561318b573d6000803e3d6000fd5b504792506000915061319f9050838361463c565b60408051888152602081018390529192507fa0948473da2b862876c9b294bc55a32b178b0e3c6c9da3c91555924ec8017ee9910160405180910390a195945050505050565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b613212613cdc565b61129e8282613d43565b6126b8613cdc565b61322c613cdc565b6126b8613da6565b61323c613cdc565b6126b8613dd9565b7f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800600061329f8460009081527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015490565b600085815260208490526040808220600101869055519192508491839187917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a450505050565b6001600160a01b03821661332b576040517fec442f050000000000000000000000000000000000000000000000000000000081526000600482015260240161136d565b61129e600083836134fa565b6000610e7a825490565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602090815260408083206001600160a01b038516845290915290205460ff1661129e576040517fe2517d3f0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024810183905260440161136d565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace006001600160a01b038516613432576040517fe602df050000000000000000000000000000000000000000000000000000000081526000600482015260240161136d565b6001600160a01b038416613475576040517f94280d620000000000000000000000000000000000000000000000000000000081526000600482015260240161136d565b6001600160a01b038086166000908152600183016020908152604080832093881683529290522083905581156134f357836001600160a01b0316856001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040516134ea91815260200190565b60405180910390a35b5050505050565b6004546000906001600160a01b038581166201000090920416148061353257506004546001600160a01b038481166201000090920416145b8015613552575033737a250d5630b4cf539739df2c5dacb4c659f2488d14155b801561356757506001600160a01b0384163014155b801561357c57506001600160a01b0383163014155b80156135c057506001600160a01b03841660009081527fad26d6f611bb87734587b81c10d42377fc8d10182ad7ede203733d2bf10b81f6602052604090205460ff16155b801561360457506001600160a01b03831660009081527fad26d6f611bb87734587b81c10d42377fc8d10182ad7ede203733d2bf10b81f6602052604090205460ff16155b60055490915074010000000000000000000000000000000000000000900460ff168061362e575080155b61367a5760405162461bcd60e51b815260206004820152601a60248201527f54726164696e67206973206e6f7420656e61626c656420796574000000000000604482015260640161136d565b81811561392c5760055474010000000000000000000000000000000000000000900460ff166136eb5760405162461bcd60e51b815260206004820152601a60248201527f54726164696e67206973206e6f7420656e61626c656420796574000000000000604482015260640161136d565b6004546001600160a01b03868116620100009092041614801561370f575060008054115b156137d45760005483613756866001600160a01b031660009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00602052604090205490565b613760919061467e565b11156137d45760405162461bcd60e51b815260206004820152603b60248201527f486f6c64696e6720616d6f756e7420616674657220627579696e67206578636560448201527f656473206d6178696d756d20616c6c6f77656420746f6b656e732e0000000000606482015260840161136d565b6004546001600160a01b0385811662010000909204161480156137f957506000600154115b15613876576001548311156138765760405162461bcd60e51b815260206004820152602e60248201527f53656c6c696e6720616d6f756e742065786365656473206d6178696d756d206160448201527f6c6c6f77656420746f6b656e732e000000000000000000000000000000000000606482015260840161136d565b60045460ff161561392c5760006127106002548561389491906146df565b61389e91906146f6565b90506138ab863083612b14565b856001600160a01b03167f9174fcf222375951e43519967bd54a1083271e61dab0b523b644cdf98c975f34826040516138e691815260200190565b60405180910390a26138f8818361463c565b9150806006600082825461390c919061467e565b925050819055508060076000828254613925919061467e565b9091555050505b60095460009061393e9060019061463c565b905081600982815481106139545761395461464f565b90600052602060002090600702016005016000876001600160a01b03166001600160a01b031681526020019081526020016000206000828254613997919061467e565b9250508190555083600982815481106139b2576139b261464f565b90600052602060002090600702016006016000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546139f5919061467e565b909155506123c09050868684613de1565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602081815260408084206001600160a01b038616855290915282205460ff16613acb576000848152602082815260408083206001600160a01b03871684529091529020805460ff19166001179055613a813390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050610e7a565b6000915050610e7a565b600061100a836001600160a01b038416613f4a565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602081815260408084206001600160a01b038616855290915282205460ff1615613acb576000848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610e7a565b600061100a836001600160a01b038416613f99565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff166126b8576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613c0982614082565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115613c4e5761111a828261412a565b61129e6141a0565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff16156126b8576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000826000018281548110613cc957613cc961464f565b9060005260206000200154905092915050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff166126b8576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613d4b613cdc565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace007f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace03613d97848261481e565b5060048101611055838261481e565b613dae613cdc565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300805460ff19169055565b6131e4613cdc565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace006001600160a01b038416613e2f5781816002016000828254613e24919061467e565b90915550613eba9050565b6001600160a01b03841660009081526020829052604090205482811015613e9b576040517fe450d38c0000000000000000000000000000000000000000000000000000000081526001600160a01b0386166004820152602481018290526044810184905260640161136d565b6001600160a01b03851660009081526020839052604090209083900390555b6001600160a01b038316613ed8576002810180548390039055613ef7565b6001600160a01b03831660009081526020829052604090208054830190555b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051613f3c91815260200190565b60405180910390a350505050565b6000818152600183016020526040812054613f9157508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610e7a565b506000610e7a565b60008181526001830160205260408120548015613acb576000613fbd60018361463c565b8554909150600090613fd19060019061463c565b9050808214614036576000866000018281548110613ff157613ff161464f565b90600052602060002001549050808760000184815481106140145761401461464f565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614047576140476148fc565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610e7a565b806001600160a01b03163b6000036140d1576040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526001600160a01b038216600482015260240161136d565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051614147919061492b565b600060405180830381855af49150503d8060008114614182576040519150601f19603f3d011682016040523d82523d6000602084013e614187565b606091505b50915091506141978583836141d8565b95945050505050565b34156126b8576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6060826141ed576141e88261424d565b61100a565b815115801561420457506001600160a01b0384163b155b15614246576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240161136d565b508061100a565b80511561425d5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000602082840312156142a157600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461100a57600080fd5b60005b838110156142ec5781810151838201526020016142d4565b50506000910152565b60208152600082518060208401526143148160408501602087016142d1565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6001600160a01b038116811461128057600080fd5b6000806040838503121561436e57600080fd5b823561437981614346565b946020939093013593505050565b60008060006060848603121561439c57600080fd5b83356143a781614346565b925060208401356143b781614346565b929592945050506040919091013590565b6000602082840312156143da57600080fd5b5035919050565b600080604083850312156143f457600080fd5b82359150602083013561440681614346565b809150509250929050565b801515811461128057600080fd5b60006020828403121561443157600080fd5b813561100a81614411565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806040838503121561447e57600080fd5b823561448981614346565b9150602083013567ffffffffffffffff808211156144a657600080fd5b818501915085601f8301126144ba57600080fd5b8135818111156144cc576144cc61443c565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156145125761451261443c565b8160405282815288602084870101111561452b57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b6000806040838503121561456057600080fd5b50508035926020909101359150565b60006020828403121561458157600080fd5b813561100a81614346565b6000806040838503121561459f57600080fd5b82356145aa81614346565b9150602083013561440681614346565b600181811c908216806145ce57607f821691505b602082108103614607577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115610e7a57610e7a61460d565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80820180821115610e7a57610e7a61460d565b6000816146a0576146a061460d565b506000190190565b600060001982036146bb576146bb61460d565b5060010190565b6000602082840312156146d457600080fd5b815161100a81614411565b8082028115828204841417610e7a57610e7a61460d565b60008261472c577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006020828403121561474357600080fd5b815161100a81614346565b60006020828403121561476057600080fd5b5051919050565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156147b75784516001600160a01b031683529383019391830191600101614792565b50506001600160a01b03969096166060850152505050608001529392505050565b601f82111561111a57600081815260208120601f850160051c810160208610156147ff5750805b601f850160051c820191505b818110156123c05782815560010161480b565b815167ffffffffffffffff8111156148385761483861443c565b61484c8161484684546145ba565b846147d8565b602080601f83116001811461488157600084156148695750858301515b600019600386901b1c1916600185901b1785556123c0565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156148ce578886015182559484019460019091019084016148af565b50858210156148ec5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6000825161493d8184602087016142d1565b919091019291505056
Deployed Bytecode
0x6080604052600436106104335760003560e01c80637cb332bb11610228578063a9059cbb11610128578063ca15c873116100bb578063d9a553aa1161008a578063e4ef93b81161006f578063e4ef93b814610dd9578063fe85b42b14610df9578063feb1dfcc14610e0f57600080fd5b8063d9a553aa14610d55578063dd62ed3e14610d7457600080fd5b8063ca15c87314610ce0578063cdbafa1014610d00578063d1058e5914610d20578063d547741f14610d3557600080fd5b8063b1316460116100f7578063b131646014610c17578063b1a9f80914610c44578063c4d66de814610c78578063c6b61e4c14610c9857600080fd5b8063a9059cbb14610b6e578063a9bf2c0914610b8e578063aa65c54614610bae578063ad3cb1cc14610bce57600080fd5b80639010d07c116101bb57806395d89b411161018a57806398a0dd091161016f57806398a0dd0914610b1f5780639e252f0014610b39578063a217fddf14610b5957600080fd5b806395d89b4114610b025780639711715a14610b1757600080fd5b80639010d07c14610a4857806390f5fd4b14610a6857806391d1485414610a885780639358928b14610aed57600080fd5b8063853755fc116101f7578063853755fc146109e75780638817f6f1146109fc5780638a9cb36114610a125780638cd4426d14610a2857600080fd5b80637cb332bb1461097d5780637ff976c71461099d57806382b2ed13146109b25780638456cb59146109d257600080fd5b806337c279dc116103335780634f91e48c116102c65780635e9177ae116102955780637028e2cd1161027a5780637028e2cd146108c057806370a08231146108f457806375b238fc1461094957600080fd5b80635e9177ae14610880578063667f6526146108a057600080fd5b80634f91e48c146107fe57806352d1902d1461081457806359927044146108295780635c975abb1461084957600080fd5b806349bd5a5e1161030257806349bd5a5e1461077b57806349cb380f146107a15780634e2fe61f146107b75780634f1ef286146107eb57600080fd5b806337c279dc146107125780633c88c0a3146107285780633f4ba83a14610748578063413e920d1461075d57600080fd5b8063233edfe7116103c65780632f2ff15d116103955780633059f3561161037a5780633059f356146106c0578063313ce567146106d657806336568abe146106f257600080fd5b80632f2ff15d146106805780632ffc1628146106a057600080fd5b8063233edfe7146105c757806323b872dd146105dd578063244519fa146105fd578063248a9ca31461063157600080fd5b8063095ea7b311610402578063095ea7b3146105145780631694505e1461053457806318160ddd146105745780631c73bca4146105b257600080fd5b806301ffc9a71461047457806303c051c3146104a9578063064a59d0146104c057806306fdde03146104f257600080fd5b3661046f5760405134815233907fa419615bc8fda4c87663805ee2a3597a6d71c1d476911d9892f340d965bc7bf19060200160405180910390a2005b600080fd5b34801561048057600080fd5b5061049461048f36600461428f565b610e24565b60405190151581526020015b60405180910390f35b3480156104b557600080fd5b506104be610e80565b005b3480156104cc57600080fd5b506005546104949074010000000000000000000000000000000000000000900460ff1681565b3480156104fe57600080fd5b50610507610efe565b6040516104a091906142f5565b34801561052057600080fd5b5061049461052f36600461435b565b610fd3565b34801561054057600080fd5b5061055c737a250d5630b4cf539739df2c5dacb4c659f2488d81565b6040516001600160a01b0390911681526020016104a0565b34801561058057600080fd5b507f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace02545b6040519081526020016104a0565b3480156105be57600080fd5b506009546105a4565b3480156105d357600080fd5b506105a460075481565b3480156105e957600080fd5b506104946105f8366004614387565b610feb565b34801561060957600080fd5b506105a47fdf112b612e9caae17b7645f3b1b08e97332b1641a13ce63785457f40efa3f27c81565b34801561063d57600080fd5b506105a461064c3660046143c8565b60009081527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015490565b34801561068c57600080fd5b506104be61069b3660046143e1565b611011565b3480156106ac57600080fd5b506104be6106bb36600461441f565b61105b565b3480156106cc57600080fd5b506105a460035481565b3480156106e257600080fd5b50604051601281526020016104a0565b3480156106fe57600080fd5b506104be61070d3660046143e1565b6110ce565b34801561071e57600080fd5b506105a460065481565b34801561073457600080fd5b506105a461074336600461435b565b61111f565b34801561075457600080fd5b506104be61124e565b34801561076957600080fd5b506105a469d3c21bcecceda100000081565b34801561078757600080fd5b5060045461055c906201000090046001600160a01b031681565b3480156107ad57600080fd5b506105a460085481565b3480156107c357600080fd5b506105a47f2bfa5424769abb48caa3faa232f6faec62b33e75ed1d06512252216b523808d681565b6104be6107f936600461446b565b611283565b34801561080a57600080fd5b506105a460015481565b34801561082057600080fd5b506105a46112a2565b34801561083557600080fd5b5060055461055c906001600160a01b031681565b34801561085557600080fd5b507fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff16610494565b34801561088c57600080fd5b506105a461089b3660046143c8565b6112d1565b3480156108ac57600080fd5b506104be6108bb36600461454d565b6112dd565b3480156108cc57600080fd5b506105a47f5fdbd35e8da83ee755d5e62a539e5ed7f47126abede0b8b10f9ea43dc6eed07f81565b34801561090057600080fd5b506105a461090f36600461456f565b6001600160a01b031660009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00602052604090205490565b34801561095557600080fd5b506105a47fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561098957600080fd5b506104be61099836600461456f565b6113be565b3480156109a957600080fd5b506104be6114a4565b3480156109be57600080fd5b506105a46109cd36600461456f565b611539565b3480156109de57600080fd5b506104be611644565b3480156109f357600080fd5b506104be611676565b348015610a0857600080fd5b506105a460005481565b348015610a1e57600080fd5b506105a461271081565b348015610a3457600080fd5b506104be610a4336600461435b565b611720565b348015610a5457600080fd5b5061055c610a6336600461454d565b6117d4565b348015610a7457600080fd5b506105a4610a8336600461435b565b611815565b348015610a9457600080fd5b50610494610aa33660046143e1565b60009182527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602090815260408084206001600160a01b0393909316845291905290205460ff1690565b348015610af957600080fd5b506105a46118e1565b348015610b0e57600080fd5b50610507611a29565b6104be611a7a565b348015610b2b57600080fd5b506004546104949060ff1681565b348015610b4557600080fd5b506104be610b543660046143c8565b611cfb565b348015610b6557600080fd5b506105a4600081565b348015610b7a57600080fd5b50610494610b8936600461435b565b611d52565b348015610b9a57600080fd5b506104be610ba93660046143c8565b611d60565b348015610bba57600080fd5b506105a4610bc93660046143e1565b611e22565b348015610bda57600080fd5b506105076040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b348015610c2357600080fd5b506105a4610c3236600461456f565b600a6020526000908152604090205481565b348015610c5057600080fd5b506105a47fc4c453d647953c0fd35db5a34ee76e60fb4abc3a8fb891a25936b70b38f2925381565b348015610c8457600080fd5b506104be610c9336600461456f565b611eba565b348015610ca457600080fd5b50610cb8610cb33660046143c8565b6123c8565b604080519586526020860194909452928401919091526060830152608082015260a0016104a0565b348015610cec57600080fd5b506105a4610cfb3660046143c8565b612409565b348015610d0c57600080fd5b506105a4610d1b3660046143e1565b612441565b348015610d2c57600080fd5b506104be6124d9565b348015610d4157600080fd5b506104be610d503660046143e1565b6126ba565b348015610d6157600080fd5b5060045461049490610100900460ff1681565b348015610d8057600080fd5b506105a4610d8f36600461458c565b6001600160a01b0391821660009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020908152604080832093909416825291909152205490565b348015610de557600080fd5b506104be610df43660046143c8565b6126fe565b348015610e0557600080fd5b506105a460025481565b348015610e1b57600080fd5b506104be6127c1565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610e7a5750610e7a826129b6565b92915050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610eaa81612a4d565b600580547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690556040517ff6c0da004e5c54863f4e9c53375139d02174b08a4b6d00edcc264f31ce57092d90600090a150565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0380546060917f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0091610f4f906145ba565b80601f0160208091040260200160405190810160405280929190818152602001828054610f7b906145ba565b8015610fc85780601f10610f9d57610100808354040283529160200191610fc8565b820191906000526020600020905b815481529060010190602001808311610fab57829003601f168201915b505050505091505090565b600033610fe1818585612a57565b5060019392505050565b600033610ff9858285612a64565b611004858585612b14565b60019150505b9392505050565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015461104b81612a4d565b6110558383612ba5565b50505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561108581612a4d565b6004805460ff19168315159081179091556040519081527f540a527e51aeab0dddfb9797856930b60ffa5937b1d134ccf4e271a797dbe70a906020015b60405180910390a15050565b6001600160a01b0381163314611110576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61111a8282612bfc565b505050565b600954600090821061113357506000610e7a565b6001600160a01b03831660009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00602052604090205460095460011161100a576009546000906111879060019061463c565b90505b6009818154811061119d5761119d61464f565b600091825260208083206001600160a01b0389168452600660079093020191909101905260409020546111d0908361467e565b9150600981815481106111e5576111e561464f565b600091825260208083206001600160a01b038916845260056007909302019190910190526040902054611218908361463c565b915061122584600161467e565b811480611230575080155b611246578061123e81614691565b91505061118a565b509392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561127881612a4d565b611280612c4a565b50565b61128b612cb6565b61129482612d86565b61129e8282612d91565b5050565b60006112ac612eb0565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b6000610e7a338361111f565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561130781612a4d565b6127108311158015611317575060015b801561132557506127108211155b6113765760405162461bcd60e51b815260206004820152600b60248201527f496e76616c69642074617800000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6002839055600382905560408051848152602081018490527f4ac0d6b0d694ec6c120242feaca94cfb6fbfe646756cd7026301e3a5984f0450910160405180910390a1505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756113e881612a4d565b6001600160a01b03821661143e5760405162461bcd60e51b815260206004820152601360248201527f496e76616c6964207465616d2077616c6c657400000000000000000000000000604482015260640161136d565b600580547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0384169081179091556040519081527ff6215f245bfd24e51265c56ef650fdd856aa4ece6221ee1ef395bbe0a5558010906020016110c2565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756114ce81612a4d565b600580547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790556040517f2d4fd5bae8f53dd83c59664d82f3c9a17a251e2ac3b1af3d85d6bec37d098f9f90600090a150565b60095460009060011061158e5760405162461bcd60e51b815260206004820152600d60248201527f4e6f2065706f6368732079657400000000000000000000000000000000000000604482015260640161136d565b6001600160a01b03821660009081527f943a504c852fc4fd086158e94aaf0770a97cfa81b8009a4886168d053ff1dceb602052604090205460ff16156115d657506000919050565b6001600160a01b0382166000908152600a602052604081205481906115fc90600161467e565b90505b60095461160e9060019061463c565b81101561163d5761161f8482611815565b611629908361467e565b915080611635816146a8565b9150506115ff565b5092915050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561166e81612a4d565b611280612f12565b7f5fdbd35e8da83ee755d5e62a539e5ed7f47126abede0b8b10f9ea43dc6eed07f6116a081612a4d565b6004805460ff61010080830482161581027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff90931692909217928390556040517f406c46ebfaaea47203daefc50a4298117dc2a4d07342d50b54b526c8316b0d8f936117159390049091161515815260200190565b60405180910390a150565b7fc4c453d647953c0fd35db5a34ee76e60fb4abc3a8fb891a25936b70b38f2925361174a81612a4d565b6040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018390526001600160a01b0384169063a9059cbb906044016020604051808303816000875af11580156117b0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105591906146c2565b60008281527fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e8237170593200060208190526040822061180d9084612f6d565b949350505050565b6009546000906001118061182b57506009548210155b1561183857506000610e7a565b60006009838154811061184d5761184d61464f565b90600052602060002090600702019050600a6000856001600160a01b03166001600160a01b03168152602001908152602001600020548311158061189357506001810154155b156118a2576000915050610e7a565b8060010154816004015482600301546118bb919061467e565b6118c5868661111f565b6118cf91906146df565b6118d991906146f6565b915050610e7a565b60008061190d7f2bfa5424769abb48caa3faa232f6faec62b33e75ed1d06512252216b523808d6612409565b90506000805b828110156119665761194861090f7f2bfa5424769abb48caa3faa232f6faec62b33e75ed1d06512252216b523808d6836117d4565b611952908361467e565b91508061195e816146a8565b915050611913565b503060009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0060205260409020546119a0908261467e565b6004546201000090046001600160a01b031660009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0060205260409020549091506119ed908261467e565b905080611a187f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace025490565b611a22919061463c565b9250505090565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0480546060917f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0091610f4f906145ba565b7f5fdbd35e8da83ee755d5e62a539e5ed7f47126abede0b8b10f9ea43dc6eed07f611aa481612a4d565b611aac612f79565b6009805460009190611ac09060019061463c565b81548110611ad057611ad061464f565b600091825260208220426007909202019081559150611aed6118e1565b60075490915080151580611b015750600034115b611b725760405162461bcd60e51b8152602060048201526024808201527f4e6f2074617820636f6c6c65637465642079657420616e64206e6f204554482060448201527f73656e7400000000000000000000000000000000000000000000000000000000606482015260840161136d565b3060009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace006020526040902054811115611bf05760405162461bcd60e51b815260206004820152601a60248201527f42616c616e6365206c657373207468616e207265717569726564000000000000604482015260640161136d565b6000808211611c00576000611c09565b611c0982612ffa565b9050600060025460035483611c1e91906146df565b611c2891906146f6565b90506000611c36828461463c565b6005546040519192506001600160a01b03169083156108fc029084906000818181858888f19350505050158015611c71573d6000803e3d6000fd5b5060018601859055346004870181905560028701859055600387018290556009546040805191825260208201889052810183905260608101919091527f2b7e220b2babc392b7f28bbfb51e48a8ae7ab8d75e59253607e2483dd411edb79060800160405180910390a1505060098054600101815560009081526007555061128092506131e4915050565b7fc4c453d647953c0fd35db5a34ee76e60fb4abc3a8fb891a25936b70b38f29253611d2581612a4d565b604051339083156108fc029084906000818181858888f1935050505015801561111a573d6000803e3d6000fd5b600033610fe1818585612b14565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775611d8a81612a4d565b69d3c21bcecceda1000000821115611de45760405162461bcd60e51b815260206004820152601a60248201527f496e76616c69642073656c6c2062616c616e6365206c696d6974000000000000604482015260640161136d565b600182905560005460408051918252602082018490527f71d2b4d3f228f2d75fd480fb859115900b1af3df7a4f93fdff075e55271d808191016110c2565b6009546000908310611e765760405162461bcd60e51b815260206004820152601360248201527f496e76616c69642065706f636820696e64657800000000000000000000000000604482015260640161136d565b60098381548110611e8957611e8961464f565b600091825260208083206001600160a01b038616845260066007909302019190910190526040902054905092915050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff16600081158015611f055750825b905060008267ffffffffffffffff166001148015611f225750303b155b905081158015611f30575080155b15611f67576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001660011785558315611fc85784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b6001600160a01b038616612008576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61207c6040518060400160405280600581526020017f78706572700000000000000000000000000000000000000000000000000000008152506040518060400160405280600581526020017f787065727000000000000000000000000000000000000000000000000000000081525061320a565b61208461321c565b61208c613224565b61209461321c565b61209c613234565b6005805461015e6002556096600355600480547fffffffffffffffffffffff0000000000000000000000000000000000000000009092166001600160a01b038a161790925569021e19e0c9bab2400000600081815560019182557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909216179091556121289080613244565b6121527fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177580613244565b61219c7f2bfa5424769abb48caa3faa232f6faec62b33e75ed1d06512252216b523808d67fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775613244565b6121e67fdf112b612e9caae17b7645f3b1b08e97332b1641a13ce63785457f40efa3f27c7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775613244565b6122107f5fdbd35e8da83ee755d5e62a539e5ed7f47126abede0b8b10f9ea43dc6eed07f80613244565b61225a7fc4c453d647953c0fd35db5a34ee76e60fb4abc3a8fb891a25936b70b38f292537fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775613244565b6122847fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533612ba5565b506122af7f2bfa5424769abb48caa3faa232f6faec62b33e75ed1d06512252216b523808d633612ba5565b506122da7fdf112b612e9caae17b7645f3b1b08e97332b1641a13ce63785457f40efa3f27c33612ba5565b506123057f5fdbd35e8da83ee755d5e62a539e5ed7f47126abede0b8b10f9ea43dc6eed07f33612ba5565b506123307fc4c453d647953c0fd35db5a34ee76e60fb4abc3a8fb891a25936b70b38f2925333612ba5565b5061233c600033612ba5565b50600980546000829052600201905561235f3369d3c21bcecceda10000006132e8565b83156123c05784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050565b600981815481106123d857600080fd5b6000918252602090912060079091020180546001820154600283015460038401546004909401549294509092909185565b60008181527fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e8237170593200060208190526040822061100a90613337565b60095460009083106124955760405162461bcd60e51b815260206004820152601360248201527f496e76616c69642065706f636820696e64657800000000000000000000000000604482015260640161136d565b600983815481106124a8576124a861464f565b600091825260208083206001600160a01b038616845260056007909302019190910190526040902054905092915050565b6124e1612f79565b600454610100900460ff161561255f5760405162461bcd60e51b815260206004820152602560248201527f41697264726f702069732061637469766520696e7374656164206f6620636c6160448201527f696d696e67000000000000000000000000000000000000000000000000000000606482015260840161136d565b600061256a33611539565b9050600081116125bc5760405162461bcd60e51b815260206004820152601060248201527f4e6f7468696e6720746f20636c61696d00000000000000000000000000000000604482015260640161136d565b6009546125cb9060029061463c565b336000908152600a60205260409020554781111561262b5760405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e7420636f6e74726163742062616c616e6365000000604482015260640161136d565b604051339082156108fc029083906000818181858888f19350505050158015612658573d6000803e3d6000fd5b5060405181815233907fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a9060200160405180910390a2506126b860017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260409020600101546126f481612a4d565b6110558383612bfc565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561272881612a4d565b69d3c21bcecceda10000008211156127825760405162461bcd60e51b815260206004820152601c60248201527f496e76616c69642077616c6c65742062616c616e6365206c696d697400000000604482015260640161136d565b60008290556001546040805184815260208101929092527f71d2b4d3f228f2d75fd480fb859115900b1af3df7a4f93fdff075e55271d808191016110c2565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756127eb81612a4d565b737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561283d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128619190614731565b6001600160a01b031663c9c6539630737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156128c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128e69190614731565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af115801561294b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061296f9190614731565b600460026101000a8154816001600160a01b0302191690836001600160a01b0316021790555061128030737a250d5630b4cf539739df2c5dacb4c659f2488d600019612a57565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610e7a57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610e7a565b6112808133613341565b61111a83838360016133ce565b6001600160a01b0383811660009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace01602090815260408083209386168352929052205460001981146110555781811015612b05576040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602481018290526044810183905260640161136d565b611055848484840360006133ce565b6001600160a01b038316612b57576040517f96c6fd1e0000000000000000000000000000000000000000000000000000000081526000600482015260240161136d565b6001600160a01b038216612b9a576040517fec442f050000000000000000000000000000000000000000000000000000000081526000600482015260240161136d565b61111a8383836134fa565b60007fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e8237170593200081612bd38585613a06565b9050801561180d576000858152602083905260409020612bf39085613ad5565b50949350505050565b60007fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e8237170593200081612c2a8585613aea565b9050801561180d576000858152602083905260409020612bf39085613b90565b612c52613ba5565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300805460ff191681557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b039091168152602001611715565b306001600160a01b037f000000000000000000000000c61930adde8eb27604f2d78b0a8196ac6318422d161480612d4f57507f000000000000000000000000c61930adde8eb27604f2d78b0a8196ac6318422d6001600160a01b0316612d437f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614155b156126b8576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061129e81612a4d565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612e09575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252612e069181019061474e565b60015b612e4a576040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526001600160a01b038316600482015260240161136d565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8114612ea6576040517faa1d49a40000000000000000000000000000000000000000000000000000000081526004810182905260240161136d565b61111a8383613c00565b306001600160a01b037f000000000000000000000000c61930adde8eb27604f2d78b0a8196ac6318422d16146126b8576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612f1a613c56565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300805460ff191660011781557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833612c9e565b600061100a8383613cb2565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0080547ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01612ff4576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b60008160000361300c57506000919050565b60408051600280825260608201835260009260208301908036833701905050905030816000815181106130415761304161464f565b60200260200101906001600160a01b031690816001600160a01b031681525050737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d79190614731565b816001815181106130ea576130ea61464f565b6001600160a01b03909216602092830291909101909101526040517f791ac9470000000000000000000000000000000000000000000000000000000081524790737a250d5630b4cf539739df2c5dacb4c659f2488d9063791ac9479061315d908790600090879030904290600401614767565b600060405180830381600087803b15801561317757600080fd5b505af115801561318b573d6000803e3d6000fd5b504792506000915061319f9050838361463c565b60408051888152602081018390529192507fa0948473da2b862876c9b294bc55a32b178b0e3c6c9da3c91555924ec8017ee9910160405180910390a195945050505050565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b613212613cdc565b61129e8282613d43565b6126b8613cdc565b61322c613cdc565b6126b8613da6565b61323c613cdc565b6126b8613dd9565b7f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800600061329f8460009081527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015490565b600085815260208490526040808220600101869055519192508491839187917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a450505050565b6001600160a01b03821661332b576040517fec442f050000000000000000000000000000000000000000000000000000000081526000600482015260240161136d565b61129e600083836134fa565b6000610e7a825490565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602090815260408083206001600160a01b038516845290915290205460ff1661129e576040517fe2517d3f0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024810183905260440161136d565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace006001600160a01b038516613432576040517fe602df050000000000000000000000000000000000000000000000000000000081526000600482015260240161136d565b6001600160a01b038416613475576040517f94280d620000000000000000000000000000000000000000000000000000000081526000600482015260240161136d565b6001600160a01b038086166000908152600183016020908152604080832093881683529290522083905581156134f357836001600160a01b0316856001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040516134ea91815260200190565b60405180910390a35b5050505050565b6004546000906001600160a01b038581166201000090920416148061353257506004546001600160a01b038481166201000090920416145b8015613552575033737a250d5630b4cf539739df2c5dacb4c659f2488d14155b801561356757506001600160a01b0384163014155b801561357c57506001600160a01b0383163014155b80156135c057506001600160a01b03841660009081527fad26d6f611bb87734587b81c10d42377fc8d10182ad7ede203733d2bf10b81f6602052604090205460ff16155b801561360457506001600160a01b03831660009081527fad26d6f611bb87734587b81c10d42377fc8d10182ad7ede203733d2bf10b81f6602052604090205460ff16155b60055490915074010000000000000000000000000000000000000000900460ff168061362e575080155b61367a5760405162461bcd60e51b815260206004820152601a60248201527f54726164696e67206973206e6f7420656e61626c656420796574000000000000604482015260640161136d565b81811561392c5760055474010000000000000000000000000000000000000000900460ff166136eb5760405162461bcd60e51b815260206004820152601a60248201527f54726164696e67206973206e6f7420656e61626c656420796574000000000000604482015260640161136d565b6004546001600160a01b03868116620100009092041614801561370f575060008054115b156137d45760005483613756866001600160a01b031660009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00602052604090205490565b613760919061467e565b11156137d45760405162461bcd60e51b815260206004820152603b60248201527f486f6c64696e6720616d6f756e7420616674657220627579696e67206578636560448201527f656473206d6178696d756d20616c6c6f77656420746f6b656e732e0000000000606482015260840161136d565b6004546001600160a01b0385811662010000909204161480156137f957506000600154115b15613876576001548311156138765760405162461bcd60e51b815260206004820152602e60248201527f53656c6c696e6720616d6f756e742065786365656473206d6178696d756d206160448201527f6c6c6f77656420746f6b656e732e000000000000000000000000000000000000606482015260840161136d565b60045460ff161561392c5760006127106002548561389491906146df565b61389e91906146f6565b90506138ab863083612b14565b856001600160a01b03167f9174fcf222375951e43519967bd54a1083271e61dab0b523b644cdf98c975f34826040516138e691815260200190565b60405180910390a26138f8818361463c565b9150806006600082825461390c919061467e565b925050819055508060076000828254613925919061467e565b9091555050505b60095460009061393e9060019061463c565b905081600982815481106139545761395461464f565b90600052602060002090600702016005016000876001600160a01b03166001600160a01b031681526020019081526020016000206000828254613997919061467e565b9250508190555083600982815481106139b2576139b261464f565b90600052602060002090600702016006016000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546139f5919061467e565b909155506123c09050868684613de1565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602081815260408084206001600160a01b038616855290915282205460ff16613acb576000848152602082815260408083206001600160a01b03871684529091529020805460ff19166001179055613a813390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050610e7a565b6000915050610e7a565b600061100a836001600160a01b038416613f4a565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602081815260408084206001600160a01b038616855290915282205460ff1615613acb576000848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610e7a565b600061100a836001600160a01b038416613f99565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff166126b8576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613c0982614082565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115613c4e5761111a828261412a565b61129e6141a0565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff16156126b8576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000826000018281548110613cc957613cc961464f565b9060005260206000200154905092915050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff166126b8576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613d4b613cdc565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace007f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace03613d97848261481e565b5060048101611055838261481e565b613dae613cdc565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300805460ff19169055565b6131e4613cdc565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace006001600160a01b038416613e2f5781816002016000828254613e24919061467e565b90915550613eba9050565b6001600160a01b03841660009081526020829052604090205482811015613e9b576040517fe450d38c0000000000000000000000000000000000000000000000000000000081526001600160a01b0386166004820152602481018290526044810184905260640161136d565b6001600160a01b03851660009081526020839052604090209083900390555b6001600160a01b038316613ed8576002810180548390039055613ef7565b6001600160a01b03831660009081526020829052604090208054830190555b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051613f3c91815260200190565b60405180910390a350505050565b6000818152600183016020526040812054613f9157508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610e7a565b506000610e7a565b60008181526001830160205260408120548015613acb576000613fbd60018361463c565b8554909150600090613fd19060019061463c565b9050808214614036576000866000018281548110613ff157613ff161464f565b90600052602060002001549050808760000184815481106140145761401461464f565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080614047576140476148fc565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610e7a565b806001600160a01b03163b6000036140d1576040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526001600160a01b038216600482015260240161136d565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051614147919061492b565b600060405180830381855af49150503d8060008114614182576040519150601f19603f3d011682016040523d82523d6000602084013e614187565b606091505b50915091506141978583836141d8565b95945050505050565b34156126b8576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6060826141ed576141e88261424d565b61100a565b815115801561420457506001600160a01b0384163b155b15614246576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260240161136d565b508061100a565b80511561425d5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000602082840312156142a157600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461100a57600080fd5b60005b838110156142ec5781810151838201526020016142d4565b50506000910152565b60208152600082518060208401526143148160408501602087016142d1565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6001600160a01b038116811461128057600080fd5b6000806040838503121561436e57600080fd5b823561437981614346565b946020939093013593505050565b60008060006060848603121561439c57600080fd5b83356143a781614346565b925060208401356143b781614346565b929592945050506040919091013590565b6000602082840312156143da57600080fd5b5035919050565b600080604083850312156143f457600080fd5b82359150602083013561440681614346565b809150509250929050565b801515811461128057600080fd5b60006020828403121561443157600080fd5b813561100a81614411565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806040838503121561447e57600080fd5b823561448981614346565b9150602083013567ffffffffffffffff808211156144a657600080fd5b818501915085601f8301126144ba57600080fd5b8135818111156144cc576144cc61443c565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156145125761451261443c565b8160405282815288602084870101111561452b57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b6000806040838503121561456057600080fd5b50508035926020909101359150565b60006020828403121561458157600080fd5b813561100a81614346565b6000806040838503121561459f57600080fd5b82356145aa81614346565b9150602083013561440681614346565b600181811c908216806145ce57607f821691505b602082108103614607577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115610e7a57610e7a61460d565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80820180821115610e7a57610e7a61460d565b6000816146a0576146a061460d565b506000190190565b600060001982036146bb576146bb61460d565b5060010190565b6000602082840312156146d457600080fd5b815161100a81614411565b8082028115828204841417610e7a57610e7a61460d565b60008261472c577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006020828403121561474357600080fd5b815161100a81614346565b60006020828403121561476057600080fd5b5051919050565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156147b75784516001600160a01b031683529383019391830191600101614792565b50506001600160a01b03969096166060850152505050608001529392505050565b601f82111561111a57600081815260208120601f850160051c810160208610156147ff5750805b601f850160051c820191505b818110156123c05782815560010161480b565b815167ffffffffffffffff8111156148385761483861443c565b61484c8161484684546145ba565b846147d8565b602080601f83116001811461488157600084156148695750858301515b600019600386901b1c1916600185901b1785556123c0565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156148ce578886015182559484019460019091019084016148af565b50858210156148ec5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6000825161493d8184602087016142d1565b919091019291505056
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.