@reyaxyz/common 0.36.0 → 0.37.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/dist/services/getAllowedChainsForMoneyInOut.js +12 -2
- package/dist/services/getAllowedChainsForMoneyInOut.js.map +1 -1
- package/dist/services/getSocketWithdrawFees.js +2 -2
- package/dist/services/getSocketWithdrawFees.js.map +1 -1
- package/dist/types/services/getAllowedChainsForMoneyInOut.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/services/getAllowedChainsForMoneyInOut.ts +11 -2
- package/src/services/getSocketWithdrawFees.ts +2 -2
|
@@ -6,8 +6,18 @@ var getAllowedChainsForMoneyInOut = function (_a) {
|
|
|
6
6
|
var
|
|
7
7
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8
8
|
destinationChainId = _a.destinationChainId;
|
|
9
|
-
// todo:
|
|
10
|
-
|
|
9
|
+
// todo: mainnet
|
|
10
|
+
if (destinationChainId === types_1.ReyaChainId.reyaCronos) {
|
|
11
|
+
return [
|
|
12
|
+
types_1.MoneyInOutChainId.polygonMumbai,
|
|
13
|
+
types_1.MoneyInOutChainId.arbitrumSepolia,
|
|
14
|
+
types_1.MoneyInOutChainId.opSepolia,
|
|
15
|
+
types_1.MoneyInOutChainId.ethereumSepolia,
|
|
16
|
+
];
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
throw new Error('getAllowedChainsForMoneyInOut unsupported network');
|
|
20
|
+
}
|
|
11
21
|
};
|
|
12
22
|
exports.getAllowedChainsForMoneyInOut = getAllowedChainsForMoneyInOut;
|
|
13
23
|
//# sourceMappingURL=getAllowedChainsForMoneyInOut.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAllowedChainsForMoneyInOut.js","sourceRoot":"/","sources":["services/getAllowedChainsForMoneyInOut.ts"],"names":[],"mappings":";;;AAAA,kCAA0D;AAEnD,IAAM,6BAA6B,GAAG,UAAC,EAK7C;;IAJC,6DAA6D;IAC7D,kBAAkB,wBAAA;IAIlB,kBAAkB;
|
|
1
|
+
{"version":3,"file":"getAllowedChainsForMoneyInOut.js","sourceRoot":"/","sources":["services/getAllowedChainsForMoneyInOut.ts"],"names":[],"mappings":";;;AAAA,kCAA0D;AAEnD,IAAM,6BAA6B,GAAG,UAAC,EAK7C;;IAJC,6DAA6D;IAC7D,kBAAkB,wBAAA;IAIlB,gBAAgB;IAChB,IAAI,kBAAkB,KAAK,mBAAW,CAAC,UAAU,EAAE,CAAC;QAClD,OAAO;YACL,yBAAiB,CAAC,aAAa;YAC/B,yBAAiB,CAAC,eAAe;YACjC,yBAAiB,CAAC,SAAS;YAC3B,yBAAiB,CAAC,eAAe;SAClC,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACvE,CAAC;AACH,CAAC,CAAC;AAjBW,QAAA,6BAA6B,iCAiBxC","sourcesContent":["import { ReyaChainId, MoneyInOutChainId } from '../types';\n\nexport const getAllowedChainsForMoneyInOut = ({\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n destinationChainId,\n}: {\n destinationChainId: ReyaChainId;\n}): MoneyInOutChainId[] => {\n // todo: mainnet\n if (destinationChainId === ReyaChainId.reyaCronos) {\n return [\n MoneyInOutChainId.polygonMumbai,\n MoneyInOutChainId.arbitrumSepolia,\n MoneyInOutChainId.opSepolia,\n MoneyInOutChainId.ethereumSepolia,\n ];\n } else {\n throw new Error('getAllowedChainsForMoneyInOut unsupported network');\n }\n};\n"]}
|
|
@@ -3,13 +3,13 @@ var _a;
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.getSocketWithdrawFees = void 0;
|
|
5
5
|
var types_1 = require("../types");
|
|
6
|
-
// todo-socket
|
|
6
|
+
// todo-socket: this should be per reya chain id, token AND source chain id
|
|
7
7
|
var socketWithdrawFees = (_a = {},
|
|
8
8
|
_a[types_1.ReyaChainId.polygonMumbai] = {
|
|
9
9
|
'': 0,
|
|
10
10
|
},
|
|
11
11
|
_a[types_1.ReyaChainId.reyaCronos] = {
|
|
12
|
-
'': 0,
|
|
12
|
+
'0x1b700a40a0707dd5f0bc31cbc57d730558e5714d': 0,
|
|
13
13
|
},
|
|
14
14
|
_a[types_1.ReyaChainId.reyaNetwork] = {
|
|
15
15
|
'': 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSocketWithdrawFees.js","sourceRoot":"/","sources":["services/getSocketWithdrawFees.ts"],"names":[],"mappings":";;;;AAAA,kCAKkB;AAElB,
|
|
1
|
+
{"version":3,"file":"getSocketWithdrawFees.js","sourceRoot":"/","sources":["services/getSocketWithdrawFees.ts"],"names":[],"mappings":";;;;AAAA,kCAKkB;AAElB,2EAA2E;AAC3E,IAAM,kBAAkB;IAItB,GAAC,mBAAW,CAAC,aAAa,IAAG;QAC3B,EAAE,EAAE,CAAC;KACN;IACD,GAAC,mBAAW,CAAC,UAAU,IAAG;QACxB,4CAA4C,EAAE,CAAC;KAChD;IACD,GAAC,mBAAW,CAAC,WAAW,IAAG;QACzB,EAAE,EAAE,CAAC;KACN;OACF,CAAC;AAEK,IAAM,qBAAqB,GAAG,UACnC,MAAmC;IAEnC,OAAO;QACL,IAAI,EAAE,kBAAkB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;KAClE,CAAC;AACJ,CAAC,CAAC;AANW,QAAA,qBAAqB,yBAMhC","sourcesContent":["import {\n GetSocketWithdrawFeesParams,\n GetSocketWithdrawFeesResult,\n ReyaChainId,\n TokenEntity,\n} from '../types';\n\n// todo-socket: this should be per reya chain id, token AND source chain id\nconst socketWithdrawFees: Record<\n ReyaChainId,\n Record<TokenEntity['address'], number>\n> = {\n [ReyaChainId.polygonMumbai]: {\n '': 0,\n },\n [ReyaChainId.reyaCronos]: {\n '0x1b700a40a0707dd5f0bc31cbc57d730558e5714d': 0,\n },\n [ReyaChainId.reyaNetwork]: {\n '': 0,\n },\n};\n\nexport const getSocketWithdrawFees = (\n params: GetSocketWithdrawFeesParams,\n): GetSocketWithdrawFeesResult => {\n return {\n fees: socketWithdrawFees[params.reyaChainId][params.tokenAddress],\n };\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAllowedChainsForMoneyInOut.d.ts","sourceRoot":"/","sources":["services/getAllowedChainsForMoneyInOut.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE1D,eAAO,MAAM,6BAA6B;wBAIpB,WAAW;MAC7B,iBAAiB,
|
|
1
|
+
{"version":3,"file":"getAllowedChainsForMoneyInOut.d.ts","sourceRoot":"/","sources":["services/getAllowedChainsForMoneyInOut.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE1D,eAAO,MAAM,6BAA6B;wBAIpB,WAAW;MAC7B,iBAAiB,EAYpB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reyaxyz/common",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"generate:coverage-badges": "npx istanbul-badges-readme --silent"
|
|
43
43
|
},
|
|
44
44
|
"packageManager": "pnpm@8.10.4",
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "32bd99005ada02134cb54b281e33ab9da1920f4d"
|
|
46
46
|
}
|
|
@@ -6,6 +6,15 @@ export const getAllowedChainsForMoneyInOut = ({
|
|
|
6
6
|
}: {
|
|
7
7
|
destinationChainId: ReyaChainId;
|
|
8
8
|
}): MoneyInOutChainId[] => {
|
|
9
|
-
// todo:
|
|
10
|
-
|
|
9
|
+
// todo: mainnet
|
|
10
|
+
if (destinationChainId === ReyaChainId.reyaCronos) {
|
|
11
|
+
return [
|
|
12
|
+
MoneyInOutChainId.polygonMumbai,
|
|
13
|
+
MoneyInOutChainId.arbitrumSepolia,
|
|
14
|
+
MoneyInOutChainId.opSepolia,
|
|
15
|
+
MoneyInOutChainId.ethereumSepolia,
|
|
16
|
+
];
|
|
17
|
+
} else {
|
|
18
|
+
throw new Error('getAllowedChainsForMoneyInOut unsupported network');
|
|
19
|
+
}
|
|
11
20
|
};
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
TokenEntity,
|
|
6
6
|
} from '../types';
|
|
7
7
|
|
|
8
|
-
// todo-socket
|
|
8
|
+
// todo-socket: this should be per reya chain id, token AND source chain id
|
|
9
9
|
const socketWithdrawFees: Record<
|
|
10
10
|
ReyaChainId,
|
|
11
11
|
Record<TokenEntity['address'], number>
|
|
@@ -14,7 +14,7 @@ const socketWithdrawFees: Record<
|
|
|
14
14
|
'': 0,
|
|
15
15
|
},
|
|
16
16
|
[ReyaChainId.reyaCronos]: {
|
|
17
|
-
'': 0,
|
|
17
|
+
'0x1b700a40a0707dd5f0bc31cbc57d730558e5714d': 0,
|
|
18
18
|
},
|
|
19
19
|
[ReyaChainId.reyaNetwork]: {
|
|
20
20
|
'': 0,
|