@verified-network/verified-sdk 1.3.7 → 1.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7,6 +7,25 @@ const Security_json_1 = require("../../abi/securities/Security.json");
|
|
|
7
7
|
var FUNCTIONS;
|
|
8
8
|
(function (FUNCTIONS) {
|
|
9
9
|
FUNCTIONS["WHITELIST"] = "whiteList";
|
|
10
|
+
FUNCTIONS["TRANSFER"] = "transfer";
|
|
11
|
+
FUNCTIONS["APPROVE"] = "approve";
|
|
12
|
+
FUNCTIONS["TRANSFERFROM"] = "transferFrom";
|
|
13
|
+
FUNCTIONS["INCREASEALLOWANCE"] = "increaseAllowance";
|
|
14
|
+
FUNCTIONS["DECREASEALLOWANCE"] = "decreaseAllowance";
|
|
15
|
+
FUNCTIONS["FREEZE"] = "freeze";
|
|
16
|
+
FUNCTIONS["UNFREEZE"] = "unfreeze";
|
|
17
|
+
FUNCTIONS["FROZEN"] = "frozen";
|
|
18
|
+
FUNCTIONS["BURN"] = "burn";
|
|
19
|
+
FUNCTIONS["BURNALL"] = "burnAll";
|
|
20
|
+
FUNCTIONS["SCHEDULE"] = "scheduleSnapshot";
|
|
21
|
+
FUNCTIONS["RESCHEDULE"] = "rescheduleSnapshot";
|
|
22
|
+
FUNCTIONS["UNSCHEDULE"] = "unscheduleSnapshot";
|
|
23
|
+
FUNCTIONS["CREATERESOLUTION"] = "createResolution";
|
|
24
|
+
FUNCTIONS["COUNTVOTES"] = "countVotes";
|
|
25
|
+
FUNCTIONS["PAYOUTPRORATA"] = "payoutProrata";
|
|
26
|
+
FUNCTIONS["PAYOUT"] = "payout";
|
|
27
|
+
FUNCTIONS["PAUSE"] = "pause";
|
|
28
|
+
FUNCTIONS["UNPAUSE"] = "unpause";
|
|
10
29
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
11
30
|
class Security extends index_1.VerifiedContract {
|
|
12
31
|
constructor(signer, tokenAddress) {
|
|
@@ -19,5 +38,96 @@ class Security extends index_1.VerifiedContract {
|
|
|
19
38
|
await this.validateInput(index_1.DATATYPES.NUMBER, _amount);
|
|
20
39
|
return this.callContract(FUNCTIONS.WHITELIST, _spender, _amount, options);
|
|
21
40
|
}
|
|
41
|
+
async transfer(_recipient, _amount, options) {
|
|
42
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _recipient);
|
|
43
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _amount);
|
|
44
|
+
return this.callContract(FUNCTIONS.TRANSFER, _recipient, _amount, options);
|
|
45
|
+
}
|
|
46
|
+
async approve(_spender, _amount, options) {
|
|
47
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _spender);
|
|
48
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _amount);
|
|
49
|
+
return this.callContract(FUNCTIONS.APPROVE, _spender, _amount, options);
|
|
50
|
+
}
|
|
51
|
+
async transferFrom(_spender, _recipient, _amount, options) {
|
|
52
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _spender);
|
|
53
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _recipient);
|
|
54
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _amount);
|
|
55
|
+
return this.callContract(FUNCTIONS.TRANSFERFROM, _spender, _recipient, _amount, options);
|
|
56
|
+
}
|
|
57
|
+
async increaseAllowance(_spender, _amount, options) {
|
|
58
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _spender);
|
|
59
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _amount);
|
|
60
|
+
return this.callContract(FUNCTIONS.INCREASEALLOWANCE, _spender, _amount, options);
|
|
61
|
+
}
|
|
62
|
+
async decreaseAllowance(_spender, _amount, options) {
|
|
63
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _spender);
|
|
64
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _amount);
|
|
65
|
+
return this.callContract(FUNCTIONS.DECREASEALLOWANCE, _spender, _amount, options);
|
|
66
|
+
}
|
|
67
|
+
async freeze(_holder, _amount, options) {
|
|
68
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _holder);
|
|
69
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _amount);
|
|
70
|
+
return this.callContract(FUNCTIONS.FREEZE, _holder, _amount, options);
|
|
71
|
+
}
|
|
72
|
+
async unfreeze(_holder, options) {
|
|
73
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _holder);
|
|
74
|
+
return this.callContract(FUNCTIONS.UNFREEZE, _holder, options);
|
|
75
|
+
}
|
|
76
|
+
async frozen(_account, options) {
|
|
77
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _holder);
|
|
78
|
+
return this.callContract(FUNCTIONS.FROZEN, _account, options);
|
|
79
|
+
}
|
|
80
|
+
async burn(_holder, _amount, options) {
|
|
81
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _holder);
|
|
82
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _amount);
|
|
83
|
+
return this.callContract(FUNCTIONS.BURN, _holder, _amount, options);
|
|
84
|
+
}
|
|
85
|
+
async burnAll(options) {
|
|
86
|
+
return this.callContract(FUNCTIONS.BURNALL, options);
|
|
87
|
+
}
|
|
88
|
+
async schedule(_time, options) {
|
|
89
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _time);
|
|
90
|
+
return this.callContract(FUNCTIONS.SCHEDULE, _time, options);
|
|
91
|
+
}
|
|
92
|
+
async reschedule(_oldtime, _newtime, options) {
|
|
93
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _oldtime);
|
|
94
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _newtime);
|
|
95
|
+
return this.callContract(FUNCTIONS.RESCHEDULE, _oldtime, _newtime, options);
|
|
96
|
+
}
|
|
97
|
+
async unschedule(_time, options) {
|
|
98
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _time);
|
|
99
|
+
return this.callContract(FUNCTIONS.UNSCHEDULE, _time, options);
|
|
100
|
+
}
|
|
101
|
+
async createResolution(_time, _votes, _ipfslink, options) {
|
|
102
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _time);
|
|
103
|
+
await this.validateInput(index_1.DATATYPES.BOOLEAN, _votes);
|
|
104
|
+
await this.validateInput(index_1.DATATYPES.STRING, _ipfslink);
|
|
105
|
+
return this.callContract(FUNCTIONS.CREATERESOLUTION, _time, _votes, _ipfslink, options);
|
|
106
|
+
}
|
|
107
|
+
async countVotes(_time, options) {
|
|
108
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _time);
|
|
109
|
+
return this.callContract(FUNCTIONS.COUNTVOTES, _time, options);
|
|
110
|
+
}
|
|
111
|
+
async payoutProrata(_time, _wallet, _token, _amount, options) {
|
|
112
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _time);
|
|
113
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _wallet);
|
|
114
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _token);
|
|
115
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _amount);
|
|
116
|
+
return this.callContract(FUNCTIONS.PAYOUTPRORATA, _time, _wallet, _token, _amount, options);
|
|
117
|
+
}
|
|
118
|
+
async payout(_time, _holder, _wallet, _token, _amount, options) {
|
|
119
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _time);
|
|
120
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _holder);
|
|
121
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _wallet);
|
|
122
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _token);
|
|
123
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _amount);
|
|
124
|
+
return this.callContract(FUNCTIONS.PAYOUT, _time, _holder, _wallet, _token, _amount, options);
|
|
125
|
+
}
|
|
126
|
+
async pause(options) {
|
|
127
|
+
return this.callContract(FUNCTIONS.PAUSE, options);
|
|
128
|
+
}
|
|
129
|
+
async unpause(options) {
|
|
130
|
+
return this.callContract(FUNCTIONS.UNPAUSE, options);
|
|
131
|
+
}
|
|
22
132
|
}
|
|
23
133
|
exports.default = Security;
|
|
@@ -19,9 +19,9 @@ const contractAddress = {
|
|
|
19
19
|
'SecondaryIssuePoolFactory': '0xe3e79e4106327e6eAeFBD03C1fD3A4A531c59b10',
|
|
20
20
|
'BalancerSecondaryIssueManager': '0xd99eaA9786050dab5c3332E1E6eD9d6C4fB6cb6e',
|
|
21
21
|
'MarginTradingPoolFactory': '0x435f26ca4EF4709C4BB46a53424DAA2cD4D0e899',
|
|
22
|
-
'BalancerMarginIssueManager': '
|
|
22
|
+
'BalancerMarginIssueManager': '0xB99B085AC98E6836CD206d3379436f2987F7330c',
|
|
23
23
|
'Custody': '0x5fafb140f86FFd21C2C772Ea4b23225faA00ecE6',
|
|
24
|
-
'Compound': '
|
|
24
|
+
'Compound': '0xe7da2f6c05040765660cd20f5defc69ce7df2309',
|
|
25
25
|
'CASH': {
|
|
26
26
|
'VCUSD': '0xed40C75d273a8f9c746536b86d7B849871970E9D',
|
|
27
27
|
'VCEUR': '0xeFbDD964114aECf26fBAc495551697C1B20016b5',
|
|
@@ -48,8 +48,11 @@ const contractAddress = {
|
|
|
48
48
|
'Vitta': '',
|
|
49
49
|
'Liquidity': '',
|
|
50
50
|
'Distribution': '',
|
|
51
|
+
'PrimaryIssuePoolFactory': '',
|
|
51
52
|
'BalancerPrimaryIssueManager': '',
|
|
53
|
+
'SecondaryIssuePoolFactory': '',
|
|
52
54
|
'BalancerSecondaryIssueManager': '',
|
|
55
|
+
'MarginTradingPoolFactory': '',
|
|
53
56
|
'BalancerMarginIssueManager': '',
|
|
54
57
|
'Custody': '',
|
|
55
58
|
'Compound': '',
|
|
@@ -66,6 +69,40 @@ const contractAddress = {
|
|
|
66
69
|
'VBINR': ''
|
|
67
70
|
},
|
|
68
71
|
},
|
|
72
|
+
80001: {
|
|
73
|
+
'Client': '0x8009B03BbaBD09B9C1EADCaBC7D27197AC251F44',
|
|
74
|
+
'Factory': '',
|
|
75
|
+
'Cash': '',
|
|
76
|
+
'Bond': '',
|
|
77
|
+
'Token': '',
|
|
78
|
+
'Oracle': '',
|
|
79
|
+
'Rates': '',
|
|
80
|
+
'Security': '0x2D76FE6DdC229a482eDeb6E86d12c733A05Af55b',
|
|
81
|
+
'SecuritiesFactory': '0xf1f349C2CBDA5BCAfD7F95b20C812b4A17c9333D',
|
|
82
|
+
'Vitta': '',
|
|
83
|
+
'Liquidity': '',
|
|
84
|
+
'Distribution': '',
|
|
85
|
+
'PrimaryIssuePoolFactory': '',
|
|
86
|
+
'BalancerPrimaryIssueManager': '',
|
|
87
|
+
'SecondaryIssuePoolFactory': '',
|
|
88
|
+
'BalancerSecondaryIssueManager': '',
|
|
89
|
+
'MarginTradingPoolFactory': '',
|
|
90
|
+
'BalancerMarginIssueManager': '',
|
|
91
|
+
'Custody': '0x27006b68b3594EF5Ae04C5457c24F0c7CF1E5553',
|
|
92
|
+
'Compound': '',
|
|
93
|
+
'CASH': {
|
|
94
|
+
'VCUSD': '',
|
|
95
|
+
'VCEUR': '',
|
|
96
|
+
'VCCHF': '',
|
|
97
|
+
'VCINR': ''
|
|
98
|
+
},
|
|
99
|
+
'BOND': {
|
|
100
|
+
'VBUSD': '',
|
|
101
|
+
'VBEUR': '',
|
|
102
|
+
'VCCHF': '',
|
|
103
|
+
'VBINR': ''
|
|
104
|
+
},
|
|
105
|
+
},
|
|
69
106
|
137: {
|
|
70
107
|
'Client': '0x2C5718206b37b8744784ce44f374DE13dd7BC2d1',
|
|
71
108
|
'Factory': '',
|
|
@@ -79,8 +116,11 @@ const contractAddress = {
|
|
|
79
116
|
'Vitta': '0xAb26871f689241758F42627d812E2A3eda7c630e',
|
|
80
117
|
'Liquidity': '0x2E6F17DF38B4686D17C6ec63eF3Ee8f926b1769a',
|
|
81
118
|
'Distribution': '0x96De7417058Dff11D570011eA100e6F0B6Af98eC',
|
|
119
|
+
'PrimaryIssuePoolFactory': '',
|
|
82
120
|
'BalancerPrimaryIssueManager': '0x30fE817317Ffc5A45e8cB457fD1AC8ca0CE068D4',
|
|
121
|
+
'SecondaryIssuePoolFactory': '',
|
|
83
122
|
'BalancerSecondaryIssueManager': '0xb9AD11aC80AD0BE1B83ba6b83E4E27C110c18a33',
|
|
123
|
+
'MarginTradingPoolFactory': '',
|
|
84
124
|
'BalancerMarginIssueManager': '',
|
|
85
125
|
'Custody': '',
|
|
86
126
|
'Compound': '',
|
|
@@ -110,8 +150,11 @@ const contractAddress = {
|
|
|
110
150
|
'Vitta': '',
|
|
111
151
|
'Liquidity': '',
|
|
112
152
|
'Distribution': '',
|
|
153
|
+
'PrimaryIssuePoolFactory': '',
|
|
113
154
|
'BalancerPrimaryIssueManager': '',
|
|
155
|
+
'SecondaryIssuePoolFactory': '',
|
|
114
156
|
'BalancerSecondaryIssueManager': '',
|
|
157
|
+
'MarginTradingPoolFactory': '',
|
|
115
158
|
'BalancerMarginIssueManager': '',
|
|
116
159
|
'Custody': '',
|
|
117
160
|
'Compound': '',
|
|
@@ -141,8 +184,11 @@ const contractAddress = {
|
|
|
141
184
|
'Vitta': '',
|
|
142
185
|
'Liquidity': '',
|
|
143
186
|
'Distribution': '',
|
|
187
|
+
'PrimaryIssuePoolFactory': '',
|
|
144
188
|
'BalancerPrimaryIssueManager': '',
|
|
189
|
+
'SecondaryIssuePoolFactory': '',
|
|
145
190
|
'BalancerSecondaryIssueManager': '',
|
|
191
|
+
'MarginTradingPoolFactory': '',
|
|
146
192
|
'BalancerMarginIssueManager': '',
|
|
147
193
|
'Custody': '',
|
|
148
194
|
'Compound': '',
|
|
@@ -172,8 +218,11 @@ const contractAddress = {
|
|
|
172
218
|
'Vitta': '',
|
|
173
219
|
'Liquidity': '',
|
|
174
220
|
'Distribution': '',
|
|
221
|
+
'PrimaryIssuePoolFactory': '',
|
|
175
222
|
'BalancerPrimaryIssueManager': '',
|
|
223
|
+
'SecondaryIssuePoolFactory': '',
|
|
176
224
|
'BalancerSecondaryIssueManager': '',
|
|
225
|
+
'MarginTradingPoolFactory': '',
|
|
177
226
|
'BalancerMarginIssueManager': '',
|
|
178
227
|
'Custody': '',
|
|
179
228
|
'Compound': '',
|
|
@@ -203,8 +252,11 @@ const contractAddress = {
|
|
|
203
252
|
'Vitta': '',
|
|
204
253
|
'Liquidity': '',
|
|
205
254
|
'Distribution': '',
|
|
255
|
+
'PrimaryIssuePoolFactory': '',
|
|
206
256
|
'BalancerPrimaryIssueManager': '',
|
|
257
|
+
'SecondaryIssuePoolFactory': '',
|
|
207
258
|
'BalancerSecondaryIssueManager': '',
|
|
259
|
+
'MarginTradingPoolFactory': '',
|
|
208
260
|
'BalancerMarginIssueManager': '',
|
|
209
261
|
'Custody': '',
|
|
210
262
|
'Compound': '',
|
|
@@ -234,8 +286,11 @@ const contractAddress = {
|
|
|
234
286
|
'Vitta': '0x1B95D408DE85e07d0De5d5b545202E32a023772E',
|
|
235
287
|
'Liquidity': '0xBD5A0178C276d1553Eb388AdA03F6Cb79Eb6F67D',
|
|
236
288
|
'Distribution': '0x8acBeFF5F1F2e0A4298A6449494C0aA6Dd830d3D',
|
|
289
|
+
'PrimaryIssuePoolFactory': '',
|
|
237
290
|
'BalancerPrimaryIssueManager': '0x2A46d8Ca28F0b84D58d20b5158C2417E6F9CE76F',
|
|
291
|
+
'SecondaryIssuePoolFactory': '',
|
|
238
292
|
'BalancerSecondaryIssueManager': '0x2c6F953dfc7b922ef3101c65c62f9349fCd65e1A',
|
|
293
|
+
'MarginTradingPoolFactory': '',
|
|
239
294
|
'BalancerMarginIssueManager': '0x0d062A0064b762ed8AEe7DE9E79b532e6215c77a',
|
|
240
295
|
'Custody': '0x4A59d0A82A9e1196c7789a25b0F302A683b220E7',
|
|
241
296
|
'Compound': '',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verified-network/verified-sdk",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.9",
|
|
4
4
|
"description": "An SDK to develop applications on the Verified Network",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,8 +31,15 @@
|
|
|
31
31
|
"greet": "./bin/index.bin.js"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
+
"@biconomy/account": "^3.1.1",
|
|
35
|
+
"@biconomy/bundler": "^3.1.1",
|
|
36
|
+
"@biconomy/common": "^3.1.1",
|
|
37
|
+
"@biconomy/core-types": "^3.1.1",
|
|
38
|
+
"@biconomy/modules": "^3.1.1",
|
|
39
|
+
"@biconomy/paymaster": "^3.1.1",
|
|
34
40
|
"ethereumjs-tx": "^2.1.2",
|
|
35
|
-
"ethers": "^5.
|
|
41
|
+
"ethers": "^5.7.2",
|
|
42
|
+
"web3": "^4.2.2"
|
|
36
43
|
},
|
|
37
44
|
"devDependencies": {
|
|
38
45
|
"dotenv": "^10.0.0",
|