ETH Price: $2,672.08 (+1.32%)

Contract

0xD1d4f117597c9Cc1Daf491FBb24648597606735E
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Contribute187413912023-12-08 11:58:23258 days ago1702036703IN
0xD1d4f117...97606735E
0 ETH0.0040132438.92877076
Contribute187413852023-12-08 11:57:11258 days ago1702036631IN
0xD1d4f117...97606735E
0 ETH0.0042307938.25592377
Contribute187413702023-12-08 11:54:11258 days ago1702036451IN
0xD1d4f117...97606735E
0 ETH0.0020264640.48960452
Contribute187413702023-12-08 11:54:11258 days ago1702036451IN
0xD1d4f117...97606735E
0 ETH0.0046952540.68960452
Contribute187413682023-12-08 11:53:35258 days ago1702036415IN
0xD1d4f117...97606735E
0 ETH0.0046187740.02682574
Contribute187413592023-12-08 11:51:47258 days ago1702036307IN
0xD1d4f117...97606735E
0 ETH0.0046914640.65675252
Contribute187413582023-12-08 11:51:35258 days ago1702036295IN
0xD1d4f117...97606735E
0 ETH0.004098841.69518353
Contribute187413572023-12-08 11:51:23258 days ago1702036283IN
0xD1d4f117...97606735E
0 ETH0.0047949641.55370067
Contribute187413482023-12-08 11:49:35258 days ago1702036175IN
0xD1d4f117...97606735E
0 ETH0.0046770140.53155779
Contribute187413202023-12-08 11:43:35258 days ago1702035815IN
0xD1d4f117...97606735E
0 ETH0.004249936.83012227
Contribute187413162023-12-08 11:42:47258 days ago1702035767IN
0xD1d4f117...97606735E
0 ETH0.0042211936.57755914
Contribute187413112023-12-08 11:41:47258 days ago1702035707IN
0xD1d4f117...97606735E
0 ETH0.004233636.68508485
Contribute187413002023-12-08 11:39:35258 days ago1702035575IN
0xD1d4f117...97606735E
0 ETH0.0094409985.35849682
Contribute187412982023-12-08 11:39:11258 days ago1702035551IN
0xD1d4f117...97606735E
0 ETH0.0036005234.92133948
Contribute187412962023-12-08 11:38:47258 days ago1702035527IN
0xD1d4f117...97606735E
0 ETH0.0040089136.24955566
Contribute187412932023-12-08 11:38:11258 days ago1702035491IN
0xD1d4f117...97606735E
0 ETH0.0035801536.41918919
Contribute187412922023-12-08 11:37:59258 days ago1702035479IN
0xD1d4f117...97606735E
0 ETH0.0039935136.10638313
Contribute187412782023-12-08 11:35:11258 days ago1702035311IN
0xD1d4f117...97606735E
0 ETH0.0044902238.91281562
Contribute187412772023-12-08 11:34:59258 days ago1702035299IN
0xD1d4f117...97606735E
0 ETH0.0042515338.43925101
Contribute187412752023-12-08 11:34:35258 days ago1702035275IN
0xD1d4f117...97606735E
0 ETH0.0047092640.80681376
Contribute187412722023-12-08 11:33:59258 days ago1702035239IN
0xD1d4f117...97606735E
0 ETH0.004739241.07046062
Contribute187412712023-12-08 11:33:47258 days ago1702035227IN
0xD1d4f117...97606735E
0 ETH0.004534939.30003331
Contribute187412712023-12-08 11:33:47258 days ago1702035227IN
0xD1d4f117...97606735E
0 ETH0.0044887538.90003331
Contribute187412702023-12-08 11:33:35258 days ago1702035215IN
0xD1d4f117...97606735E
0 ETH0.0045320439.27517149
Contribute187412672023-12-08 11:32:59258 days ago1702035179IN
0xD1d4f117...97606735E
0 ETH0.0043359937.57623922
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FlashSale

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 2 : FlashSale.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

