Sepolia Testnet

Contract

0xB133E73Bee89A7E7D71B0cA2b12974fbc88aBa1d

Overview

ETH Balance

0 ETH

Token Holdings

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Buy With USDT63326952024-07-18 10:25:3655 days ago1721298336IN
0xB133E73B...bc88aBa1d
0 ETH0.0028891329.59758787
Buy With USDT63326922024-07-18 10:25:0055 days ago1721298300IN
0xB133E73B...bc88aBa1d
0 ETH0.0034909335.76264706
Buy With USDT63326872024-07-18 10:23:4855 days ago1721298228IN
0xB133E73B...bc88aBa1d
0 ETH0.0036905737.80321936
Buy With Eth63326832024-07-18 10:22:4855 days ago1721298168IN
0xB133E73B...bc88aBa1d
0.00014785 ETH0.0038941339.17169086
Buy With Eth63325892024-07-18 10:00:0055 days ago1721296800IN
0xB133E73B...bc88aBa1d
0.00014785 ETH0.0043800642.9788735
Buy With Eth63325852024-07-18 9:59:0055 days ago1721296740IN
0xB133E73B...bc88aBa1d
0.0014785 ETH0.004618446.45725444
Buy With Eth63325622024-07-18 9:52:2455 days ago1721296344IN
0xB133E73B...bc88aBa1d
0.0014785 ETH0.0053100844.6180729
Buy With Eth63325602024-07-18 9:51:2455 days ago1721296284IN
0xB133E73B...bc88aBa1d
0.0014785 ETH0.005057842.49828864
Buy With Eth63325592024-07-18 9:51:1255 days ago1721296272IN
0xB133E73B...bc88aBa1d
0.0005914 ETH0.0061815341.015516

Latest 13 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
63326832024-07-18 10:22:4855 days ago1721298168
0xB133E73B...bc88aBa1d
0.00000304 ETH
63326832024-07-18 10:22:4855 days ago1721298168
0xB133E73B...bc88aBa1d
0.0001448 ETH
63325892024-07-18 10:00:0055 days ago1721296800
0xB133E73B...bc88aBa1d
0.00000304 ETH
63325892024-07-18 10:00:0055 days ago1721296800
0xB133E73B...bc88aBa1d
0.0001448 ETH
63325852024-07-18 9:59:0055 days ago1721296740
0xB133E73B...bc88aBa1d
0.00003043 ETH
63325852024-07-18 9:59:0055 days ago1721296740
0xB133E73B...bc88aBa1d
0.00144806 ETH
63325622024-07-18 9:52:2455 days ago1721296344
0xB133E73B...bc88aBa1d
0.00003043 ETH
63325622024-07-18 9:52:2455 days ago1721296344
0xB133E73B...bc88aBa1d
0.00144806 ETH
63325602024-07-18 9:51:2455 days ago1721296284
0xB133E73B...bc88aBa1d
0.00003043 ETH
63325602024-07-18 9:51:2455 days ago1721296284
0xB133E73B...bc88aBa1d
0.00144806 ETH
63325592024-07-18 9:51:1255 days ago1721296272
0xB133E73B...bc88aBa1d
0.00001217 ETH
63325592024-07-18 9:51:1255 days ago1721296272
0xB133E73B...bc88aBa1d
0.00057922 ETH
63325202024-07-18 9:41:3655 days ago1721295696  Contract Creation0 ETH
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xdDE5bC96...4BE48e1D1
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
TTPresaleV1

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 6 : TTPresaleV1.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
/// @title TT Presale Contract - v1
/// @author
/// @notice This contract manages a token presale with options to buy using ETH or USDT.
/// @dev This contract utilizes OpenZeppelin's libraries for additional security.

// External dependencies
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/security/Pausable.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';

/// @dev Interface for fetching the latest ETH/USD price data.
interface Aggregator {
  function latestRoundData() external view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
}

