@verified-network/verified-sdk 0.8.1 → 0.8.4
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/assetmanager/BalancerManager.json +11109 -13139
- package/dist/abi/assetmanager/Client.json +1170 -1170
- package/dist/abi/assetmanager/Products.json +330 -330
- package/dist/abi/custody/Vault.json +4 -4
- package/dist/abi/liquidity/Liquidity.json +11090 -12315
- package/dist/abi/securities/Bonds.json +7054 -7415
- package/dist/abi/securities/Products.json +5322 -5534
- package/dist/abi/securities/Stocks.json +5361 -5722
- package/dist/contract/account/index.js +1 -1
- package/dist/contract/assetmanager/index.js +17 -5
- package/dist/contract/bond/index.js +0 -1
- package/dist/contract/bonds/index.js +26 -1
- package/dist/contract/cash/index.js +0 -1
- package/dist/contract/client/index.js +4 -3
- package/dist/contract/custody/index.js +1 -1
- package/dist/contract/distribution/index.js +1 -1
- package/dist/contract/factory/index.js +2 -1
- package/dist/contract/holder/index.js +0 -1
- package/dist/contract/kyc/index.js +1 -1
- package/dist/contract/ledger/index.js +0 -1
- package/dist/contract/liquidity/index.js +7 -5
- package/dist/contract/oracle/index.js +1 -1
- package/dist/contract/orderpool/index.js +0 -1
- package/dist/contract/poolfactory/index.js +1 -1
- package/dist/contract/posttrade/index.js +1 -1
- package/dist/contract/pretrade/index.js +1 -1
- package/dist/contract/product/index.js +6 -1
- package/dist/contract/public/bond/index.js +0 -1
- package/dist/contract/public/cash/index.js +0 -1
- package/dist/contract/public/client/index.js +1 -1
- package/dist/contract/public/distribution/index.js +1 -1
- package/dist/contract/public/factory/index.js +1 -1
- package/dist/contract/public/product/index.js +1 -1
- package/dist/contract/public/rates/index.js +1 -1
- package/dist/contract/public/security/index.js +1 -1
- package/dist/contract/rates/index.js +1 -1
- package/dist/contract/securitiesregistry/index.js +1 -1
- package/dist/contract/security/index.js +0 -1
- package/dist/contract/stocks/index.js +26 -1
- package/dist/contract/system/index.js +1 -1
- package/dist/contract/token/index.js +0 -1
- package/dist/contract/trade/index.js +1 -1
- package/dist/contractAddress/index.js +9 -9
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ var FUNCTIONS;
|
|
|
10
10
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
11
11
|
class AccountContract extends index_1.VerifiedContract {
|
|
12
12
|
constructor(signer, accountAddress) {
|
|
13
|
-
const chainId = signer.provider._network.chainId.toString()
|
|
13
|
+
//const chainId: string = signer.provider._network.chainId.toString()
|
|
14
14
|
const address = accountAddress;
|
|
15
15
|
super(address, JSON.stringify(Account_json_1.abi), signer);
|
|
16
16
|
this.contractAddress = address;
|
|
@@ -20,12 +20,16 @@ var FUNCTIONS;
|
|
|
20
20
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
21
21
|
class AssetManager extends index_1.VerifiedContract {
|
|
22
22
|
constructor(signer, platformAddress) {
|
|
23
|
-
const chainId = signer.provider._network.chainId.toString();
|
|
24
23
|
const address = platformAddress;
|
|
25
24
|
super(address, JSON.stringify(BalancerManager_json_1.abi), signer);
|
|
26
25
|
this.contractAddress = address;
|
|
27
26
|
}
|
|
28
|
-
async offer(owned, isin, offered, tomatch, desired, min, issuer,
|
|
27
|
+
async offer(owned, isin, offered, tomatch, desired, min, issuer,
|
|
28
|
+
//_hashedMessage: string,
|
|
29
|
+
//_v: string,
|
|
30
|
+
//_r: string,
|
|
31
|
+
//_s: string,
|
|
32
|
+
options) {
|
|
29
33
|
await this.validateInput(index_1.DATATYPES.ADDRESS, owned);
|
|
30
34
|
await this.validateInput(index_1.DATATYPES.ADDRESS, tomatch);
|
|
31
35
|
await this.validateInput(index_1.DATATYPES.ADDRESS, issuer);
|
|
@@ -33,7 +37,8 @@ class AssetManager extends index_1.VerifiedContract {
|
|
|
33
37
|
await this.validateInput(index_1.DATATYPES.NUMBER, offered);
|
|
34
38
|
await this.validateInput(index_1.DATATYPES.NUMBER, desired);
|
|
35
39
|
await this.validateInput(index_1.DATATYPES.NUMBER, min);
|
|
36
|
-
return this.callContract(FUNCTIONS.OFFER, owned, this.sanitiseInput(index_1.DATATYPES.BYTE32, isin), offered, tomatch, desired, min, issuer,
|
|
40
|
+
return this.callContract(FUNCTIONS.OFFER, owned, this.sanitiseInput(index_1.DATATYPES.BYTE32, isin), offered, tomatch, desired, min, issuer,
|
|
41
|
+
/*_hashedMessage, _v, _r, _s,*/ options);
|
|
37
42
|
}
|
|
38
43
|
/**
|
|
39
44
|
* Gets security tokens offered for passed token parameter
|
|
@@ -71,9 +76,16 @@ class AssetManager extends index_1.VerifiedContract {
|
|
|
71
76
|
* @param options
|
|
72
77
|
* @returns array of structs of liquidity providers
|
|
73
78
|
*/
|
|
74
|
-
async getLiquidityProviders(security,
|
|
79
|
+
async getLiquidityProviders(security,
|
|
80
|
+
//_hashedMessage: string,
|
|
81
|
+
//_v: string,
|
|
82
|
+
//_r: string,
|
|
83
|
+
//_s: string,
|
|
84
|
+
options) {
|
|
75
85
|
await this.validateInput(index_1.DATATYPES.ADDRESS, security);
|
|
76
|
-
return this.callContract(FUNCTIONS.GETLIQUIDITYPROVIDERS, security,
|
|
86
|
+
return this.callContract(FUNCTIONS.GETLIQUIDITYPROVIDERS, security,
|
|
87
|
+
//_hashedMessage, _v, _r, _s,
|
|
88
|
+
options);
|
|
77
89
|
}
|
|
78
90
|
async issue(security, cutoffTime, issuer, _hashedMessage, _v, _r, _s, options) {
|
|
79
91
|
await this.validateInput(index_1.DATATYPES.ADDRESS, security);
|
|
@@ -18,7 +18,6 @@ var FUNCTIONS;
|
|
|
18
18
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
19
19
|
class BondContract extends index_1.VerifiedContract {
|
|
20
20
|
constructor(signer, bondCurrencyAddress) {
|
|
21
|
-
const chainId = signer.provider._network.chainId.toString();
|
|
22
21
|
const address = bondCurrencyAddress;
|
|
23
22
|
super(address, JSON.stringify(Bond_json_1.abi), signer);
|
|
24
23
|
this.contractAddress = address;
|
|
@@ -24,10 +24,13 @@ var FUNCTIONS;
|
|
|
24
24
|
FUNCTIONS["PAYOUT"] = "payOut";
|
|
25
25
|
FUNCTIONS["ISSUEBOND"] = "issueBond";
|
|
26
26
|
FUNCTIONS["GETBENEFICIARIES"] = "getBeneficiaries";
|
|
27
|
+
FUNCTIONS["SETLIQUIDITYPROVIDERS"] = "setLiquidityProviders";
|
|
28
|
+
FUNCTIONS["SETPLATFORMPOOLS"] = "setPlatformPools";
|
|
29
|
+
FUNCTIONS["SETPLATFORMSUBSCRIBERS"] = "setPlatformSubscribers";
|
|
30
|
+
FUNCTIONS["SETTLE"] = "settleIssue";
|
|
27
31
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
28
32
|
class BondsContract extends index_1.VerifiedContract {
|
|
29
33
|
constructor(signer, issue) {
|
|
30
|
-
const chainId = signer.provider._network.chainId.toString();
|
|
31
34
|
const address = issue;
|
|
32
35
|
super(address, JSON.stringify(Bonds_json_1.abi), signer);
|
|
33
36
|
this.contractAddress = address;
|
|
@@ -57,6 +60,10 @@ class BondsContract extends index_1.VerifiedContract {
|
|
|
57
60
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _asset);
|
|
58
61
|
return this.callContract(FUNCTIONS.ALLOTISSUE, this.sanitiseInput(index_1.DATATYPES.BYTE32, _allotment), _platform, this.sanitiseInput(index_1.DATATYPES.BYTE32, _pool), _investor, _amount, _asset, options);
|
|
59
62
|
}
|
|
63
|
+
async settle(issue, options) {
|
|
64
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, issue);
|
|
65
|
+
return this.callContract(FUNCTIONS.SETTLE, issue, options);
|
|
66
|
+
}
|
|
60
67
|
async computeNextInstallment(_currency, options) {
|
|
61
68
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _currency);
|
|
62
69
|
return this.callContract(FUNCTIONS.NEXTINSTALLMENT, _currency, options);
|
|
@@ -111,5 +118,23 @@ class BondsContract extends index_1.VerifiedContract {
|
|
|
111
118
|
await this.validateInput(index_1.DATATYPES.STRING, _offeringDocuments);
|
|
112
119
|
return this.callContract(FUNCTIONS.ISSUEBOND, _issueSize, _offerPrice, _minAskPrice, _minSubscription, _couponPaymentCycle, _tenure, this.sanitiseInput(index_1.DATATYPES.BYTE32, _currency), this.sanitiseInput(index_1.DATATYPES.BYTE32, _offerType), this.sanitiseInput(index_1.DATATYPES.BYTE32, _isin), _offeringDocuments, options);
|
|
113
120
|
}
|
|
121
|
+
async setLiquidityProviders(platform, liquidityProviders, _hashedMessage, _v, _r, _s, options) {
|
|
122
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, platform);
|
|
123
|
+
await this.validateInput(index_1.DATATYPES.STRING, liquidityProviders);
|
|
124
|
+
return this.callContract(FUNCTIONS.SETLIQUIDITYPROVIDERS, platform, liquidityProviders, _hashedMessage, _v, _r, _s, options);
|
|
125
|
+
}
|
|
126
|
+
async setPlatformPools(platform, securityToken, pools, status, _hashedMessage, _v, _r, _s, options) {
|
|
127
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, platform);
|
|
128
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, securityToken);
|
|
129
|
+
await this.validateInput(index_1.DATATYPES.STRING, pools);
|
|
130
|
+
await this.validateInput(index_1.DATATYPES.STRING, status);
|
|
131
|
+
return this.callContract(FUNCTIONS.SETPLATFORMPOOLS, platform, securityToken, pools, status, _hashedMessage, _v, _r, _s, options);
|
|
132
|
+
}
|
|
133
|
+
async setPlatformSubscribers(platform, pool, eois, _hashedMessage, _v, _r, _s, options) {
|
|
134
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, platform);
|
|
135
|
+
await this.validateInput(index_1.DATATYPES.STRING, pool);
|
|
136
|
+
await this.validateInput(index_1.DATATYPES.STRING, eois);
|
|
137
|
+
return this.callContract(FUNCTIONS.SETPLATFORMSUBSCRIBERS, platform, this.sanitiseInput(index_1.DATATYPES.BYTE32, pool), eois, _hashedMessage, _v, _r, _s, options);
|
|
138
|
+
}
|
|
114
139
|
}
|
|
115
140
|
exports.default = BondsContract;
|
|
@@ -18,7 +18,6 @@ var FUNCTIONS;
|
|
|
18
18
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
19
19
|
class CashContract extends index_1.VerifiedContract {
|
|
20
20
|
constructor(signer, currencyAddress) {
|
|
21
|
-
const chainId = signer.provider._network.chainId.toString();
|
|
22
21
|
const address = currencyAddress;
|
|
23
22
|
super(address, JSON.stringify(Cash_json_1.abi), signer);
|
|
24
23
|
this.contractAddress = address;
|
|
@@ -25,7 +25,7 @@ var FUNCTIONS;
|
|
|
25
25
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
26
26
|
class ClientContract extends index_1.VerifiedContract {
|
|
27
27
|
constructor(signer) {
|
|
28
|
-
const chainId =
|
|
28
|
+
const chainId = Object.keys(Client_json_1.networks);
|
|
29
29
|
const address = Client_json_1.networks[chainId].address;
|
|
30
30
|
super(address, JSON.stringify(Client_json_1.abi), signer);
|
|
31
31
|
this.contractAddress = address;
|
|
@@ -49,9 +49,10 @@ class ClientContract extends index_1.VerifiedContract {
|
|
|
49
49
|
* @params (bool login)
|
|
50
50
|
* @returns
|
|
51
51
|
*/
|
|
52
|
-
async setAccess(_token, options) {
|
|
52
|
+
async setAccess(_client, _token, options) {
|
|
53
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _client);
|
|
53
54
|
await this.validateInput(index_1.DATATYPES.STRING, _token);
|
|
54
|
-
return this.callContract(FUNCTIONS.SETACCESS, _token, options);
|
|
55
|
+
return this.callContract(FUNCTIONS.SETACCESS, _client, _token, options);
|
|
55
56
|
}
|
|
56
57
|
async getAccess(_clientAddress, options) {
|
|
57
58
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _clientAddress);
|
|
@@ -19,7 +19,7 @@ var FUNCTIONS;
|
|
|
19
19
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
20
20
|
class CustodyContract extends index_1.VerifiedContract {
|
|
21
21
|
constructor(signer) {
|
|
22
|
-
const chainId =
|
|
22
|
+
const chainId = Object.keys(Vault_json_1.networks);
|
|
23
23
|
const address = Vault_json_1.networks[chainId].address;
|
|
24
24
|
super(address, JSON.stringify(Vault_json_1.abi), signer);
|
|
25
25
|
this.contractAddress = address;
|
|
@@ -14,7 +14,7 @@ var FUNCTIONS;
|
|
|
14
14
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
15
15
|
class DistributionContract extends index_1.VerifiedContract {
|
|
16
16
|
constructor(signer) {
|
|
17
|
-
const chainId =
|
|
17
|
+
const chainId = Object.keys(Distribution_json_1.networks);
|
|
18
18
|
const address = Distribution_json_1.networks[chainId].address;
|
|
19
19
|
super(address, JSON.stringify(Distribution_json_1.abi), signer);
|
|
20
20
|
this.contractAddress = address;
|
|
@@ -23,7 +23,8 @@ var FUNCTIONS;
|
|
|
23
23
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
24
24
|
class FactoryContract extends index_1.VerifiedContract {
|
|
25
25
|
constructor(signer) {
|
|
26
|
-
const chainId =
|
|
26
|
+
const chainId = Object.keys(Factory_json_1.networks);
|
|
27
|
+
console.log("Factory chain id " + chainId);
|
|
27
28
|
const address = Factory_json_1.networks[chainId].address;
|
|
28
29
|
super(address, JSON.stringify(Factory_json_1.abi), signer);
|
|
29
30
|
this.contractAddress = address;
|
|
@@ -18,7 +18,6 @@ var FUNCTIONS;
|
|
|
18
18
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
19
19
|
class HolderContract extends index_1.VerifiedContract {
|
|
20
20
|
constructor(signer, holderAddress) {
|
|
21
|
-
const chainId = signer.provider._network.chainId.toString();
|
|
22
21
|
const address = holderAddress;
|
|
23
22
|
super(address, JSON.stringify(Holder_json_1.abi), signer);
|
|
24
23
|
this.contractAddress = address;
|
|
@@ -36,7 +36,7 @@ var FUNCTIONS;
|
|
|
36
36
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
37
37
|
class KYCContract extends index_1.VerifiedContract {
|
|
38
38
|
constructor(signer) {
|
|
39
|
-
const chainId =
|
|
39
|
+
const chainId = Object.keys(Kyc_json_1.networks);
|
|
40
40
|
const address = Kyc_json_1.networks[chainId].address;
|
|
41
41
|
super(address, JSON.stringify(Kyc_json_1.abi), signer);
|
|
42
42
|
this.contractAddress = address;
|
|
@@ -10,7 +10,6 @@ var FUNCTIONS;
|
|
|
10
10
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
11
11
|
class LedgerContract extends index_1.VerifiedContract {
|
|
12
12
|
constructor(signer, ledgerAddress) {
|
|
13
|
-
const chainId = signer.provider._network.chainId.toString();
|
|
14
13
|
const address = ledgerAddress;
|
|
15
14
|
super(address, JSON.stringify(Ledger_json_1.abi), signer);
|
|
16
15
|
this.contractAddress = address;
|
|
@@ -21,7 +21,7 @@ var FUNCTIONS;
|
|
|
21
21
|
FUNCTIONS["ADDMANAGER"] = "addManager";
|
|
22
22
|
FUNCTIONS["REMOVEMANAGER"] = "removeManager";
|
|
23
23
|
FUNCTIONS["GETMANAGERS"] = "getManagers";
|
|
24
|
-
FUNCTIONS["GETPLATFORMS"] = "
|
|
24
|
+
FUNCTIONS["GETPLATFORMS"] = "getPlatforms";
|
|
25
25
|
FUNCTIONS["GETPLATFORMPERFORMANCE"] = "getPlatformPerformance";
|
|
26
26
|
FUNCTIONS["GETMANAGERPERFORMANCE"] = "getManagerPerformance";
|
|
27
27
|
FUNCTIONS["PROVIDELIQUIDITY"] = "provideLiquidity";
|
|
@@ -30,7 +30,7 @@ var FUNCTIONS;
|
|
|
30
30
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
31
31
|
class LiquidityContract extends index_1.VerifiedContract {
|
|
32
32
|
constructor(signer) {
|
|
33
|
-
const chainId =
|
|
33
|
+
const chainId = Object.keys(Liquidity_json_1.networks);
|
|
34
34
|
const address = Liquidity_json_1.networks[chainId].address;
|
|
35
35
|
super(address, JSON.stringify(Liquidity_json_1.abi), signer);
|
|
36
36
|
this.contractAddress = address;
|
|
@@ -99,7 +99,7 @@ class LiquidityContract extends index_1.VerifiedContract {
|
|
|
99
99
|
/**
|
|
100
100
|
Fetches registered platforms
|
|
101
101
|
*/
|
|
102
|
-
async
|
|
102
|
+
async getPlatforms() {
|
|
103
103
|
return this.callContract(FUNCTIONS.GETPLATFORMS);
|
|
104
104
|
}
|
|
105
105
|
/**
|
|
@@ -221,11 +221,13 @@ class LiquidityContract extends index_1.VerifiedContract {
|
|
|
221
221
|
* @param options
|
|
222
222
|
* @returns none
|
|
223
223
|
*/
|
|
224
|
-
async provideLiquidity(_platform, _manager, _liquidity, options) {
|
|
224
|
+
async provideLiquidity(_platform, _manager, _liquidity, _token, _tokenAmount, options) {
|
|
225
225
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _platform);
|
|
226
226
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _manager);
|
|
227
227
|
await this.validateInput(index_1.DATATYPES.NUMBER, _liquidity);
|
|
228
|
-
|
|
228
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, _token);
|
|
229
|
+
await this.validateInput(index_1.DATATYPES.NUMBER, _tokenAmount);
|
|
230
|
+
return this.callContract(FUNCTIONS.PROVIDELIQUIDITY, _platform, _manager, _liquidity, _token, _tokenAmount, options);
|
|
229
231
|
}
|
|
230
232
|
/**
|
|
231
233
|
* Fetches balance of investor
|
|
@@ -10,7 +10,7 @@ var FUNCTIONS;
|
|
|
10
10
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
11
11
|
class OracleContract extends index_1.VerifiedContract {
|
|
12
12
|
constructor(signer) {
|
|
13
|
-
const chainId =
|
|
13
|
+
const chainId = Object.keys(Oracle_json_1.networks);
|
|
14
14
|
const address = Oracle_json_1.networks[chainId].address;
|
|
15
15
|
super(address, JSON.stringify(Oracle_json_1.abi), signer);
|
|
16
16
|
this.contractAddress = address;
|
|
@@ -13,7 +13,6 @@ var FUNCTIONS;
|
|
|
13
13
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
14
14
|
class OrderPoolContract extends index_1.VerifiedContract {
|
|
15
15
|
constructor(signer, orderPool) {
|
|
16
|
-
const chainId = signer.provider._network.chainId.toString();
|
|
17
16
|
const address = orderPool;
|
|
18
17
|
super(address, JSON.stringify(OrderPool_json_1.abi), signer);
|
|
19
18
|
this.contractAddress = address;
|
|
@@ -10,7 +10,7 @@ var FUNCTIONS;
|
|
|
10
10
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
11
11
|
class PoolFactoryContract extends index_1.VerifiedContract {
|
|
12
12
|
constructor(signer) {
|
|
13
|
-
const chainId =
|
|
13
|
+
const chainId = Object.keys(PoolFactory_json_1.networks);
|
|
14
14
|
const address = PoolFactory_json_1.networks[chainId].address;
|
|
15
15
|
super(address, JSON.stringify(PoolFactory_json_1.abi), signer);
|
|
16
16
|
this.contractAddress = address;
|
|
@@ -12,7 +12,7 @@ var FUNCTIONS;
|
|
|
12
12
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
13
13
|
class PostTradeContract extends index_1.VerifiedContract {
|
|
14
14
|
constructor(signer) {
|
|
15
|
-
const chainId =
|
|
15
|
+
const chainId = Object.keys(PostTrade_json_1.networks);
|
|
16
16
|
const address = PostTrade_json_1.networks[chainId].address;
|
|
17
17
|
super(address, JSON.stringify(PostTrade_json_1.abi), signer);
|
|
18
18
|
this.contractAddress = address;
|
|
@@ -19,7 +19,7 @@ var FUNCTIONS;
|
|
|
19
19
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
20
20
|
class PreTradeContract extends index_1.VerifiedContract {
|
|
21
21
|
constructor(signer) {
|
|
22
|
-
const chainId =
|
|
22
|
+
const chainId = Object.keys(PreTrade_json_1.networks);
|
|
23
23
|
const address = PreTrade_json_1.networks[chainId].address;
|
|
24
24
|
super(address, JSON.stringify(PreTrade_json_1.abi), signer);
|
|
25
25
|
this.contractAddress = address;
|
|
@@ -22,10 +22,11 @@ var FUNCTIONS;
|
|
|
22
22
|
FUNCTIONS["GETPLATFORMS"] = "getPlatforms";
|
|
23
23
|
FUNCTIONS["GETPRODUCTREFERENCE"] = "getProductReference";
|
|
24
24
|
FUNCTIONS["SETSIGNER"] = "setSigner";
|
|
25
|
+
FUNCTIONS["REGISTERPLATFORM"] = "registerPlatform";
|
|
25
26
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
26
27
|
class ProductContract extends index_1.VerifiedContract {
|
|
27
28
|
constructor(signer) {
|
|
28
|
-
const chainId =
|
|
29
|
+
const chainId = Object.keys(Products_json_1.networks);
|
|
29
30
|
const address = Products_json_1.networks[chainId].address;
|
|
30
31
|
super(address, JSON.stringify(Products_json_1.abi), signer);
|
|
31
32
|
this.contractAddress = address;
|
|
@@ -101,5 +102,9 @@ class ProductContract extends index_1.VerifiedContract {
|
|
|
101
102
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _issue);
|
|
102
103
|
return this.callContract(FUNCTIONS.GETPRODUCTREFERENCE, _issue, options);
|
|
103
104
|
}
|
|
105
|
+
async registerPlatform(liquidityPlatform, _hashedMessage, _v, _r, _s, options) {
|
|
106
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, liquidityPlatform);
|
|
107
|
+
return this.callContract(FUNCTIONS.REGISTERPLATFORM, liquidityPlatform, _hashedMessage, _v, _r, _s, options);
|
|
108
|
+
}
|
|
104
109
|
}
|
|
105
110
|
exports.default = ProductContract;
|
|
@@ -21,7 +21,6 @@ var FUNCTIONS;
|
|
|
21
21
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
22
22
|
class VerifiedBond extends index_1.VerifiedContract {
|
|
23
23
|
constructor(signer, bondCurrencyAddress) {
|
|
24
|
-
const chainId = signer.provider._network.chainId.toString();
|
|
25
24
|
const address = bondCurrencyAddress;
|
|
26
25
|
super(address, JSON.stringify(Bond_json_1.abi), signer);
|
|
27
26
|
this.contractAddress = address;
|
|
@@ -24,7 +24,6 @@ var FUNCTIONS;
|
|
|
24
24
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
25
25
|
class VerifiedCash extends index_1.VerifiedContract {
|
|
26
26
|
constructor(signer, currencyAddress) {
|
|
27
|
-
const chainId = signer.provider._network.chainId.toString();
|
|
28
27
|
const address = currencyAddress;
|
|
29
28
|
super(address, JSON.stringify(Cash_json_1.abi), signer);
|
|
30
29
|
this.contractAddress = address;
|
|
@@ -13,7 +13,7 @@ var FUNCTIONS;
|
|
|
13
13
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
14
14
|
class VerifiedClient extends index_1.VerifiedContract {
|
|
15
15
|
constructor(signer) {
|
|
16
|
-
const chainId =
|
|
16
|
+
const chainId = Object.keys(Client_json_1.networks);
|
|
17
17
|
const address = Client_json_1.networks[chainId].address;
|
|
18
18
|
super(address, JSON.stringify(Client_json_1.abi), signer);
|
|
19
19
|
this.contractAddress = address;
|
|
@@ -14,7 +14,7 @@ var FUNCTIONS;
|
|
|
14
14
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
15
15
|
class DistributionContract extends index_1.VerifiedContract {
|
|
16
16
|
constructor(signer) {
|
|
17
|
-
const chainId =
|
|
17
|
+
const chainId = Object.keys(Distribution_json_1.networks);
|
|
18
18
|
const address = Distribution_json_1.networks[chainId].address;
|
|
19
19
|
super(address, JSON.stringify(Distribution_json_1.abi), signer);
|
|
20
20
|
this.contractAddress = address;
|
|
@@ -16,7 +16,7 @@ var FUNCTIONS;
|
|
|
16
16
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
17
17
|
class VerifiedFactory extends index_1.VerifiedContract {
|
|
18
18
|
constructor(signer) {
|
|
19
|
-
const chainId =
|
|
19
|
+
const chainId = Object.keys(Factory_json_1.networks);
|
|
20
20
|
const address = Factory_json_1.networks[chainId].address;
|
|
21
21
|
super(address, JSON.stringify(Factory_json_1.abi), signer);
|
|
22
22
|
this.contractAddress = address;
|
|
@@ -10,7 +10,7 @@ var FUNCTIONS;
|
|
|
10
10
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
11
11
|
class VerifiedProducts extends index_1.VerifiedContract {
|
|
12
12
|
constructor(signer) {
|
|
13
|
-
const chainId =
|
|
13
|
+
const chainId = Object.keys(Products_json_1.networks);
|
|
14
14
|
const address = Products_json_1.networks[chainId].address;
|
|
15
15
|
super(address, JSON.stringify(Products_json_1.abi), signer);
|
|
16
16
|
this.contractAddress = address;
|
|
@@ -19,7 +19,7 @@ var FUNCTIONS;
|
|
|
19
19
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
20
20
|
class VerifiedRates extends index_1.VerifiedContract {
|
|
21
21
|
constructor(signer) {
|
|
22
|
-
const chainId =
|
|
22
|
+
const chainId = Object.keys(Rates_json_1.networks);
|
|
23
23
|
const address = Rates_json_1.networks[chainId].address;
|
|
24
24
|
super(address, JSON.stringify(Rates_json_1.abi), signer);
|
|
25
25
|
this.contractAddress = address;
|
|
@@ -13,7 +13,7 @@ var FUNCTIONS;
|
|
|
13
13
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
14
14
|
class VerifiedSecurity extends index_1.VerifiedContract {
|
|
15
15
|
constructor(signer) {
|
|
16
|
-
const chainId =
|
|
16
|
+
const chainId = Object.keys(Security_json_1.networks);
|
|
17
17
|
const address = Security_json_1.networks[chainId].address;
|
|
18
18
|
super(address, JSON.stringify(Security_json_1.abi), signer);
|
|
19
19
|
this.contractAddress = address;
|
|
@@ -19,7 +19,7 @@ var FUNCTIONS;
|
|
|
19
19
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
20
20
|
class RatesContract extends index_1.VerifiedContract {
|
|
21
21
|
constructor(signer) {
|
|
22
|
-
const chainId =
|
|
22
|
+
const chainId = Object.keys(Rates_json_1.networks);
|
|
23
23
|
const address = Rates_json_1.networks[chainId].address;
|
|
24
24
|
super(address, JSON.stringify(Rates_json_1.abi), signer);
|
|
25
25
|
this.contractAddress = address;
|
|
@@ -19,7 +19,7 @@ var FUNCTIONS;
|
|
|
19
19
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
20
20
|
class SecuritiesRegistryContract extends index_1.VerifiedContract {
|
|
21
21
|
constructor(signer) {
|
|
22
|
-
const chainId =
|
|
22
|
+
const chainId = Object.keys(SecuritiesRegistry_json_1.networks);
|
|
23
23
|
const address = SecuritiesRegistry_json_1.networks[chainId].address;
|
|
24
24
|
super(address, JSON.stringify(SecuritiesRegistry_json_1.abi), signer);
|
|
25
25
|
this.contractAddress = address;
|
|
@@ -11,7 +11,6 @@ var FUNCTIONS;
|
|
|
11
11
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
12
12
|
class SecurityContract extends index_1.VerifiedContract {
|
|
13
13
|
constructor(signer, tokenAddress) {
|
|
14
|
-
const chainId = signer.provider._network.chainId.toString();
|
|
15
14
|
const address = tokenAddress;
|
|
16
15
|
super(address, JSON.stringify(Security_json_1.abi), signer);
|
|
17
16
|
this.contractAddress = address;
|
|
@@ -17,10 +17,13 @@ var FUNCTIONS;
|
|
|
17
17
|
FUNCTIONS["PAYOUT"] = "payOut";
|
|
18
18
|
FUNCTIONS["ISSUESHARE"] = "issueShare";
|
|
19
19
|
FUNCTIONS["GETBENEFICIARIES"] = "getBeneficiaries";
|
|
20
|
+
FUNCTIONS["SETLIQUIDITYPROVIDERS"] = "setLiquidityProviders";
|
|
21
|
+
FUNCTIONS["SETPLATFORMPOOLS"] = "setPlatformPools";
|
|
22
|
+
FUNCTIONS["SETPLATFORMSUBSCRIBERS"] = "setPlatformSubscribers";
|
|
23
|
+
FUNCTIONS["SETTLE"] = "settleIssue";
|
|
20
24
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
21
25
|
class StocksContract extends index_1.VerifiedContract {
|
|
22
26
|
constructor(signer, issue) {
|
|
23
|
-
const chainId = signer.provider._network.chainId.toString();
|
|
24
27
|
const address = issue;
|
|
25
28
|
super(address, JSON.stringify(Stocks_json_1.abi), signer);
|
|
26
29
|
this.contractAddress = address;
|
|
@@ -50,6 +53,10 @@ class StocksContract extends index_1.VerifiedContract {
|
|
|
50
53
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _asset);
|
|
51
54
|
return this.callContract(FUNCTIONS.ALLOTISSUE, this.sanitiseInput(index_1.DATATYPES.BYTE32, _allotment), _platform, this.sanitiseInput(index_1.DATATYPES.BYTE32, _pool), _investor, _amount, _asset, options);
|
|
52
55
|
}
|
|
56
|
+
async settle(issue, options) {
|
|
57
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, issue);
|
|
58
|
+
return this.callContract(FUNCTIONS.SETTLE, issue, options);
|
|
59
|
+
}
|
|
53
60
|
async getPaymentStatusFor(_beneficiary, options) {
|
|
54
61
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _beneficiary);
|
|
55
62
|
return this.callContract(FUNCTIONS.GETPAYMENTSTATUS, _beneficiary, options);
|
|
@@ -78,5 +85,23 @@ class StocksContract extends index_1.VerifiedContract {
|
|
|
78
85
|
await this.validateInput(index_1.DATATYPES.STRING, _isin);
|
|
79
86
|
return this.callContract(FUNCTIONS.ISSUESHARE, _issueSize, _offerPrice, _minAskPrice, _minSubscription, this.sanitiseInput(index_1.DATATYPES.BYTE32, _currency), this.sanitiseInput(index_1.DATATYPES.BYTE32, _offerType), this.sanitiseInput(index_1.DATATYPES.BYTE32, _isin), _offeringDocuments, options);
|
|
80
87
|
}
|
|
88
|
+
async setLiquidityProviders(platform, liquidityProviders, _hashedMessage, _v, _r, _s, options) {
|
|
89
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, platform);
|
|
90
|
+
await this.validateInput(index_1.DATATYPES.STRING, liquidityProviders);
|
|
91
|
+
return this.callContract(FUNCTIONS.SETLIQUIDITYPROVIDERS, platform, liquidityProviders, _hashedMessage, _v, _r, _s, options);
|
|
92
|
+
}
|
|
93
|
+
async setPlatformPools(platform, securityToken, pools, status, _hashedMessage, _v, _r, _s, options) {
|
|
94
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, platform);
|
|
95
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, securityToken);
|
|
96
|
+
await this.validateInput(index_1.DATATYPES.STRING, pools);
|
|
97
|
+
await this.validateInput(index_1.DATATYPES.STRING, status);
|
|
98
|
+
return this.callContract(FUNCTIONS.SETPLATFORMPOOLS, platform, securityToken, pools, status, _hashedMessage, _v, _r, _s, options);
|
|
99
|
+
}
|
|
100
|
+
async setPlatformSubscribers(platform, pool, eois, _hashedMessage, _v, _r, _s, options) {
|
|
101
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, platform);
|
|
102
|
+
await this.validateInput(index_1.DATATYPES.STRING, pool);
|
|
103
|
+
await this.validateInput(index_1.DATATYPES.STRING, eois);
|
|
104
|
+
return this.callContract(FUNCTIONS.SETPLATFORMSUBSCRIBERS, platform, this.sanitiseInput(index_1.DATATYPES.BYTE32, pool), eois, _hashedMessage, _v, _r, _s, options);
|
|
105
|
+
}
|
|
81
106
|
}
|
|
82
107
|
exports.default = StocksContract;
|
|
@@ -19,7 +19,7 @@ var FUNCTIONS;
|
|
|
19
19
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
20
20
|
class SystemContract extends index_1.VerifiedContract {
|
|
21
21
|
constructor(signer) {
|
|
22
|
-
const chainId =
|
|
22
|
+
const chainId = Object.keys(System_json_1.networks);
|
|
23
23
|
const address = System_json_1.networks[chainId].address;
|
|
24
24
|
super(address, JSON.stringify(System_json_1.abi), signer);
|
|
25
25
|
this.contractAddress = address;
|
|
@@ -12,7 +12,6 @@ var FUNCTIONS;
|
|
|
12
12
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
13
13
|
class TokenContract extends index_1.VerifiedContract {
|
|
14
14
|
constructor(signer, bondCurrencyAddress) {
|
|
15
|
-
const chainId = signer.provider._network.chainId.toString();
|
|
16
15
|
const address = bondCurrencyAddress;
|
|
17
16
|
super(address, JSON.stringify(Token_json_1.abi), signer);
|
|
18
17
|
this.contractAddress = address;
|
|
@@ -12,7 +12,7 @@ var FUNCTIONS;
|
|
|
12
12
|
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
13
13
|
class TradeContract extends index_1.VerifiedContract {
|
|
14
14
|
constructor(signer) {
|
|
15
|
-
const chainId =
|
|
15
|
+
const chainId = Object.keys(Trade_json_1.networks);
|
|
16
16
|
const address = Trade_json_1.networks[chainId].address;
|
|
17
17
|
super(address, JSON.stringify(Trade_json_1.abi), signer);
|
|
18
18
|
this.contractAddress = address;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const contractAddress = {
|
|
4
4
|
'L1-goerli': {
|
|
5
|
-
'Client': '
|
|
5
|
+
'Client': '0x9C0B0Fc0737e6C87EB9AbB00BAFE5A211691E62D',
|
|
6
6
|
'KYC': '',
|
|
7
7
|
'System': '',
|
|
8
8
|
'Holder': '',
|
|
@@ -21,13 +21,13 @@ const contractAddress = {
|
|
|
21
21
|
'Security': '0x8B7D20deDF0DC7874B3C357Ba759890e51ad4bb3',
|
|
22
22
|
'OrderPool': '',
|
|
23
23
|
'PoolFactory': '',
|
|
24
|
-
'Products': '
|
|
24
|
+
'Products': '0xF647F22e8Ce31d912c2786135610f9f4A45c8690',
|
|
25
25
|
'Stocks': '',
|
|
26
26
|
'Bonds': '',
|
|
27
|
-
'Liquidity': '
|
|
27
|
+
'Liquidity': '0xE3B74659a6464519987DEe03F17696690BF3Ae10',
|
|
28
28
|
'Distribution': '0x5c3171AFEC854f8B6FD138ee9533629ABd8A5365',
|
|
29
|
-
'BalancerManager': '
|
|
30
|
-
'PrimaryIssuePoolFactory': '
|
|
29
|
+
'BalancerManager': '0x3afBe221d32e981af537da23b8feE92A46faC370',
|
|
30
|
+
'PrimaryIssuePoolFactory': '0xD2eFfB1CDeBE86cE710E73097d74A1a528f9F783',
|
|
31
31
|
'Custody': '',
|
|
32
32
|
'CASH': {
|
|
33
33
|
'VCUSD': '0xCb8eF17d0715bB115977C65e04423d9171025911',
|
|
@@ -60,14 +60,14 @@ const contractAddress = {
|
|
|
60
60
|
'Security': '0x324dfB528BEea8419eC96C6a54E0DA7744A4f8da',
|
|
61
61
|
'OrderPool': '0x69C61a08b46fdd75D6f000CCf2b85618AC7011a5',
|
|
62
62
|
'PoolFactory': '0xEE713f9e7d7D03267534C2628019C16dC1c41ecB',
|
|
63
|
-
'Products': '
|
|
64
|
-
'Stocks': '
|
|
65
|
-
'Bonds': '
|
|
63
|
+
'Products': '0xCA7C581d55E5025745C495D9be8EE6f8B22FD156',
|
|
64
|
+
'Stocks': '0xA02119054272E52f6b6380c358E995f95Db2E9B2',
|
|
65
|
+
'Bonds': '0xBa0daEBb3D325e6cE3401ff2FF913a5FEe20181D',
|
|
66
66
|
'Liquidity': '',
|
|
67
67
|
'Distribution': '',
|
|
68
68
|
'BalancerManager': '',
|
|
69
69
|
'PrimaryIssuePoolFactory': '',
|
|
70
|
-
'Custody': '',
|
|
70
|
+
'Custody': '0x138a6aF82D20c1bb4589721C846626317C5E1143',
|
|
71
71
|
'CASH': {
|
|
72
72
|
'VCUSD': '0xdD089A53574CabcA8082F81CC883bdBFCb0e464a',
|
|
73
73
|
'VCEUR': '0xC889374e780911b6524ADde13998F7Cb2b0Bb8d5',
|