@reyaxyz/common 0.314.0 → 0.316.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.
package/README.md CHANGED
@@ -6,5 +6,5 @@
6
6
 
7
7
  | Statements | Branches | Functions | Lines |
8
8
  | --------------------------- | ----------------------- | ------------------------- | ----------------- |
9
- | ![Statements](https://img.shields.io/badge/statements-21.18%25-red.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-18.12%25-red.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-11.06%25-red.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-22.8%25-red.svg?style=flat) |
9
+ | ![Statements](https://img.shields.io/badge/statements-21.23%25-red.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-18.06%25-red.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-11.01%25-red.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-22.87%25-red.svg?style=flat) |
10
10
 
@@ -5,6 +5,7 @@ export declare const chainIdToExplorerURL: {
5
5
  [key in MoneyInOutChainId | ReyaChainId]: string;
6
6
  };
7
7
  export declare const getAlchemyRpcUrl: (apiKey: string, chainId: MoneyInOutChainId) => string | null;
8
+ export declare const getInfuraRpcUrl: (apiKey: string, chainId: MoneyInOutChainId) => string | null;
8
9
  export declare const getPublicRpcUrls: (chainId: MoneyInOutChainId | ReyaChainId) => string[];
9
10
  export declare const getPublicRpcUrlsOrThrow: (chainId: MoneyInOutChainId | ReyaChainId) => string[];
10
11
  //# sourceMappingURL=network.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"network.d.ts","sourceRoot":"/","sources":["utils/network.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE1D,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,WAAW,GACnB,iBAAiB,EAAE,CAkBrB;AAED,wBAAgB,mCAAmC,CACjD,iBAAiB,EAAE,iBAAiB,GACnC,WAAW,CAcb;AAED,eAAO,MAAM,oBAAoB,EAAE;KAChC,GAAG,IAAI,iBAAiB,GAAG,WAAW,GAAG,MAAM;CAYjD,CAAC;AAiFF,eAAO,MAAM,gBAAgB,WACnB,MAAM,WACL,iBAAiB,KACzB,MAAM,GAAG,IAQX,CAAC;AAEF,eAAO,MAAM,gBAAgB,YAClB,iBAAiB,GAAG,WAAW,KACvC,MAAM,EAQR,CAAC;AAEF,eAAO,MAAM,uBAAuB,YACzB,iBAAiB,GAAG,WAAW,KACvC,MAAM,EAQR,CAAC"}
1
+ {"version":3,"file":"network.d.ts","sourceRoot":"/","sources":["utils/network.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE1D,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,WAAW,GACnB,iBAAiB,EAAE,CAkBrB;AAED,wBAAgB,mCAAmC,CACjD,iBAAiB,EAAE,iBAAiB,GACnC,WAAW,CAcb;AAED,eAAO,MAAM,oBAAoB,EAAE;KAChC,GAAG,IAAI,iBAAiB,GAAG,WAAW,GAAG,MAAM;CAYjD,CAAC;AA8FF,eAAO,MAAM,gBAAgB,WACnB,MAAM,WACL,iBAAiB,KACzB,MAAM,GAAG,IAQX,CAAC;AAEF,eAAO,MAAM,eAAe,WAClB,MAAM,WACL,iBAAiB,KACzB,MAAM,GAAG,IAQX,CAAC;AAEF,eAAO,MAAM,gBAAgB,YAClB,iBAAiB,GAAG,WAAW,KACvC,MAAM,EAQR,CAAC;AAEF,eAAO,MAAM,uBAAuB,YACzB,iBAAiB,GAAG,WAAW,KACvC,MAAM,EAQR,CAAC"}
@@ -18,11 +18,11 @@ exports.VLTZ_MINTING_DETAILS = (_a = {},
18
18
  },
19
19
  },
20
20
  _a[types_1.MoneyInOutChainId.ethereumMainnet] = {
21
- contractAddress: '0x7A00255ebcBE36FbF469e0A6265A271749560aE4',
21
+ contractAddress: '0x28606bbC6DBdcd8953B480Ac4226fcC34a396950',
22
22
  rounds: {
23
23
  1: {
24
- mintDeadline: 1761742800,
25
- mintStart: 1760529600,
24
+ mintDeadline: 1762347600,
25
+ mintStart: 1761134400,
26
26
  totalAllocation: 1000000000, // 1 Billion
27
27
  root: '0x2055f18a8e96ea548a78552f33632989ab0afa5706e530b10bd24c8bfcdafe71',
28
28
  },
@@ -1 +1 @@
1
- {"version":3,"file":"minting-helpers.js","sourceRoot":"/","sources":["utils/minting-helpers.ts"],"names":[],"mappings":";;;;AAAA,iCAAgC;AAChC,kCAA6C;AAM7C,6CAA6C;AAChC,QAAA,oBAAoB;IAe/B,GAAC,yBAAiB,CAAC,eAAe,IAAG;QACnC,eAAe,EAAE,4CAA4C;QAC7D,MAAM,EAAE;YACN,CAAC,EAAE;gBACD,YAAY,EAAE,UAAU;gBACxB,SAAS,EAAE,UAAU;gBACrB,eAAe,EAAE,UAAU,EAAE,YAAY;gBACzC,IAAI,EAAE,oEAAoE;aAC3E;SACF;KACF;IACD,GAAC,yBAAiB,CAAC,eAAe,IAAG;QACnC,eAAe,EAAE,4CAA4C;QAC7D,MAAM,EAAE;YACN,CAAC,EAAE;gBACD,YAAY,EAAE,UAAU;gBACxB,SAAS,EAAE,UAAU;gBACrB,eAAe,EAAE,UAAU,EAAE,YAAY;gBACzC,IAAI,EAAE,oEAAoE;aAC3E;SACF;KACF;QACD;AAEF,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,+BAAe,CAAA;IACf,+BAAe,CAAA;IACf,+BAAe,CAAA;IACf,uCAAuB,CAAA;IACvB,uCAAuB,CAAA;AACzB,CAAC,EANW,YAAY,4BAAZ,YAAY,QAMvB;AAED,IAAY,WAMX;AAND,WAAY,WAAW;IACrB,6BAAc,CAAA;IACd,4BAAa,CAAA;IACb,4BAAa,CAAA;IACb,4BAAa,CAAA;IACb,4BAAa,CAAA;AACf,CAAC,EANW,WAAW,2BAAX,WAAW,QAMtB;AAaM,IAAM,WAAW,GAAG,UACzB,aAAqB,EACrB,UAAkB;IAElB,IAAM,WAAW,GAAG,eAAM,CAAC,SAAS,CAClC,eAAM,CAAC,cAAc,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC,CAC3E,CAAC;IACF,OAAO,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AAClD,CAAC,CAAC;AARW,QAAA,WAAW,eAQtB","sourcesContent":["import { ethers } from 'ethers';\nimport { MoneyInOutChainId } from '../types';\n\ntype VltzMintingChainIds =\n | MoneyInOutChainId.ethereumMainnet\n | MoneyInOutChainId.ethereumSepolia;\n\n// mapping from round, to network, to details\nexport const VLTZ_MINTING_DETAILS: Record<\n VltzMintingChainIds,\n {\n contractAddress: string;\n rounds: Record<\n number,\n {\n mintDeadline: number;\n mintStart: number;\n totalAllocation: number;\n root: string;\n }\n >;\n }\n> = {\n [MoneyInOutChainId.ethereumSepolia]: {\n contractAddress: '0x7A00255ebcBE36FbF469e0A6265A271749560aE4',\n rounds: {\n 1: {\n mintDeadline: 1761742800,\n mintStart: 1760529600,\n totalAllocation: 1000000000, // 1 Billion\n root: '0x1aaeed7e414b0946dee1e5ddb2eb8bd63953c2f4f4a0f413998a1070a30b06d8',\n },\n },\n },\n [MoneyInOutChainId.ethereumMainnet]: {\n contractAddress: '0x7A00255ebcBE36FbF469e0A6265A271749560aE4',\n rounds: {\n 1: {\n mintDeadline: 1761742800,\n mintStart: 1760529600,\n totalAllocation: 1000000000, // 1 Billion\n root: '0x2055f18a8e96ea548a78552f33632989ab0afa5706e530b10bd24c8bfcdafe71',\n },\n },\n },\n};\n\nexport enum VltzTierName {\n tier1 = 'tier1',\n tier2 = 'tier2',\n tier3 = 'tier3',\n legendary = 'legendary',\n easterEgg = 'easterEgg',\n}\n\nexport enum VltzSeasons {\n seasonOg = '0',\n season1 = '1',\n season2 = '2',\n season3 = '3',\n season4 = '4',\n}\n\nexport type VltzAllocationInfo = {\n walletAddress: string;\n totalAllocation: number;\n allocationPerSeasonBadge: Record<VltzSeasons, Record<VltzTierName, number>>;\n};\n\nexport type VltzLeafInfo = {\n walletAddress: string;\n allocation: string;\n};\n\nexport const getVltzLeaf = (\n walletAddress: string,\n allocation: string,\n): Buffer => {\n const messageHash = ethers.keccak256(\n ethers.solidityPacked(['address', 'uint256'], [walletAddress, allocation]),\n );\n return Buffer.from(messageHash.slice(2), 'hex');\n};\n"]}
1
+ {"version":3,"file":"minting-helpers.js","sourceRoot":"/","sources":["utils/minting-helpers.ts"],"names":[],"mappings":";;;;AAAA,iCAAgC;AAChC,kCAA6C;AAM7C,6CAA6C;AAChC,QAAA,oBAAoB;IAe/B,GAAC,yBAAiB,CAAC,eAAe,IAAG;QACnC,eAAe,EAAE,4CAA4C;QAC7D,MAAM,EAAE;YACN,CAAC,EAAE;gBACD,YAAY,EAAE,UAAU;gBACxB,SAAS,EAAE,UAAU;gBACrB,eAAe,EAAE,UAAU,EAAE,YAAY;gBACzC,IAAI,EAAE,oEAAoE;aAC3E;SACF;KACF;IACD,GAAC,yBAAiB,CAAC,eAAe,IAAG;QACnC,eAAe,EAAE,4CAA4C;QAC7D,MAAM,EAAE;YACN,CAAC,EAAE;gBACD,YAAY,EAAE,UAAU;gBACxB,SAAS,EAAE,UAAU;gBACrB,eAAe,EAAE,UAAU,EAAE,YAAY;gBACzC,IAAI,EAAE,oEAAoE;aAC3E;SACF;KACF;QACD;AAEF,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,+BAAe,CAAA;IACf,+BAAe,CAAA;IACf,+BAAe,CAAA;IACf,uCAAuB,CAAA;IACvB,uCAAuB,CAAA;AACzB,CAAC,EANW,YAAY,4BAAZ,YAAY,QAMvB;AAED,IAAY,WAMX;AAND,WAAY,WAAW;IACrB,6BAAc,CAAA;IACd,4BAAa,CAAA;IACb,4BAAa,CAAA;IACb,4BAAa,CAAA;IACb,4BAAa,CAAA;AACf,CAAC,EANW,WAAW,2BAAX,WAAW,QAMtB;AAaM,IAAM,WAAW,GAAG,UACzB,aAAqB,EACrB,UAAkB;IAElB,IAAM,WAAW,GAAG,eAAM,CAAC,SAAS,CAClC,eAAM,CAAC,cAAc,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC,CAC3E,CAAC;IACF,OAAO,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AAClD,CAAC,CAAC;AARW,QAAA,WAAW,eAQtB","sourcesContent":["import { ethers } from 'ethers';\nimport { MoneyInOutChainId } from '../types';\n\ntype VltzMintingChainIds =\n | MoneyInOutChainId.ethereumMainnet\n | MoneyInOutChainId.ethereumSepolia;\n\n// mapping from round, to network, to details\nexport const VLTZ_MINTING_DETAILS: Record<\n VltzMintingChainIds,\n {\n contractAddress: string;\n rounds: Record<\n number,\n {\n mintDeadline: number;\n mintStart: number;\n totalAllocation: number;\n root: string;\n }\n >;\n }\n> = {\n [MoneyInOutChainId.ethereumSepolia]: {\n contractAddress: '0x7A00255ebcBE36FbF469e0A6265A271749560aE4',\n rounds: {\n 1: {\n mintDeadline: 1761742800,\n mintStart: 1760529600,\n totalAllocation: 1000000000, // 1 Billion\n root: '0x1aaeed7e414b0946dee1e5ddb2eb8bd63953c2f4f4a0f413998a1070a30b06d8',\n },\n },\n },\n [MoneyInOutChainId.ethereumMainnet]: {\n contractAddress: '0x28606bbC6DBdcd8953B480Ac4226fcC34a396950',\n rounds: {\n 1: {\n mintDeadline: 1762347600,\n mintStart: 1761134400,\n totalAllocation: 1000000000, // 1 Billion\n root: '0x2055f18a8e96ea548a78552f33632989ab0afa5706e530b10bd24c8bfcdafe71',\n },\n },\n },\n};\n\nexport enum VltzTierName {\n tier1 = 'tier1',\n tier2 = 'tier2',\n tier3 = 'tier3',\n legendary = 'legendary',\n easterEgg = 'easterEgg',\n}\n\nexport enum VltzSeasons {\n seasonOg = '0',\n season1 = '1',\n season2 = '2',\n season3 = '3',\n season4 = '4',\n}\n\nexport type VltzAllocationInfo = {\n walletAddress: string;\n totalAllocation: number;\n allocationPerSeasonBadge: Record<VltzSeasons, Record<VltzTierName, number>>;\n};\n\nexport type VltzLeafInfo = {\n walletAddress: string;\n allocation: string;\n};\n\nexport const getVltzLeaf = (\n walletAddress: string,\n allocation: string,\n): Buffer => {\n const messageHash = ethers.keccak256(\n ethers.solidityPacked(['address', 'uint256'], [walletAddress, allocation]),\n );\n return Buffer.from(messageHash.slice(2), 'hex');\n};\n"]}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
- var _a, _b, _c;
2
+ var _a, _b, _c, _d;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.getPublicRpcUrlsOrThrow = exports.getPublicRpcUrls = exports.getAlchemyRpcUrl = exports.chainIdToExplorerURL = exports.getReyaNetworkFromMoneyInOutChainId = exports.getMoneyInOutNetworks = void 0;
4
+ exports.getPublicRpcUrlsOrThrow = exports.getPublicRpcUrls = exports.getInfuraRpcUrl = exports.getAlchemyRpcUrl = exports.chainIdToExplorerURL = exports.getReyaNetworkFromMoneyInOutChainId = exports.getMoneyInOutNetworks = void 0;
5
5
  var types_1 = require("../types");
6
6
  function getMoneyInOutNetworks(chainId) {
7
7
  if (chainId === types_1.ReyaChainId.reyaNetwork)
@@ -119,6 +119,18 @@ var ALCHEMY_BASE_RPC_URL = (_c = {},
119
119
  _c[types_1.MoneyInOutChainId.opSepolia] = 'https://opt-sepolia.g.alchemy.com/v2',
120
120
  _c[types_1.MoneyInOutChainId.ethereumSepolia] = 'https://eth-sepolia.g.alchemy.com/v2',
121
121
  _c);
122
+ var INFURA_BASE_RPC_URL = (_d = {},
123
+ // mainnet
124
+ _d[types_1.MoneyInOutChainId.ethereumMainnet] = 'https://mainnet.infura.io/v3',
125
+ _d[types_1.MoneyInOutChainId.opMainnet] = 'https://optimism-mainnet.infura.io/v3',
126
+ _d[types_1.MoneyInOutChainId.polygonMainnet] = 'https://polygon-mainnet.infura.io/v3',
127
+ _d[types_1.MoneyInOutChainId.arbitrumOne] = 'https://arbitrum-mainnet.infura.io/v3',
128
+ _d[types_1.MoneyInOutChainId.baseMainnet] = 'https://base-mainnet.infura.io/v3',
129
+ // testnet
130
+ _d[types_1.MoneyInOutChainId.arbitrumSepolia] = 'https://arbitrum-sepolia.infura.io/v3',
131
+ _d[types_1.MoneyInOutChainId.opSepolia] = 'https://optimism-sepolia.infura.io/v3',
132
+ _d[types_1.MoneyInOutChainId.ethereumSepolia] = 'https://sepolia.infura.io/v3',
133
+ _d);
122
134
  var getAlchemyRpcUrl = function (apiKey, chainId) {
123
135
  var rpcUrl = ALCHEMY_BASE_RPC_URL[chainId];
124
136
  if (!rpcUrl) {
@@ -127,6 +139,14 @@ var getAlchemyRpcUrl = function (apiKey, chainId) {
127
139
  return "".concat(rpcUrl, "/").concat(apiKey);
128
140
  };
129
141
  exports.getAlchemyRpcUrl = getAlchemyRpcUrl;
142
+ var getInfuraRpcUrl = function (apiKey, chainId) {
143
+ var rpcUrl = INFURA_BASE_RPC_URL[chainId];
144
+ if (!rpcUrl) {
145
+ return null;
146
+ }
147
+ return "".concat(rpcUrl, "/").concat(apiKey);
148
+ };
149
+ exports.getInfuraRpcUrl = getInfuraRpcUrl;
130
150
  var getPublicRpcUrls = function (chainId) {
131
151
  var rpcUrls = ChainRpcUrls[chainId];
132
152
  if (!rpcUrls) {
@@ -1 +1 @@
1
- {"version":3,"file":"network.js","sourceRoot":"/","sources":["utils/network.ts"],"names":[],"mappings":";;;;AAAA,kCAA0D;AAE1D,SAAgB,qBAAqB,CACnC,OAAoB;IAEpB,IAAI,OAAO,KAAK,mBAAW,CAAC,WAAW;QACrC,OAAO;YACL,yBAAiB,CAAC,eAAe;YACjC,yBAAiB,CAAC,SAAS;YAC3B,yBAAiB,CAAC,cAAc;YAChC,yBAAiB,CAAC,WAAW;YAC7B,yBAAiB,CAAC,WAA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AAC,WAAW,IAAG,sCAAsC;IACvE,GAAC,yBAAiB,CAAC,WAAW,IAAG,uCAAuC;IACxE,UAAU;IACV,GAAC,yBAAiB,CAAC,eAAe,IAAG,sCAAsC;IAC3E,GAAC,yBAAiB,CAAC,SAAS,IAAG,sCAAsC;IACrE,GAAC,yBAAiB,CAAC,eAAe,IAAG,sCAAsC;OAC5E,CAAC;AAEK,IAAM,gBAAgB,GAAG,UAC9B,MAAc,EACd,OAA0B;IAE1B,IAAM,MAAM,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAE7C,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,UAAG,MAAM,cAAI,MAAM,CAAE,CAAC;AAC/B,CAAC,CAAC;AAXW,QAAA,gBAAgB,oBAW3B;AAEK,IAAM,gBAAgB,GAAG,UAC9B,OAAwC;IAExC,IAAM,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IAEtC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAVW,QAAA,gBAAgB,oBAU3B;AAEK,IAAM,uBAAuB,GAAG,UACrC,OAAwC;IAExC,IAAM,OAAO,GAAG,IAAA,wBAAgB,EAAC,OAAO,CAAC,CAAC;IAE1C,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,+CAA+C,GAAG,OAAO,CAAC,CAAC;IAC7E,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAVW,QAAA,uBAAuB,2BAUlC","sourcesContent":["import { MoneyInOutChainId, ReyaChainId } from '../types';\n\nexport function getMoneyInOutNetworks(\n chainId: ReyaChainId,\n): MoneyInOutChainId[] {\n if (chainId === ReyaChainId.reyaNetwork)\n return [\n MoneyInOutChainId.ethereumMainnet,\n MoneyInOutChainId.opMainnet,\n MoneyInOutChainId.polygonMainnet,\n MoneyInOutChainId.arbitrumOne,\n MoneyInOutChainId.baseMainnet,\n ];\n\n if (chainId === ReyaChainId.reyaCronos)\n return [\n MoneyInOutChainId.ethereumSepolia,\n MoneyInOutChainId.opSepolia,\n MoneyInOutChainId.arbitrumSepolia,\n ];\n\n throw new Error(`Unknown Reya chain id ${chainId}`);\n}\n\nexport function getReyaNetworkFromMoneyInOutChainId(\n moneyInOutChainId: MoneyInOutChainId,\n): ReyaChainId {\n if (\n getMoneyInOutNetworks(ReyaChainId.reyaNetwork).includes(moneyInOutChainId)\n ) {\n return ReyaChainId.reyaNetwork;\n }\n\n if (\n getMoneyInOutNetworks(ReyaChainId.reyaCronos).includes(moneyInOutChainId)\n ) {\n return ReyaChainId.reyaCronos;\n }\n\n throw new Error(`Unknown external chain id ${moneyInOutChainId}`);\n}\n\nexport const chainIdToExplorerURL: {\n [key in MoneyInOutChainId | ReyaChainId]: string;\n} = {\n [MoneyInOutChainId.ethereumMainnet]: 'https://etherscan.io',\n [MoneyInOutChainId.opMainnet]: 'https://optimistic.etherscan.io',\n [MoneyInOutChainId.polygonMainnet]: 'https://polygonscan.com',\n [MoneyInOutChainId.arbitrumOne]: 'https://arbiscan.io',\n [MoneyInOutChainId.baseMainnet]: 'https://basescan.org',\n [MoneyInOutChainId.arbitrumSepolia]: 'https://sepolia.arbiscan.io',\n [MoneyInOutChainId.opSepolia]: 'https://sepolia-optimism.etherscan.io',\n [MoneyInOutChainId.ethereumSepolia]: 'https://sepolia.etherscan.io',\n [ReyaChainId.reyaNetwork]: 'https://explorer.reya.network',\n [ReyaChainId.reyaCronos]: 'https://reya-cronos.blockscout.com',\n};\n\nconst ChainRpcUrls: Record<MoneyInOutChainId | ReyaChainId, string[]> = {\n [ReyaChainId.reyaNetwork]: [\n 'https://rpc.reya.network/263e76b89da84d478fd2b6e8783a1cfe',\n ],\n [MoneyInOutChainId.ethereumMainnet]: [\n 'https://mainnet.gateway.tenderly.co',\n 'https://eth.llamarpc.com',\n 'https://eth-mainnet.g.alchemy.com/v2/Tkk3-2tTcsCLnFa4dSSUkpZsDyOH55Ar',\n 'https://eth-mainnet.g.alchemy.com/v2/Bin_D_qtJLCqvFyzt-0SxZRWTL423_tg',\n 'https://eth-mainnet.g.alchemy.com/v2/A21_W1GwGu775PCAoQbj_pJgBPzIgAzv',\n 'https://mainnet.gateway.tenderly.co/69U6LoF0URUv5CfuIU7FdL',\n ],\n [MoneyInOutChainId.opMainnet]: [\n 'https://mainnet.optimism.io',\n 'https://optimism.llamarpc.com',\n 'https://opt-mainnet.g.alchemy.com/v2/Tkk3-2tTcsCLnFa4dSSUkpZsDyOH55Ar',\n 'https://opt-mainnet.g.alchemy.com/v2/Bin_D_qtJLCqvFyzt-0SxZRWTL423_tg',\n 'https://opt-mainnet.g.alchemy.com/v2/A21_W1GwGu775PCAoQbj_pJgBPzIgAzv',\n 'https://optimism.gateway.tenderly.co/69LkAPTI3LODcBAdtz9wQC',\n ],\n [MoneyInOutChainId.polygonMainnet]: [\n 'https://polygon-rpc.com',\n 'https://gateway.tenderly.co/public/polygon',\n 'https://polygon-mainnet.g.alchemy.com/v2/Tkk3-2tTcsCLnFa4dSSUkpZsDyOH55Ar',\n 'https://polygon-mainnet.g.alchemy.com/v2/Bin_D_qtJLCqvFyzt-0SxZRWTL423_tg',\n 'https://polygon-mainnet.g.alchemy.com/v2/A21_W1GwGu775PCAoQbj_pJgBPzIgAzv',\n 'https://polygon.gateway.tenderly.co/7Qw4fTY4kf3v02LjJjWyvZ',\n ],\n [MoneyInOutChainId.arbitrumOne]: [\n 'https://arb1.arbitrum.io/rpc',\n 'https://arbitrum.llamarpc.com',\n 'https://arb-mainnet.g.alchemy.com/v2/Tkk3-2tTcsCLnFa4dSSUkpZsDyOH55Ar',\n 'https://arb-mainnet.g.alchemy.com/v2/Bin_D_qtJLCqvFyzt-0SxZRWTL423_tg',\n 'https://arb-mainnet.g.alchemy.com/v2/A21_W1GwGu775PCAoQbj_pJgBPzIgAzv',\n 'https://arbitrum.gateway.tenderly.co/1wQGK6nNPTbSc7asucAbzA',\n ],\n [MoneyInOutChainId.baseMainnet]: [\n 'https://mainnet.base.org',\n 'https://base.llamarpc.com',\n 'https://base-mainnet.g.alchemy.com/v2/Tkk3-2tTcsCLnFa4dSSUkpZsDyOH55Ar',\n 'https://base-mainnet.g.alchemy.com/v2/Bin_D_qtJLCqvFyzt-0SxZRWTL423_tg',\n 'https://base-mainnet.g.alchemy.com/v2/A21_W1GwGu775PCAoQbj_pJgBPzIgAzv',\n 'https://base.gateway.tenderly.co/2LHAD54IBvgXiVQdhE9mIF',\n ],\n // Add the rest of the mainnet URLs above\n [ReyaChainId.reyaCronos]: [\n 'https://rpc.reya-cronos.gelato.digital/263e76b89da84d478fd2b6e8783a1cfe',\n ],\n [MoneyInOutChainId.arbitrumSepolia]: [\n 'https://sepolia-rollup.arbitrum.io/rpc',\n 'https://endpoints.omniatech.io/v1/arbitrum/sepolia/public',\n 'https://arbitrum-sepolia.gateway.tenderly.co/4YMRN8fKu2SV1JSNsGlbMZ',\n ],\n [MoneyInOutChainId.opSepolia]: [\n 'https://sepolia.optimism.io',\n 'https://optimism-sepolia.blockpi.network/v1/rpc/public',\n 'https://optimism-sepolia.gateway.tenderly.co/2nXBEGPk57CotvTJMjIMK7',\n ],\n [MoneyInOutChainId.ethereumSepolia]: [\n 'https://sepolia.gateway.tenderly.co',\n 'https://ethereum-sepolia.blockpi.network/v1/rpc/public',\n 'https://sepolia.gateway.tenderly.co/1u2yZV1rdVLpgOeHwD1Z8M',\n ],\n};\n\nconst ALCHEMY_BASE_RPC_URL: Record<MoneyInOutChainId, string> = {\n // mainnet\n [MoneyInOutChainId.ethereumMainnet]: 'https://eth-mainnet.g.alchemy.com/v2',\n [MoneyInOutChainId.opMainnet]: 'https://opt-mainnet.g.alchemy.com/v2',\n [MoneyInOutChainId.polygonMainnet]:\n 'https://polygon-mainnet.g.alchemy.com/v2',\n [MoneyInOutChainId.arbitrumOne]: 'https://arb-mainnet.g.alchemy.com/v2',\n [MoneyInOutChainId.baseMainnet]: 'https://base-mainnet.g.alchemy.com/v2',\n // testnet\n [MoneyInOutChainId.arbitrumSepolia]: 'https://arb-sepolia.g.alchemy.com/v2',\n [MoneyInOutChainId.opSepolia]: 'https://opt-sepolia.g.alchemy.com/v2',\n [MoneyInOutChainId.ethereumSepolia]: 'https://eth-sepolia.g.alchemy.com/v2',\n};\n\nexport const getAlchemyRpcUrl = (\n apiKey: string,\n chainId: MoneyInOutChainId,\n): string | null => {\n const rpcUrl = ALCHEMY_BASE_RPC_URL[chainId];\n\n if (!rpcUrl) {\n return null;\n }\n\n return `${rpcUrl}/${apiKey}`;\n};\n\nexport const getPublicRpcUrls = (\n chainId: MoneyInOutChainId | ReyaChainId,\n): string[] => {\n const rpcUrls = ChainRpcUrls[chainId];\n\n if (!rpcUrls) {\n return [];\n }\n\n return rpcUrls;\n};\n\nexport const getPublicRpcUrlsOrThrow = (\n chainId: MoneyInOutChainId | ReyaChainId,\n): string[] => {\n const rpcUrls = getPublicRpcUrls(chainId);\n\n if (rpcUrls.length === 0) {\n throw new Error('No public RPC URLs configured for the chain: ' + chainId);\n }\n\n return rpcUrls;\n};\n"]}
1
+ {"version":3,"file":"network.js","sourceRoot":"/","sources":["utils/network.ts"],"names":[],"mappings":";;;;AAAA,kCAA0D;AAE1D,SAAgB,qBAAqB,CACnC,OAAoB;IAEpB,IAAI,OAAO,KAAK,mBAAW,CAAC,WAAW;QACrC,OAAO;YACL,yBAAiB,CAAC,eAAe;YACjC,yBAAiB,CAAC,SAAS;YAC3B,yBAAiB,CAAC,cAAc;YAChC,yBAAiB,CAAC,WAAW;YAC7B,yBAAiB,CAAC,WAAW;SAC9B,CAAC;IAEJ,IAAI,OAAO,KAAK,mBAAW,CAAC,UAAU;QACpC,OAAO;YACL,yBAAiB,CAAC,eAAe;YACjC,yBAAiB,CAAC,SAAS;YAC3B,yBAAiB,CAAC,eAAe;SAClC,CA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AAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAVW,QAAA,gBAAgB,oBAU3B;AAEK,IAAM,uBAAuB,GAAG,UACrC,OAAwC;IAExC,IAAM,OAAO,GAAG,IAAA,wBAAgB,EAAC,OAAO,CAAC,CAAC;IAE1C,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,+CAA+C,GAAG,OAAO,CAAC,CAAC;IAC7E,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAVW,QAAA,uBAAuB,2BAUlC","sourcesContent":["import { MoneyInOutChainId, ReyaChainId } from '../types';\n\nexport function getMoneyInOutNetworks(\n chainId: ReyaChainId,\n): MoneyInOutChainId[] {\n if (chainId === ReyaChainId.reyaNetwork)\n return [\n MoneyInOutChainId.ethereumMainnet,\n MoneyInOutChainId.opMainnet,\n MoneyInOutChainId.polygonMainnet,\n MoneyInOutChainId.arbitrumOne,\n MoneyInOutChainId.baseMainnet,\n ];\n\n if (chainId === ReyaChainId.reyaCronos)\n return [\n MoneyInOutChainId.ethereumSepolia,\n MoneyInOutChainId.opSepolia,\n MoneyInOutChainId.arbitrumSepolia,\n ];\n\n throw new Error(`Unknown Reya chain id ${chainId}`);\n}\n\nexport function getReyaNetworkFromMoneyInOutChainId(\n moneyInOutChainId: MoneyInOutChainId,\n): ReyaChainId {\n if (\n getMoneyInOutNetworks(ReyaChainId.reyaNetwork).includes(moneyInOutChainId)\n ) {\n return ReyaChainId.reyaNetwork;\n }\n\n if (\n getMoneyInOutNetworks(ReyaChainId.reyaCronos).includes(moneyInOutChainId)\n ) {\n return ReyaChainId.reyaCronos;\n }\n\n throw new Error(`Unknown external chain id ${moneyInOutChainId}`);\n}\n\nexport const chainIdToExplorerURL: {\n [key in MoneyInOutChainId | ReyaChainId]: string;\n} = {\n [MoneyInOutChainId.ethereumMainnet]: 'https://etherscan.io',\n [MoneyInOutChainId.opMainnet]: 'https://optimistic.etherscan.io',\n [MoneyInOutChainId.polygonMainnet]: 'https://polygonscan.com',\n [MoneyInOutChainId.arbitrumOne]: 'https://arbiscan.io',\n [MoneyInOutChainId.baseMainnet]: 'https://basescan.org',\n [MoneyInOutChainId.arbitrumSepolia]: 'https://sepolia.arbiscan.io',\n [MoneyInOutChainId.opSepolia]: 'https://sepolia-optimism.etherscan.io',\n [MoneyInOutChainId.ethereumSepolia]: 'https://sepolia.etherscan.io',\n [ReyaChainId.reyaNetwork]: 'https://explorer.reya.network',\n [ReyaChainId.reyaCronos]: 'https://reya-cronos.blockscout.com',\n};\n\nconst ChainRpcUrls: Record<MoneyInOutChainId | ReyaChainId, string[]> = {\n [ReyaChainId.reyaNetwork]: [\n 'https://rpc.reya.network/263e76b89da84d478fd2b6e8783a1cfe',\n ],\n [MoneyInOutChainId.ethereumMainnet]: [\n 'https://mainnet.gateway.tenderly.co',\n 'https://eth.llamarpc.com',\n 'https://eth-mainnet.g.alchemy.com/v2/Tkk3-2tTcsCLnFa4dSSUkpZsDyOH55Ar',\n 'https://eth-mainnet.g.alchemy.com/v2/Bin_D_qtJLCqvFyzt-0SxZRWTL423_tg',\n 'https://eth-mainnet.g.alchemy.com/v2/A21_W1GwGu775PCAoQbj_pJgBPzIgAzv',\n 'https://mainnet.gateway.tenderly.co/69U6LoF0URUv5CfuIU7FdL',\n ],\n [MoneyInOutChainId.opMainnet]: [\n 'https://mainnet.optimism.io',\n 'https://optimism.llamarpc.com',\n 'https://opt-mainnet.g.alchemy.com/v2/Tkk3-2tTcsCLnFa4dSSUkpZsDyOH55Ar',\n 'https://opt-mainnet.g.alchemy.com/v2/Bin_D_qtJLCqvFyzt-0SxZRWTL423_tg',\n 'https://opt-mainnet.g.alchemy.com/v2/A21_W1GwGu775PCAoQbj_pJgBPzIgAzv',\n 'https://optimism.gateway.tenderly.co/69LkAPTI3LODcBAdtz9wQC',\n ],\n [MoneyInOutChainId.polygonMainnet]: [\n 'https://polygon-rpc.com',\n 'https://gateway.tenderly.co/public/polygon',\n 'https://polygon-mainnet.g.alchemy.com/v2/Tkk3-2tTcsCLnFa4dSSUkpZsDyOH55Ar',\n 'https://polygon-mainnet.g.alchemy.com/v2/Bin_D_qtJLCqvFyzt-0SxZRWTL423_tg',\n 'https://polygon-mainnet.g.alchemy.com/v2/A21_W1GwGu775PCAoQbj_pJgBPzIgAzv',\n 'https://polygon.gateway.tenderly.co/7Qw4fTY4kf3v02LjJjWyvZ',\n ],\n [MoneyInOutChainId.arbitrumOne]: [\n 'https://arb1.arbitrum.io/rpc',\n 'https://arbitrum.llamarpc.com',\n 'https://arb-mainnet.g.alchemy.com/v2/Tkk3-2tTcsCLnFa4dSSUkpZsDyOH55Ar',\n 'https://arb-mainnet.g.alchemy.com/v2/Bin_D_qtJLCqvFyzt-0SxZRWTL423_tg',\n 'https://arb-mainnet.g.alchemy.com/v2/A21_W1GwGu775PCAoQbj_pJgBPzIgAzv',\n 'https://arbitrum.gateway.tenderly.co/1wQGK6nNPTbSc7asucAbzA',\n ],\n [MoneyInOutChainId.baseMainnet]: [\n 'https://mainnet.base.org',\n 'https://base.llamarpc.com',\n 'https://base-mainnet.g.alchemy.com/v2/Tkk3-2tTcsCLnFa4dSSUkpZsDyOH55Ar',\n 'https://base-mainnet.g.alchemy.com/v2/Bin_D_qtJLCqvFyzt-0SxZRWTL423_tg',\n 'https://base-mainnet.g.alchemy.com/v2/A21_W1GwGu775PCAoQbj_pJgBPzIgAzv',\n 'https://base.gateway.tenderly.co/2LHAD54IBvgXiVQdhE9mIF',\n ],\n // Add the rest of the mainnet URLs above\n [ReyaChainId.reyaCronos]: [\n 'https://rpc.reya-cronos.gelato.digital/263e76b89da84d478fd2b6e8783a1cfe',\n ],\n [MoneyInOutChainId.arbitrumSepolia]: [\n 'https://sepolia-rollup.arbitrum.io/rpc',\n 'https://endpoints.omniatech.io/v1/arbitrum/sepolia/public',\n 'https://arbitrum-sepolia.gateway.tenderly.co/4YMRN8fKu2SV1JSNsGlbMZ',\n ],\n [MoneyInOutChainId.opSepolia]: [\n 'https://sepolia.optimism.io',\n 'https://optimism-sepolia.blockpi.network/v1/rpc/public',\n 'https://optimism-sepolia.gateway.tenderly.co/2nXBEGPk57CotvTJMjIMK7',\n ],\n [MoneyInOutChainId.ethereumSepolia]: [\n 'https://sepolia.gateway.tenderly.co',\n 'https://ethereum-sepolia.blockpi.network/v1/rpc/public',\n 'https://sepolia.gateway.tenderly.co/1u2yZV1rdVLpgOeHwD1Z8M',\n ],\n};\n\nconst ALCHEMY_BASE_RPC_URL: Record<MoneyInOutChainId, string> = {\n // mainnet\n [MoneyInOutChainId.ethereumMainnet]: 'https://eth-mainnet.g.alchemy.com/v2',\n [MoneyInOutChainId.opMainnet]: 'https://opt-mainnet.g.alchemy.com/v2',\n [MoneyInOutChainId.polygonMainnet]:\n 'https://polygon-mainnet.g.alchemy.com/v2',\n [MoneyInOutChainId.arbitrumOne]: 'https://arb-mainnet.g.alchemy.com/v2',\n [MoneyInOutChainId.baseMainnet]: 'https://base-mainnet.g.alchemy.com/v2',\n // testnet\n [MoneyInOutChainId.arbitrumSepolia]: 'https://arb-sepolia.g.alchemy.com/v2',\n [MoneyInOutChainId.opSepolia]: 'https://opt-sepolia.g.alchemy.com/v2',\n [MoneyInOutChainId.ethereumSepolia]: 'https://eth-sepolia.g.alchemy.com/v2',\n};\n\nconst INFURA_BASE_RPC_URL: Record<MoneyInOutChainId, string> = {\n // mainnet\n [MoneyInOutChainId.ethereumMainnet]: 'https://mainnet.infura.io/v3',\n [MoneyInOutChainId.opMainnet]: 'https://optimism-mainnet.infura.io/v3',\n [MoneyInOutChainId.polygonMainnet]: 'https://polygon-mainnet.infura.io/v3',\n [MoneyInOutChainId.arbitrumOne]: 'https://arbitrum-mainnet.infura.io/v3',\n [MoneyInOutChainId.baseMainnet]: 'https://base-mainnet.infura.io/v3',\n // testnet\n [MoneyInOutChainId.arbitrumSepolia]: 'https://arbitrum-sepolia.infura.io/v3',\n [MoneyInOutChainId.opSepolia]: 'https://optimism-sepolia.infura.io/v3',\n [MoneyInOutChainId.ethereumSepolia]: 'https://sepolia.infura.io/v3',\n};\n\nexport const getAlchemyRpcUrl = (\n apiKey: string,\n chainId: MoneyInOutChainId,\n): string | null => {\n const rpcUrl = ALCHEMY_BASE_RPC_URL[chainId];\n\n if (!rpcUrl) {\n return null;\n }\n\n return `${rpcUrl}/${apiKey}`;\n};\n\nexport const getInfuraRpcUrl = (\n apiKey: string,\n chainId: MoneyInOutChainId,\n): string | null => {\n const rpcUrl = INFURA_BASE_RPC_URL[chainId];\n\n if (!rpcUrl) {\n return null;\n }\n\n return `${rpcUrl}/${apiKey}`;\n};\n\nexport const getPublicRpcUrls = (\n chainId: MoneyInOutChainId | ReyaChainId,\n): string[] => {\n const rpcUrls = ChainRpcUrls[chainId];\n\n if (!rpcUrls) {\n return [];\n }\n\n return rpcUrls;\n};\n\nexport const getPublicRpcUrlsOrThrow = (\n chainId: MoneyInOutChainId | ReyaChainId,\n): string[] => {\n const rpcUrls = getPublicRpcUrls(chainId);\n\n if (rpcUrls.length === 0) {\n throw new Error('No public RPC URLs configured for the chain: ' + chainId);\n }\n\n return rpcUrls;\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reyaxyz/common",
3
- "version": "0.314.0",
3
+ "version": "0.316.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -44,5 +44,5 @@
44
44
  "generate:coverage-badges": "npx istanbul-badges-readme --silent"
45
45
  },
46
46
  "packageManager": "pnpm@8.3.1",
47
- "gitHead": "032dd7a9acede5d077be3aeaee4f11e1e4036aca"
47
+ "gitHead": "93ae722aae6d90e9e007249814389262c9f5b9e3"
48
48
  }
@@ -33,11 +33,11 @@ export const VLTZ_MINTING_DETAILS: Record<
33
33
  },
34
34
  },
35
35
  [MoneyInOutChainId.ethereumMainnet]: {
36
- contractAddress: '0x7A00255ebcBE36FbF469e0A6265A271749560aE4',
36
+ contractAddress: '0x28606bbC6DBdcd8953B480Ac4226fcC34a396950',
37
37
  rounds: {
38
38
  1: {
39
- mintDeadline: 1761742800,
40
- mintStart: 1760529600,
39
+ mintDeadline: 1762347600,
40
+ mintStart: 1761134400,
41
41
  totalAllocation: 1000000000, // 1 Billion
42
42
  root: '0x2055f18a8e96ea548a78552f33632989ab0afa5706e530b10bd24c8bfcdafe71',
43
43
  },
@@ -134,6 +134,19 @@ const ALCHEMY_BASE_RPC_URL: Record<MoneyInOutChainId, string> = {
134
134
  [MoneyInOutChainId.ethereumSepolia]: 'https://eth-sepolia.g.alchemy.com/v2',
135
135
  };
136
136
 
137
+ const INFURA_BASE_RPC_URL: Record<MoneyInOutChainId, string> = {
138
+ // mainnet
139
+ [MoneyInOutChainId.ethereumMainnet]: 'https://mainnet.infura.io/v3',
140
+ [MoneyInOutChainId.opMainnet]: 'https://optimism-mainnet.infura.io/v3',
141
+ [MoneyInOutChainId.polygonMainnet]: 'https://polygon-mainnet.infura.io/v3',
142
+ [MoneyInOutChainId.arbitrumOne]: 'https://arbitrum-mainnet.infura.io/v3',
143
+ [MoneyInOutChainId.baseMainnet]: 'https://base-mainnet.infura.io/v3',
144
+ // testnet
145
+ [MoneyInOutChainId.arbitrumSepolia]: 'https://arbitrum-sepolia.infura.io/v3',
146
+ [MoneyInOutChainId.opSepolia]: 'https://optimism-sepolia.infura.io/v3',
147
+ [MoneyInOutChainId.ethereumSepolia]: 'https://sepolia.infura.io/v3',
148
+ };
149
+
137
150
  export const getAlchemyRpcUrl = (
138
151
  apiKey: string,
139
152
  chainId: MoneyInOutChainId,
@@ -147,6 +160,19 @@ export const getAlchemyRpcUrl = (
147
160
  return `${rpcUrl}/${apiKey}`;
148
161
  };
149
162
 
163
+ export const getInfuraRpcUrl = (
164
+ apiKey: string,
165
+ chainId: MoneyInOutChainId,
166
+ ): string | null => {
167
+ const rpcUrl = INFURA_BASE_RPC_URL[chainId];
168
+
169
+ if (!rpcUrl) {
170
+ return null;
171
+ }
172
+
173
+ return `${rpcUrl}/${apiKey}`;
174
+ };
175
+
150
176
  export const getPublicRpcUrls = (
151
177
  chainId: MoneyInOutChainId | ReyaChainId,
152
178
  ): string[] => {