@verified-network/verified-sdk 1.6.1 → 1.6.2

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.
@@ -1,5 +1,5 @@
1
1
  import { VerifiedContract } from '../index';
2
- import { VerifiedWallet } from "../../../wallet";
2
+ import { VerifiedWallet } from "../../wallet";
3
3
  export default class Client extends VerifiedContract {
4
4
  contractAddress: string;
5
5
  constructor(signer: VerifiedWallet, contractNetworkAddress: string);
@@ -242,15 +242,15 @@ const contractAddress = {
242
242
  },
243
243
  //Base Sepolia
244
244
  84532: {
245
- 'Client': '',
245
+ 'Client': '0x266d35A820B8e7f1CcAf7f14A24eC2232aE3D010',
246
246
  'Factory': '0x1021A1474dC1630E5781B1676Def04fF7f11Cc0b',
247
247
  'Cash': '0x15323E84AFF1dDFfcE321F05D75c5dB4b4491e9F',
248
248
  'Bond': '0x4464fF4e174CABeC48901d0B990C7fD47e0A5d1B',
249
249
  'Token': '0xE18a3Fcad231BA549aA488Fa984BDaEb0F6B30e5',
250
250
  'Oracle': '0x3DBAa50441669fDdd9100a9f4703F8B53ca991F7',
251
251
  'Rates': '0x127C7ef8D3b60Dd3bE78cDB3b349D1a9cf4368bD',
252
- 'Security': '',
253
- 'SecuritiesFactory': '',
252
+ 'Security': '0x40b8764740149704A09bF7526b82D92E4c0958a9',
253
+ 'SecuritiesFactory': '0x68497F1380f29b2C41Ca8Ff1Da3B5a3BD8327d4D',
254
254
  'Vitta': '',
255
255
  'Liquidity': '',
256
256
  'Distribution': '',
@@ -260,8 +260,8 @@ const contractAddress = {
260
260
  'BalancerSecondaryIssueManager': '',
261
261
  'MarginTradingPoolFactory': '',
262
262
  'BalancerMarginIssueManager': '',
263
- 'Custody': '0x8365A76099629CDd6B28c3D85862A220504C0b46',
264
- 'Compound': '',
263
+ 'Custody': '0x48b14BA34CB0c95779B4049C3B994a5ab43a6385',
264
+ 'Compound': '0xc090208AF73839e2Ec074Db27294548e7d19d8FA',
265
265
  'CASH': {
266
266
  'VCUSD': '0x1C751BA898D01789af51A9022b7A6f45836a5d6c',
267
267
  'VCEUR': '0xF0736Fa9490C45b5dF5129A461fAA1362795A4c0',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verified-network/verified-sdk",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "An SDK to develop applications on the Verified Network",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,24 +0,0 @@
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 Oracle_json_1 = require("../../abi/payments/Oracle.json");
7
- var FUNCTIONS;
8
- (function (FUNCTIONS) {
9
- FUNCTIONS["RESULTRECEIVED"] = "UpdatedRequest";
10
- })(FUNCTIONS || (FUNCTIONS = {}));
11
- class OracleContract extends index_1.VerifiedContract {
12
- constructor(signer, contractNetworkAddress) {
13
- const address = contractNetworkAddress;
14
- super(address, JSON.stringify(Oracle_json_1.abi), signer);
15
- this.contractAddress = address;
16
- }
17
- /*
18
- Watches and notifies event that is emitted when the Verified oracle fetches pricing, exchange and interest rate data.
19
- */
20
- notifyResult(callback) {
21
- this.getEvent(FUNCTIONS.RESULTRECEIVED, callback);
22
- }
23
- }
24
- exports.default = OracleContract;
@@ -1,18 +0,0 @@
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 Vault_json_1 = require("../../abi/assetmanager/Vault.json");
7
- var FUNCTIONS;
8
- (function (FUNCTIONS) {
9
- FUNCTIONS["FUNCTIONNAME"] = "funcName";
10
- })(FUNCTIONS || (FUNCTIONS = {}));
11
- class VaultContract extends index_1.VerifiedContract {
12
- constructor(signer, poolAddress) {
13
- const address = poolAddress;
14
- super(address, JSON.stringify(Vault_json_1.abi), signer);
15
- this.contractAddress = address;
16
- }
17
- }
18
- exports.default = VaultContract;
@@ -1,44 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const index_1 = require("../utils/index");
4
- const index_2 = require("../wallet/index");
5
- const index_3 = require("../index");
6
- const ethers_1 = require("ethers");
7
- const testSecurityFactoryIssueProduct = async (securityFactoryAddress) => {
8
- const INFURA_API_KEY = "95c1322d7c0e44de9ea77cc9eea18534";
9
- const SECURITY_HOLDER_MNEMONICS = "correct galaxy various swap chair assault blue improve ivory pear infant oak";
10
- const sender = index_2.VerifiedWallet.importWallet(SECURITY_HOLDER_MNEMONICS);
11
- const signer = sender.setProvider(index_1.Provider.infuraProvider(80001, INFURA_API_KEY));
12
- const securityFactoryContract = new index_3.SecuritiesFactory(signer, securityFactoryAddress);
13
- const zeroAddress = "0x0000000000000000000000000000000000000000";
14
- const BTCShortBytes = "0x425443";
15
- const currency = "0x07865c6E87B9F70255377e024ace6630C1Eaa37F"; //usdc
16
- const defaultBytes = "0x4346440000000000000000000000000000000000000000000000000000000000";
17
- const indiaBytes = "0x496e646961000000000000000000000000000000000000000000000000000000";
18
- const restrictions = [];
19
- const abiCoder = ethers_1.ethers.utils.defaultAbiCoder;
20
- const encodedArray = abiCoder.encode(["bytes32[]"], [restrictions]);
21
- await securityFactoryContract
22
- .issueSecurity(zeroAddress, defaultBytes, BTCShortBytes, BTCShortBytes, currency, sender.address, sender.address, encodedArray, indiaBytes, "false")
23
- .then(async (res) => {
24
- console.log("Security Issued Succesfully with hash: ", res.response.hash);
25
- securityFactoryContract.notifySecuritiesAdded(async (evnt) => {
26
- const security = evnt.response.result[0];
27
- console.log("added security : ", security, "succesfully");
28
- if (security) {
29
- await securityFactoryContract
30
- .addBalance(security, zeroAddress, sender.address, "1000000000000000000000000")
31
- .then(async (_res) => {
32
- console.log("Security Minted succesfully with hash: ", _res.response.hash);
33
- })
34
- .catch((_err) => {
35
- console.error("Mint security failed with error: ", _err);
36
- });
37
- }
38
- });
39
- })
40
- .catch((err) => {
41
- console.error("issueSecurity failed with error: ", err);
42
- });
43
- };
44
- testSecurityFactoryIssueProduct("0xf1f349C2CBDA5BCAfD7F95b20C812b4A17c9333D");
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const index_1 = require("../utils/index");
4
- const index_2 = require("../wallet/index");
5
- const index_3 = require("../index");
6
- const testSecurityTransfer = async (securityAddress, amount, receiverAddress) => {
7
- const INFURA_API_KEY = "95c1322d7c0e44de9ea77cc9eea18534";
8
- const SECURITY_HOLDER_MNEMONICS = "correct galaxy various swap chair assault blue improve ivory pear infant oak";
9
- const sender = index_2.VerifiedWallet.importWallet(SECURITY_HOLDER_MNEMONICS);
10
- const signer = sender.setProvider(index_1.Provider.infuraProvider(80001, INFURA_API_KEY));
11
- const securityContract = new index_3.Security(signer, securityAddress);
12
- await securityContract
13
- .transfer(receiverAddress, amount)
14
- .then((res) => {
15
- console.log("Transfer succesful with hash: ", res.response.hash);
16
- })
17
- .catch((err) => {
18
- console.log("Transfer failed with error: ", err);
19
- });
20
- };
21
- // testSecurityTransfer(
22
- // "0xd7252bfa14C0Dca5A72d90a28Bb513E0f989Ee1e",
23
- // 1000000000000000000n,
24
- // "0x286a759DACfd0C533B88E42b9e7571040008D778"
25
- // );