@verified-network/verified-sdk 0.5.7 → 0.5.8
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/accounts/Account.json +3 -3
- package/dist/abi/accounts/Client.json +676 -676
- package/dist/abi/accounts/Holder.json +3 -3
- package/dist/abi/accounts/Kyc.json +3 -3
- package/dist/abi/accounts/Ledger.json +3 -3
- package/dist/abi/accounts/System.json +4 -4
- package/dist/abi/assetmanager/BalancerManager.json +43520 -0
- package/dist/abi/liquidity/Distribution.json +53 -53
- package/dist/abi/liquidity/Liquidity.json +24243 -18143
- package/dist/abi/payments/Bond.json +930 -930
- package/dist/abi/payments/Cash.json +8537 -8433
- package/dist/abi/payments/Factory.json +1761 -1761
- package/dist/abi/payments/Oracle.json +2176 -2176
- package/dist/abi/payments/Rates.json +1376 -1376
- package/dist/abi/payments/Token.json +1220 -1220
- package/dist/abi/securities/Bonds.json +7138 -9413
- package/dist/abi/securities/Products.json +5956 -4766
- package/dist/abi/securities/Stocks.json +5555 -5849
- package/dist/abi/trades/OrderPool.json +4 -4
- package/dist/abi/trades/PoolFactory.json +3 -3
- package/dist/abi/trades/PostTrade.json +3 -3
- package/dist/abi/trades/PreTrade.json +4 -4
- package/dist/abi/trades/SecuritiesRegistry.json +4 -4
- package/dist/abi/trades/Security.json +3 -3
- package/dist/abi/trades/Trade.json +4 -4
- package/dist/contract/assetmanager/index.js +61 -0
- package/dist/contract/balancer/index.js +32 -12
- package/dist/contract/liquidity/index.js +80 -5
- package/dist/contract/product/index.js +9 -0
- package/dist/contract/securitiesregistry/index.js +1 -1
- package/dist/contractAddress/index.js +31 -30
- package/dist/index.js +3 -1
- package/package.json +1 -1
|
@@ -56207,14 +56207,14 @@
|
|
|
56207
56207
|
"3": {
|
|
56208
56208
|
"events": {},
|
|
56209
56209
|
"links": {
|
|
56210
|
-
"stringutils": "
|
|
56210
|
+
"stringutils": "0x2D14e93232C3C276073D2496732CCb82a9949918"
|
|
56211
56211
|
},
|
|
56212
|
-
"address": "
|
|
56213
|
-
"transactionHash": "
|
|
56212
|
+
"address": "0xB8F217a7a49B250ed02577FC9F9C4B538da8c847",
|
|
56213
|
+
"transactionHash": "0xfdb5b50c60b41811cb18c041647051fcdb9b28533d18fe3930feeeeed386579b"
|
|
56214
56214
|
}
|
|
56215
56215
|
},
|
|
56216
56216
|
"schemaVersion": "3.4.3",
|
|
56217
|
-
"updatedAt": "2022-02-
|
|
56217
|
+
"updatedAt": "2022-02-19T08:19:00.642Z",
|
|
56218
56218
|
"networkType": "ethereum",
|
|
56219
56219
|
"devdoc": {
|
|
56220
56220
|
"methods": {}
|
|
@@ -5893,12 +5893,12 @@
|
|
|
5893
5893
|
"3": {
|
|
5894
5894
|
"events": {},
|
|
5895
5895
|
"links": {},
|
|
5896
|
-
"address": "
|
|
5897
|
-
"transactionHash": "
|
|
5896
|
+
"address": "0xBF4872e094A621Be1eCE8f72bbc78C885034ac98",
|
|
5897
|
+
"transactionHash": "0x2cc37f99a3d782456afa14fd535623d806e440f5145b8889af74aa25f9edb807"
|
|
5898
5898
|
}
|
|
5899
5899
|
},
|
|
5900
5900
|
"schemaVersion": "3.4.3",
|
|
5901
|
-
"updatedAt": "2022-02-
|
|
5901
|
+
"updatedAt": "2022-02-19T08:19:00.628Z",
|
|
5902
5902
|
"networkType": "ethereum",
|
|
5903
5903
|
"devdoc": {
|
|
5904
5904
|
"methods": {}
|
|
@@ -15934,12 +15934,12 @@
|
|
|
15934
15934
|
"3": {
|
|
15935
15935
|
"events": {},
|
|
15936
15936
|
"links": {},
|
|
15937
|
-
"address": "
|
|
15938
|
-
"transactionHash": "
|
|
15937
|
+
"address": "0x2cdc21375844Ad844Cef6f9Ce19379f38C073f53",
|
|
15938
|
+
"transactionHash": "0x8b3c88b6142e843f2abfec7601d78cea08bbb4bbb53a736ed8e9e53b8b01941f"
|
|
15939
15939
|
}
|
|
15940
15940
|
},
|
|
15941
15941
|
"schemaVersion": "3.4.3",
|
|
15942
|
-
"updatedAt": "2022-02-
|
|
15942
|
+
"updatedAt": "2022-02-19T08:19:00.983Z",
|
|
15943
15943
|
"networkType": "ethereum",
|
|
15944
15944
|
"devdoc": {
|
|
15945
15945
|
"methods": {}
|
|
@@ -27091,14 +27091,14 @@
|
|
|
27091
27091
|
"3": {
|
|
27092
27092
|
"events": {},
|
|
27093
27093
|
"links": {
|
|
27094
|
-
"stringutils": "
|
|
27094
|
+
"stringutils": "0x2D14e93232C3C276073D2496732CCb82a9949918"
|
|
27095
27095
|
},
|
|
27096
|
-
"address": "
|
|
27097
|
-
"transactionHash": "
|
|
27096
|
+
"address": "0xc8Ac3C49583122a25725784B26aEdcBddE263d26",
|
|
27097
|
+
"transactionHash": "0xdf0788ad6434ccf862183541b9e28dbfe9d2d96be703481b6acea921b46150d4"
|
|
27098
27098
|
}
|
|
27099
27099
|
},
|
|
27100
27100
|
"schemaVersion": "3.4.3",
|
|
27101
|
-
"updatedAt": "2022-02-
|
|
27101
|
+
"updatedAt": "2022-02-19T08:19:00.604Z",
|
|
27102
27102
|
"networkType": "ethereum",
|
|
27103
27103
|
"devdoc": {
|
|
27104
27104
|
"methods": {}
|
|
@@ -22005,14 +22005,14 @@
|
|
|
22005
22005
|
}
|
|
22006
22006
|
},
|
|
22007
22007
|
"links": {
|
|
22008
|
-
"stringutils": "
|
|
22008
|
+
"stringutils": "0x2D14e93232C3C276073D2496732CCb82a9949918"
|
|
22009
22009
|
},
|
|
22010
|
-
"address": "
|
|
22011
|
-
"transactionHash": "
|
|
22010
|
+
"address": "0xf381712b49D86768c729446254B474e31364fa28",
|
|
22011
|
+
"transactionHash": "0x8c2c8d99f40d5977fcaade7186de184f2a703c6b65130468ba26589abe6dbf3b"
|
|
22012
22012
|
}
|
|
22013
22013
|
},
|
|
22014
22014
|
"schemaVersion": "3.4.3",
|
|
22015
|
-
"updatedAt": "2022-02-
|
|
22015
|
+
"updatedAt": "2022-02-19T08:19:00.616Z",
|
|
22016
22016
|
"networkType": "ethereum",
|
|
22017
22017
|
"devdoc": {
|
|
22018
22018
|
"methods": {
|
|
@@ -7307,12 +7307,12 @@
|
|
|
7307
7307
|
"3": {
|
|
7308
7308
|
"events": {},
|
|
7309
7309
|
"links": {},
|
|
7310
|
-
"address": "
|
|
7311
|
-
"transactionHash": "
|
|
7310
|
+
"address": "0xc8489565c193ad196eDED4488538ef5aC18242b1",
|
|
7311
|
+
"transactionHash": "0x742a0c2787cb45037b71dd4c4b95968637220ce0278975d964db373d2350737c"
|
|
7312
7312
|
}
|
|
7313
7313
|
},
|
|
7314
7314
|
"schemaVersion": "3.4.3",
|
|
7315
|
-
"updatedAt": "2022-02-
|
|
7315
|
+
"updatedAt": "2022-02-19T08:19:00.624Z",
|
|
7316
7316
|
"networkType": "ethereum",
|
|
7317
7317
|
"devdoc": {
|
|
7318
7318
|
"methods": {
|
|
@@ -33340,14 +33340,14 @@
|
|
|
33340
33340
|
"3": {
|
|
33341
33341
|
"events": {},
|
|
33342
33342
|
"links": {
|
|
33343
|
-
"stringutils": "
|
|
33343
|
+
"stringutils": "0x2D14e93232C3C276073D2496732CCb82a9949918"
|
|
33344
33344
|
},
|
|
33345
|
-
"address": "
|
|
33346
|
-
"transactionHash": "
|
|
33345
|
+
"address": "0xAd0d9B75b25F9291610dfF5c2536566eA94277c3",
|
|
33346
|
+
"transactionHash": "0x2b0a930cce29e0d967776513a51719068465710a95312f8db7e991478df4c1c1"
|
|
33347
33347
|
}
|
|
33348
33348
|
},
|
|
33349
33349
|
"schemaVersion": "3.4.3",
|
|
33350
|
-
"updatedAt": "2022-02-
|
|
33350
|
+
"updatedAt": "2022-02-19T08:19:00.662Z",
|
|
33351
33351
|
"networkType": "ethereum",
|
|
33352
33352
|
"devdoc": {
|
|
33353
33353
|
"methods": {}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// SPDX-License-Identifier: BUSL-1.1
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
const index_1 = require("../index");
|
|
6
|
+
const BalancerManager_json_1 = require("../../abi/assetmanager/BalancerManager.json");
|
|
7
|
+
var FUNCTIONS;
|
|
8
|
+
(function (FUNCTIONS) {
|
|
9
|
+
FUNCTIONS["OFFER"] = "offer";
|
|
10
|
+
FUNCTIONS["GETOFFERED"] = "getOffered";
|
|
11
|
+
FUNCTIONS["GETOFFERMADE"] = "getOfferMade";
|
|
12
|
+
FUNCTIONS["GETALLOTTEDSTAKE"] = "getAllotedStake";
|
|
13
|
+
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
14
|
+
class AssetManager extends index_1.VerifiedContract {
|
|
15
|
+
constructor(signer, platformAddress) {
|
|
16
|
+
const chainId = signer.provider._network.chainId.toString();
|
|
17
|
+
const address = platformAddress;
|
|
18
|
+
super(address, JSON.stringify(BalancerManager_json_1.abi), signer);
|
|
19
|
+
this.contractAddress = address;
|
|
20
|
+
}
|
|
21
|
+
async offer(owned, isin, offered, tomatch, desired, min, options) {
|
|
22
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, owned);
|
|
23
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, tomatch);
|
|
24
|
+
await this.validateInput(index_1.DATATYPES.STRING, isin);
|
|
25
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, offered);
|
|
26
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, desired);
|
|
27
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, min);
|
|
28
|
+
return this.callContract(FUNCTIONS.OFFER, owned, this.sanitiseInput(index_1.DATATYPES.BYTE32, isin), offered, tomatch, desired, min, options);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Gets security tokens offered for passed token parameter
|
|
32
|
+
* @param offered address of liquidity token offered by asset manager
|
|
33
|
+
* @param options
|
|
34
|
+
* @returns array of structs of security tokens matching with offered liquidity token
|
|
35
|
+
*/
|
|
36
|
+
async getOffered(offered, options) {
|
|
37
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, offered);
|
|
38
|
+
return this.callContract(FUNCTIONS.GETOFFERED, offered, options);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Gets offer made previously with offered token and token to match
|
|
42
|
+
* @param offered address of offered token
|
|
43
|
+
* @param tomatch address of token to match
|
|
44
|
+
* @param options
|
|
45
|
+
* @returns token struct
|
|
46
|
+
*/
|
|
47
|
+
async getOfferMade(offered, tomatch, options) {
|
|
48
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, offered);
|
|
49
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, tomatch);
|
|
50
|
+
return this.callContract(FUNCTIONS.GETOFFERMADE, offered, tomatch, options);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Gets allotted liquidity stake for caller (asset manager) that is available to invest
|
|
54
|
+
* @param options
|
|
55
|
+
* @returns amount of available liquidity for caller (asset manager)
|
|
56
|
+
*/
|
|
57
|
+
async getAllotedStake(options) {
|
|
58
|
+
return this.callContract(FUNCTIONS.GETALLOTTEDSTAKE, options);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.default = AssetManager;
|
|
@@ -3,26 +3,46 @@
|
|
|
3
3
|
// @ts-nocheck
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
const index_1 = require("../index");
|
|
6
|
-
const BalancerManager_json_1 = require("../../abi/
|
|
6
|
+
const BalancerManager_json_1 = require("../../abi/balancer/BalancerManager.json");
|
|
7
7
|
var FUNCTIONS;
|
|
8
8
|
(function (FUNCTIONS) {
|
|
9
|
-
FUNCTIONS["
|
|
9
|
+
FUNCTIONS["OFFER"] = "offer";
|
|
10
|
+
FUNCTIONS["GETOFFERED"] = "getOffered";
|
|
11
|
+
FUNCTIONS["GETALLOTTEDSTAKE"] = "getAllotedStake";
|
|
10
12
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
11
|
-
class
|
|
13
|
+
class BalancerManager extends index_1.VerifiedContract {
|
|
12
14
|
constructor(signer) {
|
|
13
15
|
const chainId = signer.provider._network.chainId.toString();
|
|
14
16
|
const address = BalancerManager_json_1.networks[chainId].address;
|
|
15
17
|
super(address, JSON.stringify(BalancerManager_json_1.abi), signer);
|
|
16
18
|
this.contractAddress = address;
|
|
17
19
|
}
|
|
18
|
-
async
|
|
19
|
-
await this.validateInput(index_1.DATATYPES.ADDRESS,
|
|
20
|
-
await this.validateInput(index_1.DATATYPES.
|
|
21
|
-
await this.validateInput(index_1.DATATYPES.
|
|
22
|
-
await this.validateInput(index_1.DATATYPES.
|
|
23
|
-
await this.validateInput(index_1.DATATYPES.NUMBER,
|
|
24
|
-
await this.validateInput(index_1.DATATYPES.NUMBER,
|
|
25
|
-
return this.callContract(FUNCTIONS.
|
|
20
|
+
async offer(owned, isin, offered, tomatch, desired, min, options) {
|
|
21
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, owned);
|
|
22
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, tomatch);
|
|
23
|
+
await this.validateInput(index_1.DATATYPES.STRING, isin);
|
|
24
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, offered);
|
|
25
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, desired);
|
|
26
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, min);
|
|
27
|
+
return this.callContract(FUNCTIONS.OFFER, owned, this.sanitiseInput(index_1.DATATYPES.BYTE32, isin), offered, tomatch, desired, min, options);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Gets security tokens offered for passed token parameter
|
|
31
|
+
* @param offered address of liquidity token offered by asset manager
|
|
32
|
+
* @param options
|
|
33
|
+
* @returns array of structs of security tokens matching with offered liquidity token
|
|
34
|
+
*/
|
|
35
|
+
async getOffered(offered, options) {
|
|
36
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, offered);
|
|
37
|
+
return this.callContract(FUNCTIONS.GETOFFERED, offered, options);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Gets allotted liquidity stake for caller (asset manager) that is available to invest
|
|
41
|
+
* @param options
|
|
42
|
+
* @returns amount of available liquidity for caller (asset manager)
|
|
43
|
+
*/
|
|
44
|
+
async getAllotedStake(options) {
|
|
45
|
+
return this.callContract(FUNCTIONS.GETALLOTTEDSTAKE, options);
|
|
26
46
|
}
|
|
27
47
|
}
|
|
28
|
-
exports.default =
|
|
48
|
+
exports.default = BalancerManager;
|
|
@@ -17,6 +17,11 @@ var FUNCTIONS;
|
|
|
17
17
|
FUNCTIONS["STAKE"] = "stake";
|
|
18
18
|
FUNCTIONS["WITHDRAW"] = "withdraw";
|
|
19
19
|
FUNCTIONS["DISTRIBUTE"] = "distribute";
|
|
20
|
+
FUNCTIONS["ADDMANAGER"] = "addManager";
|
|
21
|
+
FUNCTIONS["REMOVEMANAGER"] = "removeManager";
|
|
22
|
+
FUNCTIONS["GETMANAGERS"] = "getManagers";
|
|
23
|
+
FUNCTIONS["GETPLATFORMPERFORMANCE"] = "getPlatformPerformance";
|
|
24
|
+
FUNCTIONS["GETMANAGERPERFORMANCE"] = "getManagerPerformance";
|
|
20
25
|
FUNCTIONS["PROVIDELIQUIDITY"] = "provideLiquidity";
|
|
21
26
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
22
27
|
class LiquidityContract extends index_1.VerifiedContract {
|
|
@@ -121,16 +126,86 @@ class LiquidityContract extends index_1.VerifiedContract {
|
|
|
121
126
|
/**
|
|
122
127
|
Pay out of income by Market maker contracts to VITTA Liquidity providers
|
|
123
128
|
@param _distribution amount of VITTA to mint and distribute pro rata to liquidity providers
|
|
129
|
+
@param _manager address of asset manager
|
|
124
130
|
*/
|
|
125
|
-
async distribute(_distribution, options) {
|
|
131
|
+
async distribute(_distribution, _manager, options) {
|
|
126
132
|
await this.validateInput(index_1.DATATYPES.NUMBER, _distribution);
|
|
127
|
-
|
|
133
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _manager);
|
|
134
|
+
return this.callContract(FUNCTIONS.DISTRIBUTE, _distribution, _manager, options);
|
|
128
135
|
}
|
|
129
136
|
/**
|
|
130
|
-
|
|
137
|
+
* Adds asset manager to manage liquidity
|
|
138
|
+
* @param _platform address of market making platform (eg Balancer)
|
|
139
|
+
* @param _manager address of asset manager
|
|
140
|
+
* @param options
|
|
141
|
+
* @returns none
|
|
131
142
|
*/
|
|
132
|
-
async
|
|
133
|
-
|
|
143
|
+
async addManager(_platform, _manager, options) {
|
|
144
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _platform);
|
|
145
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _manager);
|
|
146
|
+
return this.callContract(FUNCTIONS.ADDMANAGER, _platform, _manager, options);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Removes asset manager managing liquidity
|
|
150
|
+
* @param _platform address of market making platform (eg Balancer)
|
|
151
|
+
* @param _manager address of asset manager
|
|
152
|
+
* @param options
|
|
153
|
+
* @returns none
|
|
154
|
+
*/
|
|
155
|
+
async removeManager(_platform, _manager, options) {
|
|
156
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _platform);
|
|
157
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _manager);
|
|
158
|
+
return this.callContract(FUNCTIONS.REMOVEMANAGER, _platform, _manager, options);
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Fetches asset managers
|
|
162
|
+
* @param _platform address of market making platform
|
|
163
|
+
* @param options
|
|
164
|
+
* @returns array of asset manager addresses
|
|
165
|
+
*/
|
|
166
|
+
async getManagers(_platform, options) {
|
|
167
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _platform);
|
|
168
|
+
return this.callContract(FUNCTIONS.GETMANAGERS, _platform, options);
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Gets return on investment performance of market making platform
|
|
172
|
+
* @param _platform address of market making platform
|
|
173
|
+
* @param options
|
|
174
|
+
* @returns uint256 unstakedLiquidity,
|
|
175
|
+
uint256 balancePlatformLiquidity,
|
|
176
|
+
uint256 platformLiquidityProvided,
|
|
177
|
+
uint256 platformCommissionsEarned
|
|
178
|
+
*/
|
|
179
|
+
async getPlatformPerformance(_platform, options) {
|
|
180
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _platform);
|
|
181
|
+
return this.callContract(FUNCTIONS.GETPLATFORMPERFORMANCE, _platform, options);
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Gets return on investment performance for asset manager
|
|
185
|
+
* @param _platform address of market making platform (eg Balancer)
|
|
186
|
+
* @param _manager address of asset manager
|
|
187
|
+
* @param options
|
|
188
|
+
* @returns uint256 managerLiquidityProvided,
|
|
189
|
+
uint256 managerCommissionsEarned
|
|
190
|
+
*/
|
|
191
|
+
async getManagerPerformance(_platform, _manager, options) {
|
|
192
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _platform);
|
|
193
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _manager);
|
|
194
|
+
return this.callContract(FUNCTIONS.GETMANAGERPERFORMANCE, _platform, _manager, options);
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Provides liquidity to asset managers on platform
|
|
198
|
+
* @param _platform address of market making platform
|
|
199
|
+
* @param _manager address of asset manager
|
|
200
|
+
* @param _liquidity amount of liquidity to provision to asset manager on platform
|
|
201
|
+
* @param options
|
|
202
|
+
* @returns none
|
|
203
|
+
*/
|
|
204
|
+
async provideLiquidity(_platform, _manager, _liquidity, options) {
|
|
205
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _platform);
|
|
206
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _manager);
|
|
207
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _liquidity);
|
|
208
|
+
return this.callContract(FUNCTIONS.PROVIDELIQUIDITY, _platform, _manager, _liquidity, options);
|
|
134
209
|
}
|
|
135
210
|
}
|
|
136
211
|
exports.default = LiquidityContract;
|
|
@@ -19,6 +19,8 @@ var FUNCTIONS;
|
|
|
19
19
|
FUNCTIONS["GETISSUE"] = "getIssue";
|
|
20
20
|
FUNCTIONS["GETISSUERNAME"] = "getIssuerName";
|
|
21
21
|
FUNCTIONS["GETISSUERADDRESS"] = "getIssuerAddress";
|
|
22
|
+
FUNCTIONS["GETPLATFORMS"] = "getPlatforms";
|
|
23
|
+
FUNCTIONS["GETPRODUCTREFERENCE"] = "getProductReference";
|
|
22
24
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
23
25
|
class ProductContract extends index_1.VerifiedContract {
|
|
24
26
|
constructor(signer) {
|
|
@@ -87,5 +89,12 @@ class ProductContract extends index_1.VerifiedContract {
|
|
|
87
89
|
await this.validateInput(index_1.DATATYPES.STRING, _ref);
|
|
88
90
|
return this.callContract(FUNCTIONS.GETISSUERADDRESS, _ref, options);
|
|
89
91
|
}
|
|
92
|
+
async getPlatforms() {
|
|
93
|
+
return this.callContract(FUNCTIONS.GETPLATFORMS);
|
|
94
|
+
}
|
|
95
|
+
async getProductReference(_issue, options) {
|
|
96
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _issue);
|
|
97
|
+
return this.callContract(FUNCTIONS.GETPRODUCTREFERENCE, _issue, options);
|
|
98
|
+
}
|
|
90
99
|
}
|
|
91
100
|
exports.default = ProductContract;
|
|
@@ -73,7 +73,7 @@ class SecuritiesRegistryContract extends index_1.VerifiedContract {
|
|
|
73
73
|
async getCorporateActions(_category, _isin, options) {
|
|
74
74
|
await this.validateInput(index_1.DATATYPES.STRING, _category);
|
|
75
75
|
await this.validateInput(index_1.DATATYPES.STRING, _isin);
|
|
76
|
-
return this.callContract(FUNCTIONS.GETCORPORATEACTION,
|
|
76
|
+
return this.callContract(FUNCTIONS.GETCORPORATEACTION, this.sanitiseInput(index_1.DATATYPES.BYTE32, _isin), _category, options);
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
79
|
* Gets credit score
|
|
@@ -2,40 +2,41 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const contractAddress = {
|
|
4
4
|
'ropsten': {
|
|
5
|
-
'Client': '
|
|
6
|
-
'KYC': '
|
|
7
|
-
'System': '
|
|
8
|
-
'Holder': '
|
|
9
|
-
'Ledger': '
|
|
10
|
-
'Account': '
|
|
11
|
-
'Factory': '
|
|
12
|
-
'Cash': '
|
|
13
|
-
'Bond': '
|
|
14
|
-
'Token': '
|
|
15
|
-
'Oracle': '
|
|
16
|
-
'Rates': '
|
|
17
|
-
'PreTrade': '
|
|
18
|
-
'Trade': '
|
|
19
|
-
'PostTrade': '
|
|
20
|
-
'SecuritiesRegistry': '
|
|
21
|
-
'Security': '
|
|
22
|
-
'OrderPool': '
|
|
23
|
-
'PoolFactory': '
|
|
24
|
-
'Products': '
|
|
25
|
-
'Stocks': '
|
|
26
|
-
'Bonds': '
|
|
27
|
-
'Liquidity': '
|
|
28
|
-
'Distribution': '
|
|
5
|
+
'Client': '0x984b378b8a127aE900eA5F19CB7CbA6529eB3633',
|
|
6
|
+
'KYC': '0x09677010AbA42A9E469D093dc50A108D69DB081A',
|
|
7
|
+
'System': '0x79A1895Ea13D5b41274Ab851CC634ed896C1D1F1',
|
|
8
|
+
'Holder': '0x1EaDa3d313beca88e3255b35c1bD3Fd2b6751e24',
|
|
9
|
+
'Ledger': '0x95D661E06Bc5e936804B03Df73C9303A5606F0e6',
|
|
10
|
+
'Account': '0x4F1Cad303FC6D5Fe33Fe17dB64E2AfBAee35595c',
|
|
11
|
+
'Factory': '0x836c720b59dD5912DBB2a99757493816F2B59562',
|
|
12
|
+
'Cash': '0x49C7f8D2D821e9Af80EbaA195A144E5Db97A3B40',
|
|
13
|
+
'Bond': '0xB8810B7EB37E2F38E0fb37e71863fe7F23A167ae',
|
|
14
|
+
'Token': '0x427b78CC87ba3123a825a1BB39eF428443DbdA90',
|
|
15
|
+
'Oracle': '0xce5d6dC4529591863912fE39E8E5645BCe6Db518',
|
|
16
|
+
'Rates': '0x3FfdaD9752B81c294D7b8425Bd1d9Ec55d47cb87',
|
|
17
|
+
'PreTrade': '0xc8Ac3C49583122a25725784B26aEdcBddE263d26',
|
|
18
|
+
'Trade': '0xAd0d9B75b25F9291610dfF5c2536566eA94277c3',
|
|
19
|
+
'PostTrade': '0x2cdc21375844Ad844Cef6f9Ce19379f38C073f53',
|
|
20
|
+
'SecuritiesRegistry': '0xf381712b49D86768c729446254B474e31364fa28',
|
|
21
|
+
'Security': '0xc8489565c193ad196eDED4488538ef5aC18242b1',
|
|
22
|
+
'OrderPool': '0xB8F217a7a49B250ed02577FC9F9C4B538da8c847',
|
|
23
|
+
'PoolFactory': '0xBF4872e094A621Be1eCE8f72bbc78C885034ac98',
|
|
24
|
+
'Products': '0x8d0517CCCB30a6621bF7e718a023664B1626572b',
|
|
25
|
+
'Stocks': '0x595EDBeD8073DadB80e8CF72Ae4e862D0ead6410',
|
|
26
|
+
'Bonds': '0x40a62d2C91C532C7695Ac14fEf2B8F0087699885',
|
|
27
|
+
'Liquidity': '0x8998Ca7e3565F465611088b4AB531b08187Aeaa9',
|
|
28
|
+
'Distribution': '0xe4D6ff708Bb82B24467EAa0964128196C7907e82',
|
|
29
|
+
'AssetManager': '0xfb9BAe10F8dEA2f78292bC3c3b455afc60A0c321',
|
|
29
30
|
'Custody': '0xb6DD33C076fE95ffACC84E048Bda1caa6C304673',
|
|
30
31
|
'CASH': {
|
|
31
|
-
'VCUSD': '
|
|
32
|
-
'VCEUR': '
|
|
33
|
-
'VCINR': '
|
|
32
|
+
'VCUSD': '0xac27eeA1D7B9778D5C8D9b595282AEA076e54E90',
|
|
33
|
+
'VCEUR': '0xC25Dac47A2e323Da3eE1A665ACd0C62626Ca8279',
|
|
34
|
+
'VCINR': '0xA268e5B4e980BeedCCB11635454AA0DC89Ba06B2'
|
|
34
35
|
},
|
|
35
36
|
'BOND': {
|
|
36
|
-
'VBUSD': '
|
|
37
|
-
'VBEUR': '
|
|
38
|
-
'VBINR': '
|
|
37
|
+
'VBUSD': '0x765414604B95130eD910fae412279D957278b5Fc',
|
|
38
|
+
'VBEUR': '0x3AE4379Df6578c08De873A2503FEe33252585552',
|
|
39
|
+
'VBINR': '0x945c4C7fDe7fB281521bB8c348F749121ab81c95'
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
};
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
5
|
};
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.contractAddress = exports.utils = exports.RatesContract = exports.LiquidityContract = exports.CustodyContract = exports.BondsContract = exports.StocksContract = exports.ProductContract = exports.DistributionContract = exports.OracleContract = exports.SecurityContract = exports.TokenContract = exports.FactoryContract = exports.TradeContract = exports.SecuritiesRegistryContract = exports.PreTradeContract = exports.PostTradeContract = exports.PoolFactoryContract = exports.OrderPoolContract = exports.CashContract = exports.BondContract = exports.AccountContract = exports.LedgerContract = exports.HolderContract = exports.SystemContract = exports.KYCContract = exports.ClientContract = exports.Provider = exports.VerifiedWallet = void 0;
|
|
7
|
+
exports.contractAddress = exports.utils = exports.AssetManager = exports.RatesContract = exports.LiquidityContract = exports.CustodyContract = exports.BondsContract = exports.StocksContract = exports.ProductContract = exports.DistributionContract = exports.OracleContract = exports.SecurityContract = exports.TokenContract = exports.FactoryContract = exports.TradeContract = exports.SecuritiesRegistryContract = exports.PreTradeContract = exports.PostTradeContract = exports.PoolFactoryContract = exports.OrderPoolContract = exports.CashContract = exports.BondContract = exports.AccountContract = exports.LedgerContract = exports.HolderContract = exports.SystemContract = exports.KYCContract = exports.ClientContract = exports.Provider = exports.VerifiedWallet = void 0;
|
|
8
8
|
const wallet_1 = require("./wallet");
|
|
9
9
|
Object.defineProperty(exports, "VerifiedWallet", { enumerable: true, get: function () { return wallet_1.VerifiedWallet; } });
|
|
10
10
|
const utils_1 = require("./utils");
|
|
@@ -59,6 +59,8 @@ const distribution_1 = __importDefault(require("./contract/distribution"));
|
|
|
59
59
|
exports.DistributionContract = distribution_1.default;
|
|
60
60
|
const rates_1 = __importDefault(require("./contract/rates"));
|
|
61
61
|
exports.RatesContract = rates_1.default;
|
|
62
|
+
const assetmanager_1 = __importDefault(require("./contract/assetmanager"));
|
|
63
|
+
exports.AssetManager = assetmanager_1.default;
|
|
62
64
|
const ethers_1 = require("ethers");
|
|
63
65
|
Object.defineProperty(exports, "utils", { enumerable: true, get: function () { return ethers_1.utils; } });
|
|
64
66
|
const contractAddress_1 = __importDefault(require("./contractAddress"));
|