@verified-network/verified-sdk 2.2.9 → 2.3.1
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.
|
@@ -11,20 +11,20 @@
|
|
|
11
11
|
{
|
|
12
12
|
"name": "",
|
|
13
13
|
"type": "address"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"name": "",
|
|
17
|
-
"type": "uint256"
|
|
18
14
|
}
|
|
19
15
|
],
|
|
20
|
-
"name": "
|
|
16
|
+
"name": "accruals",
|
|
21
17
|
"outputs": [
|
|
22
18
|
{
|
|
23
|
-
"name": "
|
|
19
|
+
"name": "lastTimestamp",
|
|
20
|
+
"type": "uint256"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "cumulativeBalance",
|
|
24
24
|
"type": "uint256"
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
|
-
"name": "
|
|
27
|
+
"name": "lastBalance",
|
|
28
28
|
"type": "uint256"
|
|
29
29
|
}
|
|
30
30
|
],
|
|
@@ -497,11 +497,11 @@
|
|
|
497
497
|
"type": "bytes32"
|
|
498
498
|
},
|
|
499
499
|
{
|
|
500
|
-
"name": "
|
|
501
|
-
"type": "
|
|
500
|
+
"name": "_txid",
|
|
501
|
+
"type": "uint256"
|
|
502
502
|
}
|
|
503
503
|
],
|
|
504
|
-
"name": "
|
|
504
|
+
"name": "cleanTx",
|
|
505
505
|
"outputs": [],
|
|
506
506
|
"payable": false,
|
|
507
507
|
"stateMutability": "nonpayable",
|
|
@@ -517,14 +517,24 @@
|
|
|
517
517
|
{
|
|
518
518
|
"name": "token",
|
|
519
519
|
"type": "address"
|
|
520
|
-
}
|
|
520
|
+
}
|
|
521
|
+
],
|
|
522
|
+
"name": "snapshotBalance",
|
|
523
|
+
"outputs": [],
|
|
524
|
+
"payable": false,
|
|
525
|
+
"stateMutability": "nonpayable",
|
|
526
|
+
"type": "function"
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"constant": false,
|
|
530
|
+
"inputs": [
|
|
521
531
|
{
|
|
522
|
-
"name": "
|
|
523
|
-
"type": "
|
|
532
|
+
"name": "_creator",
|
|
533
|
+
"type": "bytes32"
|
|
524
534
|
},
|
|
525
535
|
{
|
|
526
|
-
"name": "
|
|
527
|
-
"type": "
|
|
536
|
+
"name": "token",
|
|
537
|
+
"type": "address"
|
|
528
538
|
}
|
|
529
539
|
],
|
|
530
540
|
"name": "calculateAverageBalance",
|
|
@@ -23,8 +23,9 @@ export default class Custody extends VerifiedContract {
|
|
|
23
23
|
signTransaction(_creator: string, _participant: string, _tx: string, options?: Options): any;
|
|
24
24
|
checkQuorum(_creator: string, _txid: string, options?: Options): any;
|
|
25
25
|
getShards(_creator: string, _txid: string, options?: Options): any;
|
|
26
|
+
cleanTx(_creator: string, _txid: string, options?: Options): any;
|
|
26
27
|
snapshotBalance(_creator: string, _token: string, options?: Options): any;
|
|
27
|
-
calculateAverageBalance(_creator: string, _token: string,
|
|
28
|
+
calculateAverageBalance(_creator: string, _token: string, options?: Options): any;
|
|
28
29
|
collectCustodyFee(_token: string, options?: Options): any;
|
|
29
30
|
setDistributor(_nominee: string, options?: Options): any;
|
|
30
31
|
setCustodyFee(_fee: string, options?: Options): any;
|
|
@@ -28,6 +28,7 @@ var FUNCTIONS;
|
|
|
28
28
|
FUNCTIONS["COLLECTCUSTODYFEE"] = "collectCustodyFee";
|
|
29
29
|
FUNCTIONS["SETDISTRIBUTOR"] = "setDistributor";
|
|
30
30
|
FUNCTIONS["SETCUSTODYFEE"] = "setCustodyFee";
|
|
31
|
+
FUNCTIONS["CLEANTX"] = "cleanTx";
|
|
31
32
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
32
33
|
class Custody extends index_1.VerifiedContract {
|
|
33
34
|
constructor(signer, contractNetworkAddress) {
|
|
@@ -96,16 +97,19 @@ class Custody extends index_1.VerifiedContract {
|
|
|
96
97
|
await this.validateInput(index_1.DATATYPES.STRING, _txid);
|
|
97
98
|
return this.callContract(FUNCTIONS.GETSHARDS, _creator, _txid, options);
|
|
98
99
|
}
|
|
100
|
+
async cleanTx(_creator, _txid, options) {
|
|
101
|
+
await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
|
|
102
|
+
await this.validateInput(index_1.DATATYPES.STRING, _txid);
|
|
103
|
+
return this.callContract(FUNCTIONS.CLEANTX, _creator, _txid, options);
|
|
104
|
+
}
|
|
99
105
|
async snapshotBalance(_creator, _token, options) {
|
|
100
106
|
await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
|
|
101
107
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _token);
|
|
102
108
|
return this.callContract(FUNCTIONS.SNAPSHOT, _creator, _token, options);
|
|
103
109
|
}
|
|
104
|
-
async calculateAverageBalance(_creator, _token,
|
|
110
|
+
async calculateAverageBalance(_creator, _token, options) {
|
|
105
111
|
await this.validateInput(index_1.DATATYPES.BYTE32, _creator);
|
|
106
112
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _token);
|
|
107
|
-
await this.validateInput(index_1.DATATYPES.NUMBER, _fromTime);
|
|
108
|
-
await this.validateInput(index_1.DATATYPES.NUMBER, _toTime);
|
|
109
113
|
return this.callContract(FUNCTIONS.CALCULATEAVERAGEBALANCE, _creator, _token, _fromTime, _toTime, options);
|
|
110
114
|
}
|
|
111
115
|
async collectCustodyFee(_token, options) {
|
|
@@ -328,7 +328,7 @@ const contractAddress = {
|
|
|
328
328
|
'BalancerSecondaryIssueManager': '0xE3e3e9b8c0c292eD3756C7A1037322738de6B7FC',
|
|
329
329
|
'MarginTradingPoolFactory': '0xB1ae3Fc5B16d3736bf0db20606fB9a10b435392c',
|
|
330
330
|
'BalancerMarginIssueManager': '0xcC52ce78a8fF2198FBD37D85D1686E7C80604cd3',
|
|
331
|
-
'Custody': '
|
|
331
|
+
'Custody': '0xD292658282828BB845c1c64CA19621a98c622c6a',
|
|
332
332
|
'Compound': '',
|
|
333
333
|
'CASH': {
|
|
334
334
|
'VCUSD': '0x9947770931A0F4AC74941eaAE003991d2d487d83',
|