Contract Overview
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Contract Name:
InvestorVesting
Compiler Version
v0.8.15+commit.e14f2714
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; struct VestingDetail { // Vestor address address beneficiary; // Amount to be vested. uint256 vestingAmount; // Vesting duration, after cliff. uint256 duration; // Amount already claimed by beneficiary. uint256 claimedAmount; // Time at which beneficiary last claimed. uint256 lastClaimedTime; // Initial amount to be claimed, included in vestingAmount. uint256 initialAmount; // Whether the initialAmount value was claimed. bool initialClaimed; // Time at which vesting begins. uint256 claimStartTime; } interface IInvestor { function setVesting(VestingDetail[] calldata _vestingDetails) external; function claim() external; } contract InvestorVesting is IInvestor, Ownable { using SafeERC20 for ERC20; address public immutable token; uint256 public startDate; uint256 public totalClaimed; uint256 public totalVestingAmount; //Maximum number of vesting details uint256 private constant maxVestingDetailArray = 20; address private operator; /// @dev event for setting operator /// @param operator The address of the operator event SetOperator(address operator); /// @dev event for set start date /// @param date The date of the start date event StartDateSet(uint256 date); /// @dev event when beneficiary claim tokens /// @param beneficiary a beneficiary address /// @param amount a claimed amount event Claimed(address indexed beneficiary, uint256 amount); /// @dev event when beneficiary's vesting detail been set /// @param beneficiary a beneficiary address /// @param amount a claimed amount event Vested(address indexed beneficiary, uint256 amount); modifier onlyOperator() { require( msg.sender == operator, "onlyOperator: caller is not the operator" ); _; } constructor(address _token, uint256 _startDate) { require( _startDate >= block.timestamp, "Start date cannot be before the deployment date" ); require(_token != address(0), "Address cannot be zero"); startDate = _startDate; token = _token; operator = msg.sender; //emit event emit StartDateSet(_startDate); } mapping(address => VestingDetail) internal vestingDetails; /** * @dev Allow owner set user's vesting struct * @param _vestingDetails A list of beneficiary's vesting. */ function setVesting(VestingDetail[] calldata _vestingDetails) override external onlyOperator { uint256 count = _vestingDetails.length; // At least one vesting detail is required. require(count > 0, "No vesting list provided"); // Check on the maximum size over which the for loop will run over. require(count <= maxVestingDetailArray, "Too many vesting details"); for (uint256 i = 0; i < count; i++) { address beneficiary = _vestingDetails[i].beneficiary; require( beneficiary != owner() && beneficiary != address(0) && beneficiary != operator, "Beneficiary address is not valid" ); //Check if beneficiary already has a vesting require( vestingDetails[beneficiary].vestingAmount == 0, "Vesting already exists" ); //Beneficiary's vesting amount must be greater than 0 require( _vestingDetails[i].vestingAmount > 0, "Vesting amount is not valid" ); //Vesting duration must be greater than 0 require(_vestingDetails[i].duration > 0, "Duration is not valid"); //New beneficiary's initial claimed amount must be 0 require( _vestingDetails[i].claimedAmount == 0, "Claimed amount is not valid" ); //New beneficiary's last claimed time must be 0,indicating that they have never claimed require( _vestingDetails[i].lastClaimedTime == 0, "Last claimed time is not valid" ); require( (_vestingDetails[i].initialAmount > 0 && !_vestingDetails[i].initialClaimed) || (_vestingDetails[i].initialAmount == 0 && _vestingDetails[i].initialClaimed), "Initial claimed is not valid" ); //New beneficiary's claim start time must be not be before start date require( _vestingDetails[i].claimStartTime >= startDate, "Claim start time is not valid" ); vestingDetails[beneficiary] = VestingDetail( beneficiary, _vestingDetails[i].vestingAmount, _vestingDetails[i].duration, _vestingDetails[i].claimedAmount, _vestingDetails[i].lastClaimedTime, _vestingDetails[i].initialAmount, _vestingDetails[i].initialClaimed, _vestingDetails[i].claimStartTime ); totalVestingAmount += _vestingDetails[i].vestingAmount; emit Vested(beneficiary, _vestingDetails[i].vestingAmount); } } /** * @dev Allow user to claim token from vesting after start date. */ function claim() override external { //Start date must be must be in the past but not 0 require( startDate > 0 && block.timestamp >= startDate, "Claim is not allowed before start" ); address beneficiary = msg.sender; require( block.timestamp >= vestingDetails[beneficiary].claimStartTime, "Claim is not allowed before claim start date" ); //Beneficiary must have a vesting amount require( vestingDetails[beneficiary].vestingAmount > 0, "Vesting does not exist" ); //Beneficiary must have not claimed all of their vesting amount require( vestingDetails[beneficiary].claimedAmount < vestingDetails[beneficiary].vestingAmount, "You have already claimed your vested amount" ); uint256 amountToClaim; // if initial claim is not done, claim initial amount + linear amount if ( !vestingDetails[beneficiary].initialClaimed && vestingDetails[beneficiary].initialAmount > 0 ) { amountToClaim += vestingDetails[beneficiary].initialAmount; vestingDetails[beneficiary].initialClaimed = true; } // Check that block is after the cliff period. if (block.timestamp >= vestingDetails[beneficiary].claimStartTime) { uint256 lastClaimedTime = vestingDetails[beneficiary] .lastClaimedTime; if (lastClaimedTime == 0) lastClaimedTime = vestingDetails[beneficiary].claimStartTime; amountToClaim += ((block.timestamp - lastClaimedTime) * (vestingDetails[beneficiary].vestingAmount - vestingDetails[beneficiary].initialAmount)) / vestingDetails[beneficiary].duration; // In case the last claim amount is greater than the remaining amount if ( amountToClaim > vestingDetails[beneficiary].vestingAmount - vestingDetails[beneficiary].claimedAmount ) amountToClaim = vestingDetails[beneficiary].vestingAmount - vestingDetails[beneficiary].claimedAmount; } vestingDetails[beneficiary].lastClaimedTime = block.timestamp; vestingDetails[beneficiary].claimedAmount += amountToClaim; totalClaimed += amountToClaim; ERC20(token).safeTransfer(beneficiary, amountToClaim); emit Claimed(beneficiary, amountToClaim); } /** * @dev Get beneficiary's vesting detail */ function getOperator() external view returns (address) { return operator; } /** * @dev Get beneficiary's vesting detail */ function getBeneficiaryVesting(address _beneficiary) external view returns (VestingDetail memory) { return vestingDetails[_beneficiary]; } /** * @dev Allow owner to set operator * @param _operator Operator address */ function setOperator(address _operator) external onlyOwner { require(_operator != address(0), "Address cannot be zero"); require(_operator != msg.sender, "Cannot set self as operator"); require(_operator != operator, "Already set"); operator = _operator; emit SetOperator(_operator); } /** * @dev Allow owner to set start date * @param _date The date of the start */ function setStartDate(uint256 _date) external onlyOwner { require(_date > block.timestamp, "Start date is not valid"); require(startDate != _date, "Start date is already set"); startDate = _date; emit StartDateSet(_date); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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 anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing 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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// 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.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_startDate","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"operator","type":"address"}],"name":"SetOperator","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"date","type":"uint256"}],"name":"StartDateSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Vested","type":"event"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"}],"name":"getBeneficiaryVesting","outputs":[{"components":[{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"uint256","name":"vestingAmount","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"claimedAmount","type":"uint256"},{"internalType":"uint256","name":"lastClaimedTime","type":"uint256"},{"internalType":"uint256","name":"initialAmount","type":"uint256"},{"internalType":"bool","name":"initialClaimed","type":"bool"},{"internalType":"uint256","name":"claimStartTime","type":"uint256"}],"internalType":"struct VestingDetail","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOperator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_date","type":"uint256"}],"name":"setStartDate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"uint256","name":"vestingAmount","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"claimedAmount","type":"uint256"},{"internalType":"uint256","name":"lastClaimedTime","type":"uint256"},{"internalType":"uint256","name":"initialAmount","type":"uint256"},{"internalType":"bool","name":"initialClaimed","type":"bool"},{"internalType":"uint256","name":"claimStartTime","type":"uint256"}],"internalType":"struct VestingDetail[]","name":"_vestingDetails","type":"tuple[]"}],"name":"setVesting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startDate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalVestingAmount","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
60a06040523480156200001157600080fd5b50604051620033a4380380620033a483398181016040528101906200003791906200033d565b620000576200004b620001cc60201b60201c565b620001d460201b60201c565b428110156200009d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000094906200040b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036200010f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000106906200047d565b60405180910390fd5b806001819055508173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff168152505033600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fb7c4cfab55f258306528123c09b531989ac12a88a9896955338ee5d5342f4dce81604051620001bc9190620004b0565b60405180910390a15050620004cd565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002ca826200029d565b9050919050565b620002dc81620002bd565b8114620002e857600080fd5b50565b600081519050620002fc81620002d1565b92915050565b6000819050919050565b620003178162000302565b81146200032357600080fd5b50565b60008151905062000337816200030c565b92915050565b6000806040838503121562000357576200035662000298565b5b60006200036785828601620002eb565b92505060206200037a8582860162000326565b9150509250929050565b600082825260208201905092915050565b7f537461727420646174652063616e6e6f74206265206265666f7265207468652060008201527f6465706c6f796d656e7420646174650000000000000000000000000000000000602082015250565b6000620003f3602f8362000384565b9150620004008262000395565b604082019050919050565b600060208201905081810360008301526200042681620003e4565b9050919050565b7f416464726573732063616e6e6f74206265207a65726f00000000000000000000600082015250565b60006200046560168362000384565b915062000472826200042d565b602082019050919050565b60006020820190508181036000830152620004988162000456565b9050919050565b620004aa8162000302565b82525050565b6000602082019050620004c760008301846200049f565b92915050565b608051612eb4620004f06000396000818161098c015261175f0152612eb46000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80638da5cb5b1161008c578063d54ad2a111610066578063d54ad2a1146101c6578063e7f43c68146101e4578063f2fde38b14610202578063fc0c546a1461021e576100cf565b80638da5cb5b1461015c578063ad268b011461017a578063b3ab15fb146101aa576100cf565b80630b97bc86146100d45780632db94d19146100f25780634e71d92d14610110578063715018a61461011a57806382d95df51461012457806386f1d2a214610140575b600080fd5b6100dc61023c565b6040516100e99190611c44565b60405180910390f35b6100fa610242565b6040516101079190611c44565b60405180910390f35b610118610248565b005b610122610a22565b005b61013e60048036038101906101399190611c95565b610a36565b005b61015a60048036038101906101559190611d28565b610b05565b005b61016461138a565b6040516101719190611db6565b60405180910390f35b610194600480360381019061018f9190611dfd565b6113b3565b6040516101a19190611f05565b60405180910390f35b6101c460048036038101906101bf9190611dfd565b6114ba565b005b6101ce6116aa565b6040516101db9190611c44565b60405180910390f35b6101ec6116b0565b6040516101f99190611db6565b60405180910390f35b61021c60048036038101906102179190611dfd565b6116da565b005b61022661175d565b6040516102339190611db6565b60405180910390f35b60015481565b60035481565b600060015411801561025c57506001544210155b61029b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029290611fa4565b60405180910390fd5b6000339050600560008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060070154421015610325576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161031c90612036565b60405180910390fd5b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154116103aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103a1906120a2565b60405180910390fd5b600560008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003015410610470576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161046790612134565b60405180910390fd5b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060060160009054906101000a900460ff1615801561051157506000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060050154115b156105c257600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060050154816105649190612183565b90506001600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060060160006101000a81548160ff0219169083151502179055505b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206007015442106108cc576000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600401549050600081036106a057600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206007015490505b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060050154600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015461077391906121d9565b824261077f91906121d9565b610789919061220d565b6107939190612296565b8261079e9190612183565b9150600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015461083091906121d9565b8211156108ca57600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101546108c791906121d9565b91505b505b42600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206004018190555080600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030160008282546109659190612183565b92505081905550806002600082825461097e9190612183565b925050819055506109d082827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166117819092919063ffffffff16565b8173ffffffffffffffffffffffffffffffffffffffff167fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a82604051610a169190611c44565b60405180910390a25050565b610a2a611807565b610a346000611885565b565b610a3e611807565b428111610a80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7790612313565b60405180910390fd5b8060015403610ac4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610abb9061237f565b60405180910390fd5b806001819055507fb7c4cfab55f258306528123c09b531989ac12a88a9896955338ee5d5342f4dce81604051610afa9190611c44565b60405180910390a150565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b95576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8c90612411565b60405180910390fd5b600082829050905060008111610be0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bd79061247d565b60405180910390fd5b6014811115610c24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1b906124e9565b60405180910390fd5b60005b81811015611384576000848483818110610c4457610c43612509565b5b905061010002016000016020810190610c5d9190611dfd565b9050610c6761138a565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015610ccf5750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b8015610d295750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b610d68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5f90612584565b60405180910390fd5b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015414610ded576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610de4906125f0565b60405180910390fd5b6000858584818110610e0257610e01612509565b5b905061010002016020013511610e4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e449061265c565b60405180910390fd5b6000858584818110610e6257610e61612509565b5b905061010002016040013511610ead576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea4906126c8565b60405180910390fd5b6000858584818110610ec257610ec1612509565b5b905061010002016060013514610f0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0490612734565b60405180910390fd5b6000858584818110610f2257610f21612509565b5b905061010002016080013514610f6d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f64906127a0565b60405180910390fd5b6000858584818110610f8257610f81612509565b5b9050610100020160a00135118015610fc35750848483818110610fa857610fa7612509565b5b9050610100020160c0016020810190610fc191906127ec565b155b8061101f57506000858584818110610fde57610fdd612509565b5b9050610100020160a0013514801561101e575084848381811061100457611003612509565b5b9050610100020160c001602081019061101d91906127ec565b5b5b61105e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105590612865565b60405180910390fd5b60015485858481811061107457611073612509565b5b9050610100020160e0013510156110c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110b7906128d1565b60405180910390fd5b6040518061010001604052808273ffffffffffffffffffffffffffffffffffffffff1681526020018686858181106110fb576110fa612509565b5b9050610100020160200135815260200186868581811061111e5761111d612509565b5b9050610100020160400135815260200186868581811061114157611140612509565b5b9050610100020160600135815260200186868581811061116457611163612509565b5b9050610100020160800135815260200186868581811061118757611186612509565b5b9050610100020160a0013581526020018686858181106111aa576111a9612509565b5b9050610100020160c00160208101906111c391906127ec565b151581526020018686858181106111dd576111dc612509565b5b9050610100020160e00135815250600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a81548160ff02191690831515021790555060e082015181600701559050508484838181106112e3576112e2612509565b5b9050610100020160200135600360008282546112ff9190612183565b925050819055508073ffffffffffffffffffffffffffffffffffffffff167ed5958799b183a7b738d3ad5e711305293dd5076a37a4e3b7e6611dea6114f38686858181106113505761134f612509565b5b90506101000201602001356040516113689190611c44565b60405180910390a250808061137c906128f1565b915050610c27565b50505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6113bb611bce565b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020604051806101000160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160018201548152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820160009054906101000a900460ff161515151581526020016007820154815250509050919050565b6114c2611807565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611531576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161152890612985565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361159f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611596906129f1565b60405180910390fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361162f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161162690612a5d565b60405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fdbebfba65bd6398fb722063efc10c99f624f9cd8ba657201056af918a676d5ee8160405161169f9190611db6565b60405180910390a150565b60025481565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6116e2611807565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611751576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161174890612aef565b60405180910390fd5b61175a81611885565b50565b7f000000000000000000000000000000000000000000000000000000000000000081565b6118028363a9059cbb60e01b84846040516024016117a0929190612b0f565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611949565b505050565b61180f611a10565b73ffffffffffffffffffffffffffffffffffffffff1661182d61138a565b73ffffffffffffffffffffffffffffffffffffffff1614611883576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187a90612b84565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006119ab826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611a189092919063ffffffff16565b9050600081511115611a0b57808060200190518101906119cb9190612bb9565b611a0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a0190612c58565b60405180910390fd5b5b505050565b600033905090565b6060611a278484600085611a30565b90509392505050565b606082471015611a75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a6c90612cea565b60405180910390fd5b611a7e85611b44565b611abd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ab490612d56565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611ae69190612df0565b60006040518083038185875af1925050503d8060008114611b23576040519150601f19603f3d011682016040523d82523d6000602084013e611b28565b606091505b5091509150611b38828286611b67565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60608315611b7757829050611bc7565b600083511115611b8a5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bbe9190612e5c565b60405180910390fd5b9392505050565b604051806101000160405280600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001600081526020016000815260200160008152602001600015158152602001600081525090565b6000819050919050565b611c3e81611c2b565b82525050565b6000602082019050611c596000830184611c35565b92915050565b600080fd5b600080fd5b611c7281611c2b565b8114611c7d57600080fd5b50565b600081359050611c8f81611c69565b92915050565b600060208284031215611cab57611caa611c5f565b5b6000611cb984828501611c80565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f840112611ce757611ce6611cc2565b5b8235905067ffffffffffffffff811115611d0457611d03611cc7565b5b60208301915083610100820283011115611d2157611d20611ccc565b5b9250929050565b60008060208385031215611d3f57611d3e611c5f565b5b600083013567ffffffffffffffff811115611d5d57611d5c611c64565b5b611d6985828601611cd1565b92509250509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611da082611d75565b9050919050565b611db081611d95565b82525050565b6000602082019050611dcb6000830184611da7565b92915050565b611dda81611d95565b8114611de557600080fd5b50565b600081359050611df781611dd1565b92915050565b600060208284031215611e1357611e12611c5f565b5b6000611e2184828501611de8565b91505092915050565b611e3381611d95565b82525050565b611e4281611c2b565b82525050565b60008115159050919050565b611e5d81611e48565b82525050565b61010082016000820151611e7a6000850182611e2a565b506020820151611e8d6020850182611e39565b506040820151611ea06040850182611e39565b506060820151611eb36060850182611e39565b506080820151611ec66080850182611e39565b5060a0820151611ed960a0850182611e39565b5060c0820151611eec60c0850182611e54565b5060e0820151611eff60e0850182611e39565b50505050565b600061010082019050611f1b6000830184611e63565b92915050565b600082825260208201905092915050565b7f436c61696d206973206e6f7420616c6c6f776564206265666f7265207374617260008201527f7400000000000000000000000000000000000000000000000000000000000000602082015250565b6000611f8e602183611f21565b9150611f9982611f32565b604082019050919050565b60006020820190508181036000830152611fbd81611f81565b9050919050565b7f436c61696d206973206e6f7420616c6c6f776564206265666f726520636c616960008201527f6d20737461727420646174650000000000000000000000000000000000000000602082015250565b6000612020602c83611f21565b915061202b82611fc4565b604082019050919050565b6000602082019050818103600083015261204f81612013565b9050919050565b7f56657374696e6720646f6573206e6f7420657869737400000000000000000000600082015250565b600061208c601683611f21565b915061209782612056565b602082019050919050565b600060208201905081810360008301526120bb8161207f565b9050919050565b7f596f75206861766520616c726561647920636c61696d656420796f757220766560008201527f7374656420616d6f756e74000000000000000000000000000000000000000000602082015250565b600061211e602b83611f21565b9150612129826120c2565b604082019050919050565b6000602082019050818103600083015261214d81612111565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061218e82611c2b565b915061219983611c2b565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156121ce576121cd612154565b5b828201905092915050565b60006121e482611c2b565b91506121ef83611c2b565b92508282101561220257612201612154565b5b828203905092915050565b600061221882611c2b565b915061222383611c2b565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561225c5761225b612154565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006122a182611c2b565b91506122ac83611c2b565b9250826122bc576122bb612267565b5b828204905092915050565b7f53746172742064617465206973206e6f742076616c6964000000000000000000600082015250565b60006122fd601783611f21565b9150612308826122c7565b602082019050919050565b6000602082019050818103600083015261232c816122f0565b9050919050565b7f5374617274206461746520697320616c72656164792073657400000000000000600082015250565b6000612369601983611f21565b915061237482612333565b602082019050919050565b600060208201905081810360008301526123988161235c565b9050919050565b7f6f6e6c794f70657261746f723a2063616c6c6572206973206e6f74207468652060008201527f6f70657261746f72000000000000000000000000000000000000000000000000602082015250565b60006123fb602883611f21565b91506124068261239f565b604082019050919050565b6000602082019050818103600083015261242a816123ee565b9050919050565b7f4e6f2076657374696e67206c6973742070726f76696465640000000000000000600082015250565b6000612467601883611f21565b915061247282612431565b602082019050919050565b600060208201905081810360008301526124968161245a565b9050919050565b7f546f6f206d616e792076657374696e672064657461696c730000000000000000600082015250565b60006124d3601883611f21565b91506124de8261249d565b602082019050919050565b60006020820190508181036000830152612502816124c6565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f42656e65666963696172792061646472657373206973206e6f742076616c6964600082015250565b600061256e602083611f21565b915061257982612538565b602082019050919050565b6000602082019050818103600083015261259d81612561565b9050919050565b7f56657374696e6720616c72656164792065786973747300000000000000000000600082015250565b60006125da601683611f21565b91506125e5826125a4565b602082019050919050565b60006020820190508181036000830152612609816125cd565b9050919050565b7f56657374696e6720616d6f756e74206973206e6f742076616c69640000000000600082015250565b6000612646601b83611f21565b915061265182612610565b602082019050919050565b6000602082019050818103600083015261267581612639565b9050919050565b7f4475726174696f6e206973206e6f742076616c69640000000000000000000000600082015250565b60006126b2601583611f21565b91506126bd8261267c565b602082019050919050565b600060208201905081810360008301526126e1816126a5565b9050919050565b7f436c61696d656420616d6f756e74206973206e6f742076616c69640000000000600082015250565b600061271e601b83611f21565b9150612729826126e8565b602082019050919050565b6000602082019050818103600083015261274d81612711565b9050919050565b7f4c61737420636c61696d65642074696d65206973206e6f742076616c69640000600082015250565b600061278a601e83611f21565b915061279582612754565b602082019050919050565b600060208201905081810360008301526127b98161277d565b9050919050565b6127c981611e48565b81146127d457600080fd5b50565b6000813590506127e6816127c0565b92915050565b60006020828403121561280257612801611c5f565b5b6000612810848285016127d7565b91505092915050565b7f496e697469616c20636c61696d6564206973206e6f742076616c696400000000600082015250565b600061284f601c83611f21565b915061285a82612819565b602082019050919050565b6000602082019050818103600083015261287e81612842565b9050919050565b7f436c61696d2073746172742074696d65206973206e6f742076616c6964000000600082015250565b60006128bb601d83611f21565b91506128c682612885565b602082019050919050565b600060208201905081810360008301526128ea816128ae565b9050919050565b60006128fc82611c2b565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361292e5761292d612154565b5b600182019050919050565b7f416464726573732063616e6e6f74206265207a65726f00000000000000000000600082015250565b600061296f601683611f21565b915061297a82612939565b602082019050919050565b6000602082019050818103600083015261299e81612962565b9050919050565b7f43616e6e6f74207365742073656c66206173206f70657261746f720000000000600082015250565b60006129db601b83611f21565b91506129e6826129a5565b602082019050919050565b60006020820190508181036000830152612a0a816129ce565b9050919050565b7f416c726561647920736574000000000000000000000000000000000000000000600082015250565b6000612a47600b83611f21565b9150612a5282612a11565b602082019050919050565b60006020820190508181036000830152612a7681612a3a565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000612ad9602683611f21565b9150612ae482612a7d565b604082019050919050565b60006020820190508181036000830152612b0881612acc565b9050919050565b6000604082019050612b246000830185611da7565b612b316020830184611c35565b9392505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612b6e602083611f21565b9150612b7982612b38565b602082019050919050565b60006020820190508181036000830152612b9d81612b61565b9050919050565b600081519050612bb3816127c0565b92915050565b600060208284031215612bcf57612bce611c5f565b5b6000612bdd84828501612ba4565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b6000612c42602a83611f21565b9150612c4d82612be6565b604082019050919050565b60006020820190508181036000830152612c7181612c35565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b6000612cd4602683611f21565b9150612cdf82612c78565b604082019050919050565b60006020820190508181036000830152612d0381612cc7565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000612d40601d83611f21565b9150612d4b82612d0a565b602082019050919050565b60006020820190508181036000830152612d6f81612d33565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015612daa578082015181840152602081019050612d8f565b83811115612db9576000848401525b50505050565b6000612dca82612d76565b612dd48185612d81565b9350612de4818560208601612d8c565b80840191505092915050565b6000612dfc8284612dbf565b915081905092915050565b600081519050919050565b6000601f19601f8301169050919050565b6000612e2e82612e07565b612e388185611f21565b9350612e48818560208601612d8c565b612e5181612e12565b840191505092915050565b60006020820190508181036000830152612e768184612e23565b90509291505056fea2646970667358221220fd74bbc9b262f16750e374e192a8f42f6bd411b2d602b6be9af06c652be8496c64736f6c634300080f0033000000000000000000000000bb6129911d3bbdadb447241d433b4ed529aebbd80000000000000000000000000000000000000000000000000000000063120c60
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000bb6129911d3bbdadb447241d433b4ed529aebbd80000000000000000000000000000000000000000000000000000000063120c60
-----Decoded View---------------
Arg [0] : _token (address): 0xbb6129911d3bbdadb447241d433b4ed529aebbd8
Arg [1] : _startDate (uint256): 1662127200
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000bb6129911d3bbdadb447241d433b4ed529aebbd8
Arg [1] : 0000000000000000000000000000000000000000000000000000000063120c60
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.