More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 514 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Deposit | 18830056 | 338 days ago | IN | 0.01 ETH | 0.0012654 | ||||
Deposit | 18815710 | 340 days ago | IN | 0.05 ETH | 0.00173392 | ||||
Set Sale Active | 18815708 | 340 days ago | IN | 0 ETH | 0.00228961 | ||||
Deposit | 18815707 | 340 days ago | IN | 1 ETH | 0.00841697 | ||||
Deposit | 18815706 | 340 days ago | IN | 0.02 ETH | 0.0082058 | ||||
Deposit | 18815705 | 340 days ago | IN | 1 ETH | 0.00780753 | ||||
Deposit | 18815704 | 340 days ago | IN | 0.03 ETH | 0.00781264 | ||||
Deposit | 18815704 | 340 days ago | IN | 0.3 ETH | 0.00781264 | ||||
Deposit | 18815704 | 340 days ago | IN | 0.1 ETH | 0.00783528 | ||||
Deposit | 18815703 | 340 days ago | IN | 0.05 ETH | 0.00793164 | ||||
Deposit | 18815702 | 340 days ago | IN | 0.85 ETH | 0.00674266 | ||||
Deposit | 18815701 | 340 days ago | IN | 1.9 ETH | 0.00805421 | ||||
Deposit | 18815700 | 340 days ago | IN | 0.4 ETH | 0.00691666 | ||||
Deposit | 18815700 | 340 days ago | IN | 0.06 ETH | 0.00691666 | ||||
Deposit | 18815700 | 340 days ago | IN | 0.13 ETH | 0.00814772 | ||||
Deposit | 18815699 | 340 days ago | IN | 0.08 ETH | 0.00721369 | ||||
Deposit | 18815699 | 340 days ago | IN | 1 ETH | 0.00850158 | ||||
Deposit | 18815698 | 340 days ago | IN | 0.05 ETH | 0.00825691 | ||||
Deposit | 18815698 | 340 days ago | IN | 0.05 ETH | 0.00825691 | ||||
Deposit | 18815698 | 340 days ago | IN | 1 ETH | 0.00702857 | ||||
Deposit | 18815695 | 340 days ago | IN | 0.05 ETH | 0.00833822 | ||||
Deposit | 18815695 | 340 days ago | IN | 0.25 ETH | 0.00833822 | ||||
Deposit | 18815695 | 340 days ago | IN | 0.065 ETH | 0.00833822 | ||||
Deposit | 18815694 | 340 days ago | IN | 0.1 ETH | 0.00825325 | ||||
Deposit | 18815693 | 340 days ago | IN | 0.1 ETH | 0.00797971 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
18815707 | 340 days ago | 1 ETH | ||||
18815706 | 340 days ago | 0.02 ETH | ||||
18815705 | 340 days ago | 1 ETH | ||||
18815704 | 340 days ago | 0.03 ETH | ||||
18815704 | 340 days ago | 0.3 ETH | ||||
18815704 | 340 days ago | 0.1 ETH | ||||
18815703 | 340 days ago | 0.05 ETH | ||||
18815702 | 340 days ago | 0.85 ETH | ||||
18815701 | 340 days ago | 1.9 ETH | ||||
18815700 | 340 days ago | 0.4 ETH | ||||
18815700 | 340 days ago | 0.06 ETH | ||||
18815700 | 340 days ago | 0.13 ETH | ||||
18815699 | 340 days ago | 0.08 ETH | ||||
18815699 | 340 days ago | 1 ETH | ||||
18815698 | 340 days ago | 0.05 ETH | ||||
18815698 | 340 days ago | 0.05 ETH | ||||
18815698 | 340 days ago | 1 ETH | ||||
18815695 | 340 days ago | 0.05 ETH | ||||
18815695 | 340 days ago | 0.25 ETH | ||||
18815695 | 340 days ago | 0.065 ETH | ||||
18815694 | 340 days ago | 0.1 ETH | ||||
18815693 | 340 days ago | 0.1 ETH | ||||
18815693 | 340 days ago | 1 ETH | ||||
18815693 | 340 days ago | 0.33 ETH | ||||
18815692 | 340 days ago | 0.03 ETH |
Loading...
Loading
Contract Name:
PublicSale
Compiler Version
v0.8.12+commit.f00d7308
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.4; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract PublicSale is Context, Ownable { uint256 public minDeposit = 0.01 * 10 ** 18; address public feeAddress; bool public isSaleActive = true; mapping(address => uint256) public depositedAmount; uint256 public totalDepositedAmount; struct DepositInfo { address depositor; uint256 amount; } event DepositEvent(address depositor, uint256 amount); DepositInfo[] public depositList; constructor() { feeAddress = address(0x7f388E617DcB6388CccF8750b3c8c8f8C7eb09F4); } function deposit() external payable { // make sure that sale is active require(isSaleActive); // make sure that user pays enough require(msg.value >= minDeposit); // send fees to fee address payable(feeAddress).transfer(msg.value); // increase deposited amount depositedAmount[_msgSender()] += msg.value; // increase total deposited amount totalDepositedAmount += msg.value; // add entry to deposit list depositList.push(DepositInfo(_msgSender(), msg.value)); // emit deposit event emit DepositEvent(_msgSender(), msg.value); } function setSaleActive(bool _isSaleActive) external onlyOwner { isSaleActive = _isSaleActive; } function setMinDeposit(uint256 _minDeposit) external onlyOwner { minDeposit = _minDeposit; } function getDepositList() external view returns (DepositInfo[] memory) { return depositList; } function getDepositListLength() external view returns (uint256) { return depositList.length; } }
// 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; } }
// 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); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "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":"depositor","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"DepositEvent","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"},{"inputs":[],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"depositList","outputs":[{"internalType":"address","name":"depositor","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"depositedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDepositList","outputs":[{"components":[{"internalType":"address","name":"depositor","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct PublicSale.DepositInfo[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDepositListLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minDeposit","type":"uint256"}],"name":"setMinDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isSaleActive","type":"bool"}],"name":"setSaleActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalDepositedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052662386f26fc100006001556002805460ff60a01b1916600160a01b17905534801561002e57600080fd5b5061003833610063565b600280546001600160a01b031916737f388e617dcb6388cccf8750b3c8c8f8c7eb09f41790556100b3565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610742806100c26000396000f3fe6080604052600436106100dd5760003560e01c80638da5cb5b1161007f578063b8ec667811610059578063b8ec66781461024e578063d0e30db01461028d578063da025e6814610295578063f2fde38b146102aa57600080fd5b80638da5cb5b146101ee5780638fcc9cfb1461020c578063a87b0cb71461022c57600080fd5b80634a4643f7116100bb5780634a4643f714610159578063564566a814610186578063715018a6146101b7578063841718a6146101ce57600080fd5b806317295894146100e2578063412753581461010b57806341b3d18514610143575b600080fd5b3480156100ee57600080fd5b506100f860045481565b6040519081526020015b60405180910390f35b34801561011757600080fd5b5060025461012b906001600160a01b031681565b6040516001600160a01b039091168152602001610102565b34801561014f57600080fd5b506100f860015481565b34801561016557600080fd5b506100f8610174366004610623565b60036020526000908152604090205481565b34801561019257600080fd5b506002546101a790600160a01b900460ff1681565b6040519015158152602001610102565b3480156101c357600080fd5b506101cc6102ca565b005b3480156101da57600080fd5b506101cc6101e9366004610653565b6102de565b3480156101fa57600080fd5b506000546001600160a01b031661012b565b34801561021857600080fd5b506101cc610227366004610675565b610304565b34801561023857600080fd5b50610241610311565b604051610102919061068e565b34801561025a57600080fd5b5061026e610269366004610675565b610386565b604080516001600160a01b039093168352602083019190915201610102565b6101cc6103be565b3480156102a157600080fd5b506005546100f8565b3480156102b657600080fd5b506101cc6102c5366004610623565b6104fb565b6102d2610579565b6102dc60006105d3565b565b6102e6610579565b60028054911515600160a01b0260ff60a01b19909216919091179055565b61030c610579565b600155565b60606005805480602002602001604051908101604052809291908181526020016000905b8282101561037d576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101610335565b50505050905090565b6005818154811061039657600080fd5b6000918252602090912060029091020180546001909101546001600160a01b03909116915082565b600254600160a01b900460ff166103d457600080fd5b6001543410156103e357600080fd5b6002546040516001600160a01b03909116903480156108fc02916000818181858888f1935050505015801561041c573d6000803e3d6000fd5b50336000908152600360205260408120805434929061043c9084906106e6565b92505081905550346004600082825461045591906106e6565b92505081905550600560405180604001604052806104703390565b6001600160a01b03908116825234602092830152835460018082018655600095865294839020845160029092020180546001600160a01b031916919092161781559101519101557f2d8a08b6430a894aea608bcaa6013d5d3e263bc49110605e4d4ba76930ae5c2933604080516001600160a01b0390921682523460208301520160405180910390a1565b610503610579565b6001600160a01b03811661056d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b610576816105d3565b50565b6000546001600160a01b031633146102dc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610564565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561063557600080fd5b81356001600160a01b038116811461064c57600080fd5b9392505050565b60006020828403121561066557600080fd5b8135801515811461064c57600080fd5b60006020828403121561068757600080fd5b5035919050565b602080825282518282018190526000919060409081850190868401855b828110156106d957815180516001600160a01b031685528601518685015292840192908501906001016106ab565b5091979650505050505050565b6000821982111561070757634e487b7160e01b600052601160045260246000fd5b50019056fea264697066735822122080244dcb732a4854c557c0f6db40455981dce3f584c79d504797caa7b5bca4f264736f6c634300080c0033
Deployed Bytecode
0x6080604052600436106100dd5760003560e01c80638da5cb5b1161007f578063b8ec667811610059578063b8ec66781461024e578063d0e30db01461028d578063da025e6814610295578063f2fde38b146102aa57600080fd5b80638da5cb5b146101ee5780638fcc9cfb1461020c578063a87b0cb71461022c57600080fd5b80634a4643f7116100bb5780634a4643f714610159578063564566a814610186578063715018a6146101b7578063841718a6146101ce57600080fd5b806317295894146100e2578063412753581461010b57806341b3d18514610143575b600080fd5b3480156100ee57600080fd5b506100f860045481565b6040519081526020015b60405180910390f35b34801561011757600080fd5b5060025461012b906001600160a01b031681565b6040516001600160a01b039091168152602001610102565b34801561014f57600080fd5b506100f860015481565b34801561016557600080fd5b506100f8610174366004610623565b60036020526000908152604090205481565b34801561019257600080fd5b506002546101a790600160a01b900460ff1681565b6040519015158152602001610102565b3480156101c357600080fd5b506101cc6102ca565b005b3480156101da57600080fd5b506101cc6101e9366004610653565b6102de565b3480156101fa57600080fd5b506000546001600160a01b031661012b565b34801561021857600080fd5b506101cc610227366004610675565b610304565b34801561023857600080fd5b50610241610311565b604051610102919061068e565b34801561025a57600080fd5b5061026e610269366004610675565b610386565b604080516001600160a01b039093168352602083019190915201610102565b6101cc6103be565b3480156102a157600080fd5b506005546100f8565b3480156102b657600080fd5b506101cc6102c5366004610623565b6104fb565b6102d2610579565b6102dc60006105d3565b565b6102e6610579565b60028054911515600160a01b0260ff60a01b19909216919091179055565b61030c610579565b600155565b60606005805480602002602001604051908101604052809291908181526020016000905b8282101561037d576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101610335565b50505050905090565b6005818154811061039657600080fd5b6000918252602090912060029091020180546001909101546001600160a01b03909116915082565b600254600160a01b900460ff166103d457600080fd5b6001543410156103e357600080fd5b6002546040516001600160a01b03909116903480156108fc02916000818181858888f1935050505015801561041c573d6000803e3d6000fd5b50336000908152600360205260408120805434929061043c9084906106e6565b92505081905550346004600082825461045591906106e6565b92505081905550600560405180604001604052806104703390565b6001600160a01b03908116825234602092830152835460018082018655600095865294839020845160029092020180546001600160a01b031916919092161781559101519101557f2d8a08b6430a894aea608bcaa6013d5d3e263bc49110605e4d4ba76930ae5c2933604080516001600160a01b0390921682523460208301520160405180910390a1565b610503610579565b6001600160a01b03811661056d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b610576816105d3565b50565b6000546001600160a01b031633146102dc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610564565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561063557600080fd5b81356001600160a01b038116811461064c57600080fd5b9392505050565b60006020828403121561066557600080fd5b8135801515811461064c57600080fd5b60006020828403121561068757600080fd5b5035919050565b602080825282518282018190526000919060409081850190868401855b828110156106d957815180516001600160a01b031685528601518685015292840192908501906001016106ab565b5091979650505050505050565b6000821982111561070757634e487b7160e01b600052601160045260246000fd5b50019056fea264697066735822122080244dcb732a4854c557c0f6db40455981dce3f584c79d504797caa7b5bca4f264736f6c634300080c0033
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.