Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 14 from a total of 14 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 17802131 | 359 days ago | IN | 0 ETH | 0.00057066 | ||||
Set Commit Info | 17801019 | 359 days ago | IN | 0 ETH | 0.00078727 | ||||
Commit | 17797912 | 359 days ago | IN | 1.496 ETH | 0.00104604 | ||||
Commit | 17793343 | 360 days ago | IN | 1.96 ETH | 0.00276665 | ||||
Commit | 17793324 | 360 days ago | IN | 1.06 ETH | 0.00289222 | ||||
Commit | 17793237 | 360 days ago | IN | 2 ETH | 0.00354691 | ||||
Commit | 17793211 | 360 days ago | IN | 3 ETH | 0.00312035 | ||||
Commit | 17793204 | 360 days ago | IN | 1 ETH | 0.00260264 | ||||
Commit | 17793203 | 360 days ago | IN | 1 ETH | 0.00358632 | ||||
Commit | 17793203 | 360 days ago | IN | 0.5 ETH | 0.00358567 | ||||
Commit | 17793200 | 360 days ago | IN | 2 ETH | 0.00459814 | ||||
Commit | 17793198 | 360 days ago | IN | 2 ETH | 0.00379717 | ||||
Commit | 17793196 | 360 days ago | IN | 1 ETH | 0.00456251 | ||||
0x60806040 | 17792882 | 360 days ago | IN | Create: EMBRPresale | 0 ETH | 0.11097789 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
17802131 | 359 days ago | 17.016 ETH |
Loading...
Loading
Contract Name:
EMBRPresale
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.20; import "solmate/auth/Owned.sol"; import "./IEMBR.sol"; import "solady/src/utils/ECDSA.sol"; using ECDSA for bytes32; contract EMBRPresale is Owned { IEMBRToken public ember_token; uint public total_commited_eth; uint public hard_cap = 500.01 ether; uint public precision = 10**21; uint public commit_start; uint public commit_length; mapping(address => uint) public commited_amount; mapping(address => uint) public claimed; uint public vesting_start; uint public cliff_period = 14 days; uint public vesting_period = 90 days; uint public PRICE_PER_TOKEN = 0.00016667 ether; address public claimSigner; event Commit(address indexed from, uint commit_amount, uint total_commitment); constructor(address _claimSigner, uint _commitStart, uint _commitLength) Owned(msg.sender) { claimSigner = _claimSigner; commit_start = _commitStart; commit_length = _commitLength; } function commit(bytes memory signature, uint min_allocation, uint max_allocation) payable public { require(block.timestamp >= commit_start, "Sale is not live yet"); require(block.timestamp < (commit_start + commit_length), "Sale already ended"); require(msg.value > 0, "Commitment amount too low"); // Verify signature & allocation size bytes32 hashed = keccak256(abi.encodePacked(msg.sender, min_allocation, max_allocation)); bytes32 message = ECDSA.toEthSignedMessageHash(hashed); address recovered_address = ECDSA.recover(message, signature); require(recovered_address == claimSigner, "Invalid signer"); uint user_commited_amount = commited_amount[msg.sender]; require(user_commited_amount >= min_allocation || msg.value >= min_allocation, "Minimum presale commitment not met"); uint allocation_available = max_allocation - user_commited_amount; uint leftFromHardCap = hard_cap - total_commited_eth; if (leftFromHardCap < allocation_available) allocation_available = leftFromHardCap; require(allocation_available > 0, "No more allocation left"); uint commit_amount = msg.value; // If the user is trying to commit more than they have allocated, refund the difference and proceed if (msg.value > allocation_available) { uint leftover = msg.value - allocation_available; (bool sent,) = msg.sender.call{value: leftover}(""); require(sent, "Failed to send Ether"); commit_amount -= leftover; } commited_amount[msg.sender] += commit_amount; total_commited_eth += commit_amount; emit Commit(msg.sender, commit_amount, commited_amount[msg.sender]); } function claim() external returns (uint) { require(vesting_start != 0, "vesting hasnt started yet bro"); require(block.timestamp >= vesting_start + cliff_period, "You can only start claiming after cliff period"); uint passedTime = block.timestamp - vesting_start; if (passedTime > vesting_period) passedTime = vesting_period; uint totalUserTokens = commited_amount[msg.sender] * 10**18 / PRICE_PER_TOKEN; uint totalClaimableTokens = totalUserTokens * precision * passedTime / vesting_period / precision; uint toClaim = totalClaimableTokens - claimed[msg.sender]; claimed[msg.sender] += toClaim; ember_token.mintWithAllowance(toClaim, msg.sender); return toClaim; } function claimable() external view returns (uint) { if (vesting_start == 0) return 0; if (block.timestamp < vesting_start + cliff_period) return 0; uint passedTime = block.timestamp - vesting_start; if (passedTime > vesting_period) passedTime = vesting_period; uint totalUserTokens = commited_amount[msg.sender] * 10**18 / PRICE_PER_TOKEN; uint totalClaimableTokens = totalUserTokens * precision * passedTime / vesting_period / precision; uint toClaim = totalClaimableTokens - claimed[msg.sender]; return toClaim; } function withdraw() onlyOwner external { (bool sent,) = owner.call{value: address(this).balance}(""); require(sent, "Failed to send Ether"); } function startVesting() onlyOwner external { vesting_start = block.timestamp; } function setEmbr(address embr) onlyOwner external { ember_token = IEMBRToken(embr); } function setCommitInfo(uint startTs, uint length) onlyOwner external { commit_start = startTs; commit_length = length; } function setHardCap(uint new_hardcap) onlyOwner external { hard_cap = new_hardcap; } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Simple single owner authorization mixin. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/Owned.sol) abstract contract Owned { /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event OwnershipTransferred(address indexed user, address indexed newOwner); /*////////////////////////////////////////////////////////////// OWNERSHIP STORAGE //////////////////////////////////////////////////////////////*/ address public owner; modifier onlyOwner() virtual { require(msg.sender == owner, "UNAUTHORIZED"); _; } /*////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor(address _owner) { owner = _owner; emit OwnershipTransferred(address(0), _owner); } /*////////////////////////////////////////////////////////////// OWNERSHIP LOGIC //////////////////////////////////////////////////////////////*/ function transferOwnership(address newOwner) public virtual onlyOwner { owner = newOwner; emit OwnershipTransferred(msg.sender, newOwner); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.20; interface IEMBRToken { function mint_allowance(address addy) external returns (uint); function mintWithAllowance(uint amount, address receiver) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Gas optimized ECDSA wrapper. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ECDSA.sol) /// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ECDSA.sol) /// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol) library ECDSA { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The signature is invalid. error InvalidSignature(); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CONSTANTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The number which `s` must be less than in order for /// the signature to be non-malleable. bytes32 private constant _MALLEABILITY_THRESHOLD_PLUS_ONE = 0x7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a1; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* RECOVERY OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ // Note: as of Solady version 0.0.68, these functions will // revert upon recovery failure for more safety by default. /// @dev Recovers the signer's address from a message digest `hash`, /// and the `signature`. /// /// This function does NOT accept EIP-2098 short form signatures. /// Use `recover(bytes32 hash, bytes32 r, bytes32 vs)` for EIP-2098 /// short form signatures instead. function recover(bytes32 hash, bytes memory signature) internal view returns (address result) { /// @solidity memory-safe-assembly assembly { let m := mload(0x40) // Cache the free memory pointer. mstore(0x00, hash) mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`. mstore(0x40, mload(add(signature, 0x20))) // `r`. mstore(0x60, mload(add(signature, 0x40))) // `s`. pop( staticcall( gas(), // Amount of gas left for the transaction. and( // If the signature is exactly 65 bytes in length. eq(mload(signature), 65), // If `s` in lower half order, such that the signature is not malleable. lt(mload(0x60), _MALLEABILITY_THRESHOLD_PLUS_ONE) ), // Address of `ecrecover`. 0x00, // Start of input. 0x80, // Size of input. 0x00, // Start of output. 0x20 // Size of output. ) ) result := mload(0x00) // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise. if iszero(returndatasize()) { mstore(0x00, 0x8baa579f) // `InvalidSignature()`. revert(0x1c, 0x04) } mstore(0x60, 0) // Restore the zero slot. mstore(0x40, m) // Restore the free memory pointer. } } /// @dev Recovers the signer's address from a message digest `hash`, /// and the `signature`. /// /// This function does NOT accept EIP-2098 short form signatures. /// Use `recover(bytes32 hash, bytes32 r, bytes32 vs)` for EIP-2098 /// short form signatures instead. function recoverCalldata(bytes32 hash, bytes calldata signature) internal view returns (address result) { /// @solidity memory-safe-assembly assembly { let m := mload(0x40) // Cache the free memory pointer. mstore(0x00, hash) mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`. calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`. pop( staticcall( gas(), // Amount of gas left for the transaction. and( // If the signature is exactly 65 bytes in length. eq(signature.length, 65), // If `s` in lower half order, such that the signature is not malleable. lt(mload(0x60), _MALLEABILITY_THRESHOLD_PLUS_ONE) ), // Address of `ecrecover`. 0x00, // Start of input. 0x80, // Size of input. 0x00, // Start of output. 0x20 // Size of output. ) ) result := mload(0x00) // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise. if iszero(returndatasize()) { mstore(0x00, 0x8baa579f) // `InvalidSignature()`. revert(0x1c, 0x04) } mstore(0x60, 0) // Restore the zero slot. mstore(0x40, m) // Restore the free memory pointer. } } /// @dev Recovers the signer's address from a message digest `hash`, /// and the EIP-2098 short form signature defined by `r` and `vs`. /// /// This function only accepts EIP-2098 short form signatures. /// See: https://eips.ethereum.org/EIPS/eip-2098 function recover(bytes32 hash, bytes32 r, bytes32 vs) internal view returns (address result) { /// @solidity memory-safe-assembly assembly { let m := mload(0x40) // Cache the free memory pointer. mstore(0x00, hash) mstore(0x20, add(shr(255, vs), 27)) // `v`. mstore(0x40, r) mstore(0x60, shr(1, shl(1, vs))) // `s`. pop( staticcall( gas(), // Amount of gas left for the transaction. // If `s` in lower half order, such that the signature is not malleable. lt(mload(0x60), _MALLEABILITY_THRESHOLD_PLUS_ONE), // Address of `ecrecover`. 0x00, // Start of input. 0x80, // Size of input. 0x00, // Start of output. 0x20 // Size of output. ) ) result := mload(0x00) // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise. if iszero(returndatasize()) { mstore(0x00, 0x8baa579f) // `InvalidSignature()`. revert(0x1c, 0x04) } mstore(0x60, 0) // Restore the zero slot. mstore(0x40, m) // Restore the free memory pointer. } } /// @dev Recovers the signer's address from a message digest `hash`, /// and the signature defined by `v`, `r`, `s`. function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal view returns (address result) { /// @solidity memory-safe-assembly assembly { let m := mload(0x40) // Cache the free memory pointer. mstore(0x00, hash) mstore(0x20, and(v, 0xff)) mstore(0x40, r) mstore(0x60, s) pop( staticcall( gas(), // Amount of gas left for the transaction. // If `s` in lower half order, such that the signature is not malleable. lt(s, _MALLEABILITY_THRESHOLD_PLUS_ONE), // Address of `ecrecover`. 0x00, // Start of input. 0x80, // Size of input. 0x00, // Start of output. 0x20 // Size of output. ) ) result := mload(0x00) // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise. if iszero(returndatasize()) { mstore(0x00, 0x8baa579f) // `InvalidSignature()`. revert(0x1c, 0x04) } mstore(0x60, 0) // Restore the zero slot. mstore(0x40, m) // Restore the free memory pointer. } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* TRY-RECOVER OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ // WARNING! // These functions will NOT revert upon recovery failure. // Instead, they will return the zero address upon recovery failure. // It is critical that the returned address is NEVER compared against // a zero address (e.g. an uninitialized address variable). /// @dev Recovers the signer's address from a message digest `hash`, /// and the `signature`. /// /// This function does NOT accept EIP-2098 short form signatures. /// Use `recover(bytes32 hash, bytes32 r, bytes32 vs)` for EIP-2098 /// short form signatures instead. function tryRecover(bytes32 hash, bytes memory signature) internal view returns (address result) { /// @solidity memory-safe-assembly assembly { let m := mload(0x40) // Cache the free memory pointer. mstore(0x00, hash) mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`. mstore(0x40, mload(add(signature, 0x20))) // `r`. mstore(0x60, mload(add(signature, 0x40))) // `s`. pop( staticcall( gas(), // Amount of gas left for the transaction. and( // If the signature is exactly 65 bytes in length. eq(mload(signature), 65), // If `s` in lower half order, such that the signature is not malleable. lt(mload(0x60), _MALLEABILITY_THRESHOLD_PLUS_ONE) ), // Address of `ecrecover`. 0x00, // Start of input. 0x80, // Size of input. 0x40, // Start of output. 0x20 // Size of output. ) ) mstore(0x60, 0) // Restore the zero slot. // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise. result := mload(xor(0x60, returndatasize())) mstore(0x40, m) // Restore the free memory pointer. } } /// @dev Recovers the signer's address from a message digest `hash`, /// and the `signature`. /// /// This function does NOT accept EIP-2098 short form signatures. /// Use `recover(bytes32 hash, bytes32 r, bytes32 vs)` for EIP-2098 /// short form signatures instead. function tryRecoverCalldata(bytes32 hash, bytes calldata signature) internal view returns (address result) { /// @solidity memory-safe-assembly assembly { let m := mload(0x40) // Cache the free memory pointer. mstore(0x00, hash) mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`. calldatacopy(0x40, signature.offset, 0x40) // Copy `r` and `s`. pop( staticcall( gas(), // Amount of gas left for the transaction. and( // If the signature is exactly 65 bytes in length. eq(signature.length, 65), // If `s` in lower half order, such that the signature is not malleable. lt(mload(0x60), _MALLEABILITY_THRESHOLD_PLUS_ONE) ), // Address of `ecrecover`. 0x00, // Start of input. 0x80, // Size of input. 0x40, // Start of output. 0x20 // Size of output. ) ) mstore(0x60, 0) // Restore the zero slot. // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise. result := mload(xor(0x60, returndatasize())) mstore(0x40, m) // Restore the free memory pointer. } } /// @dev Recovers the signer's address from a message digest `hash`, /// and the EIP-2098 short form signature defined by `r` and `vs`. /// /// This function only accepts EIP-2098 short form signatures. /// See: https://eips.ethereum.org/EIPS/eip-2098 function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal view returns (address result) { /// @solidity memory-safe-assembly assembly { let m := mload(0x40) // Cache the free memory pointer. mstore(0x00, hash) mstore(0x20, add(shr(255, vs), 27)) // `v`. mstore(0x40, r) mstore(0x60, shr(1, shl(1, vs))) // `s`. pop( staticcall( gas(), // Amount of gas left for the transaction. // If `s` in lower half order, such that the signature is not malleable. lt(mload(0x60), _MALLEABILITY_THRESHOLD_PLUS_ONE), // Address of `ecrecover`. 0x00, // Start of input. 0x80, // Size of input. 0x40, // Start of output. 0x20 // Size of output. ) ) mstore(0x60, 0) // Restore the zero slot. // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise. result := mload(xor(0x60, returndatasize())) mstore(0x40, m) // Restore the free memory pointer. } } /// @dev Recovers the signer's address from a message digest `hash`, /// and the signature defined by `v`, `r`, `s`. function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal view returns (address result) { /// @solidity memory-safe-assembly assembly { let m := mload(0x40) // Cache the free memory pointer. mstore(0x00, hash) mstore(0x20, and(v, 0xff)) mstore(0x40, r) mstore(0x60, s) pop( staticcall( gas(), // Amount of gas left for the transaction. // If `s` in lower half order, such that the signature is not malleable. lt(s, _MALLEABILITY_THRESHOLD_PLUS_ONE), // Address of `ecrecover`. 0x00, // Start of input. 0x80, // Size of input. 0x40, // Start of output. 0x20 // Size of output. ) ) mstore(0x60, 0) // Restore the zero slot. // `returndatasize()` will be `0x20` upon success, and `0x00` otherwise. result := mload(xor(0x60, returndatasize())) mstore(0x40, m) // Restore the free memory pointer. } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* HASHING OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns an Ethereum Signed Message, created from a `hash`. /// This produces a hash corresponding to the one signed with the /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign) /// JSON-RPC method as part of EIP-191. function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 result) { /// @solidity memory-safe-assembly assembly { mstore(0x20, hash) // Store into scratch space for keccak256. mstore(0x00, "\x00\x00\x00\x00\x19Ethereum Signed Message:\n32") // 28 bytes. result := keccak256(0x04, 0x3c) // `32 * 2 - (32 - 28) = 60 = 0x3c`. } } /// @dev Returns an Ethereum Signed Message, created from `s`. /// This produces a hash corresponding to the one signed with the /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign) /// JSON-RPC method as part of EIP-191. /// Note: Supports lengths of `s` up to 999999 bytes. function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32 result) { /// @solidity memory-safe-assembly assembly { let sLength := mload(s) let o := 0x20 mstore(o, "\x19Ethereum Signed Message:\n") // 26 bytes, zero-right-padded. mstore(0x00, 0x00) // Convert the `s.length` to ASCII decimal representation: `base10(s.length)`. for { let temp := sLength } 1 {} { o := sub(o, 1) mstore8(o, add(48, mod(temp, 10))) temp := div(temp, 10) if iszero(temp) { break } } let n := sub(0x3a, o) // Header length: `26 + 32 - o`. // Throw an out-of-offset error (consumes all gas) if the header exceeds 32 bytes. returndatacopy(returndatasize(), returndatasize(), gt(n, 0x20)) mstore(s, or(mload(0x00), mload(n))) // Temporarily store the header. result := keccak256(add(s, sub(0x20, n)), add(n, sLength)) mstore(s, sLength) // Restore the length. } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* EMPTY CALLDATA HELPERS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns an empty calldata bytes. function emptySignature() internal pure returns (bytes calldata signature) { /// @solidity memory-safe-assembly assembly { signature.length := 0 } } }
{ "remappings": [ "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "solady/=lib/solady/", "solmate/=lib/solmate/src/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "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":"_claimSigner","type":"address"},{"internalType":"uint256","name":"_commitStart","type":"uint256"},{"internalType":"uint256","name":"_commitLength","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"commit_amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"total_commitment","type":"uint256"}],"name":"Commit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"PRICE_PER_TOKEN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cliff_period","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"min_allocation","type":"uint256"},{"internalType":"uint256","name":"max_allocation","type":"uint256"}],"name":"commit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"commit_length","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"commit_start","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"commited_amount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ember_token","outputs":[{"internalType":"contract IEMBRToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hard_cap","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":"precision","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"startTs","type":"uint256"},{"internalType":"uint256","name":"length","type":"uint256"}],"name":"setCommitInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"embr","type":"address"}],"name":"setEmbr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"new_hardcap","type":"uint256"}],"name":"setHardCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startVesting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"total_commited_eth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vesting_period","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vesting_start","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052681b1b085dd55f110000600355683635c9adc5dea0000060045562127500600a556276a700600b55659795e2250c00600c5534801561004257600080fd5b50604051611098380380611098833981016040819052610061916100ce565b600080546001600160a01b031916339081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600d80546001600160a01b0319166001600160a01b039490941693909317909255600555600655610111565b6000806000606084860312156100e357600080fd5b83516001600160a01b03811681146100fa57600080fd5b602085015160409095015190969495509392505050565b610f78806101206000396000f3fe6080604052600436106101405760003560e01c8063af38d757116100b6578063d3b5dc3b1161006f578063d3b5dc3b14610342578063d8ee36cb14610358578063deb36e3214610378578063ef114bc51461038d578063f2fde38b146103a3578063fcd0cac8146103c357600080fd5b8063af38d75714610294578063c31def70146102a9578063c884ef83146102bf578063cd0cc836146102ec578063cf3364ae1461030c578063d18d944b1461032257600080fd5b8063585e1af611610108578063585e1af6146101cd5780635f43ba0c146101e3578063772aaea2146101f9578063833b9499146102265780638da5cb5b1461023c57806397f90a501461027457600080fd5b806314f2c4d01461014557806317ac62f11461015a578063332df7e8146101835780633ccfd60b146101a35780634e71d92d146101b8575b600080fd5b610158610153366004610d72565b6103d9565b005b34801561016657600080fd5b50610170600a5481565b6040519081526020015b60405180910390f35b34801561018f57600080fd5b5061015861019e366004610e36565b6107dc565b3480156101af57600080fd5b50610158610828565b3480156101c457600080fd5b506101706108ef565b3480156101d957600080fd5b5061017060035481565b3480156101ef57600080fd5b50610170600b5481565b34801561020557600080fd5b50610170610214366004610e36565b60076020526000908152604090205481565b34801561023257600080fd5b50610170600c5481565b34801561024857600080fd5b5060005461025c906001600160a01b031681565b6040516001600160a01b03909116815260200161017a565b34801561028057600080fd5b5061015861028f366004610e66565b610af5565b3480156102a057600080fd5b50610170610b2a565b3480156102b557600080fd5b5061017060055481565b3480156102cb57600080fd5b506101706102da366004610e36565b60086020526000908152604090205481565b3480156102f857600080fd5b5060015461025c906001600160a01b031681565b34801561031857600080fd5b5061017060095481565b34801561032e57600080fd5b5061015861033d366004610e88565b610c08565b34801561034e57600080fd5b5061017060045481565b34801561036457600080fd5b50600d5461025c906001600160a01b031681565b34801561038457600080fd5b50610158610c37565b34801561039957600080fd5b5061017060065481565b3480156103af57600080fd5b506101586103be366004610e36565b610c67565b3480156103cf57600080fd5b5061017060025481565b6005544210156104275760405162461bcd60e51b815260206004820152601460248201527314d85b19481a5cc81b9bdd081b1a5d99481e595d60621b60448201526064015b60405180910390fd5b6006546005546104379190610eb7565b421061047a5760405162461bcd60e51b815260206004820152601260248201527114d85b1948185b1c9958591e48195b99195960721b604482015260640161041e565b600034116104ca5760405162461bcd60e51b815260206004820152601960248201527f436f6d6d69746d656e7420616d6f756e7420746f6f206c6f7700000000000000604482015260640161041e565b6040516bffffffffffffffffffffffff193360601b16602082015260348101839052605481018290526000906074016040516020818303038152906040528051906020012090506000610542826020527b19457468657265756d205369676e6564204d6573736167653a0a3332600052603c60042090565b905060006105508287610cdc565b600d549091506001600160a01b038083169116146105a15760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21039b4b3b732b960911b604482015260640161041e565b3360009081526007602052604090205485811015806105c05750853410155b6106175760405162461bcd60e51b815260206004820152602260248201527f4d696e696d756d2070726573616c6520636f6d6d69746d656e74206e6f74206d604482015261195d60f21b606482015260840161041e565b60006106238287610ed0565b905060006002546003546106379190610ed0565b905081811015610645578091505b600082116106955760405162461bcd60e51b815260206004820152601760248201527f4e6f206d6f726520616c6c6f636174696f6e206c656674000000000000000000604482015260640161041e565b348281111561074b5760006106aa8434610ed0565b604051909150600090339083908381818185875af1925050503d80600081146106ef576040519150601f19603f3d011682016040523d82523d6000602084013e6106f4565b606091505b505090508061073c5760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b604482015260640161041e565b6107468284610ed0565b925050505b336000908152600760205260408120805483929061076a908490610eb7565b9250508190555080600260008282546107839190610eb7565b909155505033600081815260076020908152604091829020548251858152918201527f3d5f001e977afcb6eea6a84325bcff0e232f6b3d8453a04a7ea2e5b7792eba0a910160405180910390a250505050505050505050565b6000546001600160a01b031633146108065760405162461bcd60e51b815260040161041e90610ee3565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146108525760405162461bcd60e51b815260040161041e90610ee3565b600080546040516001600160a01b039091169047908381818185875af1925050503d806000811461089f576040519150601f19603f3d011682016040523d82523d6000602084013e6108a4565b606091505b50509050806108ec5760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b604482015260640161041e565b50565b60006009546000036109435760405162461bcd60e51b815260206004820152601d60248201527f76657374696e67206861736e742073746172746564207965742062726f000000604482015260640161041e565b600a546009546109539190610eb7565b4210156109b95760405162461bcd60e51b815260206004820152602e60248201527f596f752063616e206f6e6c7920737461727420636c61696d696e67206166746560448201526d1c8818db1a5999881c195c9a5bd960921b606482015260840161041e565b6000600954426109c99190610ed0565b9050600b548111156109da5750600b545b600c5433600090815260076020526040812054909190610a0290670de0b6b3a7640000610f09565b610a0c9190610f20565b600454600b5491925060009184610a238386610f09565b610a2d9190610f09565b610a379190610f20565b610a419190610f20565b3360009081526008602052604081205491925090610a5f9083610ed0565b33600090815260086020526040812080549293508392909190610a83908490610eb7565b90915550506001546040516387e557e160e01b8152600481018390523360248201526001600160a01b03909116906387e557e190604401600060405180830381600087803b158015610ad457600080fd5b505af1158015610ae8573d6000803e3d6000fd5b5092979650505050505050565b6000546001600160a01b03163314610b1f5760405162461bcd60e51b815260040161041e90610ee3565b600591909155600655565b6000600954600003610b3c5750600090565b600a54600954610b4c9190610eb7565b421015610b595750600090565b600060095442610b699190610ed0565b9050600b54811115610b7a5750600b545b600c5433600090815260076020526040812054909190610ba290670de0b6b3a7640000610f09565b610bac9190610f20565b600454600b5491925060009184610bc38386610f09565b610bcd9190610f09565b610bd79190610f20565b610be19190610f20565b3360009081526008602052604081205491925090610bff9083610ed0565b95945050505050565b6000546001600160a01b03163314610c325760405162461bcd60e51b815260040161041e90610ee3565b600355565b6000546001600160a01b03163314610c615760405162461bcd60e51b815260040161041e90610ee3565b42600955565b6000546001600160a01b03163314610c915760405162461bcd60e51b815260040161041e90610ee3565b600080546001600160a01b0319166001600160a01b0383169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b600060405183600052606083015160001a6020526020830151604052604083015160605260206000608060007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a1606051106041885114165afa5060005191503d610d4e57638baa579f6000526004601cfd5b600060605260405292915050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215610d8757600080fd5b833567ffffffffffffffff80821115610d9f57600080fd5b818601915086601f830112610db357600080fd5b813581811115610dc557610dc5610d5c565b604051601f8201601f19908116603f01168101908382118183101715610ded57610ded610d5c565b81604052828152896020848701011115610e0657600080fd5b82602086016020830137600060208483010152809750505050505060208401359150604084013590509250925092565b600060208284031215610e4857600080fd5b81356001600160a01b0381168114610e5f57600080fd5b9392505050565b60008060408385031215610e7957600080fd5b50508035926020909101359150565b600060208284031215610e9a57600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610eca57610eca610ea1565b92915050565b81810381811115610eca57610eca610ea1565b6020808252600c908201526b15539055551213d49256915160a21b604082015260600190565b8082028115828204841417610eca57610eca610ea1565b600082610f3d57634e487b7160e01b600052601260045260246000fd5b50049056fea264697066735822122088fbfbed00d93e11e62fdab7e13ffd4c9fd4a41b8b9f2d662e7ba8b3aa1558ca64736f6c63430008140033000000000000000000000000e8a16a8eb671f5b53b253d754607b9ab36ced8440000000000000000000000000000000000000000000000000000000064c40220000000000000000000000000000000000000000000000000000000000003f480
Deployed Bytecode
0x6080604052600436106101405760003560e01c8063af38d757116100b6578063d3b5dc3b1161006f578063d3b5dc3b14610342578063d8ee36cb14610358578063deb36e3214610378578063ef114bc51461038d578063f2fde38b146103a3578063fcd0cac8146103c357600080fd5b8063af38d75714610294578063c31def70146102a9578063c884ef83146102bf578063cd0cc836146102ec578063cf3364ae1461030c578063d18d944b1461032257600080fd5b8063585e1af611610108578063585e1af6146101cd5780635f43ba0c146101e3578063772aaea2146101f9578063833b9499146102265780638da5cb5b1461023c57806397f90a501461027457600080fd5b806314f2c4d01461014557806317ac62f11461015a578063332df7e8146101835780633ccfd60b146101a35780634e71d92d146101b8575b600080fd5b610158610153366004610d72565b6103d9565b005b34801561016657600080fd5b50610170600a5481565b6040519081526020015b60405180910390f35b34801561018f57600080fd5b5061015861019e366004610e36565b6107dc565b3480156101af57600080fd5b50610158610828565b3480156101c457600080fd5b506101706108ef565b3480156101d957600080fd5b5061017060035481565b3480156101ef57600080fd5b50610170600b5481565b34801561020557600080fd5b50610170610214366004610e36565b60076020526000908152604090205481565b34801561023257600080fd5b50610170600c5481565b34801561024857600080fd5b5060005461025c906001600160a01b031681565b6040516001600160a01b03909116815260200161017a565b34801561028057600080fd5b5061015861028f366004610e66565b610af5565b3480156102a057600080fd5b50610170610b2a565b3480156102b557600080fd5b5061017060055481565b3480156102cb57600080fd5b506101706102da366004610e36565b60086020526000908152604090205481565b3480156102f857600080fd5b5060015461025c906001600160a01b031681565b34801561031857600080fd5b5061017060095481565b34801561032e57600080fd5b5061015861033d366004610e88565b610c08565b34801561034e57600080fd5b5061017060045481565b34801561036457600080fd5b50600d5461025c906001600160a01b031681565b34801561038457600080fd5b50610158610c37565b34801561039957600080fd5b5061017060065481565b3480156103af57600080fd5b506101586103be366004610e36565b610c67565b3480156103cf57600080fd5b5061017060025481565b6005544210156104275760405162461bcd60e51b815260206004820152601460248201527314d85b19481a5cc81b9bdd081b1a5d99481e595d60621b60448201526064015b60405180910390fd5b6006546005546104379190610eb7565b421061047a5760405162461bcd60e51b815260206004820152601260248201527114d85b1948185b1c9958591e48195b99195960721b604482015260640161041e565b600034116104ca5760405162461bcd60e51b815260206004820152601960248201527f436f6d6d69746d656e7420616d6f756e7420746f6f206c6f7700000000000000604482015260640161041e565b6040516bffffffffffffffffffffffff193360601b16602082015260348101839052605481018290526000906074016040516020818303038152906040528051906020012090506000610542826020527b19457468657265756d205369676e6564204d6573736167653a0a3332600052603c60042090565b905060006105508287610cdc565b600d549091506001600160a01b038083169116146105a15760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21039b4b3b732b960911b604482015260640161041e565b3360009081526007602052604090205485811015806105c05750853410155b6106175760405162461bcd60e51b815260206004820152602260248201527f4d696e696d756d2070726573616c6520636f6d6d69746d656e74206e6f74206d604482015261195d60f21b606482015260840161041e565b60006106238287610ed0565b905060006002546003546106379190610ed0565b905081811015610645578091505b600082116106955760405162461bcd60e51b815260206004820152601760248201527f4e6f206d6f726520616c6c6f636174696f6e206c656674000000000000000000604482015260640161041e565b348281111561074b5760006106aa8434610ed0565b604051909150600090339083908381818185875af1925050503d80600081146106ef576040519150601f19603f3d011682016040523d82523d6000602084013e6106f4565b606091505b505090508061073c5760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b604482015260640161041e565b6107468284610ed0565b925050505b336000908152600760205260408120805483929061076a908490610eb7565b9250508190555080600260008282546107839190610eb7565b909155505033600081815260076020908152604091829020548251858152918201527f3d5f001e977afcb6eea6a84325bcff0e232f6b3d8453a04a7ea2e5b7792eba0a910160405180910390a250505050505050505050565b6000546001600160a01b031633146108065760405162461bcd60e51b815260040161041e90610ee3565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146108525760405162461bcd60e51b815260040161041e90610ee3565b600080546040516001600160a01b039091169047908381818185875af1925050503d806000811461089f576040519150601f19603f3d011682016040523d82523d6000602084013e6108a4565b606091505b50509050806108ec5760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b604482015260640161041e565b50565b60006009546000036109435760405162461bcd60e51b815260206004820152601d60248201527f76657374696e67206861736e742073746172746564207965742062726f000000604482015260640161041e565b600a546009546109539190610eb7565b4210156109b95760405162461bcd60e51b815260206004820152602e60248201527f596f752063616e206f6e6c7920737461727420636c61696d696e67206166746560448201526d1c8818db1a5999881c195c9a5bd960921b606482015260840161041e565b6000600954426109c99190610ed0565b9050600b548111156109da5750600b545b600c5433600090815260076020526040812054909190610a0290670de0b6b3a7640000610f09565b610a0c9190610f20565b600454600b5491925060009184610a238386610f09565b610a2d9190610f09565b610a379190610f20565b610a419190610f20565b3360009081526008602052604081205491925090610a5f9083610ed0565b33600090815260086020526040812080549293508392909190610a83908490610eb7565b90915550506001546040516387e557e160e01b8152600481018390523360248201526001600160a01b03909116906387e557e190604401600060405180830381600087803b158015610ad457600080fd5b505af1158015610ae8573d6000803e3d6000fd5b5092979650505050505050565b6000546001600160a01b03163314610b1f5760405162461bcd60e51b815260040161041e90610ee3565b600591909155600655565b6000600954600003610b3c5750600090565b600a54600954610b4c9190610eb7565b421015610b595750600090565b600060095442610b699190610ed0565b9050600b54811115610b7a5750600b545b600c5433600090815260076020526040812054909190610ba290670de0b6b3a7640000610f09565b610bac9190610f20565b600454600b5491925060009184610bc38386610f09565b610bcd9190610f09565b610bd79190610f20565b610be19190610f20565b3360009081526008602052604081205491925090610bff9083610ed0565b95945050505050565b6000546001600160a01b03163314610c325760405162461bcd60e51b815260040161041e90610ee3565b600355565b6000546001600160a01b03163314610c615760405162461bcd60e51b815260040161041e90610ee3565b42600955565b6000546001600160a01b03163314610c915760405162461bcd60e51b815260040161041e90610ee3565b600080546001600160a01b0319166001600160a01b0383169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b600060405183600052606083015160001a6020526020830151604052604083015160605260206000608060007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a1606051106041885114165afa5060005191503d610d4e57638baa579f6000526004601cfd5b600060605260405292915050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215610d8757600080fd5b833567ffffffffffffffff80821115610d9f57600080fd5b818601915086601f830112610db357600080fd5b813581811115610dc557610dc5610d5c565b604051601f8201601f19908116603f01168101908382118183101715610ded57610ded610d5c565b81604052828152896020848701011115610e0657600080fd5b82602086016020830137600060208483010152809750505050505060208401359150604084013590509250925092565b600060208284031215610e4857600080fd5b81356001600160a01b0381168114610e5f57600080fd5b9392505050565b60008060408385031215610e7957600080fd5b50508035926020909101359150565b600060208284031215610e9a57600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610eca57610eca610ea1565b92915050565b81810381811115610eca57610eca610ea1565b6020808252600c908201526b15539055551213d49256915160a21b604082015260600190565b8082028115828204841417610eca57610eca610ea1565b600082610f3d57634e487b7160e01b600052601260045260246000fd5b50049056fea264697066735822122088fbfbed00d93e11e62fdab7e13ffd4c9fd4a41b8b9f2d662e7ba8b3aa1558ca64736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000e8a16a8eb671f5b53b253d754607b9ab36ced8440000000000000000000000000000000000000000000000000000000064c40220000000000000000000000000000000000000000000000000000000000003f480
-----Decoded View---------------
Arg [0] : _claimSigner (address): 0xe8a16a8eb671F5b53B253d754607b9aB36CEd844
Arg [1] : _commitStart (uint256): 1690567200
Arg [2] : _commitLength (uint256): 259200
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000e8a16a8eb671f5b53b253d754607b9ab36ced844
Arg [1] : 0000000000000000000000000000000000000000000000000000000064c40220
Arg [2] : 000000000000000000000000000000000000000000000000000000000003f480
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.