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
TokenTracker
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 18963274 | 236 days ago | IN | 0 ETH | 0.05027162 |
Loading...
Loading
Contract Name:
VestingIDO
Compiler Version
v0.8.11+commit.d7f03943
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.10; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; struct CreateVestingInput { address user; uint128 amount; } /** * @param rate percentage vested from total amount during the phase in BPS * @param endAt Time when phase ends * @param minimumClaimablePeriod for linear vesting it would be "1 seconds", for weekly westing it would be "1 weeks", if not set(set to zero) user will be able to claim only after phase ends */ struct Phase { uint256 rate; uint256 endAt; uint256 minimumClaimablePeriod; } /** * @title VestingIDO * @dev no user can claim while contract is in locked state */ contract VestingIDO is Ownable, ReentrancyGuard { using SafeERC20 for IERC20; error VestingIsNotUnlocked(); error NoZeroAddress(string param); error CannotReinitializeAfterFirstClaim(); error NothingToClaimCurrentlyPleaseTryAgainLater(); error DepositedAmountIsInsufficientPleaseDepositMore(); error WrongInputParameters(); error AlreadyUnlocked(); error OnlyOneVestingPerAddress(); error MustNotBeZero(string param); error NoActiveVesting(); error EmptyInputArray(); /** * @param amount Total amount allocated for user * @param amountClaimed Total amount claimed by user so far * @param lastClaimAt Timestamp from user last claim */ struct UserVesting { uint256 amount; uint256 amountClaimed; uint256 lastClaimAt; } bool public locked = false; uint256 public totalAmountAllocated; // Amount owner allocated for all users uint256 public totalAmountClaimed; // Amount claimed by all users uint256 public constant RATE_CONVERTER = 10000; IERC20 public vestedToken; string public name; uint256 public startDateAt; uint256 public vestingEndAt; uint256 public claimableAtStart; // in BPS bool public airdroptedAtStart; Phase[] public phases; mapping(address => UserVesting) public vestings; event NewVestingCreated(address indexed user, uint256 amount); event NewClaim(address indexed user, uint256 amountClaimed); constructor( IERC20 _vestedToken, string memory _name, uint256 _startDateAt, uint256 _claimableAtStart, bool _airdroptedAtStart, Phase[] memory _phases ) { _initialize( _vestedToken, _name, _startDateAt, _claimableAtStart, _airdroptedAtStart, _phases ); } function reinitialize( IERC20 _vestedToken, string memory _name, uint256 _startDateAt, uint256 _claimableAtStart, Phase[] calldata _phases ) external onlyOwner { if (totalAmountClaimed != 0) { revert CannotReinitializeAfterFirstClaim(); } _initialize( _vestedToken, _name, _startDateAt, _claimableAtStart, false, _phases ); } function _initialize( IERC20 _vestedToken, string memory _name, uint256 _startDateAt, uint256 _claimableAtStart, bool _airdroptedAtStart, Phase[] memory _phases ) private { uint256 prevStartDate = _startDateAt; uint256 total = _claimableAtStart; for (uint256 i = 0; i < _phases.length; i++) { Phase memory phase = _phases[i]; if (prevStartDate > phase.endAt) { // phases should be ordered ascending by end date and should not overlap revert WrongInputParameters(); } total += phase.rate; prevStartDate = phase.endAt; } if (total / RATE_CONVERTER != 1) { revert WrongInputParameters(); } if (address(_vestedToken) == address(0)) { revert NoZeroAddress("_vestedToken"); } name = _name; vestedToken = _vestedToken; startDateAt = _startDateAt; // set vesting end date to last phase end date, if there is not phases then set end date to start date(e.g. for 100% claim at TGE) vestingEndAt = _phases.length > 0 ? _phases[_phases.length - 1].endAt : _startDateAt; claimableAtStart = _claimableAtStart; airdroptedAtStart = _airdroptedAtStart; // clear the phases array in case of reinitialization delete phases; for (uint256 i = 0; i < _phases.length; i++) { phases.push(_phases[i]); } } /** * @notice allow users to claim their vested tokens */ function setLock(bool _locked) external onlyOwner { locked = _locked; } /** * @notice Move vesting to another address in case user lose access to his original account */ function moveVesting(address from, address to) external onlyOwner { UserVesting memory vesting = vestings[from]; if (vesting.amount - vesting.amountClaimed == 0) { revert NoActiveVesting(); } if (vestings[to].amount > 0) { revert OnlyOneVestingPerAddress(); } if (to == address(0)) { revert NoZeroAddress("to"); } vestings[to] = vesting; delete vestings[from]; } /** * @notice create vesting for user, only one vesting per user address * @dev owner needs to first deploy enough tokens to vesting contract address */ function createVestings( CreateVestingInput[] calldata vestingsInput, bool depositCheck ) external onlyOwner { if (vestingsInput.length == 0) { revert EmptyInputArray(); } uint256 totalDepositedAmount = getDepositedAmount(); uint256 amountAllocated; for (uint64 i = 0; i < vestingsInput.length; i++) { amountAllocated += vestingsInput[i].amount; } if (airdroptedAtStart) { totalAmountClaimed += (amountAllocated * claimableAtStart) / RATE_CONVERTER; } if (depositCheck) { // check if depositor have enough credit if ( (totalDepositedAmount + totalAmountClaimed - totalAmountAllocated) < amountAllocated ) { revert DepositedAmountIsInsufficientPleaseDepositMore(); } } for (uint64 i = 0; i < vestingsInput.length; i++) { _createVesting(vestingsInput[i]); } } /** * @dev can be called any amount of time after vesting contract is unlocked, tokens are vested each block after cliffEnd */ function claim() external nonReentrant { if (locked) { revert VestingIsNotUnlocked(); } UserVesting storage vesting = vestings[msg.sender]; if (vesting.amount - vesting.amountClaimed == 0) { revert NoActiveVesting(); } uint256 claimableAmount = _claimable(vesting); if (claimableAmount == 0) { revert NothingToClaimCurrentlyPleaseTryAgainLater(); } totalAmountClaimed += claimableAmount; vesting.amountClaimed += claimableAmount; vesting.lastClaimAt = block.timestamp; assert(vesting.amountClaimed <= vesting.amount); assert(totalAmountClaimed <= totalAmountAllocated); vestedToken.safeTransfer(msg.sender, claimableAmount); emit NewClaim(msg.sender, claimableAmount); } // return amount user can claim from locked tokens at the moment function claimable(address _user) external view returns (uint256 amount) { if (locked) { return 0; } return _claimable(vestings[_user]); } function getDepositedAmount() public view returns (uint256 amount) { return vestedToken.balanceOf(address(this)); } // create a vesting for an user function _createVesting(CreateVestingInput memory v) private { if (v.user == address(0)) { revert NoZeroAddress("user"); } if (v.amount == 0) { revert MustNotBeZero("amount"); } if (vestings[v.user].amount > 0) { revert OnlyOneVestingPerAddress(); } totalAmountAllocated += v.amount; vestings[v.user] = UserVesting({ amount: v.amount, amountClaimed: airdroptedAtStart ? (v.amount * claimableAtStart) / RATE_CONVERTER : 0, lastClaimAt: airdroptedAtStart ? startDateAt : 0 }); emit NewVestingCreated(v.user, v.amount); } function _claimable(UserVesting memory v) private view returns (uint256 amount) { if (block.timestamp < startDateAt) { // vesting has not started return 0; } uint256 amountLeft = v.amount - v.amountClaimed; // user already claimed everything if (amountLeft == 0) return 0; if (block.timestamp >= vestingEndAt) { // if vesting ended return everything left amount = amountLeft; } else { if (v.lastClaimAt == 0) { // if this is first claim also calculate amount available at start amount += (claimableAtStart * v.amount) / RATE_CONVERTER; } uint256 prevEndDate = startDateAt; for (uint256 i = 0; i < phases.length; i++) { Phase memory phase = phases[i]; uint256 phaseLength = phase.endAt - prevEndDate; // if last claim time is larger than the end of phase then skip it, already calculated in previous claim if (v.lastClaimAt < phase.endAt) { if ( block.timestamp >= phase.endAt && phase.minimumClaimablePeriod == 0 ) { // if phase completely passed then calculate amount with every second in phase amount += (v.amount * phase.rate) / RATE_CONVERTER; } else if (phase.minimumClaimablePeriod != 0) { uint256 start = Math.max(v.lastClaimAt, prevEndDate); uint256 end = Math.min(block.timestamp, phase.endAt); // only take full increments of minimumClaimablePeriod in calculation of amount uint256 timePassed = end - start - ((end - start) % phase.minimumClaimablePeriod); amount += (v.amount * phase.rate * timePassed) / (phaseLength * RATE_CONVERTER); } if (block.timestamp < phase.endAt) { // if current time is less than end of this phase then there is no need to calculate remaining phases break; } } prevEndDate = phase.endAt; } } amount = Math.min(amount, amountLeft); return Math.min(amount, getDepositedAmount()); } /** * @dev Returns time until next vesting batch will be unlocked for vesting contract provided in arguments */ function nextBatchAt() external view returns (uint256) { if (block.timestamp >= vestingEndAt) { return vestingEndAt; } // we assume all vesting contracts release at least some funds on start date/TGE if (block.timestamp < startDateAt) { return startDateAt; } uint256 nextBatchIn; uint256 prevEndDate = startDateAt; // iterate over phases until we find current phase contract does not returns phases length for (uint256 i = 0; block.timestamp > prevEndDate; i++) { Phase memory phase = phases[i]; if (block.timestamp < phase.endAt) { // vesting per sec/block if (phase.minimumClaimablePeriod == 1) { nextBatchIn = 1; } else if (phase.minimumClaimablePeriod == 0) { // vested at the end of the phase nextBatchIn = phase.endAt; } else { // if the funds are released in batches in current phase every `minimumClaimablePeriod` time, nextBatchIn = block.timestamp + phase.minimumClaimablePeriod - ((block.timestamp - prevEndDate) % phase.minimumClaimablePeriod); } break; } prevEndDate = phase.endAt; } return nextBatchIn; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.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, _allowances[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 = _allowances[owner][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * 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 Spend `amount` form the allowance of `owner` toward `spender`. * * 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 v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.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)); } } /** * @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 (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 Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { 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.5.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a / b + (a % b == 0 ? 0 : 1); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// 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 (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.5.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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IERC20","name":"_vestedToken","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"uint256","name":"_startDateAt","type":"uint256"},{"internalType":"uint256","name":"_claimableAtStart","type":"uint256"},{"internalType":"bool","name":"_airdroptedAtStart","type":"bool"},{"components":[{"internalType":"uint256","name":"rate","type":"uint256"},{"internalType":"uint256","name":"endAt","type":"uint256"},{"internalType":"uint256","name":"minimumClaimablePeriod","type":"uint256"}],"internalType":"struct Phase[]","name":"_phases","type":"tuple[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyUnlocked","type":"error"},{"inputs":[],"name":"CannotReinitializeAfterFirstClaim","type":"error"},{"inputs":[],"name":"DepositedAmountIsInsufficientPleaseDepositMore","type":"error"},{"inputs":[],"name":"EmptyInputArray","type":"error"},{"inputs":[{"internalType":"string","name":"param","type":"string"}],"name":"MustNotBeZero","type":"error"},{"inputs":[],"name":"NoActiveVesting","type":"error"},{"inputs":[{"internalType":"string","name":"param","type":"string"}],"name":"NoZeroAddress","type":"error"},{"inputs":[],"name":"NothingToClaimCurrentlyPleaseTryAgainLater","type":"error"},{"inputs":[],"name":"OnlyOneVestingPerAddress","type":"error"},{"inputs":[],"name":"VestingIsNotUnlocked","type":"error"},{"inputs":[],"name":"WrongInputParameters","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountClaimed","type":"uint256"}],"name":"NewClaim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"NewVestingCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"RATE_CONVERTER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"airdroptedAtStart","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"claimable","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimableAtStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint128","name":"amount","type":"uint128"}],"internalType":"struct CreateVestingInput[]","name":"vestingsInput","type":"tuple[]"},{"internalType":"bool","name":"depositCheck","type":"bool"}],"name":"createVestings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getDepositedAmount","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"locked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"moveVesting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextBatchAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"phases","outputs":[{"internalType":"uint256","name":"rate","type":"uint256"},{"internalType":"uint256","name":"endAt","type":"uint256"},{"internalType":"uint256","name":"minimumClaimablePeriod","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_vestedToken","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"uint256","name":"_startDateAt","type":"uint256"},{"internalType":"uint256","name":"_claimableAtStart","type":"uint256"},{"components":[{"internalType":"uint256","name":"rate","type":"uint256"},{"internalType":"uint256","name":"endAt","type":"uint256"},{"internalType":"uint256","name":"minimumClaimablePeriod","type":"uint256"}],"internalType":"struct Phase[]","name":"_phases","type":"tuple[]"}],"name":"reinitialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_locked","type":"bool"}],"name":"setLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startDateAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAmountAllocated","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAmountClaimed","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":"vestedToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vestingEndAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"vestings","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"amountClaimed","type":"uint256"},{"internalType":"uint256","name":"lastClaimAt","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040526002805460ff191690553480156200001b57600080fd5b5060405162002347380380620023478339810160408190526200003e9162000507565b620000493362000069565b600180556200005d868686868686620000b9565b50505050505062000713565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b838360005b83518110156200013c576000848281518110620000df57620000df62000634565b6020026020010151905080602001518411156200010f57604051636fb9362f60e01b815260040160405180910390fd5b80516200011d908462000660565b602090910151935091508062000133816200067b565b915050620000be565b506200014b6127108262000699565b6001146200016c57604051636fb9362f60e01b815260040160405180910390fd5b6001600160a01b038816620001b75760405163030cc15560e51b815260206004820152600c60248201526b2fbb32b9ba32b22a37b5b2b760a11b604482015260640160405180910390fd5b8651620001cc9060069060208a0190620002d4565b50600580546001600160a01b0319166001600160a01b038a1617905560078690558251620001fb57856200022c565b82600184516200020c9190620006bc565b815181106200021f576200021f62000634565b6020026020010151602001515b6008556009859055600a805460ff191685151517905562000250600b600062000363565b60005b8351811015620002c957600b84828151811062000274576200027462000634565b6020908102919091018101518254600181810185556000948552938390208251600390920201908155918101519282019290925560409091015160029091015580620002c0816200067b565b91505062000253565b505050505050505050565b828054620002e290620006d6565b90600052602060002090601f01602090048101928262000306576000855562000351565b82601f106200032157805160ff191683800117855562000351565b8280016001018555821562000351579182015b828111156200035157825182559160200191906001019062000334565b506200035f92915062000389565b5090565b5080546000825560030290600052602060002090810190620003869190620003a0565b50565b5b808211156200035f57600081556001016200038a565b5b808211156200035f576000808255600182018190556002820155600301620003a1565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715620003ff57620003ff620003c4565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620004305762000430620003c4565b604052919050565b805180151581146200044957600080fd5b919050565b600082601f8301126200046057600080fd5b815160206001600160401b038211156200047e576200047e620003c4565b6200048e818360051b0162000405565b82815260609283028501820192828201919087851115620004ae57600080fd5b8387015b85811015620004fa5781818a031215620004cc5760008081fd5b620004d6620003da565b815181528582015186820152604080830151908201528452928401928101620004b2565b5090979650505050505050565b60008060008060008060c087890312156200052157600080fd5b86516001600160a01b03811681146200053957600080fd5b602088810151919750906001600160401b03808211156200055957600080fd5b818a0191508a601f8301126200056e57600080fd5b815181811115620005835762000583620003c4565b62000597601f8201601f1916850162000405565b8181528c85838601011115620005ac57600080fd5b60005b82811015620005cc578481018601518282018701528501620005af565b82811115620005de5760008684840101525b50809950505060408a0151965060608a015195506200060060808b0162000438565b945060a08a01519250808311156200061757600080fd5b50506200062789828a016200044e565b9150509295509295509295565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156200067657620006766200064a565b500190565b60006000198214156200069257620006926200064a565b5060010190565b600082620006b757634e487b7160e01b600052601260045260246000fd5b500490565b600082821015620006d157620006d16200064a565b500390565b600181811c90821680620006eb57607f821691505b602082108114156200070d57634e487b7160e01b600052602260045260246000fd5b50919050565b611c2480620007236000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c8063715018a6116100c3578063d29af10d1161007c578063d29af10d1461028e578063daf4986314610296578063dc7db49c146102c5578063e44a05af146102d8578063f2fde38b146102eb578063f843664a146102fe57600080fd5b8063715018a61461024d5780638a4113d7146102555780638da5cb5b1461025e578063918f24d41461026f578063bfa5e13c14610278578063cf3090121461028157600080fd5b8063402914f511610115578063402914f5146101d65780634e71d92d146101e9578063549c1a35146101f35780635de29741146101fc578063619d51941461022757806370c4b1f11461023a57600080fd5b80630683a0da1461015257806306fdde031461017457806323aaa7fe146101895780632e37eef6146101a0578063322ba9f3146101ce575b600080fd5b600a5461015f9060ff1681565b60405190151581526020015b60405180910390f35b61017c610307565b60405161016b919061164d565b61019261271081565b60405190815260200161016b565b6101b36101ae366004611680565b610395565b6040805193845260208401929092529082015260600161016b565b6101926103c8565b6101926101e43660046116ae565b61043a565b6101f161049e565b005b61019260035481565b60055461020f906001600160a01b031681565b6040516001600160a01b03909116815260200161016b565b6101f16102353660046116d9565b610661565b6101f16102483660046116f6565b61069e565b6101f16107f0565b61019260075481565b6000546001600160a01b031661020f565b61019260085481565b61019260045481565b60025461015f9060ff1681565b610192610826565b6101b36102a43660046116ae565b600c6020526000908152604090208054600182015460029092015490919083565b6101f16102d33660046117c2565b610931565b6101f16102e63660046118a5565b6109e5565b6101f16102f93660046116ae565b610b8a565b61019260095481565b600680546103149061192b565b80601f01602080910402602001604051908101604052809291908181526020018280546103409061192b565b801561038d5780601f106103625761010080835404028352916020019161038d565b820191906000526020600020905b81548152906001019060200180831161037057829003601f168201915b505050505081565b600b81815481106103a557600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b6005546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610411573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104359190611966565b905090565b60025460009060ff161561045057506000919050565b6001600160a01b0382166000908152600c6020908152604091829020825160608101845281548152600182015492810192909252600201549181019190915261049890610c25565b92915050565b600260015414156104f65760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260018190555460ff161561051f5760405163a995904b60e01b815260040160405180910390fd5b336000908152600c602052604090206001810154815461053f9190611995565b61055c57604051634186725760e11b815260040160405180910390fd5b60408051606081018252825481526001830154602082015260028301549181019190915260009061058c90610c25565b9050806105ac576040516347f9e41d60e01b815260040160405180910390fd5b80600460008282546105be91906119ac565b92505081905550808260010160008282546105d991906119ac565b90915550504260028301558154600183015411156105f9576105f96119c4565b600354600454111561060d5761060d6119c4565b600554610624906001600160a01b03163383610e51565b60405181815233907f081144d27d70f1f67f67a65289dde411e1a9511c916d13ee3ff9bf22f169cd9a9060200160405180910390a2505060018055565b6000546001600160a01b0316331461068b5760405162461bcd60e51b81526004016104ed906119da565b6002805460ff1916911515919091179055565b6000546001600160a01b031633146106c85760405162461bcd60e51b81526004016104ed906119da565b6001600160a01b0382166000908152600c6020908152604091829020825160608101845281548082526001830154938201849052600290920154938101939093526107139190611995565b61073057604051634186725760e11b815260040160405180910390fd5b6001600160a01b0382166000908152600c602052604090205415610767576040516382c06f2f60e01b815260040160405180910390fd5b6001600160a01b0382166107a35760405163030cc15560e51b8152602060048201526002602482015261746f60f01b60448201526064016104ed565b6001600160a01b039182166000908152600c602090815260408083208451815591840151600180840191909155938101516002928301559490931681529283208381559081018390550155565b6000546001600160a01b0316331461081a5760405162461bcd60e51b81526004016104ed906119da565b6108246000610ea8565b565b60006008544210610838575060085490565b600754421015610849575060075490565b600754600090815b81421115610929576000600b828154811061086e5761086e611a0f565b600091825260209182902060408051606081018252600390930290910180548352600181015493830184905260020154908201529150421015610911578060400151600114156108c1576001935061090b565b60408101516108d6578060200151935061090b565b60408101516108e58442611995565b6108ef9190611a3b565b60408201516108fe90426119ac565b6109089190611995565b93505b50610929565b6020015191508061092181611a4f565b915050610851565b509092915050565b6000546001600160a01b0316331461095b5760405162461bcd60e51b81526004016104ed906119da565b6004541561097c576040516339a23cf160e01b815260040160405180910390fd5b6109dd8686868660008787808060200260200160405190810160405280939291908181526020016000905b828210156109d3576109c460608302860136819003810190611a6a565b815260200190600101906109a7565b5050505050610ef8565b505050505050565b6000546001600160a01b03163314610a0f5760405162461bcd60e51b81526004016104ed906119da565b81610a2d5760405163af70781d60e01b815260040160405180910390fd5b6000610a376103c8565b90506000805b67ffffffffffffffff8116851115610aaa5785858267ffffffffffffffff16818110610a6b57610a6b611a0f565b9050604002016020016020810190610a839190611ae2565b610a96906001600160801b0316836119ac565b915080610aa281611afd565b915050610a3d565b50600a5460ff1615610ae85761271060095482610ac79190611b25565b610ad19190611b44565b60046000828254610ae291906119ac565b90915550505b8215610b29578060035460045484610b0091906119ac565b610b0a9190611995565b1015610b295760405163409a7ab960e11b815260040160405180910390fd5b60005b67ffffffffffffffff81168511156109dd57610b7886868367ffffffffffffffff16818110610b5d57610b5d611a0f565b905060400201803603810190610b739190611b58565b6110ef565b80610b8281611afd565b915050610b2c565b6000546001600160a01b03163314610bb45760405162461bcd60e51b81526004016104ed906119da565b6001600160a01b038116610c195760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104ed565b610c2281610ea8565b50565b6000600754421015610c3957506000919050565b60208201518251600091610c4c91611995565b905080610c5c5750600092915050565b6008544210610c6d57809150610e2d565b6040830151610c9f57825160095461271091610c8891611b25565b610c929190611b44565b610c9c90836119ac565b91505b60075460005b600b54811015610e2a576000600b8281548110610cc457610cc4611a0f565b600091825260208083206040805160608101825260039094029091018054845260018101549284018390526002015490830152909250610d05908590611995565b9050816020015187604001511015610e115781602001514210158015610d2d57506040820151155b15610d5e578151875161271091610d4391611b25565b610d4d9190611b44565b610d5790876119ac565b9550610dfe565b604082015115610dfe576000610d788860400151866112c8565b90506000610d8a4285602001516112df565b9050600084604001518383610d9f9190611995565b610da99190611a3b565b610db38484611995565b610dbd9190611995565b9050610dcb61271085611b25565b85518b518391610dda91611b25565b610de49190611b25565b610dee9190611b44565b610df8908a6119ac565b98505050505b8160200151421015610e11575050610e2a565b5060200151915080610e2281611a4f565b915050610ca5565b50505b610e3782826112df565b9150610e4a82610e456103c8565b6112df565b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610ea39084906112ee565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b838360005b8351811015610f71576000848281518110610f1a57610f1a611a0f565b602002602001015190508060200151841115610f4957604051636fb9362f60e01b815260040160405180910390fd5b8051610f5590846119ac565b6020909101519350915080610f6981611a4f565b915050610efd565b50610f7e61271082611b44565b600114610f9e57604051636fb9362f60e01b815260040160405180910390fd5b6001600160a01b038816610fe45760405163030cc15560e51b815260206004820152600c60248201526b2fbb32b9ba32b22a37b5b2b760a11b60448201526064016104ed565b8651610ff79060069060208a0190611541565b50600580546001600160a01b0319166001600160a01b038a16179055600786905582516110245785611050565b82600184516110339190611995565b8151811061104357611043611a0f565b6020026020010151602001515b6008556009859055600a805460ff1916851515179055611072600b60006115c5565b60005b83518110156110e457600b84828151811061109257611092611a0f565b60209081029190910181015182546001818101855560009485529383902082516003909202019081559181015192820192909255604090910151600290910155806110dc81611a4f565b915050611075565b505050505050505050565b80516001600160a01b03166111305760405163030cc15560e51b81526004016104ed906020808252600490820152633ab9b2b960e11b604082015260600190565b60208101516001600160801b031661117457604051633930c7a960e21b8152602060048201526006602482015265185b5bdd5b9d60d21b60448201526064016104ed565b80516001600160a01b03166000908152600c6020526040902054156111ac576040516382c06f2f60e01b815260040160405180910390fd5b80602001516001600160801b0316600360008282546111cb91906119ac565b909155505060408051606081019091526020808301516001600160801b03168252600a549082019060ff16611201576000611229565b61271060095484602001516001600160801b031661121f9190611b25565b6112299190611b44565b8152600a5460209091019060ff16611242576000611246565b6007545b905281516001600160a01b039081166000908152600c6020908152604091829020845181558482015160018201559382015160029094019390935583518385015191516001600160801b039092168252909116917f1ad52506d5b39a5f36ce7518f02978bb44db2961e116f2a2d8d134cd3f43e957910160405180910390a250565b6000818310156112d85781610e4a565b5090919050565b60008183106112d85781610e4a565b6000611343826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113c09092919063ffffffff16565b805190915015610ea357808060200190518101906113619190611bb5565b610ea35760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016104ed565b60606113cf84846000856113d7565b949350505050565b6060824710156114385760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016104ed565b6001600160a01b0385163b61148f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104ed565b600080866001600160a01b031685876040516114ab9190611bd2565b60006040518083038185875af1925050503d80600081146114e8576040519150601f19603f3d011682016040523d82523d6000602084013e6114ed565b606091505b50915091506114fd828286611508565b979650505050505050565b60608315611517575081610e4a565b8251156115275782518084602001fd5b8160405162461bcd60e51b81526004016104ed919061164d565b82805461154d9061192b565b90600052602060002090601f01602090048101928261156f57600085556115b5565b82601f1061158857805160ff19168380011785556115b5565b828001600101855582156115b5579182015b828111156115b557825182559160200191906001019061159a565b506115c19291506115e6565b5090565b5080546000825560030290600052602060002090810190610c2291906115fb565b5b808211156115c157600081556001016115e7565b5b808211156115c15760008082556001820181905560028201556003016115fc565b60005b83811015611638578181015183820152602001611620565b83811115611647576000848401525b50505050565b602081526000825180602084015261166c81604085016020870161161d565b601f01601f19169190910160400192915050565b60006020828403121561169257600080fd5b5035919050565b6001600160a01b0381168114610c2257600080fd5b6000602082840312156116c057600080fd5b8135610e4a81611699565b8015158114610c2257600080fd5b6000602082840312156116eb57600080fd5b8135610e4a816116cb565b6000806040838503121561170957600080fd5b823561171481611699565b9150602083013561172481611699565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561176e5761176e61172f565b604052919050565b60008083601f84011261178857600080fd5b50813567ffffffffffffffff8111156117a057600080fd5b6020830191508360206060830285010111156117bb57600080fd5b9250929050565b60008060008060008060a087890312156117db57600080fd5b86356117e681611699565b955060208781013567ffffffffffffffff8082111561180457600080fd5b818a0191508a601f83011261181857600080fd5b81358181111561182a5761182a61172f565b61183c601f8201601f19168501611745565b8181528c8583860101111561185057600080fd5b818585018683013760009181019094015291965060408901359550606089013594506080890135918083111561188557600080fd5b505061189389828a01611776565b979a9699509497509295939492505050565b6000806000604084860312156118ba57600080fd5b833567ffffffffffffffff808211156118d257600080fd5b818601915086601f8301126118e657600080fd5b8135818111156118f557600080fd5b8760208260061b850101111561190a57600080fd5b60209283019550935050840135611920816116cb565b809150509250925092565b600181811c9082168061193f57607f821691505b6020821081141561196057634e487b7160e01b600052602260045260246000fd5b50919050565b60006020828403121561197857600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000828210156119a7576119a761197f565b500390565b600082198211156119bf576119bf61197f565b500190565b634e487b7160e01b600052600160045260246000fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082611a4a57611a4a611a25565b500690565b6000600019821415611a6357611a6361197f565b5060010190565b600060608284031215611a7c57600080fd5b6040516060810181811067ffffffffffffffff82111715611a9f57611a9f61172f565b80604052508235815260208301356020820152604083013560408201528091505092915050565b80356001600160801b0381168114611add57600080fd5b919050565b600060208284031215611af457600080fd5b610e4a82611ac6565b600067ffffffffffffffff80831681811415611b1b57611b1b61197f565b6001019392505050565b6000816000190483118215151615611b3f57611b3f61197f565b500290565b600082611b5357611b53611a25565b500490565b600060408284031215611b6a57600080fd5b6040516040810181811067ffffffffffffffff82111715611b8d57611b8d61172f565b6040528235611b9b81611699565b8152611ba960208401611ac6565b60208201529392505050565b600060208284031215611bc757600080fd5b8151610e4a816116cb565b60008251611be481846020870161161d565b919091019291505056fea26469706673582212201792795582712affa54f914d30f9df39df044eb211a3f511c743ed1a3006eb5264736f6c634300080b0033000000000000000000000000fd4f2caf941b6d737382dce420b368de3fc7f2d400000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000065d9da4000000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000001e7061726167656e2d56657374696e6749444f20506174657820546f6b656e0000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000065db2bc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000232800000000000000000000000000000000000000000000000000000000699ee4400000000000000000000000000000000000000000000000000000000000000001
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061014d5760003560e01c8063715018a6116100c3578063d29af10d1161007c578063d29af10d1461028e578063daf4986314610296578063dc7db49c146102c5578063e44a05af146102d8578063f2fde38b146102eb578063f843664a146102fe57600080fd5b8063715018a61461024d5780638a4113d7146102555780638da5cb5b1461025e578063918f24d41461026f578063bfa5e13c14610278578063cf3090121461028157600080fd5b8063402914f511610115578063402914f5146101d65780634e71d92d146101e9578063549c1a35146101f35780635de29741146101fc578063619d51941461022757806370c4b1f11461023a57600080fd5b80630683a0da1461015257806306fdde031461017457806323aaa7fe146101895780632e37eef6146101a0578063322ba9f3146101ce575b600080fd5b600a5461015f9060ff1681565b60405190151581526020015b60405180910390f35b61017c610307565b60405161016b919061164d565b61019261271081565b60405190815260200161016b565b6101b36101ae366004611680565b610395565b6040805193845260208401929092529082015260600161016b565b6101926103c8565b6101926101e43660046116ae565b61043a565b6101f161049e565b005b61019260035481565b60055461020f906001600160a01b031681565b6040516001600160a01b03909116815260200161016b565b6101f16102353660046116d9565b610661565b6101f16102483660046116f6565b61069e565b6101f16107f0565b61019260075481565b6000546001600160a01b031661020f565b61019260085481565b61019260045481565b60025461015f9060ff1681565b610192610826565b6101b36102a43660046116ae565b600c6020526000908152604090208054600182015460029092015490919083565b6101f16102d33660046117c2565b610931565b6101f16102e63660046118a5565b6109e5565b6101f16102f93660046116ae565b610b8a565b61019260095481565b600680546103149061192b565b80601f01602080910402602001604051908101604052809291908181526020018280546103409061192b565b801561038d5780601f106103625761010080835404028352916020019161038d565b820191906000526020600020905b81548152906001019060200180831161037057829003601f168201915b505050505081565b600b81815481106103a557600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b6005546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610411573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104359190611966565b905090565b60025460009060ff161561045057506000919050565b6001600160a01b0382166000908152600c6020908152604091829020825160608101845281548152600182015492810192909252600201549181019190915261049890610c25565b92915050565b600260015414156104f65760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260018190555460ff161561051f5760405163a995904b60e01b815260040160405180910390fd5b336000908152600c602052604090206001810154815461053f9190611995565b61055c57604051634186725760e11b815260040160405180910390fd5b60408051606081018252825481526001830154602082015260028301549181019190915260009061058c90610c25565b9050806105ac576040516347f9e41d60e01b815260040160405180910390fd5b80600460008282546105be91906119ac565b92505081905550808260010160008282546105d991906119ac565b90915550504260028301558154600183015411156105f9576105f96119c4565b600354600454111561060d5761060d6119c4565b600554610624906001600160a01b03163383610e51565b60405181815233907f081144d27d70f1f67f67a65289dde411e1a9511c916d13ee3ff9bf22f169cd9a9060200160405180910390a2505060018055565b6000546001600160a01b0316331461068b5760405162461bcd60e51b81526004016104ed906119da565b6002805460ff1916911515919091179055565b6000546001600160a01b031633146106c85760405162461bcd60e51b81526004016104ed906119da565b6001600160a01b0382166000908152600c6020908152604091829020825160608101845281548082526001830154938201849052600290920154938101939093526107139190611995565b61073057604051634186725760e11b815260040160405180910390fd5b6001600160a01b0382166000908152600c602052604090205415610767576040516382c06f2f60e01b815260040160405180910390fd5b6001600160a01b0382166107a35760405163030cc15560e51b8152602060048201526002602482015261746f60f01b60448201526064016104ed565b6001600160a01b039182166000908152600c602090815260408083208451815591840151600180840191909155938101516002928301559490931681529283208381559081018390550155565b6000546001600160a01b0316331461081a5760405162461bcd60e51b81526004016104ed906119da565b6108246000610ea8565b565b60006008544210610838575060085490565b600754421015610849575060075490565b600754600090815b81421115610929576000600b828154811061086e5761086e611a0f565b600091825260209182902060408051606081018252600390930290910180548352600181015493830184905260020154908201529150421015610911578060400151600114156108c1576001935061090b565b60408101516108d6578060200151935061090b565b60408101516108e58442611995565b6108ef9190611a3b565b60408201516108fe90426119ac565b6109089190611995565b93505b50610929565b6020015191508061092181611a4f565b915050610851565b509092915050565b6000546001600160a01b0316331461095b5760405162461bcd60e51b81526004016104ed906119da565b6004541561097c576040516339a23cf160e01b815260040160405180910390fd5b6109dd8686868660008787808060200260200160405190810160405280939291908181526020016000905b828210156109d3576109c460608302860136819003810190611a6a565b815260200190600101906109a7565b5050505050610ef8565b505050505050565b6000546001600160a01b03163314610a0f5760405162461bcd60e51b81526004016104ed906119da565b81610a2d5760405163af70781d60e01b815260040160405180910390fd5b6000610a376103c8565b90506000805b67ffffffffffffffff8116851115610aaa5785858267ffffffffffffffff16818110610a6b57610a6b611a0f565b9050604002016020016020810190610a839190611ae2565b610a96906001600160801b0316836119ac565b915080610aa281611afd565b915050610a3d565b50600a5460ff1615610ae85761271060095482610ac79190611b25565b610ad19190611b44565b60046000828254610ae291906119ac565b90915550505b8215610b29578060035460045484610b0091906119ac565b610b0a9190611995565b1015610b295760405163409a7ab960e11b815260040160405180910390fd5b60005b67ffffffffffffffff81168511156109dd57610b7886868367ffffffffffffffff16818110610b5d57610b5d611a0f565b905060400201803603810190610b739190611b58565b6110ef565b80610b8281611afd565b915050610b2c565b6000546001600160a01b03163314610bb45760405162461bcd60e51b81526004016104ed906119da565b6001600160a01b038116610c195760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104ed565b610c2281610ea8565b50565b6000600754421015610c3957506000919050565b60208201518251600091610c4c91611995565b905080610c5c5750600092915050565b6008544210610c6d57809150610e2d565b6040830151610c9f57825160095461271091610c8891611b25565b610c929190611b44565b610c9c90836119ac565b91505b60075460005b600b54811015610e2a576000600b8281548110610cc457610cc4611a0f565b600091825260208083206040805160608101825260039094029091018054845260018101549284018390526002015490830152909250610d05908590611995565b9050816020015187604001511015610e115781602001514210158015610d2d57506040820151155b15610d5e578151875161271091610d4391611b25565b610d4d9190611b44565b610d5790876119ac565b9550610dfe565b604082015115610dfe576000610d788860400151866112c8565b90506000610d8a4285602001516112df565b9050600084604001518383610d9f9190611995565b610da99190611a3b565b610db38484611995565b610dbd9190611995565b9050610dcb61271085611b25565b85518b518391610dda91611b25565b610de49190611b25565b610dee9190611b44565b610df8908a6119ac565b98505050505b8160200151421015610e11575050610e2a565b5060200151915080610e2281611a4f565b915050610ca5565b50505b610e3782826112df565b9150610e4a82610e456103c8565b6112df565b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610ea39084906112ee565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b838360005b8351811015610f71576000848281518110610f1a57610f1a611a0f565b602002602001015190508060200151841115610f4957604051636fb9362f60e01b815260040160405180910390fd5b8051610f5590846119ac565b6020909101519350915080610f6981611a4f565b915050610efd565b50610f7e61271082611b44565b600114610f9e57604051636fb9362f60e01b815260040160405180910390fd5b6001600160a01b038816610fe45760405163030cc15560e51b815260206004820152600c60248201526b2fbb32b9ba32b22a37b5b2b760a11b60448201526064016104ed565b8651610ff79060069060208a0190611541565b50600580546001600160a01b0319166001600160a01b038a16179055600786905582516110245785611050565b82600184516110339190611995565b8151811061104357611043611a0f565b6020026020010151602001515b6008556009859055600a805460ff1916851515179055611072600b60006115c5565b60005b83518110156110e457600b84828151811061109257611092611a0f565b60209081029190910181015182546001818101855560009485529383902082516003909202019081559181015192820192909255604090910151600290910155806110dc81611a4f565b915050611075565b505050505050505050565b80516001600160a01b03166111305760405163030cc15560e51b81526004016104ed906020808252600490820152633ab9b2b960e11b604082015260600190565b60208101516001600160801b031661117457604051633930c7a960e21b8152602060048201526006602482015265185b5bdd5b9d60d21b60448201526064016104ed565b80516001600160a01b03166000908152600c6020526040902054156111ac576040516382c06f2f60e01b815260040160405180910390fd5b80602001516001600160801b0316600360008282546111cb91906119ac565b909155505060408051606081019091526020808301516001600160801b03168252600a549082019060ff16611201576000611229565b61271060095484602001516001600160801b031661121f9190611b25565b6112299190611b44565b8152600a5460209091019060ff16611242576000611246565b6007545b905281516001600160a01b039081166000908152600c6020908152604091829020845181558482015160018201559382015160029094019390935583518385015191516001600160801b039092168252909116917f1ad52506d5b39a5f36ce7518f02978bb44db2961e116f2a2d8d134cd3f43e957910160405180910390a250565b6000818310156112d85781610e4a565b5090919050565b60008183106112d85781610e4a565b6000611343826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113c09092919063ffffffff16565b805190915015610ea357808060200190518101906113619190611bb5565b610ea35760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016104ed565b60606113cf84846000856113d7565b949350505050565b6060824710156114385760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016104ed565b6001600160a01b0385163b61148f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104ed565b600080866001600160a01b031685876040516114ab9190611bd2565b60006040518083038185875af1925050503d80600081146114e8576040519150601f19603f3d011682016040523d82523d6000602084013e6114ed565b606091505b50915091506114fd828286611508565b979650505050505050565b60608315611517575081610e4a565b8251156115275782518084602001fd5b8160405162461bcd60e51b81526004016104ed919061164d565b82805461154d9061192b565b90600052602060002090601f01602090048101928261156f57600085556115b5565b82601f1061158857805160ff19168380011785556115b5565b828001600101855582156115b5579182015b828111156115b557825182559160200191906001019061159a565b506115c19291506115e6565b5090565b5080546000825560030290600052602060002090810190610c2291906115fb565b5b808211156115c157600081556001016115e7565b5b808211156115c15760008082556001820181905560028201556003016115fc565b60005b83811015611638578181015183820152602001611620565b83811115611647576000848401525b50505050565b602081526000825180602084015261166c81604085016020870161161d565b601f01601f19169190910160400192915050565b60006020828403121561169257600080fd5b5035919050565b6001600160a01b0381168114610c2257600080fd5b6000602082840312156116c057600080fd5b8135610e4a81611699565b8015158114610c2257600080fd5b6000602082840312156116eb57600080fd5b8135610e4a816116cb565b6000806040838503121561170957600080fd5b823561171481611699565b9150602083013561172481611699565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561176e5761176e61172f565b604052919050565b60008083601f84011261178857600080fd5b50813567ffffffffffffffff8111156117a057600080fd5b6020830191508360206060830285010111156117bb57600080fd5b9250929050565b60008060008060008060a087890312156117db57600080fd5b86356117e681611699565b955060208781013567ffffffffffffffff8082111561180457600080fd5b818a0191508a601f83011261181857600080fd5b81358181111561182a5761182a61172f565b61183c601f8201601f19168501611745565b8181528c8583860101111561185057600080fd5b818585018683013760009181019094015291965060408901359550606089013594506080890135918083111561188557600080fd5b505061189389828a01611776565b979a9699509497509295939492505050565b6000806000604084860312156118ba57600080fd5b833567ffffffffffffffff808211156118d257600080fd5b818601915086601f8301126118e657600080fd5b8135818111156118f557600080fd5b8760208260061b850101111561190a57600080fd5b60209283019550935050840135611920816116cb565b809150509250925092565b600181811c9082168061193f57607f821691505b6020821081141561196057634e487b7160e01b600052602260045260246000fd5b50919050565b60006020828403121561197857600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000828210156119a7576119a761197f565b500390565b600082198211156119bf576119bf61197f565b500190565b634e487b7160e01b600052600160045260246000fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082611a4a57611a4a611a25565b500690565b6000600019821415611a6357611a6361197f565b5060010190565b600060608284031215611a7c57600080fd5b6040516060810181811067ffffffffffffffff82111715611a9f57611a9f61172f565b80604052508235815260208301356020820152604083013560408201528091505092915050565b80356001600160801b0381168114611add57600080fd5b919050565b600060208284031215611af457600080fd5b610e4a82611ac6565b600067ffffffffffffffff80831681811415611b1b57611b1b61197f565b6001019392505050565b6000816000190483118215151615611b3f57611b3f61197f565b500290565b600082611b5357611b53611a25565b500490565b600060408284031215611b6a57600080fd5b6040516040810181811067ffffffffffffffff82111715611b8d57611b8d61172f565b6040528235611b9b81611699565b8152611ba960208401611ac6565b60208201529392505050565b600060208284031215611bc757600080fd5b8151610e4a816116cb565b60008251611be481846020870161161d565b919091019291505056fea26469706673582212201792795582712affa54f914d30f9df39df044eb211a3f511c743ed1a3006eb5264736f6c634300080b0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000fd4f2caf941b6d737382dce420b368de3fc7f2d400000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000065d9da4000000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000001e7061726167656e2d56657374696e6749444f20506174657820546f6b656e0000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000065db2bc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000232800000000000000000000000000000000000000000000000000000000699ee4400000000000000000000000000000000000000000000000000000000000000001
-----Decoded View---------------
Arg [0] : _vestedToken (address): 0xFD4f2Caf941B6d737382DCe420b368DE3FC7f2D4
Arg [1] : _name (string): paragen-VestingIDO Patex Token
Arg [2] : _startDateAt (uint256): 1708776000
Arg [3] : _claimableAtStart (uint256): 1000
Arg [4] : _airdroptedAtStart (bool): False
Arg [5] : _phases (tuple[]): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
-----Encoded View---------------
15 Constructor Arguments found :
Arg [0] : 000000000000000000000000fd4f2caf941b6d737382dce420b368de3fc7f2d4
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [2] : 0000000000000000000000000000000000000000000000000000000065d9da40
Arg [3] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [6] : 000000000000000000000000000000000000000000000000000000000000001e
Arg [7] : 7061726167656e2d56657374696e6749444f20506174657820546f6b656e0000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000065db2bc0
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000002328
Arg [13] : 00000000000000000000000000000000000000000000000000000000699ee440
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000001
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.