@verified-network/verified-sdk 0.9.8 → 0.9.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.
- package/dist/abi/L1distribution/Distribution.json +4604 -4577
- package/dist/abi/assetmanager/Client.json +15922 -11270
- package/dist/abi/assetmanager/balancer/PrimaryIssueManager.json +28984 -19941
- package/dist/abi/assetmanager/balancer/SecondaryIssueManager.json +25776 -20836
- package/dist/abi/deposits/Bond.json +4 -4
- package/dist/abi/deposits/Cash.json +4 -4
- package/dist/abi/deposits/Factory.json +679 -679
- package/dist/abi/deposits/Rates.json +3 -3
- package/dist/abi/deposits/Security.json +3 -3
- package/dist/abi/liquidity/Liquidity.json +4071 -5411
- package/dist/contract/amm/primary/index.js +30 -12
- package/dist/contract/amm/secondary/index.js +11 -9
- package/dist/contract/distribution/index.js +29 -0
- package/dist/contractAddress/index.js +17 -17
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@ const PrimaryIssueManager_json_2 = require("../../../abi/assetmanager/kyber/Prim
|
|
|
8
8
|
var FUNCTIONS;
|
|
9
9
|
(function (FUNCTIONS) {
|
|
10
10
|
FUNCTIONS["OFFER"] = "offer";
|
|
11
|
+
FUNCTIONS["OFFERTERMS"] = "setOfferTerms";
|
|
11
12
|
FUNCTIONS["GETOFFERED"] = "getOffered";
|
|
12
13
|
FUNCTIONS["GETOFFERMADE"] = "getOfferMade";
|
|
13
14
|
FUNCTIONS["GETALLOTTEDSTAKE"] = "getAllotedStake";
|
|
@@ -25,27 +26,44 @@ class PrimaryIssueManager extends index_1.VerifiedContract {
|
|
|
25
26
|
constructor(signer, platformAddress, platform) {
|
|
26
27
|
const address = platformAddress;
|
|
27
28
|
if (platform == "balancer")
|
|
28
|
-
super(address, JSON.stringify(PrimaryIssueManager_json_1.
|
|
29
|
+
super(address, JSON.stringify(PrimaryIssueManager_json_1.abi), signer);
|
|
29
30
|
else if (platform == "kyber")
|
|
30
|
-
super(address, JSON.stringify(PrimaryIssueManager_json_2.
|
|
31
|
+
super(address, JSON.stringify(PrimaryIssueManager_json_2.abi), signer);
|
|
31
32
|
this.contractAddress = address;
|
|
32
33
|
}
|
|
33
|
-
async offer(owned, isin, offered, tomatch, desired, min, issuer,
|
|
34
|
-
//_hashedMessage: string,
|
|
35
|
-
//_v: string,
|
|
36
|
-
//_r: string,
|
|
37
|
-
//_s: string,
|
|
34
|
+
async offer(owned, isin, offered, tomatch, desired, min, issuer, docs,
|
|
35
|
+
// _hashedMessage: string,
|
|
36
|
+
// _v: string,
|
|
37
|
+
// _r: string,
|
|
38
|
+
// _s: string,
|
|
38
39
|
options) {
|
|
39
40
|
await this.validateInput(index_1.DATATYPES.ADDRESS, owned);
|
|
40
41
|
await this.validateInput(index_1.DATATYPES.ADDRESS, tomatch);
|
|
41
42
|
await this.validateInput(index_1.DATATYPES.ADDRESS, issuer);
|
|
42
43
|
await this.validateInput(index_1.DATATYPES.STRING, isin);
|
|
44
|
+
await this.validateInput(index_1.DATATYPES.STRING, docs);
|
|
43
45
|
await this.validateInput(index_1.DATATYPES.NUMBER, offered);
|
|
44
46
|
await this.validateInput(index_1.DATATYPES.NUMBER, desired);
|
|
45
47
|
await this.validateInput(index_1.DATATYPES.NUMBER, min);
|
|
46
|
-
return this.callContract(FUNCTIONS.OFFER, owned, this.sanitiseInput(index_1.DATATYPES.BYTE32, isin), offered, tomatch, desired, min, issuer,
|
|
48
|
+
return this.callContract(FUNCTIONS.OFFER, owned, this.sanitiseInput(index_1.DATATYPES.BYTE32, isin), offered, tomatch, desired, min, issuer, docs,
|
|
47
49
|
/*_hashedMessage, _v, _r, _s,*/ options);
|
|
48
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Lets issuer or manager set minimum order size for issue
|
|
53
|
+
* @param owner address of issuer
|
|
54
|
+
* @param offered address of security issued
|
|
55
|
+
* @param tomatch address of currency paired
|
|
56
|
+
* @param ordersize minimum order value
|
|
57
|
+
* @param options
|
|
58
|
+
* @returns
|
|
59
|
+
*/
|
|
60
|
+
async setOfferTerms(owner, offered, tomatch, ordersize, _hashedMessage, _v, _r, _s, options) {
|
|
61
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, owner);
|
|
62
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, offered);
|
|
63
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, tomatch);
|
|
64
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, ordersize);
|
|
65
|
+
return this.callContract(FUNCTIONS.OFFERTERMS, owner, offered, tomatch, ordersize, _hashedMessage, _v, _r, _s, options);
|
|
66
|
+
}
|
|
49
67
|
/**
|
|
50
68
|
* Gets security tokens offered for passed token parameter
|
|
51
69
|
* @param offered address of liquidity token offered by asset manager
|
|
@@ -116,7 +134,7 @@ class PrimaryIssueManager extends index_1.VerifiedContract {
|
|
|
116
134
|
}
|
|
117
135
|
async getSubscribers(poolId, _hashedMessage, _v, _r, _s, options) {
|
|
118
136
|
await this.validateInput(index_1.DATATYPES.STRING, poolId);
|
|
119
|
-
return this.callContract(FUNCTIONS.GETSUBSCRIBERS,
|
|
137
|
+
return this.callContract(FUNCTIONS.GETSUBSCRIBERS, poolId, _hashedMessage, _v, _r, _s, options);
|
|
120
138
|
}
|
|
121
139
|
async close(security, redeem, _hashedMessage, _v, _r, _s, options) {
|
|
122
140
|
await this.validateInput(index_1.DATATYPES.ADDRESS, security);
|
|
@@ -127,16 +145,16 @@ class PrimaryIssueManager extends index_1.VerifiedContract {
|
|
|
127
145
|
await this.validateInput(index_1.DATATYPES.ADDRESS, asset);
|
|
128
146
|
await this.validateInput(index_1.DATATYPES.NUMBER, amnt);
|
|
129
147
|
await this.validateInput(index_1.DATATYPES.STRING, poolid);
|
|
130
|
-
return this.callContract(FUNCTIONS.ACCEPT,
|
|
148
|
+
return this.callContract(FUNCTIONS.ACCEPT, poolid, investor, amnt, asset, _hashedMessage, _v, _r, _s, options);
|
|
131
149
|
}
|
|
132
150
|
async reject(poolid, investor, _hashedMessage, _v, _r, _s, options) {
|
|
133
151
|
await this.validateInput(index_1.DATATYPES.ADDRESS, investor);
|
|
134
152
|
await this.validateInput(index_1.DATATYPES.STRING, poolid);
|
|
135
|
-
return this.callContract(FUNCTIONS.REJECT,
|
|
153
|
+
return this.callContract(FUNCTIONS.REJECT, poolid, investor, _hashedMessage, _v, _r, _s, options);
|
|
136
154
|
}
|
|
137
155
|
async settle(poolId, _hashedMessage, _v, _r, _s, options) {
|
|
138
156
|
await this.validateInput(index_1.DATATYPES.STRING, poolId);
|
|
139
|
-
return this.callContract(FUNCTIONS.SETTLE,
|
|
157
|
+
return this.callContract(FUNCTIONS.SETTLE, poolId, _hashedMessage, _v, _r, _s, options);
|
|
140
158
|
}
|
|
141
159
|
}
|
|
142
160
|
exports.default = PrimaryIssueManager;
|
|
@@ -18,25 +18,27 @@ class SecondaryIssueManager extends index_1.VerifiedContract {
|
|
|
18
18
|
super(address, JSON.stringify(SecondaryIssueManager_json_1.abi), signer);
|
|
19
19
|
this.contractAddress = address;
|
|
20
20
|
}
|
|
21
|
-
async issueSecondary(security, currency,
|
|
21
|
+
async issueSecondary(security, currency, securityAmount, minOrderSize, currencyAmount, _hashedMessage, _v, _r, _s, options) {
|
|
22
22
|
await this.validateInput(index_1.DATATYPES.ADDRESS, security);
|
|
23
23
|
await this.validateInput(index_1.DATATYPES.ADDRESS, currency);
|
|
24
|
-
await this.validateInput(index_1.DATATYPES.NUMBER,
|
|
25
|
-
|
|
24
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, securityAmount);
|
|
25
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, minOrderSize);
|
|
26
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, currencyAmount);
|
|
27
|
+
return this.callContract(FUNCTIONS.ISSUESECONDARY, security, currency, securityAmount, minOrderSize, currencyAmount, _hashedMessage, _v, _r, _s, options);
|
|
26
28
|
}
|
|
27
|
-
async getSettlementRequests(dpid, options) {
|
|
29
|
+
async getSettlementRequests(dpid, poolid, options) {
|
|
28
30
|
await this.validateInput(index_1.DATATYPES.STRING, dpid);
|
|
29
|
-
|
|
31
|
+
await this.validateInput(index_1.DATATYPES.STRING, poolid);
|
|
32
|
+
return this.callContract(FUNCTIONS.GETSETTLEMENTREQUESTS, this.sanitiseInput(index_1.DATATYPES.BYTE32, dpid), poolid, options);
|
|
30
33
|
}
|
|
31
34
|
async getSettlementRequest(ref, options) {
|
|
32
35
|
await this.validateInput(index_1.DATATYPES.STRING, ref);
|
|
33
|
-
return this.callContract(FUNCTIONS.GETSETTLEMENTREQUEST,
|
|
36
|
+
return this.callContract(FUNCTIONS.GETSETTLEMENTREQUEST, ref, options);
|
|
34
37
|
}
|
|
35
|
-
async setSettlementStatus(ref, status,
|
|
38
|
+
async setSettlementStatus(ref, status, options) {
|
|
36
39
|
await this.validateInput(index_1.DATATYPES.STRING, ref);
|
|
37
40
|
await this.validateInput(index_1.DATATYPES.STRING, status);
|
|
38
|
-
|
|
39
|
-
return this.callContract(FUNCTIONS.SETSETTLEMENTSTATUS, this.sanitiseInput(index_1.DATATYPES.BYTE32, ref), this.sanitiseInput(index_1.DATATYPES.BYTE32, status), this.sanitiseInput(index_1.DATATYPES.BYTE32, id), options);
|
|
41
|
+
return this.callContract(FUNCTIONS.SETSETTLEMENTSTATUS, this.sanitiseInput(index_1.DATATYPES.BYTE32, ref), this.sanitiseInput(index_1.DATATYPES.BYTE32, status), options);
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
exports.default = SecondaryIssueManager;
|
|
@@ -11,6 +11,9 @@ var FUNCTIONS;
|
|
|
11
11
|
FUNCTIONS["GETPAYMENTFEECOLLECTED"] = "getPaymentFeeCollected";
|
|
12
12
|
FUNCTIONS["GETLOANFEECOLLECTED"] = "getLoanFeeCollected";
|
|
13
13
|
FUNCTIONS["SHAREFEE"] = "shareFee";
|
|
14
|
+
FUNCTIONS["GETISSUINGFEECOLLECTED"] = "getIssuingFeeCollected";
|
|
15
|
+
FUNCTIONS["GETTRADINGFEECOLLECTED"] = "getTradingFeeCollected";
|
|
16
|
+
FUNCTIONS["SHARECOLLECTEDFEE"] = "shareCollection";
|
|
14
17
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
15
18
|
class DistributionContract extends index_1.VerifiedContract {
|
|
16
19
|
constructor(signer) {
|
|
@@ -25,6 +28,12 @@ class DistributionContract extends index_1.VerifiedContract {
|
|
|
25
28
|
async shareFee() {
|
|
26
29
|
return this.callContract(FUNCTIONS.SHAREFEE);
|
|
27
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
Shares issuing and trading fee collected with shareholders
|
|
33
|
+
*/
|
|
34
|
+
async shareCollection() {
|
|
35
|
+
return this.callContract(FUNCTIONS.SHARECOLLECTEDFEE);
|
|
36
|
+
}
|
|
28
37
|
/**
|
|
29
38
|
Gets payment fee collected
|
|
30
39
|
@param _currency payment fee in currency collected
|
|
@@ -41,6 +50,26 @@ class DistributionContract extends index_1.VerifiedContract {
|
|
|
41
50
|
await this.validateInput(index_1.DATATYPES.STRING, _currency);
|
|
42
51
|
return this.callContract(FUNCTIONS.GETLOANFEECOLLECTED, this.sanitiseInput(index_1.DATATYPES.BYTE32, _currency), options);
|
|
43
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
Gets issuing fee collected
|
|
55
|
+
@param _platform address of platform from which fee needs to be collected
|
|
56
|
+
@param _token address of token for which fee needs to be collected
|
|
57
|
+
*/
|
|
58
|
+
async getIssuingFeeCollected(_platform, _token, options) {
|
|
59
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _platform);
|
|
60
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _token);
|
|
61
|
+
return this.callContract(FUNCTIONS.GETISSUINGFEECOLLECTED, _platform, _token, options);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
Gets trading fee collected
|
|
65
|
+
@param _platform address of platform from which fee needs to be collected
|
|
66
|
+
@param _token address of token for which fee needs to be collected
|
|
67
|
+
*/
|
|
68
|
+
async getTradingFeeCollected(_platform, _token, options) {
|
|
69
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _platform);
|
|
70
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _token);
|
|
71
|
+
return this.callContract(FUNCTIONS.GETTRADINGFEECOLLECTED, _platform, _token, options);
|
|
72
|
+
}
|
|
44
73
|
/**
|
|
45
74
|
Get revenue shareholders
|
|
46
75
|
@param _type type of shareholder, ie, 'BUSINESS' or 'OPERATOR'
|
|
@@ -2,42 +2,42 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const contractAddress = {
|
|
4
4
|
'L1-goerli': {
|
|
5
|
-
'Client': '
|
|
5
|
+
'Client': '0x7297afd7950C966367A31cb15A56C2bC81E22AC0',
|
|
6
6
|
'KYC': '',
|
|
7
7
|
'System': '',
|
|
8
8
|
'Holder': '',
|
|
9
9
|
'Ledger': '',
|
|
10
10
|
'Account': '',
|
|
11
|
-
'Factory': '
|
|
12
|
-
'Cash': '
|
|
13
|
-
'Bond': '
|
|
11
|
+
'Factory': '0x6405ddCD72841f0827D51A65a6AB89B7486d4A48',
|
|
12
|
+
'Cash': '0x2f7Ff905D8aD56Ab2F9afE10AD7486DbD258d3F8',
|
|
13
|
+
'Bond': '0x2E44D8FDd5343142b5224c57E44E13e249e93FdB',
|
|
14
14
|
'Token': '',
|
|
15
15
|
'Oracle': '',
|
|
16
|
-
'Rates': '
|
|
16
|
+
'Rates': '0x04d3C888F112AF5cD43928e2456631401D591664',
|
|
17
17
|
'PreTrade': '',
|
|
18
18
|
'Trade': '',
|
|
19
19
|
'PostTrade': '',
|
|
20
20
|
'SecuritiesRegistry': '',
|
|
21
|
-
'Security': '
|
|
21
|
+
'Security': '0xDF81795A2c6078FD541F6C5E949153F2bC76b6b6',
|
|
22
22
|
'OrderPool': '',
|
|
23
23
|
'PoolFactory': '',
|
|
24
24
|
'Stocks': '',
|
|
25
25
|
'Bonds': '',
|
|
26
|
-
'Liquidity': '
|
|
27
|
-
'Vitta': '
|
|
28
|
-
'Distribution': '
|
|
29
|
-
'BalancerPrimaryIssueManager': '
|
|
30
|
-
'BalancerSecondaryIssueManager': '
|
|
26
|
+
'Liquidity': '0x9Ab60Ce0ae460Cfa7961858c0065034e35e009FD',
|
|
27
|
+
'Vitta': '0xB40716004C92C8B6C65DA47b8073089027C189D1',
|
|
28
|
+
'Distribution': '0x721965FAf93C94EeB1479F649f3c6ce67b0108D2',
|
|
29
|
+
'BalancerPrimaryIssueManager': '0x215a3B1F93b231e5c085aE4016aeF89BD5D0EF14',
|
|
30
|
+
'BalancerSecondaryIssueManager': '0xE2FC98AF62c4274819a3EBc96eB0a34980CEE6F0',
|
|
31
31
|
'Custody': '0xF6ebB33E758eC36A2D3065F4633131DFF8307A07',
|
|
32
32
|
'CASH': {
|
|
33
|
-
'VCUSD': '
|
|
34
|
-
'VCEUR': '
|
|
35
|
-
'VCINR': '
|
|
33
|
+
'VCUSD': '0x441059c70c8294BecC1796275507C93Ea61db12B',
|
|
34
|
+
'VCEUR': '0xA63D3324C253A6947dFfC2Fa7731297073632fce',
|
|
35
|
+
'VCINR': '0x17166D19107Be2a588Adf9773492090631e97c80'
|
|
36
36
|
},
|
|
37
37
|
'BOND': {
|
|
38
|
-
'VBUSD': '
|
|
39
|
-
'VBEUR': '
|
|
40
|
-
'VBINR': '
|
|
38
|
+
'VBUSD': '0xA5CcB17569195C2C4DC71099232C5046da568b06',
|
|
39
|
+
'VBEUR': '0xBa60968eF7A487B53c22e019061d4FDa946313C1',
|
|
40
|
+
'VBINR': '0x167E576bEBf95d25449E6EFa0516b23d52Bef19a'
|
|
41
41
|
},
|
|
42
42
|
},
|
|
43
43
|
'L2-goerli': {
|