//////// Contact Adress.
////////
contract.airdropList(address _user)
return [
uint256; #Last collection time
uint256; # Total amount of airdrop
uint256; # Amount received
]
contract.investorList(address_user)
return [
uint256; #Last collection time
uint256; # Total amount of airdrop
uint256; # Amount received
]
contract.kolDonationList(address _user)
return [
uint256; #Last collection time
uint256; # Total amount of airdrop
uint256; # Amount received
]
contract.getClaimAmount(address _user, ListType _listType) # _listType: <0: Airdrop wallet; 1: Investment wallet>
return uint256 # Amount that can be claimed
contract.claimToken(ListType _listType, uint256 _amount, bytes _signature) # _listType: <0: airdrop wallet; 1: investment wallet>
contract.transferToStake(ListType _listType, uint256 _amount, bytes _signature) # _listType: <0: airdrop wallet; 1: investment wallet>
contract.poolInfo(uint8 _pid) # This _pid needs to be placed in the front-end configuration file: [{pid: 0, "pool_name": "xxx"...}]
return [
address; // Token Contract
uint256; // Amount of token in pool.
uint256; // lock time
uint256; // Unlock period (not needed for now)
uint256; //Daily reward
uint256; //Reward distribution start time
uint256; //Reward distribution end time
bool; // Whether to enable reward distribution
bool; // Whether the reward is ETH (no need to use it yet)
bool; // Whether to enable emergency extraction (no need to use it yet)
]
contract.userInfo(uint8 _pid, address _user)
return [
uint256; // Pledge amount
uint256; // Receive amount
uint256; // Pledge time
uint256; // Collection time
]
contract.pendingTokenReward(uint8 _pid, address _user)
return uint256
contract.deposit(uint8 _pid, uint256 _amount)
contract.canWithdraw(address _user, uint8 _pid, uint256 _amount)
return uint8; # <0: Available for withdrawal; 1: Frozen; 2: Insufficient balance>
contract.withdraw(uint8 _pid, uint256 _amount)
contract.harvest(uint8 _pid, address _user)
contract.tokenRewardPerSecondForPool(uint8 _pid)
return uint256;
contract.poolInfo(uint8 _pid)
return [
IERC20; // Raise tokens;
IERC20; // Token sale;
uint256; // ifo start time;
uint256; // ifo end time;
uint256; // ifo collection time;
uint256; // Minimum pledge to raise tokens;
uint256; // Maximum pledge to raise tokens;
uint256; // Total tokens raised;
uint256; //Total tokens for sale;
uint256; // Raised coins;
bool; // Whether it is excessive fundraising;
]
contract.getAddressListLength(uint8 _pid)
return uint256
contract.userInfo(uint8 _pid, address _user)
return [
uint256; //Amount raised;
uint256; //Last collection time;
bool; // Whether to receive;
]
contract.deposit(uint8 _pid, uint256 _amount, bytes _signature)
Note:
((_amount + user.amount) < pool.maxAmount and (_amount >= pool.minAmount))
If pool.isBeyond == False, it is non-over-raising mode, and the current
if (pool.isBeyond == False) { // It is non-over-funding mode
if (pool.totalAmount + _amount >= pool.raisingAmount) {
# Staking is no longer allowed
}
}
contract.isClaimed(uint8 _pid, address _user)
contract.claim(uint8 _pid)