contract FlashSale {
    address public owner;
    address public multisig;
    address public usdc;
    uint256 public remainingAmount = 2000000000000;
    mapping(address => uint) public contributed;
    address[] public contributors;

    uint256 public timeStart = 1702033200;

    uint public price = 230000;

    event Contribution(address user, uint amount);
    
    constructor() {
        owner = msg.sender;
        multisig = 0x7ae230223c4803961A9F41B960cA6e31095706Ed;
        usdc = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;
    }

    
    function contribute(uint _amountUSDC) external {
        require(block.timestamp >= timeStart && block.timestamp <= (timeStart + 1 days));
        require (_amountUSDC >= 500e6, "Contribution Too Low");
        require (_amountUSDC <= 25000e6, "Contribution Too High");
        
        uint256 lndxAmount = _amountUSDC / price * 1e6;
        require((remainingAmount - lndxAmount) >=0, "LNDX limit exceeded");
        IERC20(usdc).transferFrom(msg.sender, address(this), _amountUSDC);
        
        remainingAmount -= lndxAmount;
        contributed[msg.sender] += _amountUSDC;
        contributors.push(msg.sender); // may be duplicate addresses
        emit Contribution(msg.sender, _amountUSDC);
    }

   
    function updateToken(address _usdc) external {
        require(msg.sender == owner, "only owner has access");
        usdc = _usdc;
    }

    // multisig functions
    function updateMultisig(address _multisig) external {
        require(msg.sender == multisig, "only multisig has access");
        multisig = _multisig;
    }

     function updateStartDate(uint256 _timeStart) external {
        require (timeStart > block.timestamp, "Sale have been already started");
        require (_timeStart > block.timestamp, "Time start should be in the future");
        require(msg.sender == multisig || msg.sender == owner, "only multisig and owner has access");
        timeStart = _timeStart;
    }

    function claimToken(IERC20 _token) external {
        require(msg.sender == multisig || msg.sender == owner, "only multisig and owner has access");
        uint balance = _token.balanceOf(address(this));
        _token.transfer(multisig, balance);
    }

    function claimETH() external {
        require(msg.sender == multisig || msg.sender == owner, "only multisig and owner has access");
        payable(multisig).transfer(address(this).balance);
    }

}

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface 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);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Contribution","type":"event"},{"inputs":[],"name":"claimETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"}],"name":"claimToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountUSDC","type":"uint256"}],"name":"contribute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"contributed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"contributors","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"multisig","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"remainingAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timeStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_multisig","type":"address"}],"name":"updateMultisig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timeStart","type":"uint256"}],"name":"updateStartDate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_usdc","type":"address"}],"name":"updateToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"usdc","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60806040526501d1a94a2000600355636572f7306006556203827060075534801561002957600080fd5b50600080546001600160a01b03199081163317909155600180548216737ae230223c4803961a9f41b960ca6e31095706ed1790556002805490911673a0b86991c6218b36c1d19d4a2e9eb0ce3606eb481790556109b18061008b6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80637ad3def21161008c578063a035b1fe11610066578063a035b1fe146101dc578063a50a1fe6146101e5578063c1cbbca7146101ee578063fd74d2941461020157600080fd5b80637ad3def2146101885780638da5cb5b1461019b578063995c5e9d146101ae57600080fd5b80633cb5d100116100c85780633cb5d1001461012a5780633e413bee1461015a5780634783c35b1461016d578063672729991461018057600080fd5b806318d94793146100ef5780632929c25c1461010457806332f289cf14610117575b600080fd5b6101026100fd366004610829565b61020a565b005b610102610112366004610857565b6102fe565b610102610125366004610857565b61037a565b61013d610138366004610829565b6104a2565b6040516001600160a01b0390911681526020015b60405180910390f35b60025461013d906001600160a01b031681565b60015461013d906001600160a01b031681565b6101026104cc565b610102610196366004610857565b610547565b60005461013d906001600160a01b031681565b6101ce6101bc366004610857565b60046020526000908152604090205481565b604051908152602001610151565b6101ce60075481565b6101ce60035481565b6101026101fc366004610829565b6105bb565b6101ce60065481565b42600654116102605760405162461bcd60e51b815260206004820152601e60248201527f53616c652068617665206265656e20616c72656164792073746172746564000060448201526064015b60405180910390fd5b4281116102ba5760405162461bcd60e51b815260206004820152602260248201527f54696d652073746172742073686f756c6420626520696e207468652066757475604482015261726560f01b6064820152608401610257565b6001546001600160a01b03163314806102dd57506000546001600160a01b031633145b6102f95760405162461bcd60e51b81526004016102579061087b565b600655565b6001546001600160a01b031633146103585760405162461bcd60e51b815260206004820152601860248201527f6f6e6c79206d756c7469736967206861732061636365737300000000000000006044820152606401610257565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633148061039d57506000546001600160a01b031633145b6103b95760405162461bcd60e51b81526004016102579061087b565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610400573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061042491906108bd565b60015460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810183905291925083169063a9059cbb906044016020604051808303816000875af1158015610479573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061049d91906108d6565b505050565b600581815481106104b257600080fd5b6000918252602090912001546001600160a01b0316905081565b6001546001600160a01b03163314806104ef57506000546001600160a01b031633145b61050b5760405162461bcd60e51b81526004016102579061087b565b6001546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610544573d6000803e3d6000fd5b50565b6000546001600160a01b031633146105995760405162461bcd60e51b81526020600482015260156024820152746f6e6c79206f776e6572206861732061636365737360581b6044820152606401610257565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60065442101580156105dc57506006546105d8906201518061090e565b4211155b6105e557600080fd5b631dcd65008110156106305760405162461bcd60e51b8152602060048201526014602482015273436f6e747269627574696f6e20546f6f204c6f7760601b6044820152606401610257565b6405d21dba0081111561067d5760405162461bcd60e51b8152602060048201526015602482015274086dedce8e4d2c4eae8d2dedc40a8dede4090d2ced605b1b6044820152606401610257565b60006007548261068d9190610927565b61069a90620f4240610949565b90506000816003546106ac9190610968565b10156106f05760405162461bcd60e51b815260206004820152601360248201527213139116081b1a5b5a5d08195e18d959591959606a1b6044820152606401610257565b6002546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610747573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076b91906108d6565b50806003600082825461077e9190610968565b909155505033600090815260046020526040812080548492906107a290849061090e565b9091555050600580546001810182556000919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0319163390811790915560408051918252602082018490527f4d154d4aae216bed6d0926db77c00df2b57c6b5ba4eee05775de20facede3a7b910160405180910390a15050565b60006020828403121561083b57600080fd5b5035919050565b6001600160a01b038116811461054457600080fd5b60006020828403121561086957600080fd5b813561087481610842565b9392505050565b60208082526022908201527f6f6e6c79206d756c746973696720616e64206f776e6572206861732061636365604082015261737360f01b606082015260800190565b6000602082840312156108cf57600080fd5b5051919050565b6000602082840312156108e857600080fd5b8151801515811461087457600080fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610921576109216108f8565b92915050565b60008261094457634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615610963576109636108f8565b500290565b81810381811115610921576109216108f856fea26469706673582212203e417761523b756d79ec0e28b1475be28b17aa4e6ea41ecde0b4e8fcab69eea664736f6c63430008100033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c80637ad3def21161008c578063a035b1fe11610066578063a035b1fe146101dc578063a50a1fe6146101e5578063c1cbbca7146101ee578063fd74d2941461020157600080fd5b80637ad3def2146101885780638da5cb5b1461019b578063995c5e9d146101ae57600080fd5b80633cb5d100116100c85780633cb5d1001461012a5780633e413bee1461015a5780634783c35b1461016d578063672729991461018057600080fd5b806318d94793146100ef5780632929c25c1461010457806332f289cf14610117575b600080fd5b6101026100fd366004610829565b61020a565b005b610102610112366004610857565b6102fe565b610102610125366004610857565b61037a565b61013d610138366004610829565b6104a2565b6040516001600160a01b0390911681526020015b60405180910390f35b60025461013d906001600160a01b031681565b60015461013d906001600160a01b031681565b6101026104cc565b610102610196366004610857565b610547565b60005461013d906001600160a01b031681565b6101ce6101bc366004610857565b60046020526000908152604090205481565b604051908152602001610151565b6101ce60075481565b6101ce60035481565b6101026101fc366004610829565b6105bb565b6101ce60065481565b42600654116102605760405162461bcd60e51b815260206004820152601e60248201527f53616c652068617665206265656e20616c72656164792073746172746564000060448201526064015b60405180910390fd5b4281116102ba5760405162461bcd60e51b815260206004820152602260248201527f54696d652073746172742073686f756c6420626520696e207468652066757475604482015261726560f01b6064820152608401610257565b6001546001600160a01b03163314806102dd57506000546001600160a01b031633145b6102f95760405162461bcd60e51b81526004016102579061087b565b600655565b6001546001600160a01b031633146103585760405162461bcd60e51b815260206004820152601860248201527f6f6e6c79206d756c7469736967206861732061636365737300000000000000006044820152606401610257565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633148061039d57506000546001600160a01b031633145b6103b95760405162461bcd60e51b81526004016102579061087b565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610400573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061042491906108bd565b60015460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810183905291925083169063a9059cbb906044016020604051808303816000875af1158015610479573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061049d91906108d6565b505050565b600581815481106104b257600080fd5b6000918252602090912001546001600160a01b0316905081565b6001546001600160a01b03163314806104ef57506000546001600160a01b031633145b61050b5760405162461bcd60e51b81526004016102579061087b565b6001546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610544573d6000803e3d6000fd5b50565b6000546001600160a01b031633146105995760405162461bcd60e51b81526020600482015260156024820152746f6e6c79206f776e6572206861732061636365737360581b6044820152606401610257565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60065442101580156105dc57506006546105d8906201518061090e565b4211155b6105e557600080fd5b631dcd65008110156106305760405162461bcd60e51b8152602060048201526014602482015273436f6e747269627574696f6e20546f6f204c6f7760601b6044820152606401610257565b6405d21dba0081111561067d5760405162461bcd60e51b8152602060048201526015602482015274086dedce8e4d2c4eae8d2dedc40a8dede4090d2ced605b1b6044820152606401610257565b60006007548261068d9190610927565b61069a90620f4240610949565b90506000816003546106ac9190610968565b10156106f05760405162461bcd60e51b815260206004820152601360248201527213139116081b1a5b5a5d08195e18d959591959606a1b6044820152606401610257565b6002546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610747573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076b91906108d6565b50806003600082825461077e9190610968565b909155505033600090815260046020526040812080548492906107a290849061090e565b9091555050600580546001810182556000919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0319163390811790915560408051918252602082018490527f4d154d4aae216bed6d0926db77c00df2b57c6b5ba4eee05775de20facede3a7b910160405180910390a15050565b60006020828403121561083b57600080fd5b5035919050565b6001600160a01b038116811461054457600080fd5b60006020828403121561086957600080fd5b813561087481610842565b9392505050565b60208082526022908201527f6f6e6c79206d756c746973696720616e64206f776e6572206861732061636365604082015261737360f01b606082015260800190565b6000602082840312156108cf57600080fd5b5051919050565b6000602082840312156108e857600080fd5b8151801515811461087457600080fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610921576109216108f8565b92915050565b60008261094457634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615610963576109636108f8565b500290565b81810381811115610921576109216108f856fea26469706673582212203e417761523b756d79ec0e28b1475be28b17aa4e6ea41ecde0b4e8fcab69eea664736f6c63430008100033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.