contract TTPresaleV1 is ReentrancyGuard, Ownable, Pausable {
  // Presale variables
  uint256 public totalTokensSold; // Total number of tokens sold during the sale.
  uint256 public startTime; // Start timestamp of the sale.
  uint256 public endTime; // End timestamp of the sale.
  uint256 public claimStart; // Timestamp when buyers can claim their tokens.
  address public saleToken; // ERC20 token that is on sale.
  uint256 public constant baseDecimals = 10 ** 18; // Base unit for token and ETH calculations.

  // Purchase and pricing variables
  uint256 public usdRaised; // USD amount accumulated from the sale.
  uint256 public tokensToBeSold; // Total number of tokens available for sale.
  uint256 public tokenPrice; // Price of the token in terms of USD.

  // Wallets and commission
  address public paymentWallet; // Address where the funds (ETH/USDT) from sale will be sent.
  address public commissionWallet; // Address which receives the commission.
  uint256 public commissionPercentage; // Commission rate in percentage.
  address public adminWallet; // Address which has admin role.

  // External contract interfaces
  IERC20 public USDTInterface; // Interface for the USDT token functions.
  Aggregator public aggregatorInterface; // Interface to fetch latest ETH/USD prices.

  // Trackers for user data
  mapping(address => uint256) public userDeposits; // Track how many tokens each user has bought.
  mapping(address => bool) public hasClaimed; // Track if a user has claimed their tokens after the sale.

  // Events to record notable contract actions
  /// @dev Emitted when the sale's start and end times are set.
  event SaleTimeSet(uint256 indexed _start, uint256 indexed _end, uint256 indexed timestamp);

  /// @dev Emitted when specific sale details, like token count or price, are updated.
  event SaleDetailsUpdated(bytes32 indexed key, uint256 prevValue, uint256 newValue, uint256 timestamp);

  /// @dev Emitted when either the sale's start or end time is updated.
  event SaleTimeUpdated(bytes32 indexed key, uint256 prevValue, uint256 newValue, uint256 timestamp);

  /// @dev Emitted when tokens are bought by users.
  event TokensBought(address indexed user, uint256 indexed tokensBought, address indexed purchaseToken, uint256 amountPaid, uint256 usdEq, uint256 timestamp, uint256 usdRaised, uint256 totalTokensSold);

  /// @dev Emitted when tokens are added to the contract for selling or claiming.
  event TokensAdded(address indexed token, uint256 noOfTokens, uint256 timestamp);

  /// @dev Emitted when a user claims their purchased tokens after the sale.
  event TokensClaimed(address indexed user, uint256 amount, uint256 timestamp);

  /// @dev Emitted when the time users can start claiming their tokens is updated.
  event ClaimStartUpdated(uint256 prevValue, uint256 newValue, uint256 timestamp);

  /// @dev Emitted when the maximum number of tokens that can be bought is updated.
  event MaxTokensUpdated(uint256 prevValue, uint256 newValue, uint256 timestamp);
  /// @dev Emitted when Payment wallet is updated.
  event PaymentWalletUpdated(address prevAddress, address newAddress, uint256 timestamp);
  /// @dev Emitted when Commission wallet is updated.
  event CommissionWalletUpdated(address prevAddress, address newAddress, uint256 timestamp);
  /// @dev Emitted when the Commission Percentage is updated.
  event CommissionPercentageUpdated(uint256 prevValue, uint256 newValue, uint256 timestamp);
  /// @dev Emitted when Admin wallet is updated.
  event AdminWalletUpdated(address prevAddress, address newAddress, uint256 timestamp);
  /// @dev Emitted when Oracle Address is updated.
  event OracleAddressUpdated(address prevAddress, address newAddress, uint256 timestamp);

  /// @dev Constructor to initialize the presale contract with specific parameters.
  /// @param _oracle Address of the price aggregator for ETH/USD.
  /// @param _usdt Address of the USDT token contract.
  /// @param _startTime Start time of the presale.
  /// @param _endTime End time of the presale.
  /// @param _tokensToBeSold Number of tokens available for presale.
  /// @param _tokenPrice Price of each token in USD.
  /// @param _paymentWallet Wallet address to which the sale funds will be transferred.
  /// @param _commissionWallet Address to receive commission.
  /// @param _commissionPercentage Percentage of sales as commission.
  constructor(address _oracle, address _usdt, uint256 _startTime, uint256 _endTime, uint256 _tokensToBeSold, uint256 _tokenPrice, address _paymentWallet, address _commissionWallet, uint256 _commissionPercentage, address _adminWallet) {
    // Validation
    require(_oracle != address(0), 'Zero aggregator address');
    require(_usdt != address(0), 'Zero USDT address');
    require(_paymentWallet != address(0), 'Zero address');
    require(_commissionWallet != address(0), 'Zero commission wallet address');
    require(_startTime > block.timestamp && _endTime > _startTime, 'Invalid time');

    // Assigning values
    aggregatorInterface = Aggregator(_oracle);
    USDTInterface = IERC20(_usdt);
    startTime = _startTime;
    endTime = _endTime;
    tokensToBeSold = _tokensToBeSold;
    tokenPrice = _tokenPrice;
    paymentWallet = _paymentWallet;
    commissionPercentage = _commissionPercentage;
    commissionWallet = _commissionWallet;
    adminWallet = _adminWallet;
    emit SaleTimeSet(startTime, endTime, block.timestamp);
  }

  /// @notice Pause the sale.
  function pause() external onlyOwner {
    _pause();
  }

  /// @notice Resume the sale.
  function unpause() external onlyOwner {
    _unpause();
  }

  /**
    @notice Calculate the price in USDT for a given amount of tokens.
    @dev The function takes into account the token price set in the contract 
    and multiplies it by the amount of tokens to derive the USDT price.
    @param _amount Number of tokens for which the USDT price needs to be calculated.
    @return The USDT price for the specified amount of tokens.
    */
  function calculatePrice(uint256 _amount) public view returns (uint256) {
    // Ensure that selling this amount of tokens won't exceed the total tokens designated for sale
    require(_amount + totalTokensSold <= tokensToBeSold, 'Insufficient tokens available for sale.');

    // Calculate the total price in USDT by multiplying the amount of tokens with the token's price
    uint256 USDTAmount = _amount * tokenPrice;

    return USDTAmount;
  }

  /// @notice Update the start and end times for the sale.
  /// @param _startTime The new start time for the sale.
  /// @param _endTime The new end time for the sale.
  function changeSaleTimes(uint256 _startTime, uint256 _endTime) external onlyOwner {
    // Ensure either startTime or endTime is valid
    require(_startTime > 0 || _endTime > 0, 'Invalid parameters');

    // If startTime is specified and is still in the future, update it
    if (_startTime > 0) {
      // Ensure sale hasn't started
      require(block.timestamp < startTime, 'Sale already started');
      require(block.timestamp < _startTime, 'Sale time in past');

      // Emit the update and then change the startTime
      emit SaleTimeUpdated(bytes32('START'), startTime, _startTime, block.timestamp);
      startTime = _startTime;
    }

    // If endTime is specified and is still in the future, update it
    if (_endTime > 0) {
      // Ensure sale hasn't ended
      require(block.timestamp < endTime, 'Sale already ended');
      require(_endTime > startTime, 'Invalid endTime');

      // Emit the update and then change the endTime
      emit SaleTimeUpdated(bytes32('END'), endTime, _endTime, block.timestamp);
      endTime = _endTime;
    }
  }

  /// @notice Get the latest Ether price in USD with 18 decimals.
  /// @return The latest Ether price in 10^18 format.
  function getLatestPrice() public view returns (uint256) {
    // Fetch the latest round data from the oracle aggregator
    (, int256 price, , , ) = aggregatorInterface.latestRoundData();

    // Convert the price to 10^18 format
    price = price * (10 ** 10);

    // Ensure price is non-negative and cast to uint256 before returning
    require(price >= 0, 'Negative price returned from the aggregator');
    return uint256(price);
  }

  /**
    @dev A modifier to check whether the sale is active based on the current timestamp and a specified token purchase amount.
    @param amount The amount of tokens the user intends to buy.
    */
  modifier checkSaleState(uint256 amount) {
    // Ensure the current timestamp is within the sale start and end time
    require(block.timestamp >= startTime && block.timestamp <= endTime, 'Outside of sale period');

    // Ensure the specified purchase amount is valid
    require(amount > 0, 'Invalid purchase amount');

    _; // Placeholder for the modified function's body
  }
  /**
    @dev A modifier to check whether the caller is Admin or not.
    */
  modifier onlyAdmin() {
    // Ensure the current is admin
    require(_msgSender() == adminWallet, 'Admin : Caller is not the Admin');

    _; // Placeholder for the modified function's body
  }

  /// @notice Purchase tokens using USDT.
  /// @param amount Number of tokens to purchase.
  /// @return A boolean indicating whether the purchase was successful.
  function buyWithUSDT(uint256 amount) external checkSaleState(amount) whenNotPaused returns (bool) {
    // Calculate the USD price for the desired token amount
    uint256 usdPrice = calculatePrice(amount);

    // Convert the price into USDT (taking into account USDT's decimals)
    uint256 price = usdPrice / (10 ** 12);

    // Calculate commission based on set commissionPercentage
    uint256 commission = (price * commissionPercentage) / 10000;

    // Increment the total tokens sold and USD raised
    totalTokensSold += amount;
    usdRaised += usdPrice;

    // Record the token purchase amount for the user
    userDeposits[_msgSender()] += (amount * baseDecimals);

    // Ensure user has set enough USDT allowance for this contract to deduct funds
    uint256 ourAllowance = USDTInterface.allowance(_msgSender(), address(this));
    require(price <= ourAllowance, 'Make sure to add enough allowance');

    // Transfer funds from user to paymentWallet and commissionWallet
    // This uses low-level call for flexibility and error handling
    (bool success, ) = address(USDTInterface).call(abi.encodeWithSignature('transferFrom(address,address,uint256)', _msgSender(), paymentWallet, price - commission));
    // Ensure transfers were successful
    require(success, 'Payment Wallet Token payment failed');

    (bool commissionSuccess, ) = address(USDTInterface).call(abi.encodeWithSignature('transferFrom(address,address,uint256)', _msgSender(), commissionWallet, commission));
    // Ensure transfers were successful
    require(commissionSuccess, 'Commission Wallet Token payment failed');

    // Emit an event recording this purchase
    emit TokensBought(_msgSender(), amount, address(USDTInterface), price, usdPrice, block.timestamp, usdRaised, totalTokensSold);

    return true;
  }

  /// @notice Purchase tokens using Ether.
  /// @param amount Number of tokens to purchase.
  /// @return A boolean indicating whether the purchase was successful.
  function buyWithEth(uint256 amount) external payable checkSaleState(amount) whenNotPaused nonReentrant returns (bool) {
    // Calculate the USD price for the desired token amount
    uint256 usdPrice = calculatePrice(amount);

    // Convert the USD price to its equivalent in Ether
    uint256 ethAmount = (usdPrice * baseDecimals) / getLatestPrice();

    // Calculate commission based on set commissionPercentage
    uint256 commission = (ethAmount * commissionPercentage) / 10000;

    // Ensure the Ether sent with the transaction is enough
    require(msg.value >= ethAmount, 'Insufficient payment');

    // Calculate any excess Ether sent
    uint256 excess = msg.value - ethAmount;

    // Update total tokens sold and the total USD raised
    totalTokensSold += amount;
    usdRaised += usdPrice;

    // Record the token purchase amount for the user
    userDeposits[_msgSender()] += (amount * baseDecimals);

    // Transfer Ether to the payment and commission wallets
    sendValue(payable(paymentWallet), ethAmount - commission);
    sendValue(payable(commissionWallet), commission);

    // Refund any excess Ether sent by the buyer
    if (excess > 0) sendValue(payable(_msgSender()), excess);

    // Emit an event to log the purchase details
    emit TokensBought(_msgSender(), amount, address(0), ethAmount, usdPrice, block.timestamp, usdRaised, totalTokensSold);

    return true;
  }

  /// @notice Helper function to compute the Ether amount required for a given token purchase.
  /// @param amount The number of tokens intended for purchase.
  /// @return The Ether amount required for the purchase.
  function ethBuyHelper(uint256 amount) external view returns (uint256) {
    // Use the internal calculatePrice function to compute the USD price for the amount
    uint256 usdPrice = calculatePrice(amount);

    // Convert the USD price to its Ether equivalent
    return (usdPrice * baseDecimals) / getLatestPrice();
  }

  /// @notice Helper function to compute the USDT amount required for a given token purchase.
  /// @param amount The number of tokens intended for purchase.
  /// @return The USDT amount required for the purchase.
  function usdtBuyHelper(uint256 amount) external view returns (uint256) {
    // Use the internal calculatePrice function to compute the USD price for the amount
    uint256 usdPrice = calculatePrice(amount);

    // Adjust for the USDT's decimal places (typically 6 decimals)
    return usdPrice / (10 ** 12);
  }

  /// @dev A utility function to safely send Ether to a specified address.
  /// @param recipient The address to receive the Ether.
  /// @param amount The amount of Ether to send in wei.
  function sendValue(address payable recipient, uint256 amount) internal {
    // Ensure the contract has enough Ether before attempting the transfer
    require(address(this).balance >= amount, 'Insufficient funds');

    // Use call instead of transfer or send for better gas efficiency and to avoid the 2300 gas stipend limitation
    (bool success, ) = recipient.call{value: amount}('');
    require(success, 'Ether transfer failed');
  }

  /// @notice Set the claiming period and add sale tokens for user
  /// @param _claimStart Timestamp when users can start claiming tokens.
  /// @param noOfTokens Amount of tokens to add for claiming.
  /// @param _saleToken Address of the token being sold.
  /// @return A boolean indicating whether the operation was successful.
  function startClaim(uint256 _claimStart, uint256 noOfTokens, address _saleToken) external onlyOwner returns (bool) {
    // Check that the claim start is set appropriately and tokens are available
    require(_claimStart > endTime && _claimStart > block.timestamp, 'Invalid claim start time');
    require(_saleToken != address(0), 'Token address cannot be zero');
    require(claimStart == 0, 'Claim period already set');

    // Set the claim start time and sale token address.
    claimStart = _claimStart;
    saleToken = _saleToken;

    // Transfer the sale tokens to this contract
    bool success = IERC20(_saleToken).transferFrom(_msgSender(), address(this), noOfTokens);
    require(success, 'Token transfer failed');
    // Emit event logging added tokens
    emit TokensAdded(saleToken, noOfTokens, block.timestamp);
    return true;
  }

  /// @notice Change the starting timestamp for token claims after the sale ends.
  /// @param _claimStart The new timestamp when users can start claiming their tokens.
  /// @return A boolean indicating if the operation was successful.
  function changeClaimStart(uint256 _claimStart) external onlyOwner returns (bool) {
    // Ensure that the claim period has been set
    require(claimStart > 0, 'Initial claim data not set');

    // Validate the new claim start time
    require(_claimStart > endTime, 'Sale is still in progress');
    require(_claimStart > block.timestamp, 'Claim start is in the past');

    // Emit an event for the claim start change and update the claim start
    emit ClaimStartUpdated(claimStart, _claimStart, block.timestamp);
    claimStart = _claimStart;

    return true;
  }

  /// @notice Allows users to claim the tokens they bought after the claim period starts.
  /// @return A boolean indicating whether the claim was successful.
  function claim() external whenNotPaused returns (bool) {
    // Ensure that the sale token has been set and the claim period has started
    require(block.timestamp >= claimStart, 'Claim period has not started yet');

    // Check that the user hasn't already claimed their tokens
    require(!hasClaimed[_msgSender()], 'Tokens already claimed');
    hasClaimed[_msgSender()] = true;

    // Get the amount of tokens the user is allowed to claim
    uint256 amount = userDeposits[_msgSender()];

    // Ensure the user has tokens to claim
    require(amount > 0, 'No tokens to claim');

    // Remove the user's token deposit data to prevent re-entrancy
    delete userDeposits[_msgSender()];

    // Transfer the tokens to the user
    bool success = IERC20(saleToken).transfer(_msgSender(), amount);
    require(success, 'Token transfer failed');

    // Emit an event to record the token claim
    emit TokensClaimed(_msgSender(), amount, block.timestamp);

    return true;
  }

  /// @notice Update the number of tokens available for sale and their price.
  /// @param _tokensToBeSold The new number of tokens available for sale.
  /// @param _tokenPrice The new token price.
  function changeRoundsData(uint256 _tokensToBeSold, uint256 _tokenPrice) external onlyOwner {
    // Validate and update the token price if needed
    if (_tokenPrice > 0) {
      require(block.timestamp < endTime, 'Sale has already ended');
      emit SaleDetailsUpdated(bytes32('PRICE'), tokenPrice, _tokenPrice, block.timestamp);
      tokenPrice = _tokenPrice;
    }

    // Validate and update the number of tokens for sale if needed
    if (_tokensToBeSold > 0) {
      require(_tokensToBeSold > totalTokensSold, 'Amount less then already sold tokens');
      require(block.timestamp < endTime, 'Sale has already ended');
      emit SaleDetailsUpdated(bytes32('TOKENSTOBESOLD'), tokensToBeSold, _tokensToBeSold, block.timestamp);
      tokensToBeSold = _tokensToBeSold;
    }
  }

  /// @notice Update the payment wallet address.
  /// @param _newPaymentWallet The new payment wallet address.
  function setPaymentWallet(address _newPaymentWallet) external onlyOwner {
    // Ensure the new address is valid
    require(_newPaymentWallet != address(0), 'Invalid address');
    emit PaymentWalletUpdated(paymentWallet, _newPaymentWallet, block.timestamp);
    paymentWallet = _newPaymentWallet;
  }

  /// @notice Update the address for commission collection.
  /// @param _commissionWallet The new commission collection address.
  function setCommissionWallet(address _commissionWallet) external onlyAdmin {
    // Ensure the new commission address is valid
    require(_commissionWallet != address(0), 'Invalid address');
    emit CommissionWalletUpdated(commissionWallet, _commissionWallet, block.timestamp);
    commissionWallet = _commissionWallet;
  }

  /// @notice Update the percentage of commissions taken on each purchase.
  /// @param _commissionPercentage The new commission percentage.
  function setCommissionPercentage(uint256 _commissionPercentage) external onlyAdmin {
    // Ensure that the new commission percentage is valid
    require(_commissionPercentage <= 10000, 'Invalid commission percentage');
    emit CommissionPercentageUpdated(commissionPercentage, _commissionPercentage, block.timestamp);
    commissionPercentage = _commissionPercentage;
  }

  /// @notice Update the address for admin wallet.
  /// @param _adminWallet The new admin wallet address.
  function setAdminWallet(address _adminWallet) external onlyAdmin {
    // Ensure the new admin address is valid
    require(_adminWallet != address(0), 'Invalid address');
    emit AdminWalletUpdated(adminWallet, _adminWallet, block.timestamp);
    adminWallet = _adminWallet;
  }

  /// @notice Update the ETH/USD oracle
  /// @param _newOracleAddress The new oracle Address
  function setOracle(address _newOracleAddress) external onlyAdmin {
    // Ensure the new admin address is valid
    require(_newOracleAddress != address(0), 'Invalid address');
    emit OracleAddressUpdated(address(aggregatorInterface), _newOracleAddress, block.timestamp);
    aggregatorInterface = Aggregator(_newOracleAddress);
  }
}

