@verified-network/verified-sdk 2.4.4 → 2.4.5
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.
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
{
|
|
58
58
|
"indexed": false,
|
|
59
59
|
"internalType": "address",
|
|
60
|
-
"name": "
|
|
60
|
+
"name": "bond",
|
|
61
61
|
"type": "address"
|
|
62
62
|
}
|
|
63
63
|
],
|
|
@@ -79,6 +79,12 @@
|
|
|
79
79
|
"name": "asset",
|
|
80
80
|
"type": "address"
|
|
81
81
|
},
|
|
82
|
+
{
|
|
83
|
+
"indexed": false,
|
|
84
|
+
"internalType": "address",
|
|
85
|
+
"name": "collateral",
|
|
86
|
+
"type": "address"
|
|
87
|
+
},
|
|
82
88
|
{
|
|
83
89
|
"indexed": false,
|
|
84
90
|
"internalType": "address",
|
|
@@ -103,6 +109,12 @@
|
|
|
103
109
|
"name": "couponFrequency",
|
|
104
110
|
"type": "uint256"
|
|
105
111
|
},
|
|
112
|
+
{
|
|
113
|
+
"indexed": false,
|
|
114
|
+
"internalType": "uint256",
|
|
115
|
+
"name": "faceValue",
|
|
116
|
+
"type": "uint256"
|
|
117
|
+
},
|
|
106
118
|
{
|
|
107
119
|
"indexed": false,
|
|
108
120
|
"internalType": "uint256",
|
|
@@ -125,7 +137,7 @@
|
|
|
125
137
|
{
|
|
126
138
|
"indexed": true,
|
|
127
139
|
"internalType": "address",
|
|
128
|
-
"name": "
|
|
140
|
+
"name": "bond",
|
|
129
141
|
"type": "address"
|
|
130
142
|
},
|
|
131
143
|
{
|
|
@@ -164,6 +176,12 @@
|
|
|
164
176
|
"internalType": "uint256",
|
|
165
177
|
"name": "amount",
|
|
166
178
|
"type": "uint256"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"indexed": false,
|
|
182
|
+
"internalType": "address",
|
|
183
|
+
"name": "bond",
|
|
184
|
+
"type": "address"
|
|
167
185
|
}
|
|
168
186
|
],
|
|
169
187
|
"name": "Repaid",
|
|
@@ -173,7 +191,7 @@
|
|
|
173
191
|
"inputs": [
|
|
174
192
|
{
|
|
175
193
|
"internalType": "address",
|
|
176
|
-
"name": "
|
|
194
|
+
"name": "bond",
|
|
177
195
|
"type": "address"
|
|
178
196
|
}
|
|
179
197
|
],
|
|
@@ -222,7 +240,7 @@
|
|
|
222
240
|
"inputs": [
|
|
223
241
|
{
|
|
224
242
|
"internalType": "address",
|
|
225
|
-
"name": "
|
|
243
|
+
"name": "bond",
|
|
226
244
|
"type": "address"
|
|
227
245
|
},
|
|
228
246
|
{
|
|
@@ -240,7 +258,7 @@
|
|
|
240
258
|
"inputs": [
|
|
241
259
|
{
|
|
242
260
|
"internalType": "address",
|
|
243
|
-
"name": "
|
|
261
|
+
"name": "bond",
|
|
244
262
|
"type": "address"
|
|
245
263
|
},
|
|
246
264
|
{
|
|
@@ -261,6 +279,11 @@
|
|
|
261
279
|
"name": "asset",
|
|
262
280
|
"type": "address"
|
|
263
281
|
},
|
|
282
|
+
{
|
|
283
|
+
"internalType": "address",
|
|
284
|
+
"name": "collateral",
|
|
285
|
+
"type": "address"
|
|
286
|
+
},
|
|
264
287
|
{
|
|
265
288
|
"internalType": "address",
|
|
266
289
|
"name": "bond",
|
|
@@ -281,6 +304,11 @@
|
|
|
281
304
|
"name": "frequency",
|
|
282
305
|
"type": "uint256"
|
|
283
306
|
},
|
|
307
|
+
{
|
|
308
|
+
"internalType": "uint256",
|
|
309
|
+
"name": "faceValue",
|
|
310
|
+
"type": "uint256"
|
|
311
|
+
},
|
|
284
312
|
{
|
|
285
313
|
"internalType": "address",
|
|
286
314
|
"name": "factory",
|
|
@@ -303,11 +331,6 @@
|
|
|
303
331
|
"internalType": "address",
|
|
304
332
|
"name": "issuer",
|
|
305
333
|
"type": "address"
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
"internalType": "address",
|
|
309
|
-
"name": "factory",
|
|
310
|
-
"type": "address"
|
|
311
334
|
}
|
|
312
335
|
],
|
|
313
336
|
"name": "withdrawCollateral",
|
|
@@ -14,10 +14,19 @@ export default class Compound extends VerifiedContract {
|
|
|
14
14
|
setSigner(_address: string, options?: Options): any;
|
|
15
15
|
/**
|
|
16
16
|
* Submits new RWA to Compound
|
|
17
|
-
* @params (
|
|
17
|
+
* @params submitNewRWA(
|
|
18
|
+
address asset,
|
|
19
|
+
address collateral,
|
|
20
|
+
address bond,
|
|
21
|
+
uint256 apy,
|
|
22
|
+
string memory issuingDocs,
|
|
23
|
+
uint256 frequency,
|
|
24
|
+
uint256 faceValue,
|
|
25
|
+
address factory
|
|
26
|
+
)
|
|
18
27
|
* @returns
|
|
19
28
|
*/
|
|
20
|
-
submitNewRWA(asset: string, bond: string, apy: string, issuingDocs: string, frequency: string, factory: string, options?: Options): any;
|
|
29
|
+
submitNewRWA(asset: string, collateral: string, bond: string, apy: string, issuingDocs: string, frequency: string, faceValue: string, factory: string, options?: Options): any;
|
|
21
30
|
/**
|
|
22
31
|
* Posts collateral to Compound
|
|
23
32
|
* @params (address bond, address issuer, address factory)
|
|
@@ -26,21 +35,21 @@ export default class Compound extends VerifiedContract {
|
|
|
26
35
|
postCollateral(bond: string, issuer: string, factory: string, options?: Options): any;
|
|
27
36
|
/**
|
|
28
37
|
* Borrows from Compound
|
|
29
|
-
* @params (address
|
|
38
|
+
* @params (address bond)
|
|
30
39
|
* @returns
|
|
31
40
|
*/
|
|
32
|
-
borrowBase(
|
|
41
|
+
borrowBase(bond: string, options?: Options): any;
|
|
33
42
|
/**
|
|
34
43
|
* Repays to Compound
|
|
35
|
-
* @params (address
|
|
44
|
+
* @params (address bond, uint256 amount)
|
|
36
45
|
* @returns
|
|
37
46
|
*/
|
|
38
|
-
repayBase(
|
|
47
|
+
repayBase(bond: string, amount: string, options?: Options): any;
|
|
39
48
|
/**
|
|
40
49
|
* Withdraws collateral
|
|
41
|
-
* @params (address bond, address issuer
|
|
50
|
+
* @params (address bond, address issuer)
|
|
42
51
|
* @returns
|
|
43
52
|
*/
|
|
44
53
|
withdrawCollateral(bond: string, issuer: string, factory: string, options?: Options): any;
|
|
45
|
-
repayLenders(
|
|
54
|
+
repayLenders(bond: string, collateral: string, options?: Options): any;
|
|
46
55
|
}
|
|
@@ -28,17 +28,28 @@ class Compound extends index_1.VerifiedContract {
|
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Submits new RWA to Compound
|
|
31
|
-
* @params (
|
|
31
|
+
* @params submitNewRWA(
|
|
32
|
+
address asset,
|
|
33
|
+
address collateral,
|
|
34
|
+
address bond,
|
|
35
|
+
uint256 apy,
|
|
36
|
+
string memory issuingDocs,
|
|
37
|
+
uint256 frequency,
|
|
38
|
+
uint256 faceValue,
|
|
39
|
+
address factory
|
|
40
|
+
)
|
|
32
41
|
* @returns
|
|
33
42
|
*/
|
|
34
|
-
async submitNewRWA(asset, bond, apy, issuingDocs, frequency, factory, options) {
|
|
43
|
+
async submitNewRWA(asset, collateral, bond, apy, issuingDocs, frequency, faceValue, factory, options) {
|
|
35
44
|
await this.validateInput(index_1.DATATYPES.ADDRESS, asset);
|
|
45
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, collateral);
|
|
36
46
|
await this.validateInput(index_1.DATATYPES.ADDRESS, bond);
|
|
37
47
|
await this.validateInput(index_1.DATATYPES.NUMBER, apy);
|
|
38
48
|
await this.validateInput(index_1.DATATYPES.STRING, issuingDocs);
|
|
49
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, frequency);
|
|
39
50
|
await this.validateInput(index_1.DATATYPES.NUMBER, faceValue);
|
|
40
51
|
await this.validateInput(index_1.DATATYPES.ADDRESS, factory);
|
|
41
|
-
return this.callContract(FUNCTIONS.SUBMITNEWRWA, asset, bond, apy, issuingDocs, frequency, factory, options);
|
|
52
|
+
return this.callContract(FUNCTIONS.SUBMITNEWRWA, asset, collateral, bond, apy, issuingDocs, frequency, faceValue, factory, options);
|
|
42
53
|
}
|
|
43
54
|
/**
|
|
44
55
|
* Posts collateral to Compound
|
|
@@ -53,38 +64,37 @@ class Compound extends index_1.VerifiedContract {
|
|
|
53
64
|
}
|
|
54
65
|
/**
|
|
55
66
|
* Borrows from Compound
|
|
56
|
-
* @params (address
|
|
67
|
+
* @params (address bond)
|
|
57
68
|
* @returns
|
|
58
69
|
*/
|
|
59
|
-
async borrowBase(
|
|
60
|
-
await this.validateInput(index_1.DATATYPES.ADDRESS,
|
|
61
|
-
return this.callContract(FUNCTIONS.BORROWBASE,
|
|
70
|
+
async borrowBase(bond, options) {
|
|
71
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, bond);
|
|
72
|
+
return this.callContract(FUNCTIONS.BORROWBASE, bond, options);
|
|
62
73
|
}
|
|
63
74
|
/**
|
|
64
75
|
* Repays to Compound
|
|
65
|
-
* @params (address
|
|
76
|
+
* @params (address bond, uint256 amount)
|
|
66
77
|
* @returns
|
|
67
78
|
*/
|
|
68
|
-
async repayBase(
|
|
69
|
-
await this.validateInput(index_1.DATATYPES.ADDRESS,
|
|
79
|
+
async repayBase(bond, amount, options) {
|
|
80
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, bond);
|
|
70
81
|
await this.validateInput(index_1.DATATYPES.NUMBER, amount);
|
|
71
|
-
return this.callContract(FUNCTIONS.REPAYBASE,
|
|
82
|
+
return this.callContract(FUNCTIONS.REPAYBASE, bond, amount, options);
|
|
72
83
|
}
|
|
73
84
|
/**
|
|
74
85
|
* Withdraws collateral
|
|
75
|
-
* @params (address bond, address issuer
|
|
86
|
+
* @params (address bond, address issuer)
|
|
76
87
|
* @returns
|
|
77
88
|
*/
|
|
78
89
|
async withdrawCollateral(bond, issuer, factory, options) {
|
|
79
90
|
await this.validateInput(index_1.DATATYPES.ADDRESS, bond);
|
|
80
91
|
await this.validateInput(index_1.DATATYPES.ADDRESS, issuer);
|
|
81
|
-
|
|
82
|
-
return this.callContract(FUNCTIONS.WITHDRAWCOLLATERAL, bond, issuer, factory, options);
|
|
92
|
+
return this.callContract(FUNCTIONS.WITHDRAWCOLLATERAL, bond, issuer, options);
|
|
83
93
|
}
|
|
84
|
-
async repayLenders(
|
|
85
|
-
await this.validateInput(index_1.DATATYPES.ADDRESS,
|
|
94
|
+
async repayLenders(bond, collateral, options) {
|
|
95
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, bond);
|
|
86
96
|
await this.validateInput(index_1.DATATYPES.ADDRESS, collateral);
|
|
87
|
-
return this.callContract(FUNCTIONS.REPAYLENDERS,
|
|
97
|
+
return this.callContract(FUNCTIONS.REPAYLENDERS, bond, collateral, options);
|
|
88
98
|
}
|
|
89
99
|
}
|
|
90
100
|
exports.default = Compound;
|