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
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 17826941 | 387 days ago | IN | 0 ETH | 0.05638119 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xB790f7cC...0227db739 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
PresaleV1
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import '@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol'; import '@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol'; import '@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/utils/cryptography/MerkleProofUpgradeable.sol'; interface Aggregator { function latestRoundData() external view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound); } contract PresaleV1 is Initializable, ReentrancyGuardUpgradeable, OwnableUpgradeable, PausableUpgradeable { uint256 public totalTokensSold; uint256 public startTime; uint256 public endTime; uint256 public claimStart; address public saleToken; uint256 public baseDecimals; uint256 public maxTokensToBuy; uint256 public currentStep; uint256[][3] public rounds; uint256 public checkPoint; uint256 public usdRaised; uint256[] public prevCheckpoints; uint256[] public remainingTokensTracker; uint256 public timeConstant; address public paymentWallet; bool public dynamicTimeFlag; bool public whitelistClaimOnly; address public admin; IERC20Upgradeable public USDTInterface; Aggregator public aggregatorInterface; bytes32 public claimMerkleRoot; mapping(address => uint256) public userDeposits; mapping(address => bool) public hasClaimed; mapping(address => bool) public isBlacklisted; mapping(address => bool) public isWhitelisted; mapping(address => bool) public wertWhitelisted; event SaleTimeSet(uint256 _start, uint256 _end, uint256 timestamp); event SaleTimeUpdated(bytes32 indexed key, uint256 prevValue, uint256 newValue, uint256 timestamp); event TokensBought(address indexed user, uint256 indexed tokensBought, address indexed purchaseToken, uint256 amountPaid, uint256 usdEq, uint256 timestamp); event TokensAdded(address indexed token, uint256 noOfTokens, uint256 timestamp); event TokensClaimed(address indexed user, uint256 amount, uint256 timestamp); event ClaimStartUpdated(uint256 prevValue, uint256 newValue, uint256 timestamp); event MaxTokensUpdated(uint256 prevValue, uint256 newValue, uint256 timestamp); /// @custom:oz-upgrades-unsafe-allow constructor constructor() initializer {} /** * @dev Initializes the contract and sets key parameters * @param _oracle Oracle contract to fetch ETH/USDT price * @param _usdt USDT token contract address * @param _startTime start time of the presale * @param _endTime end time of the presale * @param _rounds array of round details * @param _maxTokensToBuy amount of max tokens to buy * @param _paymentWallet address to recive payments */ function initialize(address _oracle, address _usdt, uint256 _startTime, uint256 _endTime, uint256[][3] memory _rounds, uint256 _maxTokensToBuy, address _paymentWallet) external initializer { require(_oracle != address(0), 'Zero aggregator address'); require(_usdt != address(0), 'Zero USDT address'); require(_startTime > block.timestamp && _endTime > _startTime, 'Invalid time'); __Pausable_init_unchained(); __Ownable_init_unchained(); __ReentrancyGuard_init_unchained(); baseDecimals = (10 ** 18); aggregatorInterface = Aggregator(_oracle); USDTInterface = IERC20Upgradeable(_usdt); startTime = _startTime; endTime = _endTime; rounds = _rounds; maxTokensToBuy = _maxTokensToBuy; paymentWallet = _paymentWallet; emit SaleTimeSet(startTime, endTime, block.timestamp); } /** * @dev To pause the presale */ function pause() external onlyOwner { _pause(); } /** * @dev To unpause the presale */ function unpause() external onlyOwner { _unpause(); } /** * @dev To calculate the price in USD for given amount of tokens. * @param _amount No of tokens */ function calculatePrice(uint256 _amount) public view returns (uint256) { uint256 USDTAmount; uint256 total = checkPoint == 0 ? totalTokensSold : checkPoint; require(_amount <= maxTokensToBuy, 'Amount exceeds max tokens to buy'); if (_amount + total > rounds[0][currentStep] || block.timestamp >= rounds[2][currentStep]) { require(currentStep < (rounds[0].length - 1), 'Wrong params'); if (block.timestamp >= rounds[2][currentStep]) { require(rounds[0][currentStep] + _amount <= rounds[0][currentStep + 1], 'Cant Purchase More in individual tx'); USDTAmount = _amount * rounds[1][currentStep + 1]; } else { uint256 tokenAmountForCurrentPrice = rounds[0][currentStep] - total; USDTAmount = tokenAmountForCurrentPrice * rounds[1][currentStep] + (_amount - tokenAmountForCurrentPrice) * rounds[1][currentStep + 1]; } } else USDTAmount = _amount * rounds[1][currentStep]; return USDTAmount; } /** * @dev To update the sale times * @param _startTime New start time * @param _endTime New end time */ function changeSaleTimes(uint256 _startTime, uint256 _endTime) external onlyOwner { require(_startTime > 0 || _endTime > 0, 'Invalid parameters'); if (_startTime > 0) { require(block.timestamp < startTime, 'Sale already started'); require(block.timestamp < _startTime, 'Sale time in past'); uint256 prevValue = startTime; startTime = _startTime; emit SaleTimeUpdated(bytes32('START'), prevValue, _startTime, block.timestamp); } if (_endTime > 0) { require(block.timestamp < endTime, 'Sale already ended'); require(_endTime > startTime, 'Invalid endTime'); uint256 prevValue = endTime; endTime = _endTime; emit SaleTimeUpdated(bytes32('END'), prevValue, _endTime, block.timestamp); } } /** * @dev To get latest ETH price in 10**18 format */ function getLatestPrice() public view returns (uint256) { (, int256 price, , , ) = aggregatorInterface.latestRoundData(); price = (price * (10 ** 10)); return uint256(price); } modifier checkSaleState(uint256 amount) { require(block.timestamp >= startTime && block.timestamp <= endTime, 'Invalid time for buying'); require(amount > 0, 'Invalid sale amount'); _; } /** * @dev To buy into a presale using USDT * @param amount No of tokens to buy */ function buyWithUSDT(uint256 amount) external checkSaleState(amount) whenNotPaused returns (bool) { uint256 usdPrice = calculatePrice(amount); totalTokensSold += amount; if (checkPoint != 0) checkPoint += amount; uint256 total = totalTokensSold > checkPoint ? totalTokensSold : checkPoint; if (total > rounds[0][currentStep] || block.timestamp >= rounds[2][currentStep]) { if (block.timestamp >= rounds[2][currentStep]) { checkPoint = rounds[0][currentStep] + amount; } else { if (dynamicTimeFlag) { manageTimeDiff(); } } uint256 unsoldTokens = total > rounds[0][currentStep] ? 0 : rounds[0][currentStep] - total; remainingTokensTracker.push(unsoldTokens); currentStep += 1; } userDeposits[_msgSender()] += (amount * baseDecimals); usdRaised += usdPrice; uint256 ourAllowance = USDTInterface.allowance(_msgSender(), address(this)); uint256 price = usdPrice / (10 ** 12); require(price <= ourAllowance, 'Make sure to add enough allowance'); (bool success, ) = address(USDTInterface).call(abi.encodeWithSignature('transferFrom(address,address,uint256)', _msgSender(), paymentWallet, price)); require(success, 'Token payment failed'); emit TokensBought(_msgSender(), amount, address(USDTInterface), price, usdPrice, block.timestamp); return true; } /** * @dev To buy into a presale using ETH * @param amount No of tokens to buy */ function buyWithEth(uint256 amount) external payable checkSaleState(amount) whenNotPaused nonReentrant returns (bool) { uint256 usdPrice = calculatePrice(amount); uint256 ethAmount = (usdPrice * baseDecimals) / getLatestPrice(); require(msg.value >= ethAmount, 'Less payment'); uint256 excess = msg.value - ethAmount; totalTokensSold += amount; if (checkPoint != 0) checkPoint += amount; uint256 total = totalTokensSold > checkPoint ? totalTokensSold : checkPoint; if (total > rounds[0][currentStep] || block.timestamp >= rounds[2][currentStep]) { if (block.timestamp >= rounds[2][currentStep]) { checkPoint = rounds[0][currentStep] + amount; } else { if (dynamicTimeFlag) { manageTimeDiff(); } } uint256 unsoldTokens = total > rounds[0][currentStep] ? 0 : rounds[0][currentStep] - total; remainingTokensTracker.push(unsoldTokens); currentStep += 1; } userDeposits[_msgSender()] += (amount * baseDecimals); usdRaised += usdPrice; sendValue(payable(paymentWallet), ethAmount); if (excess > 0) sendValue(payable(_msgSender()), excess); emit TokensBought(_msgSender(), amount, address(0), ethAmount, usdPrice, block.timestamp); return true; } /** * @dev To buy ETH directly from wert .*wert contract address should be whitelisted if wertBuyRestrictionStatus is set true * @param _user address of the user * @param _amount No of ETH to buy */ function buyWithETHWert(address _user, uint256 _amount) external payable checkSaleState(_amount) whenNotPaused nonReentrant returns (bool) { require(wertWhitelisted[_msgSender()], 'User not whitelisted for this tx'); uint256 usdPrice = calculatePrice(_amount); uint256 ethAmount = (usdPrice * baseDecimals) / getLatestPrice(); require(msg.value >= ethAmount, 'Less payment'); uint256 excess = msg.value - ethAmount; totalTokensSold += _amount; if (checkPoint != 0) checkPoint += _amount; uint256 total = totalTokensSold > checkPoint ? totalTokensSold : checkPoint; if (total > rounds[0][currentStep] || block.timestamp >= rounds[2][currentStep]) { if (block.timestamp >= rounds[2][currentStep]) { checkPoint = rounds[0][currentStep] + _amount; } else { if (dynamicTimeFlag) { manageTimeDiff(); } } uint256 unsoldTokens = total > rounds[0][currentStep] ? 0 : rounds[0][currentStep] - total; remainingTokensTracker.push(unsoldTokens); currentStep += 1; } userDeposits[_user] += (_amount * baseDecimals); usdRaised += usdPrice; sendValue(payable(paymentWallet), ethAmount); if (excess > 0) sendValue(payable(_user), excess); emit TokensBought(_user, _amount, address(0), ethAmount, usdPrice, block.timestamp); return true; } /** * @dev Helper funtion to get ETH price for given amount * @param amount No of tokens to buy */ function ethBuyHelper(uint256 amount) external view returns (uint256 ethAmount) { uint256 usdPrice = calculatePrice(amount); ethAmount = (usdPrice * baseDecimals) / getLatestPrice(); } /** * @dev Helper funtion to get USDT price for given amount * @param amount No of tokens to buy */ function usdtBuyHelper(uint256 amount) external view returns (uint256 usdPrice) { usdPrice = calculatePrice(amount); usdPrice = usdPrice / (10 ** 12); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, 'Low balance'); (bool success, ) = recipient.call{value: amount}(''); require(success, 'ETH Payment failed'); } /** * @dev To set the claim start time and sale token address by the owner * @param _claimStart claim start time * @param noOfTokens no of tokens to add to the contract * @param _saleToken sale toke address */ function startClaim(uint256 _claimStart, uint256 noOfTokens, address _saleToken) external onlyOwner returns (bool) { require(_claimStart > endTime && _claimStart > block.timestamp, 'Invalid claim start time'); require(noOfTokens >= (totalTokensSold * baseDecimals), 'Tokens less than sold'); require(_saleToken != address(0), 'Zero token address'); require(claimStart == 0, 'Claim already set'); claimStart = _claimStart; saleToken = _saleToken; bool success = IERC20Upgradeable(_saleToken).transferFrom(_msgSender(), address(this), noOfTokens); require(success, 'Token transfer failed'); emit TokensAdded(saleToken, noOfTokens, block.timestamp); return true; } /** * @dev To change the claim start time by the owner * @param _claimStart new claim start time */ function changeClaimStart(uint256 _claimStart) external onlyOwner returns (bool) { require(claimStart > 0, 'Initial claim data not set'); require(_claimStart > endTime, 'Sale in progress'); require(_claimStart > block.timestamp, 'Claim start in past'); uint256 prevValue = claimStart; claimStart = _claimStart; emit ClaimStartUpdated(prevValue, _claimStart, block.timestamp); return true; } /** * @dev To claim tokens after claiming starts */ function claim(uint256 _amount, bytes32[] memory _proof) external whenNotPaused returns (bool) { require(saleToken != address(0), 'Sale token not added'); require(!isBlacklisted[_msgSender()], 'This Address is Blacklisted'); if (whitelistClaimOnly) { require(isWhitelisted[_msgSender()], 'User not whitelisted for claim'); } require(block.timestamp >= claimStart, 'Claim has not started yet'); require(!hasClaimed[_msgSender()], 'Already claimed'); require(_amount > 0, 'Nothing to claim'); bytes32 leaf = keccak256(bytes.concat(keccak256(abi.encode(msg.sender, _amount)))); require(MerkleProofUpgradeable.verify(_proof, claimMerkleRoot, leaf), 'Invalid proof'); hasClaimed[_msgSender()] = true; bool success = IERC20Upgradeable(saleToken).transfer(_msgSender(), _amount); require(success, 'Token transfer failed'); emit TokensClaimed(_msgSender(), _amount, block.timestamp); return true; } function changeMaxTokensToBuy(uint256 _maxTokensToBuy) external onlyOwner { require(_maxTokensToBuy > 0, 'Zero max tokens to buy value'); uint256 prevValue = maxTokensToBuy; maxTokensToBuy = _maxTokensToBuy; emit MaxTokensUpdated(prevValue, _maxTokensToBuy, block.timestamp); } function changeRoundsData(uint256[][3] memory _rounds) external onlyOwner { rounds = _rounds; } /** * @dev To add wert contract addresses to whitelist * @param _addressesToWhitelist addresses of the contract */ function whitelistUsersForWERT(address[] calldata _addressesToWhitelist) external onlyOwner { for (uint256 i = 0; i < _addressesToWhitelist.length; i++) { wertWhitelisted[_addressesToWhitelist[i]] = true; } } /** * @dev To remove wert contract addresses to whitelist * @param _addressesToRemoveFromWhitelist addresses of the contracts */ function removeFromWhitelistForWERT(address[] calldata _addressesToRemoveFromWhitelist) external onlyOwner { for (uint256 i = 0; i < _addressesToRemoveFromWhitelist.length; i++) { wertWhitelisted[_addressesToRemoveFromWhitelist[i]] = false; } } /** * @dev To add users to blacklist which restricts blacklisted users from claiming * @param _usersToBlacklist addresses of the users */ function blacklistUsers(address[] calldata _usersToBlacklist) external onlyOwner { for (uint256 i = 0; i < _usersToBlacklist.length; i++) { isBlacklisted[_usersToBlacklist[i]] = true; } } /** * @dev To remove users from blacklist which restricts blacklisted users from claiming * @param _userToRemoveFromBlacklist addresses of the users */ function removeFromBlacklist(address[] calldata _userToRemoveFromBlacklist) external onlyOwner { for (uint256 i = 0; i < _userToRemoveFromBlacklist.length; i++) { isBlacklisted[_userToRemoveFromBlacklist[i]] = false; } } /** * @dev To add users to whitelist which restricts users from claiming if claimWhitelistStatus is true * @param _usersToWhitelist addresses of the users */ function whitelistUsers(address[] calldata _usersToWhitelist) external onlyOwner { for (uint256 i = 0; i < _usersToWhitelist.length; i++) { isWhitelisted[_usersToWhitelist[i]] = true; } } /** * @dev To remove users from whitelist which restricts users from claiming if claimWhitelistStatus is true * @param _userToRemoveFromWhitelist addresses of the users */ function removeFromWhitelist(address[] calldata _userToRemoveFromWhitelist) external onlyOwner { for (uint256 i = 0; i < _userToRemoveFromWhitelist.length; i++) { isWhitelisted[_userToRemoveFromWhitelist[i]] = false; } } /** * @dev To set status for claim whitelisting * @param _status bool value */ function setClaimWhitelistStatus(bool _status) external onlyOwner { whitelistClaimOnly = _status; } /** * @dev To set payment wallet address * @param _newPaymentWallet new payment wallet address */ function changePaymentWallet(address _newPaymentWallet) external onlyOwner { require(_newPaymentWallet != address(0), 'address cannot be zero'); paymentWallet = _newPaymentWallet; } /** * @dev To manage time gap between two rounds */ function manageTimeDiff() internal { for (uint256 i; i < rounds[2].length - currentStep; i++) { rounds[2][currentStep + i] = block.timestamp + i * timeConstant; } } /** * @dev To set time constant for manageTimeDiff() * @param _timeConstant time in <days>*24*60*60 format */ function setTimeConstant(uint256 _timeConstant) external onlyOwner { timeConstant = _timeConstant; } /** * @dev To get array of round details at once * @param _no array index */ function roundDetails(uint256 _no) external view returns (uint256[] memory) { return rounds[_no]; } /** * @dev to set merkleroot for claim verification * @param _merkleRoot bytes32 */ function setClaimMerkleRoot(bytes32 _merkleRoot) external onlyOwner { claimMerkleRoot = _merkleRoot; } /** * @dev To increment the rounds from backend */ function incrementCurrentStep() external { require(msg.sender == admin || msg.sender == owner(), 'caller not admin or owner'); prevCheckpoints.push(checkPoint); if (dynamicTimeFlag) { manageTimeDiff(); } if (checkPoint < rounds[0][currentStep]) { remainingTokensTracker.push(rounds[0][currentStep] - checkPoint); checkPoint = rounds[0][currentStep]; } currentStep++; } /** * @dev To change details of the round * @param _step round for which you want to change the details * @param _checkpoint token tracker amount */ function setCurrentStep(uint256 _step, uint256 _checkpoint) external onlyOwner { currentStep = _step; checkPoint = _checkpoint; } /** * @dev To set time shift functionality on/off * @param _dynamicTimeFlag bool value */ function setDynamicTimeFlag(bool _dynamicTimeFlag) external onlyOwner { dynamicTimeFlag = _dynamicTimeFlag; } function trackRemainingTokens() external view returns (uint256[] memory) { return remainingTokensTracker; } /** * @dev To set time shift functionality on/off * @param _index index of the round we need to change * @param _newNoOfTokens number of tokens to be sold * @param _newPrice price for the round * @param _newTime new end time */ function changeIndividualRoundData(uint256 _index, uint256 _newNoOfTokens, uint256 _newPrice, uint256 _newTime) external onlyOwner returns (bool) { require(_index <= rounds[0].length, 'invalid index'); if (_newNoOfTokens > 0) { rounds[0][_index] = _newNoOfTokens; } if (_newPrice > 0) { rounds[1][_index] = _newPrice; } if (_newTime > 0) { rounds[2][_index] = _newTime; } return true; } /** * @dev To set time shift functionality on/off * @param _newNoOfTokens number of tokens to be sold * @param _newPrice price for the round * @param _newTime new end time */ function addNewRound(uint256 _newNoOfTokens, uint256 _newPrice, uint256 _newTime) external onlyOwner returns (bool) { require(_newNoOfTokens > 0, 'invalid no of tokens'); require(_newPrice > 0, 'invalid new price'); require(_newTime > 0, 'invalid new time'); rounds[0].push(_newNoOfTokens); rounds[1].push(_newPrice); rounds[2].push(_newTime); return true; } /** * @dev To set admin * @param _admin new admin wallet address */ function setAdmin(address _admin) external onlyOwner { admin = _admin; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```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 Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized != type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; import "../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; uint256 private _status; function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://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.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.2) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. * OpenZeppelin's JavaScript library generates merkle trees that are safe * against this attack out of the box. */ library MerkleProofUpgradeable { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 proofLen = proof.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proofLen - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { require(proofPos == proofLen, "MerkleProof: invalid multiproof"); unchecked { return hashes[totalHashes - 1]; } } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 proofLen = proof.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proofLen - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { require(proofPos == proofLen, "MerkleProof: invalid multiproof"); unchecked { return hashes[totalHashes - 1]; } } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"prevValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ClaimStartUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"prevValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"MaxTokensUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_start","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_end","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"SaleTimeSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"key","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"prevValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"SaleTimeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"noOfTokens","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"TokensAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokensBought","type":"uint256"},{"indexed":true,"internalType":"address","name":"purchaseToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountPaid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"usdEq","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"TokensBought","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"TokensClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"USDTInterface","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newNoOfTokens","type":"uint256"},{"internalType":"uint256","name":"_newPrice","type":"uint256"},{"internalType":"uint256","name":"_newTime","type":"uint256"}],"name":"addNewRound","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"aggregatorInterface","outputs":[{"internalType":"contract Aggregator","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseDecimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_usersToBlacklist","type":"address[]"}],"name":"blacklistUsers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"buyWithETHWert","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"buyWithEth","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"buyWithUSDT","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"calculatePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_claimStart","type":"uint256"}],"name":"changeClaimStart","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"},{"internalType":"uint256","name":"_newNoOfTokens","type":"uint256"},{"internalType":"uint256","name":"_newPrice","type":"uint256"},{"internalType":"uint256","name":"_newTime","type":"uint256"}],"name":"changeIndividualRoundData","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxTokensToBuy","type":"uint256"}],"name":"changeMaxTokensToBuy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newPaymentWallet","type":"address"}],"name":"changePaymentWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[][3]","name":"_rounds","type":"uint256[][3]"}],"name":"changeRoundsData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_endTime","type":"uint256"}],"name":"changeSaleTimes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"checkPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"claim","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentStep","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dynamicTimeFlag","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ethBuyHelper","outputs":[{"internalType":"uint256","name":"ethAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLatestPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"hasClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"incrementCurrentStep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oracle","type":"address"},{"internalType":"address","name":"_usdt","type":"address"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_endTime","type":"uint256"},{"internalType":"uint256[][3]","name":"_rounds","type":"uint256[][3]"},{"internalType":"uint256","name":"_maxTokensToBuy","type":"uint256"},{"internalType":"address","name":"_paymentWallet","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isBlacklisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTokensToBuy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"paymentWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"prevCheckpoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"remainingTokensTracker","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_userToRemoveFromBlacklist","type":"address[]"}],"name":"removeFromBlacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_userToRemoveFromWhitelist","type":"address[]"}],"name":"removeFromWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addressesToRemoveFromWhitelist","type":"address[]"}],"name":"removeFromWhitelistForWERT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_no","type":"uint256"}],"name":"roundDetails","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"rounds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"saleToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setClaimMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setClaimWhitelistStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_step","type":"uint256"},{"internalType":"uint256","name":"_checkpoint","type":"uint256"}],"name":"setCurrentStep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_dynamicTimeFlag","type":"bool"}],"name":"setDynamicTimeFlag","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timeConstant","type":"uint256"}],"name":"setTimeConstant","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_claimStart","type":"uint256"},{"internalType":"uint256","name":"noOfTokens","type":"uint256"},{"internalType":"address","name":"_saleToken","type":"address"}],"name":"startClaim","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timeConstant","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTokensSold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trackRemainingTokens","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"usdRaised","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"usdtBuyHelper","outputs":[{"internalType":"uint256","name":"usdPrice","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userDeposits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"wertWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistClaimOnly","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_usersToWhitelist","type":"address[]"}],"name":"whitelistUsers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addressesToWhitelist","type":"address[]"}],"name":"whitelistUsersForWERT","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x6080604052600436106103c35760003560e01c80638456cb59116101f2578063c8adff011161010d578063edec5f27116100a0578063f597573f1161006f578063f597573f14610af9578063f851a44014610b19578063fd1e296214610b39578063fe575a8714610b5957600080fd5b8063edec5f2714610a83578063f04d688f14610aa3578063f2fde38b14610ab9578063f446374314610ad957600080fd5b8063e32204dd116100dc578063e32204dd14610a0d578063e6da921314610a2d578063e985e36714610a4d578063eadd94ec14610a6d57600080fd5b8063c8adff01146109a2578063cad00556146109b7578063cff805ab146109d7578063e19648db146109ed57600080fd5b8063a7c6016011610185578063ba166a3911610154578063ba166a3914610915578063bb3d676a14610942578063c23326f314610962578063c49cc6451461098257600080fd5b8063a7c6016014610895578063ae104265146108b5578063b0253847146108d5578063b2caaebd146108f557600080fd5b80639a89c1fb116101c15780639a89c1fb146108295780639c4dab52146108495780639cfa0f7c1461085f578063a6d42e4e1461087557600080fd5b80638456cb59146107ad57806389daf799146107c25780638da5cb5b146107e25780638e15f4731461081457600080fd5b806343568eae116102e257806363b2011711610275578063715018a611610244578063715018a61461073f57806373b2e80e146107545780637649b9571461078457806378e979251461079757600080fd5b806363b20117146106d457806363e40879146106ea578063641046f41461070a578063704b6c021461071f57600080fd5b806357405d05116102b157806357405d05146106565780635bc34f71146106765780635c975abb1461068c5780635df4f353146106a457600080fd5b806343568eae146105ec5780635173ffaa1461060257806353d9920714610615578063548db1741461063657600080fd5b8063278c278b1161035a57806333f761781161032957806333f76178146105715780633af32abf146105875780633d9c8d8b146105b75780633f4ba83a146105d757600080fd5b8063278c278b146104fb57806329a5a0b61461051b5780632f52ebb71461053b5780633197cbb61461055b57600080fd5b80630dc9c838116103965780630dc9c8381461047a5780631ddc60911461049a5780631fa2bc92146104ba57806323a8f1c0146104db57600080fd5b806303b9c5ad146103c857806307f18082146103ea5780630a200fc71461041f5780630ba36dcd1461043f575b600080fd5b3480156103d457600080fd5b506103e86103e3366004613827565b610b89565b005b3480156103f657600080fd5b5061040a61040536600461389c565b610c08565b60405190151581526020015b60405180910390f35b34801561042b57600080fd5b506103e861043a3660046138c3565b610d44565b34801561044b57600080fd5b5061046c61045a3660046138f7565b60de6020526000908152604090205481565b604051908152602001610416565b34801561048657600080fd5b506103e8610495366004613912565b610d6a565b3480156104a657600080fd5b506103e86104b53660046138c3565b610f8c565b3480156104c657600080fd5b5060d95461040a90600160a01b900460ff1681565b3480156104e757600080fd5b506103e86104f636600461389c565b610fb2565b34801561050757600080fd5b506103e861051636600461389c565b610fbf565b34801561052757600080fd5b5061046c61053636600461389c565b611062565b34801561054757600080fd5b5061040a6105563660046139c8565b611096565b34801561056757600080fd5b5061046c60cb5481565b34801561057d57600080fd5b5061046c60ce5481565b34801561059357600080fd5b5061040a6105a23660046138f7565b60e16020526000908152604090205460ff1681565b3480156105c357600080fd5b5061040a6105d2366004613a6a565b611462565b3480156105e357600080fd5b506103e8611537565b3480156105f857600080fd5b5061046c60d85481565b61040a610610366004613a9c565b611549565b34801561062157600080fd5b5060d95461040a90600160a81b900460ff1681565b34801561064257600080fd5b506103e8610651366004613827565b611940565b34801561066257600080fd5b506103e8610671366004613b90565b6119ba565b34801561068257600080fd5b5061046c60d05481565b34801561069857600080fd5b5060975460ff1661040a565b3480156106b057600080fd5b5061040a6106bf3660046138f7565b60e26020526000908152604090205460ff1681565b3480156106e057600080fd5b5061046c60c95481565b3480156106f657600080fd5b5061046c61070536600461389c565b611c86565b34801561071657600080fd5b506103e8611ca2565b34801561072b57600080fd5b506103e861073a3660046138f7565b611e10565b34801561074b57600080fd5b506103e8611e3a565b34801561076057600080fd5b5061040a61076f3660046138f7565b60df6020526000908152604090205460ff1681565b61040a61079236600461389c565b611e4c565b3480156107a357600080fd5b5061046c60ca5481565b3480156107b957600080fd5b506103e86121d1565b3480156107ce57600080fd5b506103e86107dd366004613827565b6121e1565b3480156107ee57600080fd5b506065546001600160a01b03165b6040516001600160a01b039091168152602001610416565b34801561082057600080fd5b5061046c61225b565b34801561083557600080fd5b506103e8610844366004613912565b6122ec565b34801561085557600080fd5b5061046c60dd5481565b34801561086b57600080fd5b5061046c60cf5481565b34801561088157600080fd5b506103e8610890366004613c1c565b6122ff565b3480156108a157600080fd5b5061040a6108b036600461389c565b612314565b3480156108c157600080fd5b5061046c6108d036600461389c565b6127f6565b3480156108e157600080fd5b5061040a6108f0366004613c51565b612b2a565b34801561090157600080fd5b5061040a610910366004613c7d565b612c9a565b34801561092157600080fd5b5061093561093036600461389c565b612f22565b6040516104169190613cb2565b34801561094e57600080fd5b506103e861095d366004613827565b612f8e565b34801561096e57600080fd5b5061046c61097d36600461389c565b613008565b34801561098e57600080fd5b5060dc546107fc906001600160a01b031681565b3480156109ae57600080fd5b50610935613029565b3480156109c357600080fd5b506103e86109d23660046138f7565b613081565b3480156109e357600080fd5b5061046c60d45481565b3480156109f957600080fd5b5061046c610a0836600461389c565b6130fa565b348015610a1957600080fd5b5060d9546107fc906001600160a01b031681565b348015610a3957600080fd5b5061046c610a48366004613912565b61310a565b348015610a5957600080fd5b5060cd546107fc906001600160a01b031681565b348015610a7957600080fd5b5061046c60d55481565b348015610a8f57600080fd5b506103e8610a9e366004613827565b61313e565b348015610aaf57600080fd5b5061046c60cc5481565b348015610ac557600080fd5b506103e8610ad43660046138f7565b6131b8565b348015610ae557600080fd5b506103e8610af4366004613827565b613231565b348015610b0557600080fd5b5060db546107fc906001600160a01b031681565b348015610b2557600080fd5b5060da546107fc906001600160a01b031681565b348015610b4557600080fd5b506103e8610b5436600461389c565b6132ab565b348015610b6557600080fd5b5061040a610b743660046138f7565b60e06020526000908152604090205460ff1681565b610b916132b8565b60005b81811015610c0357600160e26000858585818110610bb457610bb4613cea565b9050602002016020810190610bc991906138f7565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610bfb81613d16565b915050610b94565b505050565b6000610c126132b8565b600060cc5411610c695760405162461bcd60e51b815260206004820152601a60248201527f496e697469616c20636c61696d2064617461206e6f742073657400000000000060448201526064015b60405180910390fd5b60cb548211610cad5760405162461bcd60e51b815260206004820152601060248201526f53616c6520696e2070726f677265737360801b6044820152606401610c60565b428211610cf25760405162461bcd60e51b815260206004820152601360248201527210db185a5b481cdd185c9d081a5b881c185cdd606a1b6044820152606401610c60565b60cc8054908390556040805182815260208101859052428183015290517f5f3a900c85949962b4cc192dd3714dae64071dc2e907049ec720b023270905a49181900360600190a160019150505b919050565b610d4c6132b8565b60d98054911515600160a01b0260ff60a01b19909216919091179055565b610d726132b8565b6000821180610d815750600081115b610dc25760405162461bcd60e51b8152602060048201526012602482015271496e76616c696420706172616d657465727360701b6044820152606401610c60565b8115610ea75760ca544210610e105760405162461bcd60e51b815260206004820152601460248201527314d85b1948185b1c9958591e481cdd185c9d195960621b6044820152606401610c60565b814210610e535760405162461bcd60e51b815260206004820152601160248201527014d85b19481d1a5b59481a5b881c185cdd607a1b6044820152606401610c60565b60ca8054908390556040805182815260208101859052428183015290516414d510549560da1b917fddd2ed237e6993c9380182683f2c8bec486aaaa429528852cd74dbdb96cea0b2919081900360600190a2505b8015610f885760cb544210610ef35760405162461bcd60e51b815260206004820152601260248201527114d85b1948185b1c9958591e48195b99195960721b6044820152606401610c60565b60ca548111610f365760405162461bcd60e51b815260206004820152600f60248201526e496e76616c696420656e6454696d6560881b6044820152606401610c60565b60cb8054908290556040805182815260208101849052428183015290516211539160ea1b917fddd2ed237e6993c9380182683f2c8bec486aaaa429528852cd74dbdb96cea0b2919081900360600190a2505b5050565b610f946132b8565b60d98054911515600160a81b0260ff60a81b19909216919091179055565b610fba6132b8565b60d855565b610fc76132b8565b600081116110175760405162461bcd60e51b815260206004820152601c60248201527f5a65726f206d617820746f6b656e7320746f206275792076616c7565000000006044820152606401610c60565b60cf8054908290556040805182815260208101849052428183015290517f76f9e5e1f6af6a9f180708b77a5c99210fbf19b91f1f194f3918c262b8edf77c9181900360600190a15050565b60008061106e836127f6565b905061107861225b565b60ce546110859083613d2f565b61108f9190613d46565b9392505050565b60006110a0613312565b60cd546001600160a01b03166110ef5760405162461bcd60e51b815260206004820152601460248201527314d85b19481d1bdad95b881b9bdd08185919195960621b6044820152606401610c60565b33600090815260e0602052604090205460ff161561114f5760405162461bcd60e51b815260206004820152601b60248201527f54686973204164647265737320697320426c61636b6c697374656400000000006044820152606401610c60565b60d954600160a81b900460ff16156111c05733600090815260e1602052604090205460ff166111c05760405162461bcd60e51b815260206004820152601e60248201527f55736572206e6f742077686974656c697374656420666f7220636c61696d00006044820152606401610c60565b60cc544210156112125760405162461bcd60e51b815260206004820152601960248201527f436c61696d20686173206e6f74207374617274656420796574000000000000006044820152606401610c60565b33600090815260df602052604090205460ff16156112645760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b6044820152606401610c60565b600083116112a75760405162461bcd60e51b815260206004820152601060248201526f4e6f7468696e6720746f20636c61696d60801b6044820152606401610c60565b6040805133602082015290810184905260009060600160408051601f19818403018152828252805160209182012090830152016040516020818303038152906040528051906020012090506112ff8360dd5483613358565b61133b5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210383937b7b360991b6044820152606401610c60565b33600081815260df60209081526040808320805460ff1916600117905560cd54815163a9059cbb60e01b8152600481019590955260248501899052905192936001600160a01b03919091169263a9059cbb92604480840193919291829003018187875af11580156113b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113d49190613d68565b90508061141b5760405162461bcd60e51b8152602060048201526015602482015274151bdad95b881d1c985b9cd9995c8819985a5b1959605a1b6044820152606401610c60565b6040805186815242602082015233917f9923b4306c6c030f2bdfbf156517d5983b87e15b96176da122cd4f2effa4ba7b910160405180910390a26001925050505b92915050565b600061146c6132b8565b60d1548511156114ae5760405162461bcd60e51b815260206004820152600d60248201526c0d2dcecc2d8d2c840d2dcc8caf609b1b6044820152606401610c60565b83156114d8578360d160000186815481106114cb576114cb613cea565b6000918252602090912001555b8215611502578260d160010186815481106114f5576114f5613cea565b6000918252602090912001555b811561152c578160d1600201868154811061151f5761151f613cea565b6000918252602090912001555b506001949350505050565b61153f6132b8565b61154761336e565b565b60008160ca544210158015611560575060cb544211155b61157c5760405162461bcd60e51b8152600401610c6090613d85565b6000811161159c5760405162461bcd60e51b8152600401610c6090613dbc565b6115a4613312565b6115ac6133c0565b33600090815260e2602052604090205460ff1661160b5760405162461bcd60e51b815260206004820181905260248201527f55736572206e6f742077686974656c697374656420666f7220746869732074786044820152606401610c60565b6000611616846127f6565b9050600061162261225b565b60ce5461162f9084613d2f565b6116399190613d46565b90508034101561167a5760405162461bcd60e51b815260206004820152600c60248201526b13195cdcc81c185e5b595b9d60a21b6044820152606401610c60565b60006116868234613de9565b90508560c9600082825461169a9190613dfc565b909155505060d454156116bf578560d460008282546116b99190613dfc565b90915550505b600060d45460c954116116d45760d4546116d8565b60c9545b905060d160000160d054815481106116f2576116f2613cea565b906000526020600020015481118061172c575060d160020160d0548154811061171d5761171d613cea565b90600052602060002001544210155b1561185f5760d160020160d0548154811061174957611749613cea565b90600052602060002001544210611790578660d160000160d0548154811061177357611773613cea565b90600052602060002001546117889190613dfc565b60d4556117aa565b60d954600160a01b900460ff16156117aa576117aa613419565b600060d1810160d054815481106117c3576117c3613cea565b90600052602060002001548211611807578160d160000160d054815481106117ed576117ed613cea565b90600052602060002001546118029190613de9565b61180a565b60005b60d780546001818101835560009283527f8a012a6de2943a5aa4d77acf5e695d4456760a3f1f30a5d6dc2079599187a07190910183905560d080549394509092909190611858908490613dfc565b9091555050505b60ce5461186c9088613d2f565b6001600160a01b038916600090815260de602052604081208054909190611894908490613dfc565b925050819055508360d560008282546118ad9190613dfc565b909155505060d9546118c8906001600160a01b031684613489565b81156118d8576118d88883613489565b60408051848152602081018690524281830152905160009189916001600160a01b038c16917f4d8aead3491b7eba4b5c7a65fc17e493b9e63f9e433522fc5f6a85a168fc9d36919081900360600190a4600195505050505061193960018055565b5092915050565b6119486132b8565b60005b81811015610c0357600060e1600085858581811061196b5761196b613cea565b905060200201602081019061198091906138f7565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806119b281613d16565b91505061194b565b600054610100900460ff16158080156119da5750600054600160ff909116105b806119f45750303b1580156119f4575060005460ff166001145b611a575760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c60565b6000805460ff191660011790558015611a7a576000805461ff0019166101001790555b6001600160a01b038816611ad05760405162461bcd60e51b815260206004820152601760248201527f5a65726f2061676772656761746f7220616464726573730000000000000000006044820152606401610c60565b6001600160a01b038716611b1a5760405162461bcd60e51b81526020600482015260116024820152705a65726f2055534454206164647265737360781b6044820152606401610c60565b4286118015611b2857508585115b611b635760405162461bcd60e51b815260206004820152600c60248201526b496e76616c69642074696d6560a01b6044820152606401610c60565b611b6b613565565b611b73613598565b611b7b6135c8565b670de0b6b3a764000060ce5560dc80546001600160a01b03808b166001600160a01b03199283161790925560db8054928a169290911691909117905560ca86905560cb859055611bce60d1856003613740565b5060cf83905560d980546001600160a01b0319166001600160a01b03841617905560ca5460cb5460408051928352602083019190915242908201527f23f6ad8232d75562dd1c6b37dfc895af6bfc1ecd0fb3b88722c6a5e6b4dc9a209060600160405180910390a18015611c7c576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050565b6000611c91826127f6565b905061145c64e8d4a5100082613d46565b60da546001600160a01b0316331480611cc557506065546001600160a01b031633145b611d115760405162461bcd60e51b815260206004820152601960248201527f63616c6c6572206e6f742061646d696e206f72206f776e6572000000000000006044820152606401610c60565b60d45460d680546001810182556000919091527fe767803f8ecf1dee6bb0345811f7312cda556058b19db6389ad9ae3568643ddd015560d954600160a01b900460ff1615611d6157611d61613419565b60d160000160d05481548110611d7957611d79613cea565b906000526020600020015460d4541015611df95760d45460d79060d160000160d05481548110611dab57611dab613cea565b9060005260206000200154611dc09190613de9565b8154600181018355600092835260208320015560d10160d05481548110611de957611de9613cea565b60009182526020909120015460d4555b60d08054906000611e0983613d16565b9190505550565b611e186132b8565b60da80546001600160a01b0319166001600160a01b0392909216919091179055565b611e426132b8565b61154760006135ef565b60008160ca544210158015611e63575060cb544211155b611e7f5760405162461bcd60e51b8152600401610c6090613d85565b60008111611e9f5760405162461bcd60e51b8152600401610c6090613dbc565b611ea7613312565b611eaf6133c0565b6000611eba846127f6565b90506000611ec661225b565b60ce54611ed39084613d2f565b611edd9190613d46565b905080341015611f1e5760405162461bcd60e51b815260206004820152600c60248201526b13195cdcc81c185e5b595b9d60a21b6044820152606401610c60565b6000611f2a8234613de9565b90508560c96000828254611f3e9190613dfc565b909155505060d45415611f63578560d46000828254611f5d9190613dfc565b90915550505b600060d45460c95411611f785760d454611f7c565b60c9545b905060d160000160d05481548110611f9657611f96613cea565b9060005260206000200154811180611fd0575060d160020160d05481548110611fc157611fc1613cea565b90600052602060002001544210155b156121035760d160020160d05481548110611fed57611fed613cea565b90600052602060002001544210612034578660d160000160d0548154811061201757612017613cea565b906000526020600020015461202c9190613dfc565b60d45561204e565b60d954600160a01b900460ff161561204e5761204e613419565b600060d1810160d0548154811061206757612067613cea565b906000526020600020015482116120ab578160d160000160d0548154811061209157612091613cea565b90600052602060002001546120a69190613de9565b6120ae565b60005b60d780546001818101835560009283527f8a012a6de2943a5aa4d77acf5e695d4456760a3f1f30a5d6dc2079599187a07190910183905560d0805493945090929091906120fc908490613dfc565b9091555050505b60ce546121109088613d2f565b33600090815260de60205260408120805490919061212f908490613dfc565b925050819055508360d560008282546121489190613dfc565b909155505060d954612163906001600160a01b031684613489565b8115612173576121733383613489565b604080518481526020810186905242818301529051600091899133917f4d8aead3491b7eba4b5c7a65fc17e493b9e63f9e433522fc5f6a85a168fc9d36919081900360600190a460019550505050506121cb60018055565b50919050565b6121d96132b8565b611547613641565b6121e96132b8565b60005b81811015610c0357600060e0600085858581811061220c5761220c613cea565b905060200201602081019061222191906138f7565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558061225381613d16565b9150506121ec565b60008060dc60009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156122b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122d59190613e29565b505050915050806402540be40061145c9190613e79565b6122f46132b8565b60d09190915560d455565b6123076132b8565b610f8860d1826003613740565b60008160ca54421015801561232b575060cb544211155b6123475760405162461bcd60e51b8152600401610c6090613d85565b600081116123675760405162461bcd60e51b8152600401610c6090613dbc565b61236f613312565b600061237a846127f6565b90508360c9600082825461238e9190613dfc565b909155505060d454156123b3578360d460008282546123ad9190613dfc565b90915550505b600060d45460c954116123c85760d4546123cc565b60c9545b905060d160000160d054815481106123e6576123e6613cea565b9060005260206000200154811180612420575060d160020160d0548154811061241157612411613cea565b90600052602060002001544210155b156125535760d160020160d0548154811061243d5761243d613cea565b90600052602060002001544210612484578460d160000160d0548154811061246757612467613cea565b906000526020600020015461247c9190613dfc565b60d45561249e565b60d954600160a01b900460ff161561249e5761249e613419565b600060d1810160d054815481106124b7576124b7613cea565b906000526020600020015482116124fb578160d160000160d054815481106124e1576124e1613cea565b90600052602060002001546124f69190613de9565b6124fe565b60005b60d780546001818101835560009283527f8a012a6de2943a5aa4d77acf5e695d4456760a3f1f30a5d6dc2079599187a07190910183905560d08054939450909290919061254c908490613dfc565b9091555050505b60ce546125609086613d2f565b33600090815260de60205260408120805490919061257f908490613dfc565b925050819055508160d560008282546125989190613dfc565b909155505060db546000906001600160a01b031663dd62ed3e336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604401602060405180830381865afa1580156125fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126209190613ea9565b9050600061263364e8d4a5100085613d46565b90508181111561268f5760405162461bcd60e51b815260206004820152602160248201527f4d616b65207375726520746f2061646420656e6f75676820616c6c6f77616e636044820152606560f81b6064820152608401610c60565b60db546000906001600160a01b03163360d9546040516001600160a01b039283166024820152911660448201526064810184905260840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b179052516126fb9190613ec2565b6000604051808303816000865af19150503d8060008114612738576040519150601f19603f3d011682016040523d82523d6000602084013e61273d565b606091505b50509050806127855760405162461bcd60e51b8152602060048201526014602482015273151bdad95b881c185e5b595b9d0819985a5b195960621b6044820152606401610c60565b60db546001600160a01b031688336001600160a01b03167f4d8aead3491b7eba4b5c7a65fc17e493b9e63f9e433522fc5f6a85a168fc9d368589426040516127e0939291909283526020830191909152604082015260600190565b60405180910390a4506001979650505050505050565b600080600060d45460001461280d5760d454612811565b60c9545b905060cf548411156128655760405162461bcd60e51b815260206004820181905260248201527f416d6f756e742065786365656473206d617820746f6b656e7320746f206275796044820152606401610c60565b60d160000160d0548154811061287d5761287d613cea565b906000526020600020015481856128949190613dfc565b11806128c2575060d160020160d054815481106128b3576128b3613cea565b90600052602060002001544210155b15612af45760d1546128d690600190613de9565b60d054106129155760405162461bcd60e51b815260206004820152600c60248201526b57726f6e6720706172616d7360a01b6044820152606401610c60565b60d160020160d0548154811061292d5761292d613cea565b90600052602060002001544210612a405760d05460d19061294f906001613dfc565b8154811061295f5761295f613cea565b90600052602060002001548460d160006003811061297f5761297f613cea565b0160d0548154811061299357612993613cea565b90600052602060002001546129a89190613dfc565b1115612a025760405162461bcd60e51b815260206004820152602360248201527f43616e74205075726368617365204d6f726520696e20696e646976696475616c604482015262040e8f60eb1b6064820152608401610c60565b60d05460d290612a13906001613dfc565b81548110612a2357612a23613cea565b906000526020600020015484612a399190613d2f565b9150611939565b60008160d1820160d05481548110612a5a57612a5a613cea565b9060005260206000200154612a6f9190613de9565b60d05490915060d290612a83906001613dfc565b81548110612a9357612a93613cea565b90600052602060002001548186612aaa9190613de9565b612ab49190613d2f565b60d160010160d05481548110612acc57612acc613cea565b906000526020600020015482612ae29190613d2f565b612aec9190613dfc565b925050611939565b60d160010160d05481548110612b0c57612b0c613cea565b906000526020600020015484612b229190613d2f565b949350505050565b6000612b346132b8565b60008411612b7b5760405162461bcd60e51b8152602060048201526014602482015273696e76616c6964206e6f206f6620746f6b656e7360601b6044820152606401610c60565b60008311612bbf5760405162461bcd60e51b8152602060048201526011602482015270696e76616c6964206e657720707269636560781b6044820152606401610c60565b60008211612c025760405162461bcd60e51b815260206004820152601060248201526f696e76616c6964206e65772074696d6560801b6044820152606401610c60565b5060d1805460018082019092557f695fb3134ad82c3b8022bc5464edd0bcc9424ef672b52245dcb6ab2374327ce3019390935560d280548085019091557ff2192e1030363415d7b4fb0406540a0060e8e2fc8982f3f32289379e11fa6546019190915560d3805480840182556000919091527f915c3eb987b20e1af620c1403197bf687fb7f18513b3a73fde6e78c7072c41a6015590565b6000612ca46132b8565b60cb5484118015612cb457504284115b612d005760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420636c61696d2073746172742074696d6500000000000000006044820152606401610c60565b60ce5460c954612d109190613d2f565b831015612d575760405162461bcd60e51b8152602060048201526015602482015274151bdad95b9cc81b195cdcc81d1a185b881cdbdb19605a1b6044820152606401610c60565b6001600160a01b038216612da25760405162461bcd60e51b81526020600482015260126024820152715a65726f20746f6b656e206164647265737360701b6044820152606401610c60565b60cc5415612de65760405162461bcd60e51b815260206004820152601160248201527010db185a5b48185b1c9958591e481cd95d607a1b6044820152606401610c60565b60cc84905560cd80546001600160a01b0319166001600160a01b0384169081179091556000906323b872dd336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604481018790526064016020604051808303816000875af1158015612e65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e899190613d68565b905080612ed05760405162461bcd60e51b8152602060048201526015602482015274151bdad95b881d1c985b9cd9995c8819985a5b1959605a1b6044820152606401610c60565b60cd54604080518681524260208201526001600160a01b03909216917fdc9670dbabdd488b372eb16ebe49a39b3124a12cdffdcefbc89834a408bf8ff8910160405180910390a2506001949350505050565b606060d18260038110612f3757612f37613cea565b01805480602002602001604051908101604052809291908181526020018280548015612f8257602002820191906000526020600020905b815481526020019060010190808311612f6e575b50505050509050919050565b612f966132b8565b60005b81811015610c0357600160e06000858585818110612fb957612fb9613cea565b9050602002016020810190612fce91906138f7565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558061300081613d16565b915050612f99565b60d7818154811061301857600080fd5b600091825260209091200154905081565b606060d780548060200260200160405190810160405280929190818152602001828054801561307757602002820191906000526020600020905b815481526020019060010190808311613063575b5050505050905090565b6130896132b8565b6001600160a01b0381166130d85760405162461bcd60e51b8152602060048201526016602482015275616464726573732063616e6e6f74206265207a65726f60501b6044820152606401610c60565b60d980546001600160a01b0319166001600160a01b0392909216919091179055565b60d6818154811061301857600080fd5b60d1826003811061311a57600080fd5b01818154811061312957600080fd5b90600052602060002001600091509150505481565b6131466132b8565b60005b81811015610c0357600160e1600085858581811061316957613169613cea565b905060200201602081019061317e91906138f7565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806131b081613d16565b915050613149565b6131c06132b8565b6001600160a01b0381166132255760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c60565b61322e816135ef565b50565b6132396132b8565b60005b81811015610c0357600060e2600085858581811061325c5761325c613cea565b905060200201602081019061327191906138f7565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806132a381613d16565b91505061323c565b6132b36132b8565b60dd55565b6065546001600160a01b031633146115475760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c60565b60975460ff16156115475760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c60565b600082613365858461367e565b14949350505050565b6133766136cb565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6002600154036134125760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c60565b6002600155565b60005b60d05460d35461342c9190613de9565b81101561322e5760d8546134409082613d2f565b61344a9042613dfc565b60d05460d39061345b908490613dfc565b8154811061346b5761346b613cea565b6000918252602090912001558061348181613d16565b91505061341c565b804710156134c75760405162461bcd60e51b815260206004820152600b60248201526a4c6f772062616c616e636560a81b6044820152606401610c60565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613514576040519150601f19603f3d011682016040523d82523d6000602084013e613519565b606091505b5050905080610c035760405162461bcd60e51b81526020600482015260126024820152711155120814185e5b595b9d0819985a5b195960721b6044820152606401610c60565b60018055565b600054610100900460ff1661358c5760405162461bcd60e51b8152600401610c6090613ef1565b6097805460ff19169055565b600054610100900460ff166135bf5760405162461bcd60e51b8152600401610c6090613ef1565b611547336135ef565b600054610100900460ff1661355f5760405162461bcd60e51b8152600401610c6090613ef1565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b613649613312565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586133a33390565b600081815b84518110156136c3576136af828683815181106136a2576136a2613cea565b6020026020010151613714565b9150806136bb81613d16565b915050613683565b509392505050565b60975460ff166115475760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c60565b600081831061373057600082815260208490526040902061108f565b5060009182526020526040902090565b8260038101928215613780579160200282015b828111156137805782518051613770918491602090910190613790565b5091602001919060010190613753565b5061378c9291506137d7565b5090565b8280548282559060005260206000209081019282156137cb579160200282015b828111156137cb5782518255916020019190600101906137b0565b5061378c9291506137f4565b8082111561378c5760006137eb8282613809565b506001016137d7565b5b8082111561378c57600081556001016137f5565b508054600082559060005260206000209081019061322e91906137f4565b6000806020838503121561383a57600080fd5b823567ffffffffffffffff8082111561385257600080fd5b818501915085601f83011261386657600080fd5b81358181111561387557600080fd5b8660208260051b850101111561388a57600080fd5b60209290920196919550909350505050565b6000602082840312156138ae57600080fd5b5035919050565b801515811461322e57600080fd5b6000602082840312156138d557600080fd5b813561108f816138b5565b80356001600160a01b0381168114610d3f57600080fd5b60006020828403121561390957600080fd5b61108f826138e0565b6000806040838503121561392557600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff8111828210171561396d5761396d613934565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561399c5761399c613934565b604052919050565b600067ffffffffffffffff8211156139be576139be613934565b5060051b60200190565b600080604083850312156139db57600080fd5b8235915060208084013567ffffffffffffffff8111156139fa57600080fd5b8401601f81018613613a0b57600080fd5b8035613a1e613a19826139a4565b613973565b81815260059190911b82018301908381019088831115613a3d57600080fd5b928401925b82841015613a5b57833582529284019290840190613a42565b80955050505050509250929050565b60008060008060808587031215613a8057600080fd5b5050823594602084013594506040840135936060013592509050565b60008060408385031215613aaf57600080fd5b613ab8836138e0565b946020939093013593505050565b6000601f8381840112613ad857600080fd5b613ae061394a565b806060850186811115613af257600080fd5b855b81811015613b8457803567ffffffffffffffff811115613b145760008081fd5b87018581018913613b255760008081fd5b80356020613b35613a19836139a4565b82815260059290921b8301810191818101908c841115613b555760008081fd5b938201935b83851015613b7357843582529382019390820190613b5a565b885250909501945050602001613af4565b50909695505050505050565b600080600080600080600060e0888a031215613bab57600080fd5b613bb4886138e0565b9650613bc2602089016138e0565b95506040880135945060608801359350608088013567ffffffffffffffff811115613bec57600080fd5b613bf88a828b01613ac6565b93505060a08801359150613c0e60c089016138e0565b905092959891949750929550565b600060208284031215613c2e57600080fd5b813567ffffffffffffffff811115613c4557600080fd5b612b2284828501613ac6565b600080600060608486031215613c6657600080fd5b505081359360208301359350604090920135919050565b600080600060608486031215613c9257600080fd5b8335925060208401359150613ca9604085016138e0565b90509250925092565b6020808252825182820181905260009190848201906040850190845b81811015613b8457835183529284019291840191600101613cce565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201613d2857613d28613d00565b5060010190565b808202811582820484141761145c5761145c613d00565b600082613d6357634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215613d7a57600080fd5b815161108f816138b5565b60208082526017908201527f496e76616c69642074696d6520666f7220627579696e67000000000000000000604082015260600190565b602080825260139082015272125b9d985b1a59081cd85b1948185b5bdd5b9d606a1b604082015260600190565b8181038181111561145c5761145c613d00565b8082018082111561145c5761145c613d00565b805169ffffffffffffffffffff81168114610d3f57600080fd5b600080600080600060a08688031215613e4157600080fd5b613e4a86613e0f565b9450602086015193506040860151925060608601519150613e6d60808701613e0f565b90509295509295909350565b80820260008212600160ff1b84141615613e9557613e95613d00565b818105831482151761145c5761145c613d00565b600060208284031215613ebb57600080fd5b5051919050565b6000825160005b81811015613ee35760208186018101518583015201613ec9565b506000920191825250919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea264697066735822122069ea6daa9013c3071b037d420bbea38cdf8ea7ca2041def9e159468d11c396d964736f6c63430008130033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 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.