More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 410 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim | 21114849 | 21 hrs ago | IN | 0 ETH | 0.0003566 | ||||
Claim | 21114848 | 21 hrs ago | IN | 0 ETH | 0.00034708 | ||||
Claim | 21114847 | 21 hrs ago | IN | 0 ETH | 0.00061509 | ||||
Claim | 21110221 | 36 hrs ago | IN | 0 ETH | 0.00029006 | ||||
Claim | 21100686 | 2 days ago | IN | 0 ETH | 0.0004449 | ||||
Claim | 21092656 | 3 days ago | IN | 0 ETH | 0.00045818 | ||||
Claim | 21078965 | 5 days ago | IN | 0 ETH | 0.00173591 | ||||
Claim | 21072287 | 6 days ago | IN | 0 ETH | 0.00113502 | ||||
Claim | 21065682 | 7 days ago | IN | 0 ETH | 0.00174633 | ||||
Claim | 21062734 | 8 days ago | IN | 0 ETH | 0.00055555 | ||||
Claim | 21052043 | 9 days ago | IN | 0 ETH | 0.00043106 | ||||
Claim | 21040460 | 11 days ago | IN | 0 ETH | 0.00035793 | ||||
Claim | 21024584 | 13 days ago | IN | 0 ETH | 0.00092584 | ||||
Claim | 20992654 | 17 days ago | IN | 0 ETH | 0.00146262 | ||||
Claim | 20971116 | 20 days ago | IN | 0 ETH | 0.00209811 | ||||
Claim | 20957919 | 22 days ago | IN | 0 ETH | 0.00124179 | ||||
Claim | 20950704 | 23 days ago | IN | 0 ETH | 0.00221994 | ||||
Claim | 20944300 | 24 days ago | IN | 0 ETH | 0.00105489 | ||||
Claim | 20935088 | 25 days ago | IN | 0 ETH | 0.00134597 | ||||
Claim | 20927990 | 26 days ago | IN | 0 ETH | 0.00132654 | ||||
Claim | 20920911 | 27 days ago | IN | 0 ETH | 0.00181111 | ||||
Claim | 20913693 | 28 days ago | IN | 0 ETH | 0.00591441 | ||||
Claim | 20892054 | 31 days ago | IN | 0 ETH | 0.00051625 | ||||
Claim | 20884888 | 32 days ago | IN | 0 ETH | 0.00081984 | ||||
Claim | 20870670 | 34 days ago | IN | 0 ETH | 0.00211536 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x955866b5...5654414da The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
PlatformVesting
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 4000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; import "../access_controller/PlatformAccessController.sol"; import "../token/IplatformToken/IPlatformToken.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import { SafeMath } from "@openzeppelin/contracts/utils/math/SafeMath.sol"; import {SafeERC20, IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./IPlatformVesting/IPlatformVesting.sol"; /** * @notice Separate vesting pool, each with separate liquidity, whitelists and parameters */ contract PlatformVesting is PlatformAccessController, ReentrancyGuard, IPlatformVesting { using SafeMath for uint256; using SafeERC20 for IERC20; event InsertVestingList(address indexed admin, uint256 vestingCount); /** * @notice Emit during vesting vesting liquidity increasing * Liquidity of the vesting decreases * @param admin Platform admin which do this action * @param vestingId The vesting id * @param amount The PROPC token amount which add to vesting free amount */ event IncreaseLiquidity( address indexed admin, uint256 indexed vestingId, uint256 amount ); /** * @notice Emit during vesting vesting liquidity decreasing process * Liquidity of the vesting increases * @param admin Platform admin which do this action * @param amount The PROPC token amount which rem from vesting free amount */ event DecreaseLiquidity( address indexed admin, uint256 amount ); event InsertWalletListToVesting( address indexed admin, uint256 indexed vestingId, address[] walletList ); event RemoveWalletListFromVesting( address indexed admin, uint256 indexed vestingId, address[] walletList ); event TGESet( uint256 tgeDate, uint256 timestamp ); event UpdateTokenAddress( address _address, uint256 timestamp ); event VestingRemoved( uint256 id, uint256 timestamp ); event VestingAdded( uint256 amountForUser, uint256 tgeAmountForUser, uint256 startTime, uint256 tickCount, uint256 tickDuration, uint256 timestamp ); /** * @notice Emit when user claim his PROPC from vesting * @param vestingId The vesting id * @param wallet The user wallet * @param amount The PROPC token amount which user save */ event Claim( uint256 indexed vestingId, address indexed wallet, uint256 amount ); struct VestingProperties { uint256 amountForUser; uint256 tgeAmountForUser; uint256 startTime; uint256 tickCount; uint256 tickDuration; uint256 unallocatedAmount; bool active; } struct UserProperties { bool isActive; uint256 spentAmount; uint256 vestingId; bool tgeClaimed; } error InsufficientBalance(); error InvalidTimestamp(); error ZeroAddress(); error ZeroAmount(); error OutOfBounds(); error EmptyArray(); error ArraySizeDoesNotMatch(); error VestingDoesNotExist(); error UserAlreadyActive(); error UserNotActive(); error NoClaimAvailable(); error VestingAlreadyActive(); error StartBeforeNow(); error StartBeforeTGE(); error TicksMissing(); error FatalError(string message); struct VestingLink { address user; bool active; } uint256 private constant TOTAL_SHARE = 100_000; uint256 public tgeStartDate; address private _token; uint256 public _vestingCount; uint256 public totalRemainingAllocatedAmount; mapping(uint256 => VestingProperties) private _vestingMap; mapping(uint256 => VestingLink) private _vestingToUser; mapping(address => UserProperties) private _userMapping; modifier existingVesting(uint256 vestingId) { require(vestingId <= _vestingCount, "vesting does not exist"); _; } constructor(address adminPanel) { if(adminPanel == address(0)) revert ZeroAddress(); _initiatePlatformAccessController(adminPanel); } function setTgeDate(uint256 timestamp) external onlyPlatformAdmin { if(timestamp < block.timestamp) revert InvalidTimestamp(); tgeStartDate = timestamp; emit TGESet(timestamp, block.timestamp); } function updateTokenAddress(address token) external onlyPlatformAdmin { if(token == address(0)) revert ZeroAddress(); _token = token; emit UpdateTokenAddress(token, block.timestamp); } /** * @notice Get vesting pool properties list * vesting.amountForUser Total PROPC amount which user can claim * vesting.tgeAmountForUser PROPC amount which user can claim immediately after the `tgeStartDate` * vesting.startTime The moment after that users can start claiming tick by tick * vesting.tickCount The number of ticks that must pass to fully unlock funds * Each tick unlocks a proportional amount * vesting.tickDuration Tick duration on seconds * vesting.unallocatedAmount PROPC that has not yet been assigned to any users * Grows when users are deleted and liquidity is increased by the admin * Falls when users are deleted and the liquidity is reduced by the admin */ function vestingPropertiesList() external view returns (VestingProperties[] memory vestingList) { uint256 count = _vestingCount; vestingList = new VestingProperties[](count); while (0 < count) { --count; vestingList[count] = _vestingMap[count]; } } /** * @notice Get properties list for the user * @param wallet User wallet * user.isActive Indicates whether the user is on the whitelist or not * Admin can add or remove users. * user.spentAmount Amount that was branded by the user or seized as staking fee */ function userPropertiesList(address wallet) external view returns (UserProperties memory userProperties) { userProperties = _userMapping[wallet]; } /** * @notice Get possible claim amount for user list for vesting pool * @param wallet User wallet * @param timestampInSeconds Time at which they plan to make claim */ function amountForClaim(address wallet, uint256 timestampInSeconds) external view returns (uint256 amount) { UserProperties storage user = _userMapping[wallet]; VestingProperties storage vesting = _vestingMap[user.vestingId]; amount = _amountForClaim( vesting, user, timestampInSeconds ); } /** * @notice Only platform admin can do * If 0 < vesting.unallocatedAmount amount will be transfer from sender wallet */ function insertVestingList( VestingProperties[] calldata vestingList ) external onlyPlatformAdmin { uint256 count = _vestingCount; if(vestingList.length == 0) revert EmptyArray(); uint256 liquidity; uint256 index = vestingList.length; while (0 < index) { --index; liquidity += _setVesting(count + index, vestingList[index]); } _vestingCount += vestingList.length; if (liquidity > 0) { totalRemainingAllocatedAmount += liquidity; emit InsertVestingList(msgSender(), vestingList.length); } } function removeVesting(uint256 vestingId) external onlyPlatformAdmin { if(vestingId >= _vestingCount) revert OutOfBounds(); VestingProperties storage vp = _vestingMap[vestingId]; VestingLink storage vl = _vestingToUser[vestingId]; UserProperties storage up = _userMapping[vl.user]; if(!vp.active) revert VestingDoesNotExist(); if(vp.amountForUser < up.spentAmount) revert FatalError("user exceeded maximum spending amount"); uint256 remainingPayoutAmount = vp.amountForUser - up.spentAmount; if(totalRemainingAllocatedAmount < remainingPayoutAmount) revert FatalError("less balance than allocated amount"); totalRemainingAllocatedAmount -= remainingPayoutAmount; delete _userMapping[vl.user]; delete _vestingMap[vestingId]; delete _vestingToUser[vestingId]; emit VestingRemoved(vestingId, block.timestamp); } /** * @notice Only platform admin can do * @param vestingId Target vesting pool id * @param amount Target additional liquidity amount * Amount will be transfer from sender wallet */ function increaseLiquidity( uint256 vestingId, uint256 amount, uint256 validAfter, uint256 validBefore, bytes32 nonce, uint8 v, bytes32 r, bytes32 s ) external onlyPlatformAdmin existingVesting(vestingId) nonReentrant { if(amount == 0) revert ZeroAmount(); VestingProperties storage vesting = _vestingMap[vestingId]; address admin = msgSender(); IPlatformToken(_token).specialTransferFrom( admin, amount, validAfter, validBefore, nonce, v, r, s ); vesting.unallocatedAmount += amount; emit IncreaseLiquidity(admin, vestingId, amount); } /** * @notice Only platform admin can do * @param amount Target removal liquidity amount * Amount will be transfer to sender wallet */ function decreaseLiquidity(uint256 amount) external onlyPlatformAdmin { if(amount == 0) revert ZeroAmount(); uint256 availableSenderBalance = IERC20(_token).balanceOf(address(this)); if(amount > availableSenderBalance) revert InsufficientBalance(); if(totalRemainingAllocatedAmount > availableSenderBalance) revert FatalError("balance less than allocated amount"); uint256 availableBalance = availableSenderBalance - totalRemainingAllocatedAmount; if(amount > availableBalance) revert InsufficientBalance(); address admin = msgSender(); IERC20(_token).safeTransfer(admin, amount); emit DecreaseLiquidity(admin, amount); } function insertWalletListToVesting( uint256[] calldata vestingIdList, address[] calldata walletList ) external onlyPlatformAdmin { if(walletList.length != vestingIdList.length) revert ArraySizeDoesNotMatch(); if(walletList.length == 0) revert EmptyArray(); uint256 decrease; uint256 index = walletList.length; while (0 < index) { --index; uint256 vestingId = vestingIdList[index]; if(vestingId >= _vestingCount) revert VestingDoesNotExist(); VestingProperties storage vesting = _vestingMap[vestingId]; uint256 amountForUser = vesting.amountForUser; address wallet = walletList[index]; UserProperties storage user = _userMapping[wallet]; if(user.isActive) revert UserAlreadyActive(); user.isActive = true; user.vestingId = vestingId; VestingLink storage vl = _vestingToUser[vestingId]; if(vl.active) revert VestingAlreadyActive(); vl.user = wallet; vl.active = true; decrease = amountForUser - user.spentAmount; uint256 oldUnallocatedAmount = vesting.unallocatedAmount; if(decrease > oldUnallocatedAmount) revert InsufficientBalance(); vesting.unallocatedAmount = oldUnallocatedAmount - decrease; emit InsertWalletListToVesting(msgSender(), vestingId, walletList); } } function removeWalletListFromVesting( address[] calldata walletList ) external onlyPlatformAdmin { if(walletList.length == 0) revert EmptyArray(); uint256 increasing; uint256 index = walletList.length; while (0 < index) { --index; address wallet = walletList[index]; UserProperties storage user = _userMapping[wallet]; uint256 vestingId = user.vestingId; VestingProperties storage vesting = _vestingMap[vestingId]; uint256 amountForUser = vesting.amountForUser; if(!user.isActive) revert UserNotActive(); user.isActive = false; VestingLink storage vl = _vestingToUser[vestingId]; vl.user = address(0); vl.active = false; increasing = amountForUser - user.spentAmount; vesting.unallocatedAmount += increasing; emit RemoveWalletListFromVesting(msgSender(), vestingId, walletList); } } /** * @notice Claim possible for user amount from the pool * If possible amounts equal to zero will revert * @param wallet User wallet */ function claim(address wallet) external { _claim(wallet); } function _claim(address wallet) private { UserProperties storage user = _userMapping[wallet]; VestingProperties storage vesting = _vestingMap[user.vestingId]; uint256 claimAmount = _amountForClaim(vesting, user, block.timestamp); if(claimAmount == 0) revert NoClaimAvailable(); user.spentAmount += claimAmount; uint256 vestingId = user.vestingId; totalRemainingAllocatedAmount -= claimAmount; IERC20(_token).safeTransfer(wallet, claimAmount); emit Claim(vestingId, wallet, claimAmount); } /** * @notice allows to individually send the TGE amount to a participant */ function distributeAmount(uint256 vestingId) private { if(vestingId >= _vestingCount) revert OutOfBounds(); VestingLink memory vl = _vestingToUser[vestingId]; if(vl.active) { _claim(vl.user); } } /** * @notice allows to airdrop currently available amounts to all vesting wallets * @param batchSize the number of people being airdropped in this call * @param offset the offset to select the correct batch */ function airdrop(uint256 batchSize, uint256 offset) external onlyPlatformAdmin { if(offset > _vestingCount) revert OutOfBounds(); uint256 index = _vestingCount - offset; while (0 < index) { --index; if(batchSize == 0) return; distributeAmount(index); batchSize--; } } function _share( uint256 amount, uint256 share, uint256 total ) private pure returns (uint256) { return (amount * share) / total; } /** * @notice Returns the total amount claimable until the nowPoint point in time * @param vesting schedule to calculate amount for * @param user to retrieve the already spent amount * @param nowTime point in time to check for */ function _amountForClaim( VestingProperties storage vesting, UserProperties storage user, uint256 nowTime ) private view returns (uint256) { uint256 startTime = vesting.startTime; if (!user.isActive) { return 0; } if (nowTime < tgeStartDate) { return 0; } else if (nowTime >= tgeStartDate && nowTime < startTime) { return vesting.tgeAmountForUser - user.spentAmount; } uint256 tickCount = vesting.tickCount; uint256 tick = (nowTime - startTime) / vesting.tickDuration + 1; // at start time, the first tick is available uint256 amount = vesting.tgeAmountForUser; uint256 rest = vesting.amountForUser - amount; if (tick < tickCount) { uint256 share = _share(TOTAL_SHARE, tick, tickCount); amount += _share(rest, share, TOTAL_SHARE); } else { amount += rest; } uint256 alreadyClaimed = user.spentAmount; if (amount <= alreadyClaimed) { return 0; } return amount - alreadyClaimed; } function _setVesting(uint256 vestingId, VestingProperties calldata setting) private returns (uint256 liquidity) { if(setting.tgeAmountForUser > setting.amountForUser) revert FatalError("tge amount greater than total amount"); if(setting.startTime <= block.timestamp) revert StartBeforeNow(); if(setting.startTime < tgeStartDate) revert StartBeforeTGE(); if (setting.tgeAmountForUser < setting.amountForUser) { if(0 == setting.tickCount || setting.tickDuration == 0) revert TicksMissing(); } _vestingMap[vestingId] = setting; liquidity = setting.unallocatedAmount; emit VestingAdded( setting.amountForUser, setting.tgeAmountForUser, setting.startTime, setting.tickCount, setting.tickDuration, block.timestamp ); } }
// 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/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.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 (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 (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); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; import "../admin_panel/PlatformAdminPanel.sol"; /** * @title Abstract contract from which platform contracts with admin function are inherited * @dev Contains the platform admin panel * Contains modifier that checks whether sender is platform admin, use platform admin panel */ abstract contract PlatformAccessController { address public _panel; error CallerNotAdmin(); error AlreadyInitialized(); function _initiatePlatformAccessController(address adminPanel) internal { if(address(_panel) != address(0)) revert AlreadyInitialized(); _panel = adminPanel; } /** * @dev Modifier that makes function available for platform admins only */ modifier onlyPlatformAdmin() { if(!PlatformAdminPanel(_panel).isAdmin(msgSender())) revert CallerNotAdmin(); _; } function _isAdmin() internal view returns (bool) { return PlatformAdminPanel(_panel).isAdmin(msgSender()); } function msgSender() internal view virtual returns (address) { return msg.sender; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; interface IPlatformAdminPanel { function isAdmin(address wallet) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; import "./Iplatform_admin_panel/IPlatformAdminPanel.sol"; /** * @title Platform admins holder contract * @notice Used to check accessibility of senders to admin functions in platform contracts */ contract PlatformAdminPanel is IPlatformAdminPanel { /** * @notice Emit during root admin set and reset */ event SetRootAdmin(address indexed wallet); event InsertAdminList(address[] adminList); event RemoveAdminList(address[] adminList); mapping(address => bool) private _adminMap; address private _rootAdmin; modifier onlyRootAdmin() { require(_rootAdmin == msg.sender, "sender is not root admin"); _; } /** * @notice Specify the root admin, only he has the rights to add and remove admins */ constructor(address rootAdminWallet) { _setRootAdmin(rootAdminWallet); } /** * @notice Needed to determine if the user has admin rights for platform contracts */ function isAdmin(address wallet) external view virtual override returns (bool) { return wallet == _rootAdmin || _adminMap[wallet]; } function rootAdmin() external view returns (address) { return _rootAdmin; } /** * @notice Only root admin can call */ function insertAdminList(address[] calldata adminList) external onlyRootAdmin { require(0 < adminList.length, "empty admin list"); uint256 index = adminList.length; while (0 < index) { --index; _adminMap[adminList[index]] = true; } emit InsertAdminList(adminList); } /** * @notice Only root admin can call */ function removeAdminList(address[] calldata adminList) external onlyRootAdmin { require(0 < adminList.length, "empty admin list"); uint256 index = adminList.length; while (0 < index) { --index; _adminMap[adminList[index]] = false; } emit RemoveAdminList(adminList); } /** * @notice Only root admin can call */ function setRootAdmin(address rootAdminWallet) external onlyRootAdmin { _setRootAdmin(rootAdminWallet); } function _setRootAdmin(address wallet) private { require(wallet != address(0), "wallet is zero address"); _rootAdmin = wallet; emit SetRootAdmin(wallet); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; interface IPlatformToken { function specialTransferFrom( address from, uint256 value, uint256 validAfter, uint256 validBefore, bytes32 nonce, uint8 v, bytes32 r, bytes32 s ) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; interface IPlatformVesting { function amountForClaim(address wallet, uint256 timestampInSeconds) external view returns (uint256 amount); function claim(address wallet) external; }
{ "optimizer": { "enabled": true, "runs": 4000 }, "viaIR": true, "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":"adminPanel","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"ArraySizeDoesNotMatch","type":"error"},{"inputs":[],"name":"CallerNotAdmin","type":"error"},{"inputs":[],"name":"EmptyArray","type":"error"},{"inputs":[{"internalType":"string","name":"message","type":"string"}],"name":"FatalError","type":"error"},{"inputs":[],"name":"InsufficientBalance","type":"error"},{"inputs":[],"name":"InvalidTimestamp","type":"error"},{"inputs":[],"name":"NoClaimAvailable","type":"error"},{"inputs":[],"name":"OutOfBounds","type":"error"},{"inputs":[],"name":"StartBeforeNow","type":"error"},{"inputs":[],"name":"StartBeforeTGE","type":"error"},{"inputs":[],"name":"TicksMissing","type":"error"},{"inputs":[],"name":"UserAlreadyActive","type":"error"},{"inputs":[],"name":"UserNotActive","type":"error"},{"inputs":[],"name":"VestingAlreadyActive","type":"error"},{"inputs":[],"name":"VestingDoesNotExist","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"inputs":[],"name":"ZeroAmount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"vestingId","type":"uint256"},{"indexed":true,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"admin","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"DecreaseLiquidity","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"admin","type":"address"},{"indexed":true,"internalType":"uint256","name":"vestingId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"IncreaseLiquidity","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"admin","type":"address"},{"indexed":false,"internalType":"uint256","name":"vestingCount","type":"uint256"}],"name":"InsertVestingList","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"admin","type":"address"},{"indexed":true,"internalType":"uint256","name":"vestingId","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"walletList","type":"address[]"}],"name":"InsertWalletListToVesting","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"admin","type":"address"},{"indexed":true,"internalType":"uint256","name":"vestingId","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"walletList","type":"address[]"}],"name":"RemoveWalletListFromVesting","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tgeDate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"TGESet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_address","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"UpdateTokenAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amountForUser","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tgeAmountForUser","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tickCount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tickDuration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"VestingAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"VestingRemoved","type":"event"},{"inputs":[],"name":"_panel","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_vestingCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"batchSize","type":"uint256"},{"internalType":"uint256","name":"offset","type":"uint256"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"uint256","name":"timestampInSeconds","type":"uint256"}],"name":"amountForClaim","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"decreaseLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"vestingId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"validAfter","type":"uint256"},{"internalType":"uint256","name":"validBefore","type":"uint256"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"increaseLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"amountForUser","type":"uint256"},{"internalType":"uint256","name":"tgeAmountForUser","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"tickCount","type":"uint256"},{"internalType":"uint256","name":"tickDuration","type":"uint256"},{"internalType":"uint256","name":"unallocatedAmount","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"}],"internalType":"struct PlatformVesting.VestingProperties[]","name":"vestingList","type":"tuple[]"}],"name":"insertVestingList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"vestingIdList","type":"uint256[]"},{"internalType":"address[]","name":"walletList","type":"address[]"}],"name":"insertWalletListToVesting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"vestingId","type":"uint256"}],"name":"removeVesting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"walletList","type":"address[]"}],"name":"removeWalletListFromVesting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"setTgeDate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tgeStartDate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalRemainingAllocatedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"updateTokenAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"userPropertiesList","outputs":[{"components":[{"internalType":"bool","name":"isActive","type":"bool"},{"internalType":"uint256","name":"spentAmount","type":"uint256"},{"internalType":"uint256","name":"vestingId","type":"uint256"},{"internalType":"bool","name":"tgeClaimed","type":"bool"}],"internalType":"struct PlatformVesting.UserProperties","name":"userProperties","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vestingPropertiesList","outputs":[{"components":[{"internalType":"uint256","name":"amountForUser","type":"uint256"},{"internalType":"uint256","name":"tgeAmountForUser","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"tickCount","type":"uint256"},{"internalType":"uint256","name":"tickDuration","type":"uint256"},{"internalType":"uint256","name":"unallocatedAmount","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"}],"internalType":"struct PlatformVesting.VestingProperties[]","name":"vestingList","type":"tuple[]"}],"stateMutability":"view","type":"function"}]
Deployed Bytecode
0x608080604052600436101561001357600080fd5b600090813560e01c9081630c3d2234146113eb57508063197fd526146111835780631bcde4ec14610ec05780631e83409a14610e9e5780632f5db57314610df4578063439c0e2514610bc75780635ab3b187146107e05780636691461a146106c45780636f243a9c1461063c5780638b4db06b146106165780638eddb685146105f8578063bbc51167146105da578063c15581a2146103fd578063d6b34756146103ab578063dc2daffe14610218578063fec9b786146101fa5763fed0e15a146100dc57600080fd5b346101f75760206003193601126101f757600435602460206001600160a01b0384541660405192838092630935e01b60e21b82523360048301525afa9081156101ec5783916101be575b50156101945742811061016a576040817fb5c71dffa213a10e8995d2b78f392c8b7960faafffd2b1055327bf96955fddd0926002558151908152426020820152a180f35b60046040517fb7d09497000000000000000000000000000000000000000000000000000000008152fd5b60046040517f06d919f2000000000000000000000000000000000000000000000000000000008152fd5b6101df915060203d81116101e5575b6101d781836116eb565b81019061170e565b38610126565b503d6101cd565b6040513d85823e3d90fd5b80fd5b50346101f757806003193601126101f7576020600554604051908152f35b50346101f757806003193601126101f7576004549061023682611726565b9161024460405193846116eb565b80835280601f1961025482611726565b01835b8181106103655750505b6102e357509060405190602080830190808452825180925280604085019301945b82811061028f5784840385f35b855180518552808301518584015260408082015190860152606080820151908601526080808201519086015260a0808201519086015260c0908101511515908501529481019460e090930192600101610282565b6102ec9061173e565b808252600660ff602091808352604085206040519361030a856116cf565b81548552600182015490850152600281015460408501526003810154606085015260048101546080850152600581015460a0850152015416151560c0820152610353828561177f565b528061035f818561177f565b50610261565b6020919250604051610376816116cf565b8581528286818301528660408301528660608301528660808301528660a08301528660c0830152828801015201908291610257565b50346101f75760406003193601126101f7576103f56020916001600160a01b036103d3611687565b1681526008835260408120600281015482526006845260406024359220611cb0565b604051908152f35b50346101f7576020806003193601126105d65760043567ffffffffffffffff81116105d257610430903690600401611651565b916001600160a01b036024828287541660405192838092630935e01b60e21b82523360048301525afa9081156105c75786916105aa575b50156101945783156105805783805b61047e578580f35b6104879061173e565b8161049b610496838888611a3d565b611a4d565b1686526008835260408620600281015480885260068552604088208054835460ff8116156105565761051061051a926001889760408f60078e60ff196005991685558b835252207fffffffffffffffffffffff00000000000000000000000000000000000000000081541690550154906117b6565b92019182546117a9565b90556040517feb676f4af31f3b27b141bb7b8896ce4d5b494f5bc63fbd1d93c8ba9392843f8233918061054e8b8b83611a61565b0390a3610476565b60046040517f3613fe95000000000000000000000000000000000000000000000000000000008152fd5b60046040517f521299a9000000000000000000000000000000000000000000000000000000008152fd5b6105c19150833d85116101e5576101d781836116eb565b38610467565b6040513d88823e3d90fd5b8280fd5b5080fd5b50346101f757806003193601126101f7576020600254604051908152f35b50346101f757806003193601126101f7576020600454604051908152f35b50346101f757806003193601126101f7576001600160a01b036020915416604051908152f35b50346101f75760406003193601126101f757602460206001600160a01b0383541660405192838092630935e01b60e21b82523360048301525afa9081156106b957829161069b575b501561019457610698602435600435611b77565b80f35b6106b3915060203d81116101e5576101d781836116eb565b38610684565b6040513d84823e3d90fd5b50346101f75760206003193601126101f7576106de611687565b6001600160a01b03602460208285541660405192838092630935e01b60e21b82523360048301525afa9081156107d55784916107b7575b5015610194578116801561078d57600380547fffffffffffffffffffffffff000000000000000000000000000000000000000016919091179055604080516001600160a01b039290921682524260208301527fc858f401f5af1ee609eff66a5255c0ecfac873a2e524f615e680870cf5bdef9191a180f35b60046040517fd92e233d000000000000000000000000000000000000000000000000000000008152fd5b6107cf915060203d81116101e5576101d781836116eb565b38610715565b6040513d86823e3d90fd5b50346101f75760206003193601126101f75767ffffffffffffffff80600435116105d6573660236004350112156105d65760043560040135116101f75736602460e060043560040135026004350101116101f757602460206001600160a01b0383541660405192838092630935e01b60e21b82523360048301525afa9081156106b9578291610ba8575b5015610194576004546004356004013515610580578160043560040135805b6108f15783826108a1600435600401356004546117a9565b600455806108ad575080f35b6108b9906005546117a9565b6005556040516004356004013581527f03f1cf0432f392a44fc2feff678eecfd8b22680f25d67f1928a4b03a135d886860203392a280f35b6108fa9061173e565b9061090582846117a9565b9060043560040135831015610b945760449160043560e085020160248101359084013511610b115742606460e086026004350101351115610ae757600254606460e0860260043501013510610abd5760043560e085020160248101359084013510610a67575b855260066020819052604086206004803560e0870201602481013583558086013560018401556064810135600284015560848101356003840181905560a482013592840183905560c482013560058501819055909660e4909201358015159691959194919391929190879003610a63578897610a5d977f4652a0e0ca5f82f97b61505bfcf0b4f05e0e56e2ac070f8757d47a3a6316b99a9560c095019060ff60ff19835416911617905560405192602460e08b02600435010135845260e08a026004350101356020840152606460e08a026004350101356040840152606083015260808201524260a0820152a16117a9565b91610889565b8a80fd5b608460e08502600435010135158015610aaa575b1561096b5760046040517f0999bbb8000000000000000000000000000000000000000000000000000000008152fd5b5060a460e0850260043501013515610a7b565b60046040517fd63e362f000000000000000000000000000000000000000000000000000000008152fd5b60046040517f7d13b789000000000000000000000000000000000000000000000000000000008152fd5b6084837f74676520616d6f756e742067726561746572207468616e20746f74616c20616d604051917f91ab676e000000000000000000000000000000000000000000000000000000008352602060048401526024808401528201527f6f756e74000000000000000000000000000000000000000000000000000000006064820152fd5b602485634e487b7160e01b81526032600452fd5b610bc1915060203d6020116101e5576101d781836116eb565b3861086a565b50346101f7576020806003193601126105d657600435906001600160a01b036024828286541660405192838092630935e01b60e21b82523360048301525afa908115610da2578591610dd7575b5015610194578215610dad5760035416906040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201528181602481865afa908115610da2578591610d71575b50808411610cc35760055490808211610ced5790610c84916117b6565b8311610cc357610cb7837fb095325de2f262bc60b8be386a4b25d689b97c5f70f84baed18cb6548d4f17929333906117c3565b6040519283523392a280f35b60046040517ff4d678b8000000000000000000000000000000000000000000000000000000008152fd5b608483604051907f91ab676e0000000000000000000000000000000000000000000000000000000082526004820152602260248201527f62616c616e6365206c657373207468616e20616c6c6f636174656420616d6f7560448201527f6e740000000000000000000000000000000000000000000000000000000000006064820152fd5b90508181813d8311610d9b575b610d8881836116eb565b81010312610d97575138610c67565b8480fd5b503d610d7e565b6040513d87823e3d90fd5b60046040517f1f2a2005000000000000000000000000000000000000000000000000000000008152fd5b610dee9150833d85116101e5576101d781836116eb565b38610c14565b50346101f75760206003193601126101f75760406080916001600160a01b03610e1b611687565b8260608551610e298161169d565b82815282602082015282878201520152168152600860205220604051610e4e8161169d565b60ff825416151591828252600181015460208301908152606060ff600360028501549460408701958652015416930192151583526040519384525160208401525160408301525115156060820152f35b50346101f75760206003193601126101f757610698610ebb611687565b611ab1565b50346101f7576020806003193601126105d657600435906001600160a01b036024828286541660405192838092630935e01b60e21b82523360048301525afa908115610da2578591611166575b50156101945760045483101561113c57828452600682526040842060078352604085209082825416865260088452604086209060ff6006820154161561111257600190549101549081811061108e5790610f66916117b6565b60055481811061100a5791610fa17f4e128ab27722471b3dff3ee854997f7c3a669cd62bc5ebdac7332a1e812827dd969492604096946117b6565b6005555416855260088152846003848220828155826001820155826002820155015581855260068152846006848220828155826001820155826002820155826003820155826004820155826005820155015560078152848381205582519182524290820152a180f35b608485604051907f91ab676e0000000000000000000000000000000000000000000000000000000082526004820152602260248201527f6c6573732062616c616e6365207468616e20616c6c6f636174656420616d6f7560448201527f6e740000000000000000000000000000000000000000000000000000000000006064820152fd5b608485604051907f91ab676e0000000000000000000000000000000000000000000000000000000082526004820152602560248201527f75736572206578636565646564206d6178696d756d207370656e64696e67206160448201527f6d6f756e740000000000000000000000000000000000000000000000000000006064820152fd5b60046040517f57fd8e07000000000000000000000000000000000000000000000000000000008152fd5b60046040517fb4120f14000000000000000000000000000000000000000000000000000000008152fd5b61117d9150833d85116101e5576101d781836116eb565b38610f0d565b50346101f7576101006003193601126101f757600435602480359060a43560ff8116809103610d97576001600160a01b039081865416926040518094630935e01b60e21b8252336004830152818360209788935afa9081156113e05788916113c3575b50156101945760045486116113805760026001541461133d5760026001558415610dad57869186835260068552604083209360035416803b1561133957610104849260405195869384927f71149d3d0000000000000000000000000000000000000000000000000000000084523360048501528b8885015260443560448501526064356064850152608435608485015260a484015260c43560c484015260e43560e48401525af1801561132e576112dd575b50509060057fb87f8ae168b8a9d78f7727bb31fb15e87d01f278c09e6fac23924474be67a22b92016112cb8482546117a9565b90556040519283523392a36001805580f35b67ffffffffffffffff829793971161131c57506040529360057fb87f8ae168b8a9d78f7727bb31fb15e87d01f278c09e6fac23924474be67a22b611298565b82634e487b7160e01b81526041600452fd5b6040513d89823e3d90fd5b8380fd5b83601f6064926040519262461bcd60e51b845260048401528201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152fd5b8360166064926040519262461bcd60e51b845260048401528201527f76657374696e6720646f6573206e6f74206578697374000000000000000000006044820152fd5b6113da9150853d87116101e5576101d781836116eb565b386111e6565b6040513d8a823e3d90fd5b9050346105d65760406003193601126105d65767ffffffffffffffff9060043582811161133957611420903690600401611651565b9092602435908111610d975761143a903690600401611651565b929093816001600160a01b03875416630935e01b60e21b825233600483015281602460209586935afa90811561132e578791611634575b50156101945782840361160a5783156105805783805b61148f578680f35b6114989061173e565b906114a4828583611a3d565b356004548110156111125780885260068452604088209081546001600160a01b036114d3610496878b8d611a3d565b16808b526008875260408b2091825460ff81166115e05760ff1990600191829116178455846002850155848d526007895260408d209384549460ff8660a01c166115b65774010000000000000000000000000000000000000000611562957fffffffffffffffffffffff00000000000000000000000000000000000000000060059816171790550154906117b6565b92018054808411610cc3578593611578916117b6565b90556040517f5bddf714d8082cf3e69c60e5a7ae8b8eaab48d975b85a82352bf903cff46727e3391806115ac8b8d83611a61565b0390a39091611487565b60046040517f383889b9000000000000000000000000000000000000000000000000000000008152fd5b60046040517fac8da943000000000000000000000000000000000000000000000000000000008152fd5b60046040517fb05754a8000000000000000000000000000000000000000000000000000000008152fd5b61164b9150833d85116101e5576101d781836116eb565b38611471565b9181601f840112156116825782359167ffffffffffffffff8311611682576020808501948460051b01011161168257565b600080fd5b600435906001600160a01b038216820361168257565b6080810190811067ffffffffffffffff8211176116b957604052565b634e487b7160e01b600052604160045260246000fd5b60e0810190811067ffffffffffffffff8211176116b957604052565b90601f601f19910116810190811067ffffffffffffffff8211176116b957604052565b90816020910312611682575180151581036116825790565b67ffffffffffffffff81116116b95760051b60200190565b8015611769577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b634e487b7160e01b600052601160045260246000fd5b80518210156117935760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b9190820180921161176957565b9190820391821161176957565b9291906040908151946001600160a01b0386611821602096878301957fa9059cbb00000000000000000000000000000000000000000000000000000000875260248401602090939291936001600160a01b0360408201951681520152565b0391611835601f19938481018a52896116eb565b16908351928484019767ffffffffffffffff988581108a8211176116b95786528685527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656487860152833b1561198257600093849283809351925af1903d1561196f573d97881161195b578596976118b986976118c7975193601f84011601836116eb565b81528092873d92013e6119c5565b805190816118d6575b50505050565b83806118e693830101910161170e565b156118f25780806118d0565b60849250519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b602483634e487b7160e01b81526041600452fd5b5090506118c792939495506060906119c5565b60648787519062461bcd60e51b82526004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b909190156119d1575090565b8151156119e15750805190602001fd5b6040519062461bcd60e51b825281602080600483015282519283602484015260005b848110611a2657505050601f19601f836000604480968601015201168101030190fd5b818101830151868201604401528593508201611a03565b91908110156117935760051b0190565b356001600160a01b03811681036116825790565b9091604060209282848201858352520192916000805b838210611a8657505050505090565b909192939485356001600160a01b0381168091036105d2578152830194830193929160010190611a77565b6001600160a01b0380821691826000526008602052604060002090600282015492836000526006602052611aeb6040600020844291611cb0565b908115611b4d5781602093611b449260017f3ed1528b0fdc7c5207c1bf935e34a667e13656b9ed165260c522be0bc544f3039701611b2a8482546117a9565b9055611b38836005546117b6565b600555600354166117c3565b604051908152a3565b60046040517fe2b4783f000000000000000000000000000000000000000000000000000000008152fd5b6004918254808211611c675790611b8d916117b6565b805b611b9857505050565b611ba19061173e565b908015611c62578254821015611c39576000828152602060078152604091828120908351938085019185831067ffffffffffffffff841117611c2657509186959391611c11959352549160ff6001600160a01b0384169384835260a01c1615159182910152611c17575b5061173e565b91611b8f565b611c2090611ab1565b38611c0b565b8060418a634e487b7160e01b6024945252fd5b826040517fb4120f14000000000000000000000000000000000000000000000000000000008152fd5b505050565b836040517fb4120f14000000000000000000000000000000000000000000000000000000008152fd5b8115611c9a570490565b634e487b7160e01b600052601260045260246000fd5b919091600281015460ff84541615611da157600254831015611cd55750505050600090565b808310611d8b57611cee611cf9916003840154946117b6565b600483015490611c90565b906001820180921161176957611d1560018201548092546117b6565b9183811015611d7657620186a093818502918583040361176957611d3891611c90565b9182810292818404149015171561176957600192611d579204906117a9565b915b015480821115611d6f57611d6c916117b6565b90565b5050600090565b506001925090611d85916117a9565b91611d59565b50611d6c929150600180910154910154906117b6565b5050505060009056fea26469706673582212200cb56081eeed6e5ae1d0af17548788aa1c52366b354573ce5be9a18eb942e09464736f6c63430008130033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.977387 | 328,659.4787 | $321,227.57 |
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.