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 ADDED
@@ -0,0 +1,141 @@
1
+ **CHANGELOGS**
2
+
3
+ <u>0.0.1</u>
4
+ Methods for front:
5
+
6
+ - claimTokensWithUuid
7
+ - getArrayVestingSchema
8
+ - getVestingSchemaWithUuid
9
+ - getStatusOfFundByRole
10
+ - connectToMumbai
11
+
12
+ ```js
13
+ /**
14
+ * @dev This function inits the library and connects to the blockchain
15
+ * @param _provider: window.ethereum or an equivalent
16
+ */
17
+ export declare function initVesting(
18
+ _provider: providers.ExternalProvider
19
+ ): Contract;
20
+ /**
21
+ * @notice Claim tokens for a wallet address by using the uuid of the vesting schedule
22
+ * @param _signer: Signer of the transaction (provider.getSigner(account))
23
+ * @param _uuid: Unique identifier created when for the vesting schedule
24
+ * @param _numberOfConfirmations: Optional pass the number of confirmations to wait for
25
+ */
26
+ export declare function claimTokensWithUuid(
27
+ _signer: Signer,
28
+ _uuid: number,
29
+ _numberOfConfirmations?: number
30
+ ): Promise<any>;
31
+ /**
32
+ * @param _signer: Signer of the transaction (provider.getSigner(account))
33
+ * @param _account: Wallet address who will receive a vesting schedule
34
+ * @param _fundsToVest: Amount of tokens to be given to _account as part of the vesting schedule
35
+ * @param _vestingPeriods: AMount of vesting periods within the vesting schedule
36
+ * @param _releaseDay: Timestamp from which 30 days later the vesting schedule will be released
37
+ * @param _roleOfAccount: Indicates one the following roles available: HOLDER_CUY_TOKEN | PRIVATE_SALE_1 | PRIVATE_SALE_2 | PACHACUY_TEAM | PARTNER_ADVISOR | MARKETING | AIRDROP
38
+ * @param _numberOfConfirmations: Optional pass the number of confirmations to wait for
39
+ */
40
+ export declare function createVestingSchema(
41
+ _signer: Signer,
42
+ _account: string,
43
+ _fundsToVest: number,
44
+ _vestingPeriods: number,
45
+ _releaseDay: number,
46
+ _roleOfAccount: string,
47
+ _numberOfConfirmations?: number
48
+ ): Promise<any>;
49
+ /**
50
+ * @param _signer: Signer of the transaction (provider.getSigner(account))
51
+ * @param _accountArray: Array of wallet addresses who will receive a vesting schedule
52
+ * @param _fundsToVestArray: Array of Amount of tokens to be given to _account as part of the vesting schedule
53
+ * @param _vestingPeriodsArray: Array of amount of vesting periods within the vesting schedule
54
+ * @param _releaseDayArray: Array of timestamps from which 30 days later the vesting schedule will be released
55
+ * @param _roleOfAccountArray: Array of roles. Available roles: HOLDER_CUY_TOKEN | PRIVATE_SALE_1 | PRIVATE_SALE_2 | PACHACUY_TEAM | PARTNER_ADVISOR | MARKETING | AIRDROP
56
+ * @param _numberOfConfirmations: Optional pass the number of confirmations to wait for
57
+ */
58
+ export declare function createVestingSchemaBatch(
59
+ _signer: Signer,
60
+ _accountArray: string[],
61
+ _fundsToVestArray: number[],
62
+ _vestingPeriodsArray: number[],
63
+ _releaseDayArray: number[],
64
+ _roleOfAccountArray: string[],
65
+ _numberOfConfirmations?: number
66
+ ): Promise<any>;
67
+ /**
68
+ * @param _signer: Signer of the transaction (provider.getSigner(account))
69
+ * @param _account: Wallet address who will receive a vesting schedule
70
+ * @param _uuid: Unique identifier of the vesting schedule created for this account
71
+ * @param _numberOfConfirmations: Optional pass the number of confirmations to wait for
72
+ */
73
+ export declare function removesVestingSchemaForAccount(
74
+ _signer: Signer,
75
+ _account: string,
76
+ _uuid: number,
77
+ _numberOfConfirmations?: number
78
+ ): Promise<any>;
79
+ /**
80
+ * @param fundsToVestForThisAccount: Total amount of tokens for vesting for this account
81
+ * @param currentVestingPeriod: Current month of the vesting schedule (starts at 0)
82
+ * @param totalFundsVested: Amount of tokens claimed so far
83
+ * @param datesForVesting: Array of dates after which the vesting tokens are claimable
84
+ * @param roleOfAccount: One of the vesting roles: HOLDER_CUY_TOKEN | PRIVATE_SALE_1 | PRIVATE_SALE_2 | PACHACUY_TEAM | PARTNER_ADVISOR | MARKETING | AIRDROP
85
+ * @param uuid: Unique identifier of the vesting schedule created for this account
86
+ * @param vestingPeriods: Amount of months or vesting periods within the vesting schedule
87
+ * @param tokensPerPeriod: Amount of tokens to be given to the account per vesting period
88
+ */
89
+ interface VestingPerAccount {
90
+ fundsToVestForThisAccount: string;
91
+ currentVestingPeriod: number;
92
+ totalFundsVested: string;
93
+ datesForVesting: string[];
94
+ roleOfAccount: string;
95
+ uuid: string;
96
+ vestingPeriods: number;
97
+ tokensPerPeriod: string;
98
+ }
99
+ /**
100
+ * @notice Gets the list of vesting schedules for an account
101
+ * @param _account: Wallet address for which the schedules are consulted
102
+ */
103
+ export declare function getArrayVestingSchema(
104
+ _account: string
105
+ ): Promise<VestingPerAccount[]>;
106
+ /**
107
+ * @notice Gets the a vesting schedule for an account by using the unique identifier of the vesting
108
+ * @param _uuid: Unique identifier of the vesting schedule created for this account
109
+ */
110
+ export declare function getVestingSchemaWithUuid(
111
+ _uuid: number
112
+ ): Promise<VestingPerAccount>;
113
+ /**
114
+ * ROLES FOR VESTING Q(M)
115
+ * -----
116
+ * HOLDER_CUY_TOKEN -> 1
117
+ * PRIVATE_SALE_1 -> 1.5
118
+ * PRIVATE_SALE_2 -> 0.6
119
+ * AIRDROP -> 1.2
120
+ * PACHACUY_TEAM -> 12
121
+ * PARTNER_ADVISOR -> 10
122
+ * MARKETING -> 10
123
+ * ------------------------------------
124
+ * TOTAL -> 36.3
125
+ *
126
+ * @param _role: Indicates one the following roles available: HOLDER_CUY_TOKEN | PRIVATE_SALE_1 | PRIVATE_SALE_2 | PACHACUY_TEAM | PARTNER_ADVISOR | MARKETING | AIRDROP
127
+ * @param fundsForAllocation: Total amount of tokens to be given for this role as vesting
128
+ * @param fundsAllocated: Total amount of tokens assigned to all wallets for this role
129
+ */
130
+ interface Fund {
131
+ role: string;
132
+ fundsForAllocation: string;
133
+ fundsAllocated: string;
134
+ }
135
+ /**
136
+ * @notice Gets the status of funds used and allocated for a particular role
137
+ * @param _role: Indicates one the following roles available: HOLDER_CUY_TOKEN | PRIVATE_SALE_1 | PRIVATE_SALE_2 | PACHACUY_TEAM | PARTNER_ADVISOR | MARKETING | AIRDROP
138
+ */
139
+ export declare function getStatusOfFundByRole(_role: string): Promise<Fund>;
140
+
141
+ ```
@@ -0,0 +1,2 @@
1
+ declare const _default: string[];
2
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import { Contract, providers } from "ethers";
2
+ /******************
3
+ * VESTING *
4
+ *****************/
5
+ export { claimTokensWithUuid, createVestingSchema, createVestingSchemaBatch, getArrayVestingSchema, getStatusOfFundByRole, getVestingSchemaWithUuid, removesVestingSchemaForAccount, } from "./vesting";
6
+ /******************
7
+ * NETWORK *
8
+ *****************/
9
+ export { connectToMumbai } from "./network";
10
+ /**
11
+ * @dev This function inits the library and connects to the blockchain
12
+ * @param _provider: window.ethereum or an equivalent
13
+ */
14
+ export declare function init(_provider: providers.ExternalProvider): Contract;