vesting-pachacuy 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +141 -0
- package/dist/abi/vestingAbi.d.ts +2 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +19528 -0
- package/dist/index.js.map +1 -0
- package/dist/network.d.ts +1 -0
- package/dist/vesting.d.ts +98 -0
- package/package.json +15 -0
@@ -0,0 +1 @@
|
|
1
|
+
export declare function connectToMumbai(): Promise<void>;
|
@@ -0,0 +1,98 @@
|
|
1
|
+
import { Contract, providers, Signer } from "ethers";
|
2
|
+
/**
|
3
|
+
* @dev This function inits the library and connects to the blockchain
|
4
|
+
* @param _provider: window.ethereum or an equivalent
|
5
|
+
*/
|
6
|
+
export declare function initVesting(_provider: providers.ExternalProvider): Contract;
|
7
|
+
/**
|
8
|
+
* @notice Claim tokens for a wallet address by using the uuid of the vesting schedule
|
9
|
+
* @param _signer: Signer of the transaction (provider.getSigner(account))
|
10
|
+
* @param _uuid: Unique identifier created when for the vesting schedule
|
11
|
+
* @param _numberOfConfirmations: Optional pass the number of confirmations to wait for
|
12
|
+
*/
|
13
|
+
export declare function claimTokensWithUuid(_signer: Signer, _uuid: number, _numberOfConfirmations?: number): Promise<any>;
|
14
|
+
/**
|
15
|
+
* @param _signer: Signer of the transaction (provider.getSigner(account))
|
16
|
+
* @param _account: Wallet address who will receive a vesting schedule
|
17
|
+
* @param _fundsToVest: Amount of tokens to be given to _account as part of the vesting schedule
|
18
|
+
* @param _vestingPeriods: AMount of vesting periods within the vesting schedule
|
19
|
+
* @param _releaseDay: Timestamp from which 30 days later the vesting schedule will be released
|
20
|
+
* @param _roleOfAccount: Indicates one the following roles available: HOLDER_CUY_TOKEN | PRIVATE_SALE_1 | PRIVATE_SALE_2 | PACHACUY_TEAM | PARTNER_ADVISOR | MARKETING | AIRDROP
|
21
|
+
* @param _numberOfConfirmations: Optional pass the number of confirmations to wait for
|
22
|
+
*/
|
23
|
+
export declare function createVestingSchema(_signer: Signer, _account: string, _fundsToVest: number, _vestingPeriods: number, _releaseDay: number, _roleOfAccount: string, _numberOfConfirmations?: number): Promise<any>;
|
24
|
+
/**
|
25
|
+
* @param _signer: Signer of the transaction (provider.getSigner(account))
|
26
|
+
* @param _accountArray: Array of wallet addresses who will receive a vesting schedule
|
27
|
+
* @param _fundsToVestArray: Array of Amount of tokens to be given to _account as part of the vesting schedule
|
28
|
+
* @param _vestingPeriodsArray: Array of amount of vesting periods within the vesting schedule
|
29
|
+
* @param _releaseDayArray: Array of timestamps from which 30 days later the vesting schedule will be released
|
30
|
+
* @param _roleOfAccountArray: Array of roles. Available roles: HOLDER_CUY_TOKEN | PRIVATE_SALE_1 | PRIVATE_SALE_2 | PACHACUY_TEAM | PARTNER_ADVISOR | MARKETING | AIRDROP
|
31
|
+
* @param _numberOfConfirmations: Optional pass the number of confirmations to wait for
|
32
|
+
*/
|
33
|
+
export declare function createVestingSchemaBatch(_signer: Signer, _accountArray: string[], _fundsToVestArray: number[], _vestingPeriodsArray: number[], _releaseDayArray: number[], _roleOfAccountArray: string[], _numberOfConfirmations?: number): Promise<any>;
|
34
|
+
/**
|
35
|
+
* @param _signer: Signer of the transaction (provider.getSigner(account))
|
36
|
+
* @param _account: Wallet address who will receive a vesting schedule
|
37
|
+
* @param _uuid: Unique identifier of the vesting schedule created for this account
|
38
|
+
* @param _numberOfConfirmations: Optional pass the number of confirmations to wait for
|
39
|
+
*/
|
40
|
+
export declare function removesVestingSchemaForAccount(_signer: Signer, _account: string, _uuid: number, _numberOfConfirmations?: number): Promise<any>;
|
41
|
+
/**
|
42
|
+
* @param fundsToVestForThisAccount: Total amount of tokens for vesting for this account
|
43
|
+
* @param currentVestingPeriod: Current month of the vesting schedule (starts at 0)
|
44
|
+
* @param totalFundsVested: Amount of tokens claimed so far
|
45
|
+
* @param datesForVesting: Array of dates after which the vesting tokens are claimable
|
46
|
+
* @param roleOfAccount: One of the vesting roles: HOLDER_CUY_TOKEN | PRIVATE_SALE_1 | PRIVATE_SALE_2 | PACHACUY_TEAM | PARTNER_ADVISOR | MARKETING | AIRDROP
|
47
|
+
* @param uuid: Unique identifier of the vesting schedule created for this account
|
48
|
+
* @param vestingPeriods: Amount of months or vesting periods within the vesting schedule
|
49
|
+
* @param tokensPerPeriod: Amount of tokens to be given to the account per vesting period
|
50
|
+
*/
|
51
|
+
interface VestingPerAccount {
|
52
|
+
fundsToVestForThisAccount: string;
|
53
|
+
currentVestingPeriod: number;
|
54
|
+
totalFundsVested: string;
|
55
|
+
datesForVesting: string[];
|
56
|
+
roleOfAccount: string;
|
57
|
+
uuid: string;
|
58
|
+
vestingPeriods: number;
|
59
|
+
tokensPerPeriod: string;
|
60
|
+
}
|
61
|
+
/**
|
62
|
+
* @notice Gets the list of vesting schedules for an account
|
63
|
+
* @param _account: Wallet address for which the schedules are consulted
|
64
|
+
*/
|
65
|
+
export declare function getArrayVestingSchema(_account: string): Promise<VestingPerAccount[]>;
|
66
|
+
/**
|
67
|
+
* @notice Gets the a vesting schedule for an account by using the unique identifier of the vesting
|
68
|
+
* @param _uuid: Unique identifier of the vesting schedule created for this account
|
69
|
+
*/
|
70
|
+
export declare function getVestingSchemaWithUuid(_uuid: number): Promise<VestingPerAccount>;
|
71
|
+
/**
|
72
|
+
* ROLES FOR VESTING Q(M)
|
73
|
+
* -----
|
74
|
+
* HOLDER_CUY_TOKEN -> 1
|
75
|
+
* PRIVATE_SALE_1 -> 1.5
|
76
|
+
* PRIVATE_SALE_2 -> 0.6
|
77
|
+
* AIRDROP -> 1.2
|
78
|
+
* PACHACUY_TEAM -> 12
|
79
|
+
* PARTNER_ADVISOR -> 10
|
80
|
+
* MARKETING -> 10
|
81
|
+
* ------------------------------------
|
82
|
+
* TOTAL -> 36.3
|
83
|
+
*
|
84
|
+
* @param _role: Indicates one the following roles available: HOLDER_CUY_TOKEN | PRIVATE_SALE_1 | PRIVATE_SALE_2 | PACHACUY_TEAM | PARTNER_ADVISOR | MARKETING | AIRDROP
|
85
|
+
* @param fundsForAllocation: Total amount of tokens to be given for this role as vesting
|
86
|
+
* @param fundsAllocated: Total amount of tokens assigned to all wallets for this role
|
87
|
+
*/
|
88
|
+
interface Fund {
|
89
|
+
role: string;
|
90
|
+
fundsForAllocation: string;
|
91
|
+
fundsAllocated: string;
|
92
|
+
}
|
93
|
+
/**
|
94
|
+
* @notice Gets the status of funds used and allocated for a particular role
|
95
|
+
* @param _role: Indicates one the following roles available: HOLDER_CUY_TOKEN | PRIVATE_SALE_1 | PRIVATE_SALE_2 | PACHACUY_TEAM | PARTNER_ADVISOR | MARKETING | AIRDROP
|
96
|
+
*/
|
97
|
+
export declare function getStatusOfFundByRole(_role: string): Promise<Fund>;
|
98
|
+
export {};
|
package/package.json
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"name": "vesting-pachacuy",
|
3
|
+
"version": "0.0.1",
|
4
|
+
"description": "Vesting API for interacting with Vesting Smart Contract",
|
5
|
+
"main": "dist",
|
6
|
+
"types": "dist/index.d.ts",
|
7
|
+
"files": [
|
8
|
+
"dist/**/*"
|
9
|
+
],
|
10
|
+
"author": "Lee Marreros <lee@cuytoken.com>",
|
11
|
+
"license": "ISC",
|
12
|
+
"dependencies": {
|
13
|
+
"ethers": "^5.6.2"
|
14
|
+
}
|
15
|
+
}
|