编译器
0.8.19+commit.7dd6d404
文件 1 的 12:Address.sol
pragma solidity ^0.8.1;
library Address {
function isContract(address account) internal view returns (bool) {
return account.code.length > 0;
}
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");
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
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");
}
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);
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
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);
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
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);
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
if (returndata.length > 0) {
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
文件 2 的 12:IERC20.sol
pragma solidity ^0.8.0;
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
文件 3 的 12:IPlatformAdminPanel.sol
pragma solidity 0.8.19;
interface IPlatformAdminPanel {
function isAdmin(address wallet) external view returns (bool);
}
文件 4 的 12:IPlatformToken.sol
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;
}
文件 5 的 12:IPlatformVesting.sol
pragma solidity 0.8.19;
interface IPlatformVesting {
function amountForClaim(address wallet, uint256 timestampInSeconds) external view returns (uint256 amount);
function claim(address wallet) external;
}
文件 6 的 12:PlatformAccessController.sol
pragma solidity 0.8.19;
import "../admin_panel/PlatformAdminPanel.sol";
abstract contract PlatformAccessController {
address public _panel;
error CallerNotAdmin();
error AlreadyInitialized();
function _initiatePlatformAccessController(address adminPanel) internal {
if(address(_panel) != address(0))
revert AlreadyInitialized();
_panel = adminPanel;
}
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;
}
}
文件 7 的 12:PlatformAdminPanel.sol
pragma solidity 0.8.19;
import "./Iplatform_admin_panel/IPlatformAdminPanel.sol";
contract PlatformAdminPanel is IPlatformAdminPanel {
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");
_;
}
constructor(address rootAdminWallet) {
_setRootAdmin(rootAdminWallet);
}
function isAdmin(address wallet)
external
view
virtual
override
returns (bool)
{
return wallet == _rootAdmin || _adminMap[wallet];
}
function rootAdmin() external view returns (address) {
return _rootAdmin;
}
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);
}
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);
}
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);
}
}
文件 8 的 12:PlatformVesting.sol
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";
contract PlatformVesting is PlatformAccessController, ReentrancyGuard, IPlatformVesting {
using SafeMath for uint256;
using SafeERC20 for IERC20;
event InsertVestingList(address indexed admin, uint256 vestingCount);
event IncreaseLiquidity(
address indexed admin,
uint256 indexed vestingId,
uint256 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
);
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);
}
function vestingPropertiesList()
external
view
returns (VestingProperties[] memory vestingList)
{
uint256 count = _vestingCount;
vestingList = new VestingProperties[](count);
while (0 < count) {
--count;
vestingList[count] = _vestingMap[count];
}
}
function userPropertiesList(address wallet)
external
view
returns (UserProperties memory userProperties)
{
userProperties = _userMapping[wallet];
}
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
);
}
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);
}
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);
}
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);
}
}
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);
}
function distributeAmount(uint256 vestingId) private {
if(vestingId >= _vestingCount)
revert OutOfBounds();
VestingLink memory vl = _vestingToUser[vestingId];
if(vl.active) {
_claim(vl.user);
}
}
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;
}
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;
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
);
}
}
文件 9 的 12:ReentrancyGuard.sol
pragma solidity ^0.8.0;
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
modifier nonReentrant() {
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
_status = _ENTERED;
_;
_status = _NOT_ENTERED;
}
}
文件 10 的 12:SafeERC20.sol
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";
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));
}
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
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");
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}
文件 11 的 12:SafeMath.sol
pragma solidity ^0.8.0;
library SafeMath {
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);
}
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
文件 12 的 12:draft-IERC20Permit.sol
pragma solidity ^0.8.0;
interface IERC20Permit {
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
function nonces(address owner) external view returns (uint256);
function DOMAIN_SEPARATOR() external view returns (bytes32);
}
{
"compilationTarget": {
"contracts/platform/vesting/PlatformVesting.sol": "PlatformVesting"
},
"evmVersion": "paris",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 4000
},
"remappings": [],
"viaIR": true
}
[{"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"}]