Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 93 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Contribute | 18741391 | 258 days ago | IN | 0 ETH | 0.00401324 | ||||
Contribute | 18741385 | 258 days ago | IN | 0 ETH | 0.00423079 | ||||
Contribute | 18741370 | 258 days ago | IN | 0 ETH | 0.00202646 | ||||
Contribute | 18741370 | 258 days ago | IN | 0 ETH | 0.00469525 | ||||
Contribute | 18741368 | 258 days ago | IN | 0 ETH | 0.00461877 | ||||
Contribute | 18741359 | 258 days ago | IN | 0 ETH | 0.00469146 | ||||
Contribute | 18741358 | 258 days ago | IN | 0 ETH | 0.0040988 | ||||
Contribute | 18741357 | 258 days ago | IN | 0 ETH | 0.00479496 | ||||
Contribute | 18741348 | 258 days ago | IN | 0 ETH | 0.00467701 | ||||
Contribute | 18741320 | 258 days ago | IN | 0 ETH | 0.0042499 | ||||
Contribute | 18741316 | 258 days ago | IN | 0 ETH | 0.00422119 | ||||
Contribute | 18741311 | 258 days ago | IN | 0 ETH | 0.0042336 | ||||
Contribute | 18741300 | 258 days ago | IN | 0 ETH | 0.00944099 | ||||
Contribute | 18741298 | 258 days ago | IN | 0 ETH | 0.00360052 | ||||
Contribute | 18741296 | 258 days ago | IN | 0 ETH | 0.00400891 | ||||
Contribute | 18741293 | 258 days ago | IN | 0 ETH | 0.00358015 | ||||
Contribute | 18741292 | 258 days ago | IN | 0 ETH | 0.00399351 | ||||
Contribute | 18741278 | 258 days ago | IN | 0 ETH | 0.00449022 | ||||
Contribute | 18741277 | 258 days ago | IN | 0 ETH | 0.00425153 | ||||
Contribute | 18741275 | 258 days ago | IN | 0 ETH | 0.00470926 | ||||
Contribute | 18741272 | 258 days ago | IN | 0 ETH | 0.0047392 | ||||
Contribute | 18741271 | 258 days ago | IN | 0 ETH | 0.0045349 | ||||
Contribute | 18741271 | 258 days ago | IN | 0 ETH | 0.00448875 | ||||
Contribute | 18741270 | 258 days ago | IN | 0 ETH | 0.00453204 | ||||
Contribute | 18741267 | 258 days ago | IN | 0 ETH | 0.00433599 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
FlashSale
Compiler Version
v0.8.16+commit.07a7930e
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.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); } }
// 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); }
{ "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":"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"}]
Contract Creation Code
60806040526501d1a94a2000600355636572f7306006556203827060075534801561002957600080fd5b50600080546001600160a01b03199081163317909155600180548216737ae230223c4803961a9f41b960ca6e31095706ed1790556002805490911673a0b86991c6218b36c1d19d4a2e9eb0ce3606eb481790556109b18061008b6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80637ad3def21161008c578063a035b1fe11610066578063a035b1fe146101dc578063a50a1fe6146101e5578063c1cbbca7146101ee578063fd74d2941461020157600080fd5b80637ad3def2146101885780638da5cb5b1461019b578063995c5e9d146101ae57600080fd5b80633cb5d100116100c85780633cb5d1001461012a5780633e413bee1461015a5780634783c35b1461016d578063672729991461018057600080fd5b806318d94793146100ef5780632929c25c1461010457806332f289cf14610117575b600080fd5b6101026100fd366004610829565b61020a565b005b610102610112366004610857565b6102fe565b610102610125366004610857565b61037a565b61013d610138366004610829565b6104a2565b6040516001600160a01b0390911681526020015b60405180910390f35b60025461013d906001600160a01b031681565b60015461013d906001600160a01b031681565b6101026104cc565b610102610196366004610857565b610547565b60005461013d906001600160a01b031681565b6101ce6101bc366004610857565b60046020526000908152604090205481565b604051908152602001610151565b6101ce60075481565b6101ce60035481565b6101026101fc366004610829565b6105bb565b6101ce60065481565b42600654116102605760405162461bcd60e51b815260206004820152601e60248201527f53616c652068617665206265656e20616c72656164792073746172746564000060448201526064015b60405180910390fd5b4281116102ba5760405162461bcd60e51b815260206004820152602260248201527f54696d652073746172742073686f756c6420626520696e207468652066757475604482015261726560f01b6064820152608401610257565b6001546001600160a01b03163314806102dd57506000546001600160a01b031633145b6102f95760405162461bcd60e51b81526004016102579061087b565b600655565b6001546001600160a01b031633146103585760405162461bcd60e51b815260206004820152601860248201527f6f6e6c79206d756c7469736967206861732061636365737300000000000000006044820152606401610257565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633148061039d57506000546001600160a01b031633145b6103b95760405162461bcd60e51b81526004016102579061087b565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610400573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061042491906108bd565b60015460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810183905291925083169063a9059cbb906044016020604051808303816000875af1158015610479573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061049d91906108d6565b505050565b600581815481106104b257600080fd5b6000918252602090912001546001600160a01b0316905081565b6001546001600160a01b03163314806104ef57506000546001600160a01b031633145b61050b5760405162461bcd60e51b81526004016102579061087b565b6001546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610544573d6000803e3d6000fd5b50565b6000546001600160a01b031633146105995760405162461bcd60e51b81526020600482015260156024820152746f6e6c79206f776e6572206861732061636365737360581b6044820152606401610257565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60065442101580156105dc57506006546105d8906201518061090e565b4211155b6105e557600080fd5b631dcd65008110156106305760405162461bcd60e51b8152602060048201526014602482015273436f6e747269627574696f6e20546f6f204c6f7760601b6044820152606401610257565b6405d21dba0081111561067d5760405162461bcd60e51b8152602060048201526015602482015274086dedce8e4d2c4eae8d2dedc40a8dede4090d2ced605b1b6044820152606401610257565b60006007548261068d9190610927565b61069a90620f4240610949565b90506000816003546106ac9190610968565b10156106f05760405162461bcd60e51b815260206004820152601360248201527213139116081b1a5b5a5d08195e18d959591959606a1b6044820152606401610257565b6002546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610747573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076b91906108d6565b50806003600082825461077e9190610968565b909155505033600090815260046020526040812080548492906107a290849061090e565b9091555050600580546001810182556000919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0319163390811790915560408051918252602082018490527f4d154d4aae216bed6d0926db77c00df2b57c6b5ba4eee05775de20facede3a7b910160405180910390a15050565b60006020828403121561083b57600080fd5b5035919050565b6001600160a01b038116811461054457600080fd5b60006020828403121561086957600080fd5b813561087481610842565b9392505050565b60208082526022908201527f6f6e6c79206d756c746973696720616e64206f776e6572206861732061636365604082015261737360f01b606082015260800190565b6000602082840312156108cf57600080fd5b5051919050565b6000602082840312156108e857600080fd5b8151801515811461087457600080fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610921576109216108f8565b92915050565b60008261094457634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615610963576109636108f8565b500290565b81810381811115610921576109216108f856fea26469706673582212203e417761523b756d79ec0e28b1475be28b17aa4e6ea41ecde0b4e8fcab69eea664736f6c63430008100033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c80637ad3def21161008c578063a035b1fe11610066578063a035b1fe146101dc578063a50a1fe6146101e5578063c1cbbca7146101ee578063fd74d2941461020157600080fd5b80637ad3def2146101885780638da5cb5b1461019b578063995c5e9d146101ae57600080fd5b80633cb5d100116100c85780633cb5d1001461012a5780633e413bee1461015a5780634783c35b1461016d578063672729991461018057600080fd5b806318d94793146100ef5780632929c25c1461010457806332f289cf14610117575b600080fd5b6101026100fd366004610829565b61020a565b005b610102610112366004610857565b6102fe565b610102610125366004610857565b61037a565b61013d610138366004610829565b6104a2565b6040516001600160a01b0390911681526020015b60405180910390f35b60025461013d906001600160a01b031681565b60015461013d906001600160a01b031681565b6101026104cc565b610102610196366004610857565b610547565b60005461013d906001600160a01b031681565b6101ce6101bc366004610857565b60046020526000908152604090205481565b604051908152602001610151565b6101ce60075481565b6101ce60035481565b6101026101fc366004610829565b6105bb565b6101ce60065481565b42600654116102605760405162461bcd60e51b815260206004820152601e60248201527f53616c652068617665206265656e20616c72656164792073746172746564000060448201526064015b60405180910390fd5b4281116102ba5760405162461bcd60e51b815260206004820152602260248201527f54696d652073746172742073686f756c6420626520696e207468652066757475604482015261726560f01b6064820152608401610257565b6001546001600160a01b03163314806102dd57506000546001600160a01b031633145b6102f95760405162461bcd60e51b81526004016102579061087b565b600655565b6001546001600160a01b031633146103585760405162461bcd60e51b815260206004820152601860248201527f6f6e6c79206d756c7469736967206861732061636365737300000000000000006044820152606401610257565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633148061039d57506000546001600160a01b031633145b6103b95760405162461bcd60e51b81526004016102579061087b565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610400573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061042491906108bd565b60015460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810183905291925083169063a9059cbb906044016020604051808303816000875af1158015610479573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061049d91906108d6565b505050565b600581815481106104b257600080fd5b6000918252602090912001546001600160a01b0316905081565b6001546001600160a01b03163314806104ef57506000546001600160a01b031633145b61050b5760405162461bcd60e51b81526004016102579061087b565b6001546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610544573d6000803e3d6000fd5b50565b6000546001600160a01b031633146105995760405162461bcd60e51b81526020600482015260156024820152746f6e6c79206f776e6572206861732061636365737360581b6044820152606401610257565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60065442101580156105dc57506006546105d8906201518061090e565b4211155b6105e557600080fd5b631dcd65008110156106305760405162461bcd60e51b8152602060048201526014602482015273436f6e747269627574696f6e20546f6f204c6f7760601b6044820152606401610257565b6405d21dba0081111561067d5760405162461bcd60e51b8152602060048201526015602482015274086dedce8e4d2c4eae8d2dedc40a8dede4090d2ced605b1b6044820152606401610257565b60006007548261068d9190610927565b61069a90620f4240610949565b90506000816003546106ac9190610968565b10156106f05760405162461bcd60e51b815260206004820152601360248201527213139116081b1a5b5a5d08195e18d959591959606a1b6044820152606401610257565b6002546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610747573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076b91906108d6565b50806003600082825461077e9190610968565b909155505033600090815260046020526040812080548492906107a290849061090e565b9091555050600580546001810182556000919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0319163390811790915560408051918252602082018490527f4d154d4aae216bed6d0926db77c00df2b57c6b5ba4eee05775de20facede3a7b910160405180910390a15050565b60006020828403121561083b57600080fd5b5035919050565b6001600160a01b038116811461054457600080fd5b60006020828403121561086957600080fd5b813561087481610842565b9392505050565b60208082526022908201527f6f6e6c79206d756c746973696720616e64206f776e6572206861732061636365604082015261737360f01b606082015260800190565b6000602082840312156108cf57600080fd5b5051919050565b6000602082840312156108e857600080fd5b8151801515811461087457600080fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610921576109216108f8565b92915050565b60008261094457634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615610963576109636108f8565b500290565b81810381811115610921576109216108f856fea26469706673582212203e417761523b756d79ec0e28b1475be28b17aa4e6ea41ecde0b4e8fcab69eea664736f6c63430008100033
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.