File 2 of 6 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}

File 3 of 6 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.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 Pausable is Context {
    /**
     * @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.
     */
    constructor() {
        _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());
    }
}

File 4 of 6 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 5 of 6 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @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 ReentrancyGuard {
    // 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;

    constructor() {
        _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;
    }
}

File 6 of 6 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"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","name":"_tokensToBeSold","type":"uint256"},{"internalType":"uint256","name":"_tokenPrice","type":"uint256"},{"internalType":"address","name":"_paymentWallet","type":"address"},{"internalType":"address","name":"_commissionWallet","type":"address"},{"internalType":"uint256","name":"_commissionPercentage","type":"uint256"},{"internalType":"address","name":"_adminWallet","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"prevAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"AdminWalletUpdated","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":"ClaimStartUpdated","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":"CommissionPercentageUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"prevAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"CommissionWalletUpdated","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":false,"internalType":"address","name":"prevAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"OracleAddressUpdated","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":"address","name":"prevAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"PaymentWalletUpdated","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":"SaleDetailsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_start","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_end","type":"uint256"},{"indexed":true,"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"},{"indexed":false,"internalType":"uint256","name":"usdRaised","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalTokensSold","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 IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"adminWallet","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":"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":"_tokensToBeSold","type":"uint256"},{"internalType":"uint256","name":"_tokenPrice","type":"uint256"}],"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":"claim","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"commissionPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"commissionWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"","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":"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":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_adminWallet","type":"address"}],"name":"setAdminWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_commissionPercentage","type":"uint256"}],"name":"setCommissionPercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_commissionWallet","type":"address"}],"name":"setCommissionWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOracleAddress","type":"address"}],"name":"setOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newPaymentWallet","type":"address"}],"name":"setPaymentWallet","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":"tokenPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokensToBeSold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTokensSold","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":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userDeposits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x6080604052600436106102305760003560e01c806378e979251161012e578063b2caaebd116100ab578063eadd94ec1161006f578063eadd94ec14610648578063f04d688f1461065e578063f2fde38b14610674578063f597573f14610694578063fd6cb613146106b457600080fd5b8063b2caaebd146105b2578063c49cc645146105d2578063d575fe64146105f2578063e32204dd14610608578063e985e3671461062857600080fd5b80638da5cb5b116100f25780638da5cb5b1461051f5780638e15f4731461053d57806397c0262a14610552578063a7c6016014610572578063ae1042651461059257600080fd5b806378e979251461049e5780637adbf973146104b45780637d60b6ce146104d45780637ff9b596146104f45780638456cb591461050a57600080fd5b806339b87c8f116101bc57806363b201171161018057806363b201171461041057806363e4087914610426578063715018a61461044657806373b2e80e1461045b5780637649b9571461048b57600080fd5b806339b87c8f146103875780633f4ba83a146103a757806341317385146103bc5780634e71d92d146103dc5780635c975abb146103f157600080fd5b80633197cbb6116102035780633197cbb6146102e757806332bcfcbc146102fd57806333f7617814610313578063350829331461032f57806336b19cd71461034f57600080fd5b806307f18082146102355780630ba36dcd1461026a5780630dc9c838146102a557806329a5a0b6146102c7575b600080fd5b34801561024157600080fd5b50610255610250366004612124565b6106d4565b60405190151581526020015b60405180910390f35b34801561027657600080fd5b50610297610285366004612154565b60106020526000908152604090205481565b604051908152602001610261565b3480156102b157600080fd5b506102c56102c036600461216f565b610824565b005b3480156102d357600080fd5b506102976102e2366004612124565b610a44565b3480156102f357600080fd5b5061029760045481565b34801561030957600080fd5b5061029760085481565b34801561031f57600080fd5b50610297670de0b6b3a764000081565b34801561033b57600080fd5b506102c561034a366004612154565b610a7d565b34801561035b57600080fd5b50600d5461036f906001600160a01b031681565b6040516001600160a01b039091168152602001610261565b34801561039357600080fd5b506102c56103a2366004612124565b610b41565b3480156103b357600080fd5b506102c5610c0c565b3480156103c857600080fd5b506102c56103d736600461216f565b610c1e565b3480156103e857600080fd5b50610255610dd2565b3480156103fd57600080fd5b50600154600160a01b900460ff16610255565b34801561041c57600080fd5b5061029760025481565b34801561043257600080fd5b50610297610441366004612124565b611017565b34801561045257600080fd5b506102c5611034565b34801561046757600080fd5b50610255610476366004612154565b60116020526000908152604090205460ff1681565b610255610499366004612124565b611046565b3480156104aa57600080fd5b5061029760035481565b3480156104c057600080fd5b506102c56104cf366004612154565b6112c5565b3480156104e057600080fd5b506102c56104ef366004612154565b611389565b34801561050057600080fd5b5061029760095481565b34801561051657600080fd5b506102c561144d565b34801561052b57600080fd5b506001546001600160a01b031661036f565b34801561054957600080fd5b5061029761145d565b34801561055e57600080fd5b50600b5461036f906001600160a01b031681565b34801561057e57600080fd5b5061025561058d366004612124565b611564565b34801561059e57600080fd5b506102976105ad366004612124565b611a2e565b3480156105be57600080fd5b506102556105cd366004612191565b611aaf565b3480156105de57600080fd5b50600f5461036f906001600160a01b031681565b3480156105fe57600080fd5b50610297600c5481565b34801561061457600080fd5b50600a5461036f906001600160a01b031681565b34801561063457600080fd5b5060065461036f906001600160a01b031681565b34801561065457600080fd5b5061029760075481565b34801561066a57600080fd5b5061029760055481565b34801561068057600080fd5b506102c561068f366004612154565b611cf2565b3480156106a057600080fd5b50600e5461036f906001600160a01b031681565b3480156106c057600080fd5b506102c56106cf366004612154565b611d6b565b60006106de611e04565b6000600554116107355760405162461bcd60e51b815260206004820152601a60248201527f496e697469616c20636c61696d2064617461206e6f742073657400000000000060448201526064015b60405180910390fd5b60045482116107865760405162461bcd60e51b815260206004820152601960248201527f53616c65206973207374696c6c20696e2070726f677265737300000000000000604482015260640161072c565b4282116107d55760405162461bcd60e51b815260206004820152601a60248201527f436c61696d20737461727420697320696e207468652070617374000000000000604482015260640161072c565b60055460408051918252602082018490524282820152517f5f3a900c85949962b4cc192dd3714dae64071dc2e907049ec720b023270905a49181900360600190a150600581905560015b919050565b61082c611e04565b600082118061083b5750600081115b61087c5760405162461bcd60e51b8152602060048201526012602482015271496e76616c696420706172616d657465727360701b604482015260640161072c565b81156109605760035442106108ca5760405162461bcd60e51b815260206004820152601460248201527314d85b1948185b1c9958591e481cdd185c9d195960621b604482015260640161072c565b81421061090d5760405162461bcd60e51b815260206004820152601160248201527014d85b19481d1a5b59481a5b881c185cdd607a1b604482015260640161072c565b600354604080519182526020820184905242908201526414d510549560da1b907fddd2ed237e6993c9380182683f2c8bec486aaaa429528852cd74dbdb96cea0b29060600160405180910390a260038290555b8015610a405760045442106109ac5760405162461bcd60e51b815260206004820152601260248201527114d85b1948185b1c9958591e48195b99195960721b604482015260640161072c565b60035481116109ef5760405162461bcd60e51b815260206004820152600f60248201526e496e76616c696420656e6454696d6560881b604482015260640161072c565b600454604080519182526020820183905242908201526211539160ea1b907fddd2ed237e6993c9380182683f2c8bec486aaaa429528852cd74dbdb96cea0b29060600160405180910390a260048190555b5050565b600080610a5083611a2e565b9050610a5a61145d565b610a6c670de0b6b3a7640000836121dc565b610a7691906121fb565b9392505050565b600d546001600160a01b0316336001600160a01b031614610ab05760405162461bcd60e51b815260040161072c9061221d565b6001600160a01b038116610ad65760405162461bcd60e51b815260040161072c90612254565b600d546040517fc5cd37935366b7650108ffe402c0d4cab71595fb196557c7210a1132362277c391610b17916001600160a01b03909116908490429061227d565b60405180910390a1600d80546001600160a01b0319166001600160a01b0392909216919091179055565b600d546001600160a01b0316336001600160a01b031614610b745760405162461bcd60e51b815260040161072c9061221d565b612710811115610bc65760405162461bcd60e51b815260206004820152601d60248201527f496e76616c696420636f6d6d697373696f6e2070657263656e74616765000000604482015260640161072c565b600c5460408051918252602082018390524282820152517fb86231c0dbdc515e7dcda7e714bbf1da856daf39bc184464a014e32f4436712a9181900360600190a1600c55565b610c14611e04565b610c1c611e5e565b565b610c26611e04565b8015610cc9576004544210610c765760405162461bcd60e51b815260206004820152601660248201527514d85b19481a185cc8185b1c9958591e48195b99195960521b604482015260640161072c565b6009546040805191825260208201839052429082015264505249434560d81b907f272368dcf1b978f4864689e6675a85b9d35c33ac427d860187c4acd86d83dde29060600160405180910390a260098190555b8115610a40576002548211610d2c5760405162461bcd60e51b8152602060048201526024808201527f416d6f756e74206c657373207468656e20616c726561647920736f6c6420746f6044820152636b656e7360e01b606482015260840161072c565b6004544210610d765760405162461bcd60e51b815260206004820152601660248201527514d85b19481a185cc8185b1c9958591e48195b99195960521b604482015260640161072c565b600854604080519182526020820184905242908201526d1513d2d15394d513d09154d3d31160921b907f272368dcf1b978f4864689e6675a85b9d35c33ac427d860187c4acd86d83dde29060600160405180910390a250600855565b6000610ddc611eb3565b600554421015610e2e5760405162461bcd60e51b815260206004820181905260248201527f436c61696d20706572696f6420686173206e6f74207374617274656420796574604482015260640161072c565b3360009081526011602052604090205460ff1615610e875760405162461bcd60e51b8152602060048201526016602482015275151bdad95b9cc8185b1c9958591e4818db185a5b595960521b604482015260640161072c565b336000908152601160209081526040808320805460ff19166001179055601090915290205480610eee5760405162461bcd60e51b81526020600482015260126024820152714e6f20746f6b656e7320746f20636c61696d60701b604482015260640161072c565b336000818152601060209081526040808320839055600654815163a9059cbb60e01b8152600481019590955260248501869052905192936001600160a01b039091169263a9059cbb9260448084019391929182900301818787803b158015610f5557600080fd5b505af1158015610f69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f8d91906122a1565b905080610fd45760405162461bcd60e51b8152602060048201526015602482015274151bdad95b881d1c985b9cd9995c8819985a5b1959605a1b604482015260640161072c565b6040805183815242602082015233917f9923b4306c6c030f2bdfbf156517d5983b87e15b96176da122cd4f2effa4ba7b910160405180910390a260019250505090565b60008061102383611a2e565b9050610a7664e8d4a51000826121fb565b61103c611e04565b610c1c6000611f00565b600081600354421015801561105d57506004544211155b6110a25760405162461bcd60e51b815260206004820152601660248201527513dd5d1cda5919481bd9881cd85b19481c195c9a5bd960521b604482015260640161072c565b600081116110ec5760405162461bcd60e51b8152602060048201526017602482015276125b9d985b1a59081c1d5c98da185cd948185b5bdd5b9d604a1b604482015260640161072c565b6110f4611eb3565b6110fc611f52565b600061110784611a2e565b9050600061111361145d565b611125670de0b6b3a7640000846121dc565b61112f91906121fb565b90506000612710600c548361114491906121dc565b61114e91906121fb565b9050813410156111975760405162461bcd60e51b8152602060048201526014602482015273125b9cdd59999a58da595b9d081c185e5b595b9d60621b604482015260640161072c565b60006111a383346122c3565b905086600260008282546111b791906122da565b9250508190555083600760008282546111d091906122da565b909155506111e89050670de0b6b3a7640000886121dc565b33600090815260106020526040812080549091906112079084906122da565b9091555050600a5461122b906001600160a01b031661122684866122c3565b611fac565b600b54611241906001600160a01b031683611fac565b8015611251576112513382611fac565b600754600254604080518681526020810188905242818301526060810193909352608083019190915251600091899133917f507724afc8c50583a961787cb0b021df3dc28fb200ee16a1298d3849a2c5587e919081900360a00190a460019550505050506112bf6001600055565b50919050565b600d546001600160a01b0316336001600160a01b0316146112f85760405162461bcd60e51b815260040161072c9061221d565b6001600160a01b03811661131e5760405162461bcd60e51b815260040161072c90612254565b600f546040517f36fcb909572339ebb0cff8b6df189067f28da0255028f1a7d8e2c75dca233ba79161135f916001600160a01b03909116908490429061227d565b60405180910390a1600f80546001600160a01b0319166001600160a01b0392909216919091179055565b600d546001600160a01b0316336001600160a01b0316146113bc5760405162461bcd60e51b815260040161072c9061221d565b6001600160a01b0381166113e25760405162461bcd60e51b815260040161072c90612254565b600b546040517fc4b7656c9545febf36a472de3d76d4e42e431bf2952f9326e2d4bf255e607a3b91611423916001600160a01b03909116908490429061227d565b60405180910390a1600b80546001600160a01b0319166001600160a01b0392909216919091179055565b611455611e04565b610c1c612091565b600080600f60009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156114ae57600080fd5b505afa1580156114c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e6919061230c565b505050915050806402540be4006114fd919061235c565b9050600081121561081f5760405162461bcd60e51b815260206004820152602b60248201527f4e656761746976652070726963652072657475726e65642066726f6d2074686560448201526a1030b3b3b932b3b0ba37b960a91b606482015260840161072c565b600081600354421015801561157b57506004544211155b6115c05760405162461bcd60e51b815260206004820152601660248201527513dd5d1cda5919481bd9881cd85b19481c195c9a5bd960521b604482015260640161072c565b6000811161160a5760405162461bcd60e51b8152602060048201526017602482015276125b9d985b1a59081c1d5c98da185cd948185b5bdd5b9d604a1b604482015260640161072c565b611612611eb3565b600061161d84611a2e565b9050600061163064e8d4a51000836121fb565b90506000612710600c548361164591906121dc565b61164f91906121fb565b9050856002600082825461166391906122da565b92505081905550826007600082825461167c91906122da565b909155506116949050670de0b6b3a7640000876121dc565b33600090815260106020526040812080549091906116b39084906122da565b9091555050600e546000906001600160a01b031663dd62ed3e336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015230602482015260440160206040518083038186803b15801561171257600080fd5b505afa158015611726573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061174a91906123e1565b9050808311156117a65760405162461bcd60e51b815260206004820152602160248201527f4d616b65207375726520746f2061646420656e6f75676820616c6c6f77616e636044820152606560f81b606482015260840161072c565b600e546000906001600160a01b031633600a546001600160a01b03166117cc86886122c3565b6040516024016117de9392919061227d565b60408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b1790525161181391906123fa565b6000604051808303816000865af19150503d8060008114611850576040519150601f19603f3d011682016040523d82523d6000602084013e611855565b606091505b50509050806118b25760405162461bcd60e51b815260206004820152602360248201527f5061796d656e742057616c6c657420546f6b656e207061796d656e74206661696044820152621b195960ea1b606482015260840161072c565b600e546000906001600160a01b031633600b546040516118e192916001600160a01b031690889060240161227d565b60408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b1790525161191691906123fa565b6000604051808303816000865af19150503d8060008114611953576040519150601f19603f3d011682016040523d82523d6000602084013e611958565b606091505b50509050806119b85760405162461bcd60e51b815260206004820152602660248201527f436f6d6d697373696f6e2057616c6c657420546f6b656e207061796d656e742060448201526519985a5b195960d21b606482015260840161072c565b600e5460075460025460408051898152602081018b9052428183015260608101939093526080830191909152516001600160a01b03909216918b9133917f507724afc8c50583a961787cb0b021df3dc28fb200ee16a1298d3849a2c5587e9181900360a00190a450600198975050505050505050565b600060085460025483611a4191906122da565b1115611a9f5760405162461bcd60e51b815260206004820152602760248201527f496e73756666696369656e7420746f6b656e7320617661696c61626c6520666f604482015266391039b0b6329760c91b606482015260840161072c565b600060095483610a7691906121dc565b6000611ab9611e04565b60045484118015611ac957504284115b611b155760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420636c61696d2073746172742074696d650000000000000000604482015260640161072c565b6001600160a01b038216611b6b5760405162461bcd60e51b815260206004820152601c60248201527f546f6b656e20616464726573732063616e6e6f74206265207a65726f00000000604482015260640161072c565b60055415611bbb5760405162461bcd60e51b815260206004820152601860248201527f436c61696d20706572696f6420616c7265616479207365740000000000000000604482015260640161072c565b6005849055600680546001600160a01b0319166001600160a01b0384169081179091556040516323b872dd60e01b8152600091906323b872dd90611c079033903090899060040161227d565b602060405180830381600087803b158015611c2157600080fd5b505af1158015611c35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c5991906122a1565b905080611ca05760405162461bcd60e51b8152602060048201526015602482015274151bdad95b881d1c985b9cd9995c8819985a5b1959605a1b604482015260640161072c565b600654604080518681524260208201526001600160a01b03909216917fdc9670dbabdd488b372eb16ebe49a39b3124a12cdffdcefbc89834a408bf8ff8910160405180910390a2506001949350505050565b611cfa611e04565b6001600160a01b038116611d5f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161072c565b611d6881611f00565b50565b611d73611e04565b6001600160a01b038116611d995760405162461bcd60e51b815260040161072c90612254565b600a546040517fa44ef326e08857f33069d8501357dcf764f016bdaa1848e0d9acd0faf99cfb7391611dda916001600160a01b03909116908490429061227d565b60405180910390a1600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b03163314610c1c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161072c565b611e666120d4565b6001805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600154600160a01b900460ff1615610c1c5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161072c565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60026000541415611fa55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161072c565b6002600055565b80471015611ff15760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b604482015260640161072c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461203e576040519150601f19603f3d011682016040523d82523d6000602084013e612043565b606091505b505090508061208c5760405162461bcd60e51b8152602060048201526015602482015274115d1a195c881d1c985b9cd9995c8819985a5b1959605a1b604482015260640161072c565b505050565b612099611eb3565b6001805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611e963390565b600154600160a01b900460ff16610c1c5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161072c565b60006020828403121561213657600080fd5b5035919050565b80356001600160a01b038116811461081f57600080fd5b60006020828403121561216657600080fd5b610a768261213d565b6000806040838503121561218257600080fd5b50508035926020909101359150565b6000806000606084860312156121a657600080fd5b83359250602084013591506121bd6040850161213d565b90509250925092565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156121f6576121f66121c6565b500290565b60008261221857634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601f908201527f41646d696e203a2043616c6c6572206973206e6f74207468652041646d696e00604082015260600190565b6020808252600f908201526e496e76616c6964206164647265737360881b604082015260600190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6000602082840312156122b357600080fd5b81518015158114610a7657600080fd5b6000828210156122d5576122d56121c6565b500390565b600082198211156122ed576122ed6121c6565b500190565b805169ffffffffffffffffffff8116811461081f57600080fd5b600080600080600060a0868803121561232457600080fd5b61232d866122f2565b9450602086015193506040860151925060608601519150612350608087016122f2565b90509295509295909350565b60006001600160ff1b0381841382841380821686840486111615612382576123826121c6565b600160ff1b60008712828116878305891216156123a1576123a16121c6565b600087129250878205871284841616156123bd576123bd6121c6565b878505871281841616156123d3576123d36121c6565b505050929093029392505050565b6000602082840312156123f357600080fd5b5051919050565b6000825160005b8181101561241b5760208186018101518583015201612401565b8181111561242a576000828501525b50919091019291505056fea26469706673582212205953045f61df4bfce787488f3eaa47005c65ef36b082481634170b8bc485520364736f6c63430008090033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.