@reyaxyz/sdk 0.13.1 → 0.14.0

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 +1 @@
1
- {"version":3,"file":"contractAddresses.d.ts","sourceRoot":"/","sources":["utils/contractAddresses.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;AAIxC,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG,oBAAoB,CAAC;AAY/D,eAAO,MAAM,UAAU,YACZ,MAAM,gBACD,YAAY,KACzB,MAaF,CAAC"}
1
+ {"version":3,"file":"contractAddresses.d.ts","sourceRoot":"/","sources":["utils/contractAddresses.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;AAIxC,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG,oBAAoB,CAAC;AAiB/D,eAAO,MAAM,UAAU,YACZ,MAAM,gBACD,YAAY,KACzB,MAaF,CAAC"}
@@ -1,16 +1,24 @@
1
1
  "use strict";
2
+ var _a;
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
4
  exports.getAddress = void 0;
4
- var addresses = {
5
- 80001: {
5
+ // @todo update with proper chainId for mainnet
6
+ var common_1 = require("@reyaxyz/common");
7
+ var addresses = (_a = {},
8
+ _a[common_1.ReyaChainId.polygonMumbai] = {
6
9
  core_proxy: '0xc2f1b4a1275b7338e0eb03967fea3858af4bc900',
7
10
  passive_pool_proxy: '0x1b9d499f3ac864b8d4da415846d1d1916e00a6ff',
8
11
  },
9
- 1729: {
12
+ _a[common_1.ReyaChainId.reyaCronos] = {
10
13
  core_proxy: '0x2cb06a22ee9b823a307d22f131380dbe151ece5f',
11
14
  passive_pool_proxy: '0x63df38878c5b8e84d7dcb347b934072add64bdc5',
12
15
  },
13
- };
16
+ // TODO: add proper config
17
+ _a[common_1.ReyaChainId.reyaNetwork] = {
18
+ core_proxy: '0x2cb06a22ee9b823a307d22f131380dbe151ece5f',
19
+ passive_pool_proxy: '0x63df38878c5b8e84d7dcb347b934072add64bdc5',
20
+ },
21
+ _a);
14
22
  var getAddress = function (chainId, contractName) {
15
23
  var keyChainId = chainId.toString();
16
24
  if (!Object.keys(addresses).includes(keyChainId)) {
@@ -1 +1 @@
1
- {"version":3,"file":"contractAddresses.js","sourceRoot":"/","sources":["utils/contractAddresses.ts"],"names":[],"mappings":";;;AAMA,IAAM,SAAS,GAAuD;IACpE,KAAK,EAAE;QACL,UAAU,EAAE,4CAA4C;QACxD,kBAAkB,EAAE,4CAA4C;KACjE;IACD,IAAI,EAAE;QACJ,UAAU,EAAE,4CAA4C;QACxD,kBAAkB,EAAE,4CAA4C;KACjE;CACF,CAAC;AACK,IAAM,UAAU,GAAG,UACxB,OAAe,EACf,YAA0B;IAE1B,IAAM,UAAU,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAEtC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;QACjD,OAAO,6CAAsC,UAAU,CAAE,CAAC;IAC5D,CAAC;IAED,IAAM,gBAAgB,GAAG,SAAS,CAAC,OAAsB,CAAC,CAAC;IAC3D,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;QAC1D,OAAO,kCAA2B,YAAY,cAAW,CAAC;IAC5D,CAAC;IAED,OAAO,gBAAgB,CAAC,YAAY,CAAC,CAAC;AACxC,CAAC,CAAC;AAhBW,QAAA,UAAU,cAgBrB","sourcesContent":["export type Address = Lowercase<string>;\n// @todo update with proper chainId for mainnet\nimport { ReyaChainId } from '@reyaxyz/common';\n\nexport type ContractType = 'core_proxy' | 'passive_pool_proxy';\n\nconst addresses: Record<ReyaChainId, Record<ContractType, Address>> = {\n 80001: {\n core_proxy: '0xc2f1b4a1275b7338e0eb03967fea3858af4bc900',\n passive_pool_proxy: '0x1b9d499f3ac864b8d4da415846d1d1916e00a6ff',\n },\n 1729: {\n core_proxy: '0x2cb06a22ee9b823a307d22f131380dbe151ece5f',\n passive_pool_proxy: '0x63df38878c5b8e84d7dcb347b934072add64bdc5',\n },\n};\nexport const getAddress = (\n chainId: number,\n contractName: ContractType,\n): string => {\n const keyChainId = chainId.toString();\n\n if (!Object.keys(addresses).includes(keyChainId)) {\n return `Unspecified addresses for chain id ${keyChainId}`;\n }\n\n const networkAddresses = addresses[chainId as ReyaChainId];\n if (!Object.keys(networkAddresses).includes(contractName)) {\n return `Unspecified address for ${contractName} contract`;\n }\n\n return networkAddresses[contractName];\n};\n"]}
1
+ {"version":3,"file":"contractAddresses.js","sourceRoot":"/","sources":["utils/contractAddresses.ts"],"names":[],"mappings":";;;;AACA,+CAA+C;AAC/C,0CAA8C;AAI9C,IAAM,SAAS;IACb,GAAC,oBAAW,CAAC,aAAa,IAAG;QAC3B,UAAU,EAAE,4CAA4C;QACxD,kBAAkB,EAAE,4CAA4C;KACjE;IACD,GAAC,oBAAW,CAAC,UAAU,IAAG;QACxB,UAAU,EAAE,4CAA4C;QACxD,kBAAkB,EAAE,4CAA4C;KACjE;IACD,0BAA0B;IAC1B,GAAC,oBAAW,CAAC,WAAW,IAAG;QACzB,UAAU,EAAE,4CAA4C;QACxD,kBAAkB,EAAE,4CAA4C;KACjE;OACF,CAAC;AACK,IAAM,UAAU,GAAG,UACxB,OAAe,EACf,YAA0B;IAE1B,IAAM,UAAU,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAEtC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;QACjD,OAAO,6CAAsC,UAAU,CAAE,CAAC;IAC5D,CAAC;IAED,IAAM,gBAAgB,GAAG,SAAS,CAAC,OAAsB,CAAC,CAAC;IAC3D,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;QAC1D,OAAO,kCAA2B,YAAY,cAAW,CAAC;IAC5D,CAAC;IAED,OAAO,gBAAgB,CAAC,YAAY,CAAC,CAAC;AACxC,CAAC,CAAC;AAhBW,QAAA,UAAU,cAgBrB","sourcesContent":["export type Address = Lowercase<string>;\n// @todo update with proper chainId for mainnet\nimport { ReyaChainId } from '@reyaxyz/common';\n\nexport type ContractType = 'core_proxy' | 'passive_pool_proxy';\n\nconst addresses: Record<ReyaChainId, Record<ContractType, Address>> = {\n [ReyaChainId.polygonMumbai]: {\n core_proxy: '0xc2f1b4a1275b7338e0eb03967fea3858af4bc900',\n passive_pool_proxy: '0x1b9d499f3ac864b8d4da415846d1d1916e00a6ff',\n },\n [ReyaChainId.reyaCronos]: {\n core_proxy: '0x2cb06a22ee9b823a307d22f131380dbe151ece5f',\n passive_pool_proxy: '0x63df38878c5b8e84d7dcb347b934072add64bdc5',\n },\n // TODO: add proper config\n [ReyaChainId.reyaNetwork]: {\n core_proxy: '0x2cb06a22ee9b823a307d22f131380dbe151ece5f',\n passive_pool_proxy: '0x63df38878c5b8e84d7dcb347b934072add64bdc5',\n },\n};\nexport const getAddress = (\n chainId: number,\n contractName: ContractType,\n): string => {\n const keyChainId = chainId.toString();\n\n if (!Object.keys(addresses).includes(keyChainId)) {\n return `Unspecified addresses for chain id ${keyChainId}`;\n }\n\n const networkAddresses = addresses[chainId as ReyaChainId];\n if (!Object.keys(networkAddresses).includes(contractName)) {\n return `Unspecified address for ${contractName} contract`;\n }\n\n return networkAddresses[contractName];\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reyaxyz/sdk",
3
- "version": "0.13.1",
3
+ "version": "0.14.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -29,10 +29,10 @@
29
29
  "generate:coverage-badges": "npx istanbul-badges-readme --silent"
30
30
  },
31
31
  "dependencies": {
32
- "@reyaxyz/common": "0.2.0",
32
+ "@reyaxyz/common": "0.3.0",
33
33
  "bignumber.js": "^9.1.2",
34
34
  "ethers": "6.9.0"
35
35
  },
36
36
  "packageManager": "pnpm@8.10.4",
37
- "gitHead": "630f7e6f5ba60c43688e27835f75e7d94904317d"
37
+ "gitHead": "037cbc040faa91d6148afb21e36a739a017cef89"
38
38
  }
@@ -5,11 +5,16 @@ import { ReyaChainId } from '@reyaxyz/common';
5
5
  export type ContractType = 'core_proxy' | 'passive_pool_proxy';
6
6
 
7
7
  const addresses: Record<ReyaChainId, Record<ContractType, Address>> = {
8
- 80001: {
8
+ [ReyaChainId.polygonMumbai]: {
9
9
  core_proxy: '0xc2f1b4a1275b7338e0eb03967fea3858af4bc900',
10
10
  passive_pool_proxy: '0x1b9d499f3ac864b8d4da415846d1d1916e00a6ff',
11
11
  },
12
- 1729: {
12
+ [ReyaChainId.reyaCronos]: {
13
+ core_proxy: '0x2cb06a22ee9b823a307d22f131380dbe151ece5f',
14
+ passive_pool_proxy: '0x63df38878c5b8e84d7dcb347b934072add64bdc5',
15
+ },
16
+ // TODO: add proper config
17
+ [ReyaChainId.reyaNetwork]: {
13
18
  core_proxy: '0x2cb06a22ee9b823a307d22f131380dbe151ece5f',
14
19
  passive_pool_proxy: '0x63df38878c5b8e84d7dcb347b934072add64bdc5',
15
20
  },