@reyaxyz/common 0.65.0 → 0.66.1
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 +1 -1
- package/dist/services/getAllowedChainsForMoneyInOut.js +10 -5
- package/dist/services/getAllowedChainsForMoneyInOut.js.map +1 -1
- package/dist/services/getNativeToken.js +6 -0
- package/dist/services/getNativeToken.js.map +1 -1
- package/dist/services/getSocketAddresses.js +2 -1
- package/dist/services/getSocketAddresses.js.map +1 -1
- package/dist/services/getSocketBridgeTime.js +18 -4
- package/dist/services/getSocketBridgeTime.js.map +1 -1
- package/dist/services/getSocketDepositFees.js +6 -0
- package/dist/services/getSocketDepositFees.js.map +1 -1
- package/dist/types/services/getAllowedChainsForMoneyInOut.d.ts.map +1 -1
- package/dist/types/services/getNativeToken.d.ts.map +1 -1
- package/dist/types/services/getSocketAddresses.d.ts.map +1 -1
- package/dist/types/services/getSocketBridgeTime.d.ts.map +1 -1
- package/dist/types/services/getSocketDepositFees.d.ts.map +1 -1
- package/dist/types/types.d.ts +5 -0
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils/network.d.ts.map +1 -1
- package/dist/types/utils/token-info.d.ts.map +1 -1
- package/dist/types/utils/token.d.ts +1 -0
- package/dist/types/utils/token.d.ts.map +1 -1
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -1
- package/dist/utils/network.js +7 -0
- package/dist/utils/network.js.map +1 -1
- package/dist/utils/socket/reyaNetwork.json +154 -0
- package/dist/utils/token-info.js +40 -27
- package/dist/utils/token-info.js.map +1 -1
- package/dist/utils/token.js +9 -1
- package/dist/utils/token.js.map +1 -1
- package/package.json +2 -2
- package/src/services/getAllowedChainsForMoneyInOut.ts +8 -3
- package/src/services/getNativeToken.ts +6 -0
- package/src/services/getSocketAddresses.ts +2 -1
- package/src/services/getSocketBridgeTime.ts +18 -4
- package/src/services/getSocketDepositFees.ts +6 -0
- package/src/types.ts +7 -0
- package/src/utils/network.ts +8 -0
- package/src/utils/socket/reyaNetwork.json +154 -0
- package/src/utils/token-info.ts +76 -1
- package/src/utils/token.ts +16 -0
package/src/utils/token-info.ts
CHANGED
|
@@ -15,7 +15,56 @@ export const TOKEN_INFO: Record<ReyaChainId | MoneyInOutChainId, TokenInfo[]> =
|
|
|
15
15
|
/* MAINNET */
|
|
16
16
|
/* ------------------------------------------------------ */
|
|
17
17
|
[ReyaChainId.reyaNetwork]: [
|
|
18
|
-
|
|
18
|
+
{
|
|
19
|
+
name: 'RUSD',
|
|
20
|
+
address: '0xa9f32a851b1800742e47725da54a09a7ef2556a3',
|
|
21
|
+
decimals: 6,
|
|
22
|
+
isRUSDUnderlying: false,
|
|
23
|
+
...defaultTokenThresholds,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'USDC',
|
|
27
|
+
address: '0x3b860c0b53f2e8bd5264aa7c3451d41263c933f2',
|
|
28
|
+
decimals: 6,
|
|
29
|
+
isRUSDUnderlying: true,
|
|
30
|
+
...defaultTokenThresholds,
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
[MoneyInOutChainId.ethereumMainnet]: [
|
|
34
|
+
{
|
|
35
|
+
name: 'USDC',
|
|
36
|
+
address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
|
|
37
|
+
decimals: 6,
|
|
38
|
+
isRUSDUnderlying: true,
|
|
39
|
+
...defaultTokenThresholds,
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
[MoneyInOutChainId.opMainnet]: [
|
|
43
|
+
{
|
|
44
|
+
name: 'USDC.E',
|
|
45
|
+
address: '0x7f5c764cbc14f9669b88837ca1490cca17c31607',
|
|
46
|
+
decimals: 6,
|
|
47
|
+
isRUSDUnderlying: true,
|
|
48
|
+
...defaultTokenThresholds,
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
[MoneyInOutChainId.polygonMainnet]: [
|
|
52
|
+
{
|
|
53
|
+
name: 'USDC.E',
|
|
54
|
+
address: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174',
|
|
55
|
+
decimals: 6,
|
|
56
|
+
isRUSDUnderlying: true,
|
|
57
|
+
...defaultTokenThresholds,
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
[MoneyInOutChainId.arbitrumOne]: [
|
|
61
|
+
{
|
|
62
|
+
name: 'USDC.E',
|
|
63
|
+
address: '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8',
|
|
64
|
+
decimals: 6,
|
|
65
|
+
isRUSDUnderlying: true,
|
|
66
|
+
...defaultTokenThresholds,
|
|
67
|
+
},
|
|
19
68
|
],
|
|
20
69
|
|
|
21
70
|
/* ------------------------------------------------------ */
|
|
@@ -26,36 +75,42 @@ export const TOKEN_INFO: Record<ReyaChainId | MoneyInOutChainId, TokenInfo[]> =
|
|
|
26
75
|
name: 'RUSD',
|
|
27
76
|
address: '0x26ee9dfb27f12990d90ec003af7c5e9c19ea2a4c',
|
|
28
77
|
decimals: 6,
|
|
78
|
+
isRUSDUnderlying: false,
|
|
29
79
|
...defaultTokenThresholds,
|
|
30
80
|
},
|
|
31
81
|
{
|
|
32
82
|
name: 'USDC',
|
|
33
83
|
address: '0x1b700a40a0707dd5f0bc31cbc57d730558e5714d',
|
|
34
84
|
decimals: 6,
|
|
85
|
+
isRUSDUnderlying: true,
|
|
35
86
|
...defaultTokenThresholds,
|
|
36
87
|
},
|
|
37
88
|
{
|
|
38
89
|
name: 'USDT',
|
|
39
90
|
address: '0x9ade781dacbd220f0161d98f496a2982b231a9d6',
|
|
40
91
|
decimals: 6,
|
|
92
|
+
isRUSDUnderlying: false,
|
|
41
93
|
...defaultTokenThresholds,
|
|
42
94
|
},
|
|
43
95
|
{
|
|
44
96
|
name: 'DAI',
|
|
45
97
|
address: '0x733299259c45726ee1bfc9bd0deeba58e48a1853',
|
|
46
98
|
decimals: 18,
|
|
99
|
+
isRUSDUnderlying: false,
|
|
47
100
|
...defaultTokenThresholds,
|
|
48
101
|
},
|
|
49
102
|
{
|
|
50
103
|
name: 'WETH',
|
|
51
104
|
address: '0xc123b7aeb9d2b2e8a035217d5c29e317c91842e2',
|
|
52
105
|
decimals: 18,
|
|
106
|
+
isRUSDUnderlying: false,
|
|
53
107
|
...defaultTokenThresholds,
|
|
54
108
|
},
|
|
55
109
|
{
|
|
56
110
|
name: 'WBTC',
|
|
57
111
|
address: '0xd382e2f0df859ff9e82f963dcad1aaee939c5e4f',
|
|
58
112
|
decimals: 8,
|
|
113
|
+
isRUSDUnderlying: false,
|
|
59
114
|
...defaultTokenThresholds,
|
|
60
115
|
},
|
|
61
116
|
],
|
|
@@ -64,30 +119,35 @@ export const TOKEN_INFO: Record<ReyaChainId | MoneyInOutChainId, TokenInfo[]> =
|
|
|
64
119
|
name: 'USDC',
|
|
65
120
|
address: '0xd9edcc943ed9729b08e52bb1e110fe43d1930773',
|
|
66
121
|
decimals: 6,
|
|
122
|
+
isRUSDUnderlying: true,
|
|
67
123
|
...defaultTokenThresholds,
|
|
68
124
|
},
|
|
69
125
|
{
|
|
70
126
|
name: 'USDT',
|
|
71
127
|
address: '0x4f8ecb190b9ef36113127d97c7f9300875b6563f',
|
|
72
128
|
decimals: 6,
|
|
129
|
+
isRUSDUnderlying: false,
|
|
73
130
|
...defaultTokenThresholds,
|
|
74
131
|
},
|
|
75
132
|
{
|
|
76
133
|
name: 'DAI',
|
|
77
134
|
address: '0x35479b023e508ee9a7b533dbb5b516bb6875f937',
|
|
78
135
|
decimals: 18,
|
|
136
|
+
isRUSDUnderlying: false,
|
|
79
137
|
...defaultTokenThresholds,
|
|
80
138
|
},
|
|
81
139
|
{
|
|
82
140
|
name: 'WETH',
|
|
83
141
|
address: '0x6c7a28f6ae2d245b0130520b112fa3544a06d9ae',
|
|
84
142
|
decimals: 18,
|
|
143
|
+
isRUSDUnderlying: false,
|
|
85
144
|
...defaultTokenThresholds,
|
|
86
145
|
},
|
|
87
146
|
{
|
|
88
147
|
name: 'WBTC',
|
|
89
148
|
address: '0x92c7a51bd507736ac0dda48b5f35a4aad0c2bb4d',
|
|
90
149
|
decimals: 8,
|
|
150
|
+
isRUSDUnderlying: false,
|
|
91
151
|
...defaultTokenThresholds,
|
|
92
152
|
},
|
|
93
153
|
],
|
|
@@ -96,30 +156,35 @@ export const TOKEN_INFO: Record<ReyaChainId | MoneyInOutChainId, TokenInfo[]> =
|
|
|
96
156
|
name: 'USDC',
|
|
97
157
|
address: '0x8537307810fc40f4073a12a38554d4ff78efff41',
|
|
98
158
|
decimals: 6,
|
|
159
|
+
isRUSDUnderlying: true,
|
|
99
160
|
...defaultTokenThresholds,
|
|
100
161
|
},
|
|
101
162
|
{
|
|
102
163
|
name: 'USDT',
|
|
103
164
|
address: '0x66dfb9987c36c4be232156e70b085f664367599a',
|
|
104
165
|
decimals: 6,
|
|
166
|
+
isRUSDUnderlying: false,
|
|
105
167
|
...defaultTokenThresholds,
|
|
106
168
|
},
|
|
107
169
|
{
|
|
108
170
|
name: 'DAI',
|
|
109
171
|
address: '0x9a573b27d7298c6e2f4d2d4a41c37a0c8af6acca',
|
|
110
172
|
decimals: 18,
|
|
173
|
+
isRUSDUnderlying: false,
|
|
111
174
|
...defaultTokenThresholds,
|
|
112
175
|
},
|
|
113
176
|
{
|
|
114
177
|
name: 'WETH',
|
|
115
178
|
address: '0x565810cbfa3cf1390963e5afa2fb953795686339',
|
|
116
179
|
decimals: 18,
|
|
180
|
+
isRUSDUnderlying: false,
|
|
117
181
|
...defaultTokenThresholds,
|
|
118
182
|
},
|
|
119
183
|
{
|
|
120
184
|
name: 'WBTC',
|
|
121
185
|
address: '0x1019958c2bd43b882a4e1349337a32ef9563fc4d',
|
|
122
186
|
decimals: 8,
|
|
187
|
+
isRUSDUnderlying: false,
|
|
123
188
|
...defaultTokenThresholds,
|
|
124
189
|
},
|
|
125
190
|
],
|
|
@@ -128,30 +193,35 @@ export const TOKEN_INFO: Record<ReyaChainId | MoneyInOutChainId, TokenInfo[]> =
|
|
|
128
193
|
name: 'USDC',
|
|
129
194
|
address: '0x6d290609b3f5f02d52f28d97c75a443ed8564cbf',
|
|
130
195
|
decimals: 6,
|
|
196
|
+
isRUSDUnderlying: true,
|
|
131
197
|
...defaultTokenThresholds,
|
|
132
198
|
},
|
|
133
199
|
{
|
|
134
200
|
name: 'USDT',
|
|
135
201
|
address: '0x2d1aba6fabae80bf5c1c9ea433aae9030e07cb22',
|
|
136
202
|
decimals: 6,
|
|
203
|
+
isRUSDUnderlying: false,
|
|
137
204
|
...defaultTokenThresholds,
|
|
138
205
|
},
|
|
139
206
|
{
|
|
140
207
|
name: 'DAI',
|
|
141
208
|
address: '0xdc0258dc3db980090e97ebf4f1fd9cc3c5ad5894',
|
|
142
209
|
decimals: 18,
|
|
210
|
+
isRUSDUnderlying: false,
|
|
143
211
|
...defaultTokenThresholds,
|
|
144
212
|
},
|
|
145
213
|
{
|
|
146
214
|
name: 'WETH',
|
|
147
215
|
address: '0x2b42affd4b7c14d9b7c2579229495c052672ccd3',
|
|
148
216
|
decimals: 18,
|
|
217
|
+
isRUSDUnderlying: false,
|
|
149
218
|
...defaultTokenThresholds,
|
|
150
219
|
},
|
|
151
220
|
{
|
|
152
221
|
name: 'WBTC',
|
|
153
222
|
address: '0xfc5cc93d85861ac82d89fc2d3e56315540e9c8a7',
|
|
154
223
|
decimals: 8,
|
|
224
|
+
isRUSDUnderlying: false,
|
|
155
225
|
...defaultTokenThresholds,
|
|
156
226
|
},
|
|
157
227
|
],
|
|
@@ -160,30 +230,35 @@ export const TOKEN_INFO: Record<ReyaChainId | MoneyInOutChainId, TokenInfo[]> =
|
|
|
160
230
|
name: 'USDC',
|
|
161
231
|
address: '0x565810cbfa3cf1390963e5afa2fb953795686339',
|
|
162
232
|
decimals: 6,
|
|
233
|
+
isRUSDUnderlying: true,
|
|
163
234
|
...defaultTokenThresholds,
|
|
164
235
|
},
|
|
165
236
|
{
|
|
166
237
|
name: 'USDT',
|
|
167
238
|
address: '0xb4130e87a180b9448286b291331aee8a9c154a3a',
|
|
168
239
|
decimals: 6,
|
|
240
|
+
isRUSDUnderlying: false,
|
|
169
241
|
...defaultTokenThresholds,
|
|
170
242
|
},
|
|
171
243
|
{
|
|
172
244
|
name: 'DAI',
|
|
173
245
|
address: '0x255745e5c7ae620b7f523f5e4a0ead37660ec5d6',
|
|
174
246
|
decimals: 18,
|
|
247
|
+
isRUSDUnderlying: false,
|
|
175
248
|
...defaultTokenThresholds,
|
|
176
249
|
},
|
|
177
250
|
{
|
|
178
251
|
name: 'WETH',
|
|
179
252
|
address: '0x771d1ae208377453d478df08bbc38034f72ac833',
|
|
180
253
|
decimals: 18,
|
|
254
|
+
isRUSDUnderlying: false,
|
|
181
255
|
...defaultTokenThresholds,
|
|
182
256
|
},
|
|
183
257
|
{
|
|
184
258
|
name: 'WBTC',
|
|
185
259
|
address: '0x94beff5da6201cb2c8f489196fd970b3df5aa32a',
|
|
186
260
|
decimals: 8,
|
|
261
|
+
isRUSDUnderlying: false,
|
|
187
262
|
...defaultTokenThresholds,
|
|
188
263
|
},
|
|
189
264
|
],
|
package/src/utils/token.ts
CHANGED
|
@@ -118,6 +118,22 @@ export const getTokenInfosByChain = (
|
|
|
118
118
|
return TOKEN_INFO[chainId];
|
|
119
119
|
};
|
|
120
120
|
|
|
121
|
+
export const getRUSDUnderlying = (
|
|
122
|
+
chainId: ReyaChainId | MoneyInOutChainId,
|
|
123
|
+
): TokenInfo => {
|
|
124
|
+
const tokenInfo = TOKEN_INFO[chainId].find(
|
|
125
|
+
(tokenInfo) => tokenInfo.isRUSDUnderlying === true,
|
|
126
|
+
);
|
|
127
|
+
|
|
128
|
+
if (!tokenInfo) {
|
|
129
|
+
throw new Error(
|
|
130
|
+
`getRUSDUnderlying: no token info found [chain id ${chainId}]`,
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
return tokenInfo;
|
|
135
|
+
};
|
|
136
|
+
|
|
121
137
|
export const getERC20Allowance = async ({
|
|
122
138
|
walletAddress,
|
|
123
139
|
tokenAddress,
|