More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 1,793 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw Eth | 19740488 | 284 days ago | IN | 0 ETH | 0.00048623 | ||||
Trigger Pause Sa... | 19740295 | 284 days ago | IN | 0 ETH | 0.00081929 | ||||
Purchase | 19740277 | 284 days ago | IN | 1 ETH | 0.00059861 | ||||
Purchase | 19740276 | 284 days ago | IN | 0.99 ETH | 0.00059861 | ||||
Purchase | 19740275 | 284 days ago | IN | 0.08 ETH | 0.00053937 | ||||
Purchase | 19740274 | 284 days ago | IN | 0.05 ETH | 0.00056007 | ||||
Purchase | 19740273 | 284 days ago | IN | 0.05 ETH | 0.00057868 | ||||
Purchase | 19740272 | 284 days ago | IN | 0.05 ETH | 0.0005349 | ||||
Purchase | 19740271 | 284 days ago | IN | 0.4 ETH | 0.0005268 | ||||
Purchase | 19740271 | 284 days ago | IN | 1 ETH | 0.00059861 | ||||
Purchase | 19740269 | 284 days ago | IN | 1 ETH | 0.00055152 | ||||
Purchase | 19740267 | 284 days ago | IN | 0.1 ETH | 0.00054015 | ||||
Purchase | 19740267 | 284 days ago | IN | 0.1 ETH | 0.00054026 | ||||
Purchase | 19740266 | 284 days ago | IN | 0.05 ETH | 0.00049061 | ||||
Purchase | 19740263 | 284 days ago | IN | 0.05 ETH | 0.00039549 | ||||
Purchase | 19740259 | 284 days ago | IN | 0.05 ETH | 0.00039479 | ||||
Purchase | 19740256 | 284 days ago | IN | 0.42 ETH | 0.00058744 | ||||
Purchase | 19740255 | 284 days ago | IN | 0.06 ETH | 0.00062112 | ||||
Purchase | 19740255 | 284 days ago | IN | 0.17 ETH | 0.00062112 | ||||
Purchase | 19740254 | 284 days ago | IN | 0.16 ETH | 0.00059365 | ||||
Purchase | 19740253 | 284 days ago | IN | 0.05 ETH | 0.00071499 | ||||
Purchase | 19740252 | 284 days ago | IN | 0.11 ETH | 0.00054516 | ||||
Purchase | 19740252 | 284 days ago | IN | 0.5 ETH | 0.00054085 | ||||
Purchase | 19740252 | 284 days ago | IN | 0.085 ETH | 0.00054516 | ||||
Purchase | 19740252 | 284 days ago | IN | 0.1 ETH | 0.00039822 |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
SomoTokenSaleV2
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.20; import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol"; import {Pausable} from "@openzeppelin/contracts/utils/Pausable.sol"; /** * @title SomoTokenSaleV2 * @notice This contract is used for somo pre-launch sale. It doesn't send tokens to the buyer directly, and doesn not guarantee * the buyer will receive the tokens. If the buyer is not allocated the tokens, the buyer will be refunded. * @dev Contract will store the amount of eth sent by users. */ contract SomoTokenSaleV2 is AccessControl, Pausable { /** * @notice Admin role to manage the sale */ bytes32 public constant SALE_MANAGER = keccak256("SALE_MANAGER"); /** * @notice Funds receiver address */ address public immutable TREASURY; /** * @notice Total amount of eth that is sold in the sale */ uint256 public totalSold; /** * @dev Maximum amount of eth pool allocated to whitelsit sale. */ uint256 public minAmount; uint256 public maxAmount; /// @notice Mapping to store the user's allocation mapping(address => uint256) public userAllocation; /// @notice Errors to handle the exceptions error InvalidAmount(); error WithdrawFailed(); /// @notice Events event EthAllocated(address indexed user, uint256 allocated, uint256 time); constructor(address owner, uint256 min, uint256 max) { minAmount = min; maxAmount = max; TREASURY = owner; _grantRole(DEFAULT_ADMIN_ROLE, owner); _grantRole(SALE_MANAGER, msg.sender); // Pause the sale by default _pause(); } /** * @notice Function totake part in sale * @dev User can take part in sale by sending eth through this function call. msg.value should be between minAmount and maxAmount. */ function purchase() external payable whenNotPaused { // Validate the amount of eth sent by the user if ( msg.value < minAmount || userAllocation[msg.sender] + msg.value > maxAmount ) { revert InvalidAmount(); } _allocateEth(msg.sender, msg.value); } /** * @notice Function to withdraw eth from the contract * @dev Only sale manager can call this function. Withdraws all balance from the contract to owner. */ function withdrawEth() external onlyRole(SALE_MANAGER) { uint256 amount = address(this).balance; (bool sent,) = TREASURY.call{value: amount}(""); if (!sent) { revert WithdrawFailed(); } } /** * @notice Function to pause or unpause the sale * @dev Public interface for Pausable functionality * @param isPaused Boolean to pause or unpause the sale */ function triggerPauseSale(bool isPaused) external onlyRole(SALE_MANAGER) { if (isPaused) { _pause(); return; } _unpause(); } /** * @notice Function to update the limit per user * @dev Only sale manager can call this function * @param min Minimum amount of eth that can be sent by the user * @param max Maximum amount of eth that can be sent by the user */ function updateSaleConfig(uint256 min, uint256 max) external onlyRole(SALE_MANAGER) { minAmount = min; maxAmount = max; } /** * @notice Internal function to allocate eth to the user * @param to User address we are allocating the eth to * @param amount Amount of eth against which the user will receive tokens */ function _allocateEth(address to, uint256 amount) internal { userAllocation[to] += amount; totalSold += amount; emit EthAllocated(to, amount, block.timestamp); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol) pragma solidity ^0.8.20; import {IAccessControl} from "./IAccessControl.sol"; import {Context} from "../utils/Context.sol"; import {ERC165} from "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ```solidity * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ```solidity * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} * to enforce additional security measures for this role. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address account => bool) hasRole; bytes32 adminRole; } mapping(bytes32 role => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with an {AccessControlUnauthorizedAccount} error including the required role. */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual returns (bool) { return _roles[role].hasRole[account]; } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()` * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier. */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account` * is missing `role`. */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert AccessControlUnauthorizedAccount(account, role); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address callerConfirmation) public virtual { if (callerConfirmation != _msgSender()) { revert AccessControlBadConfirmation(); } _revokeRole(role, callerConfirmation); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual returns (bool) { if (!hasRole(role, account)) { _roles[role].hasRole[account] = true; emit RoleGranted(role, account, _msgSender()); return true; } else { return false; } } /** * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual returns (bool) { if (hasRole(role, account)) { _roles[role].hasRole[account] = false; emit RoleRevoked(role, account, _msgSender()); return true; } else { return false; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol) pragma solidity ^0.8.20; import {Context} from "../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 { bool private _paused; /** * @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); /** * @dev The operation failed because the contract is paused. */ error EnforcedPause(); /** * @dev The operation failed because the contract is not paused. */ error ExpectedPause(); /** * @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 { if (paused()) { revert EnforcedPause(); } } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { if (!paused()) { revert ExpectedPause(); } } /** * @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()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol) pragma solidity ^0.8.20; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev The `account` is missing a role. */ error AccessControlUnauthorizedAccount(address account, bytes32 neededRole); /** * @dev The caller of a function is not the expected one. * * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}. */ error AccessControlBadConfirmation(); /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. */ function renounceRole(bytes32 role, address callerConfirmation) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "remappings": [ "@openzeppelin/=lib/openzeppelin-contracts/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"InvalidAmount","type":"error"},{"inputs":[],"name":"WithdrawFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"allocated","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"EthAllocated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SALE_MANAGER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TREASURY","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"purchase","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"isPaused","type":"bool"}],"name":"triggerPauseSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"updateSaleConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawEth","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b50604051610bd8380380610bd883398101604081905261002f916101b2565b6001805460ff19169055600382905560048190556001600160a01b03831660805261005b600084610097565b506100867f3acf1bc7984281b30349b9bfa997b4b0f2f358952540ae4429a353ceb699e8dc33610097565b5061008f610143565b5050506101f5565b6000828152602081815260408083206001600160a01b038516845290915281205460ff16610139576000838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556100f13390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161013d565b5060005b92915050565b61014b61018c565b6001805460ff1916811790556040805133815290517f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589181900360200190a1565b60015460ff16156101b05760405163d93c066560e01b815260040160405180910390fd5b565b6000806000606084860312156101c757600080fd5b83516001600160a01b03811681146101de57600080fd5b602085015160409095015190969495509392505050565b6080516109c1610217600039600081816101e201526104d801526109c16000f3fe6080604052600436106101095760003560e01c806364edfbf011610095578063a0ef91df11610064578063a0ef91df146102de578063a217fddf146102f3578063a3f6df0114610308578063c816f72a1461032a578063d547741f1461034a57600080fd5b806364edfbf01461028a5780639106d7ba1461029257806391d14854146102a85780639b2cb5d8146102c857600080fd5b80632d2c5565116100dc5780632d2c5565146101d05780632f2ff15d1461021c57806336568abe1461023c5780635c975abb1461025c5780635f48f3931461027457600080fd5b806301ffc9a71461010e57806314dca73b146101435780631a0cb3a714610165578063248a9ca3146101a0575b600080fd5b34801561011a57600080fd5b5061012e610129366004610859565b61036a565b60405190151581526020015b60405180910390f35b34801561014f57600080fd5b5061016361015e36600461088a565b6103a1565b005b34801561017157600080fd5b506101926101803660046108c8565b60056020526000908152604090205481565b60405190815260200161013a565b3480156101ac57600080fd5b506101926101bb3660046108e3565b60009081526020819052604090206001015490565b3480156101dc57600080fd5b506102047f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161013a565b34801561022857600080fd5b506101636102373660046108fc565b6103c5565b34801561024857600080fd5b506101636102573660046108fc565b6103f0565b34801561026857600080fd5b5060015460ff1661012e565b34801561028057600080fd5b5061019260045481565b610163610428565b34801561029e57600080fd5b5061019260025481565b3480156102b457600080fd5b5061012e6102c33660046108fc565b610485565b3480156102d457600080fd5b5061019260035481565b3480156102ea57600080fd5b506101636104ae565b3480156102ff57600080fd5b50610192600081565b34801561031457600080fd5b5061019260008051602061096c83398151915281565b34801561033657600080fd5b50610163610345366004610928565b61055a565b34801561035657600080fd5b506101636103653660046108fc565b61058c565b60006001600160e01b03198216637965db0b60e01b148061039b57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60008051602061096c8339815191526103b9816105b1565b50600391909155600455565b6000828152602081905260409020600101546103e0816105b1565b6103ea83836105be565b50505050565b6001600160a01b03811633146104195760405163334bd91960e11b815260040160405180910390fd5b6104238282610650565b505050565b6104306106bb565b60035434108061045b57506004543360009081526005602052604090205461045990349061094a565b115b156104795760405163162908e360e11b815260040160405180910390fd5b61048333346106df565b565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061096c8339815191526104c6816105b1565b60405147906000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169083908381818185875af1925050503d8060008114610533576040519150601f19603f3d011682016040523d82523d6000602084013e610538565b606091505b505090508061042357604051631d42c86760e21b815260040160405180910390fd5b60008051602061096c833981519152610572816105b1565b81156105845761058061076c565b5050565b6105806107c0565b6000828152602081905260409020600101546105a7816105b1565b6103ea8383610650565b6105bb81336107f9565b50565b60006105ca8383610485565b610648576000838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556106003390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161039b565b50600061039b565b600061065c8383610485565b15610648576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161039b565b60015460ff16156104835760405163d93c066560e01b815260040160405180910390fd5b6001600160a01b0382166000908152600560205260408120805483929061070790849061094a565b925050819055508060026000828254610720919061094a565b9091555050604080518281524260208201526001600160a01b038416917fcefe277453a38f017bce6f15ab4fa682ffba348fd7a12609596ef91b77b142b9910160405180910390a25050565b6107746106bb565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a1565b6107c8610836565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa336107a3565b6108038282610485565b6105805760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440160405180910390fd5b60015460ff1661048357604051638dfc202b60e01b815260040160405180910390fd5b60006020828403121561086b57600080fd5b81356001600160e01b03198116811461088357600080fd5b9392505050565b6000806040838503121561089d57600080fd5b50508035926020909101359150565b80356001600160a01b03811681146108c357600080fd5b919050565b6000602082840312156108da57600080fd5b610883826108ac565b6000602082840312156108f557600080fd5b5035919050565b6000806040838503121561090f57600080fd5b8235915061091f602084016108ac565b90509250929050565b60006020828403121561093a57600080fd5b8135801515811461088357600080fd5b8082018082111561039b57634e487b7160e01b600052601160045260246000fdfe3acf1bc7984281b30349b9bfa997b4b0f2f358952540ae4429a353ceb699e8dca2646970667358221220c455ac97cc66a5785e0a5999cad809ccf3a7ccc64ac3b637af929dfe4c456c6164736f6c6343000814003300000000000000000000000063ab08d6ac1f4e79a6248d3b6eca748afa756ff300000000000000000000000000000000000000000000000000b1a2bc2ec500000000000000000000000000000000000000000000000000000de0b6b3a7640000
Deployed Bytecode
0x6080604052600436106101095760003560e01c806364edfbf011610095578063a0ef91df11610064578063a0ef91df146102de578063a217fddf146102f3578063a3f6df0114610308578063c816f72a1461032a578063d547741f1461034a57600080fd5b806364edfbf01461028a5780639106d7ba1461029257806391d14854146102a85780639b2cb5d8146102c857600080fd5b80632d2c5565116100dc5780632d2c5565146101d05780632f2ff15d1461021c57806336568abe1461023c5780635c975abb1461025c5780635f48f3931461027457600080fd5b806301ffc9a71461010e57806314dca73b146101435780631a0cb3a714610165578063248a9ca3146101a0575b600080fd5b34801561011a57600080fd5b5061012e610129366004610859565b61036a565b60405190151581526020015b60405180910390f35b34801561014f57600080fd5b5061016361015e36600461088a565b6103a1565b005b34801561017157600080fd5b506101926101803660046108c8565b60056020526000908152604090205481565b60405190815260200161013a565b3480156101ac57600080fd5b506101926101bb3660046108e3565b60009081526020819052604090206001015490565b3480156101dc57600080fd5b506102047f00000000000000000000000063ab08d6ac1f4e79a6248d3b6eca748afa756ff381565b6040516001600160a01b03909116815260200161013a565b34801561022857600080fd5b506101636102373660046108fc565b6103c5565b34801561024857600080fd5b506101636102573660046108fc565b6103f0565b34801561026857600080fd5b5060015460ff1661012e565b34801561028057600080fd5b5061019260045481565b610163610428565b34801561029e57600080fd5b5061019260025481565b3480156102b457600080fd5b5061012e6102c33660046108fc565b610485565b3480156102d457600080fd5b5061019260035481565b3480156102ea57600080fd5b506101636104ae565b3480156102ff57600080fd5b50610192600081565b34801561031457600080fd5b5061019260008051602061096c83398151915281565b34801561033657600080fd5b50610163610345366004610928565b61055a565b34801561035657600080fd5b506101636103653660046108fc565b61058c565b60006001600160e01b03198216637965db0b60e01b148061039b57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60008051602061096c8339815191526103b9816105b1565b50600391909155600455565b6000828152602081905260409020600101546103e0816105b1565b6103ea83836105be565b50505050565b6001600160a01b03811633146104195760405163334bd91960e11b815260040160405180910390fd5b6104238282610650565b505050565b6104306106bb565b60035434108061045b57506004543360009081526005602052604090205461045990349061094a565b115b156104795760405163162908e360e11b815260040160405180910390fd5b61048333346106df565b565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061096c8339815191526104c6816105b1565b60405147906000906001600160a01b037f00000000000000000000000063ab08d6ac1f4e79a6248d3b6eca748afa756ff3169083908381818185875af1925050503d8060008114610533576040519150601f19603f3d011682016040523d82523d6000602084013e610538565b606091505b505090508061042357604051631d42c86760e21b815260040160405180910390fd5b60008051602061096c833981519152610572816105b1565b81156105845761058061076c565b5050565b6105806107c0565b6000828152602081905260409020600101546105a7816105b1565b6103ea8383610650565b6105bb81336107f9565b50565b60006105ca8383610485565b610648576000838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556106003390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161039b565b50600061039b565b600061065c8383610485565b15610648576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161039b565b60015460ff16156104835760405163d93c066560e01b815260040160405180910390fd5b6001600160a01b0382166000908152600560205260408120805483929061070790849061094a565b925050819055508060026000828254610720919061094a565b9091555050604080518281524260208201526001600160a01b038416917fcefe277453a38f017bce6f15ab4fa682ffba348fd7a12609596ef91b77b142b9910160405180910390a25050565b6107746106bb565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a1565b6107c8610836565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa336107a3565b6108038282610485565b6105805760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440160405180910390fd5b60015460ff1661048357604051638dfc202b60e01b815260040160405180910390fd5b60006020828403121561086b57600080fd5b81356001600160e01b03198116811461088357600080fd5b9392505050565b6000806040838503121561089d57600080fd5b50508035926020909101359150565b80356001600160a01b03811681146108c357600080fd5b919050565b6000602082840312156108da57600080fd5b610883826108ac565b6000602082840312156108f557600080fd5b5035919050565b6000806040838503121561090f57600080fd5b8235915061091f602084016108ac565b90509250929050565b60006020828403121561093a57600080fd5b8135801515811461088357600080fd5b8082018082111561039b57634e487b7160e01b600052601160045260246000fdfe3acf1bc7984281b30349b9bfa997b4b0f2f358952540ae4429a353ceb699e8dca2646970667358221220c455ac97cc66a5785e0a5999cad809ccf3a7ccc64ac3b637af929dfe4c456c6164736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000063ab08d6ac1f4e79a6248d3b6eca748afa756ff300000000000000000000000000000000000000000000000000b1a2bc2ec500000000000000000000000000000000000000000000000000000de0b6b3a7640000
-----Decoded View---------------
Arg [0] : owner (address): 0x63Ab08D6ac1F4E79a6248D3B6EcA748AFa756ff3
Arg [1] : min (uint256): 50000000000000000
Arg [2] : max (uint256): 1000000000000000000
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000063ab08d6ac1f4e79a6248d3b6eca748afa756ff3
Arg [1] : 00000000000000000000000000000000000000000000000000b1a2bc2ec50000
Arg [2] : 0000000000000000000000000000000000000000000000000de0b6b3a7640000
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.