@1llet.xyz/erc4337-gasless-sdk 0.4.53 → 0.4.55

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/index.mjs CHANGED
@@ -209,14 +209,9 @@ var init_facilitator = __esm({
209
209
  chainId: 100,
210
210
  chain: gnosis,
211
211
  usdc: "0x2a22f9c3b48403ebD92cF06fF916b322a30dB834",
212
- // EURe (or USDC on Gnosis? The user is swapping USDT -> USDC, wait. The user log says GNOSIS -> Optimism (USDT -> USDC).
213
- // For verification, we just need RPC. The 'usdc' field is for CCTP, but verify logic just needs `rpcUrl`.
214
- // I will populate others as placeholders if unknown.
215
212
  usdcName: "USDC",
216
- // Placeholder
217
213
  usdcVersion: "2",
218
214
  domain: 0,
219
- // Placeholder
220
215
  tokenMessenger: "0x0000000000000000000000000000000000000000",
221
216
  messageTransmitter: "0x0000000000000000000000000000000000000000",
222
217
  rpcUrl: "https://rpc.gnosischain.com"
@@ -228,8 +223,8 @@ var init_facilitator = __esm({
228
223
  usdcName: "USD Coin",
229
224
  usdcVersion: "2",
230
225
  domain: 3,
231
- tokenMessenger: "0x19330d10D9Cc8751218eaf51E8885D058642E08A",
232
- messageTransmitter: "0xC30362313FBBA5cf9163F0bb16a0e01f01A896ca",
226
+ tokenMessenger: "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d",
227
+ messageTransmitter: "0x81D40F21F12A8F0E3252Bccb954D722d4c464B64",
233
228
  rpcUrl: "https://arb-mainnet.g.alchemy.com/v2/49fUGmuW05ynCui0VEvDN"
234
229
  },
235
230
  Polygon: {
@@ -239,10 +234,53 @@ var init_facilitator = __esm({
239
234
  usdcName: "USD Coin",
240
235
  usdcVersion: "2",
241
236
  domain: 7,
242
- // Placeholder? CCTP domain for Polygon is 7? I should check if I had it elsewhere.
243
- tokenMessenger: "0x0000000000000000000000000000000000000000",
244
- messageTransmitter: "0x0000000000000000000000000000000000000000",
237
+ tokenMessenger: "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d",
238
+ messageTransmitter: "0x81D40F21F12A8F0E3252Bccb954D722d4c464B64",
245
239
  rpcUrl: "https://polygon-mainnet.g.alchemy.com/v2/49fUGmuW05ynCui0VEvDN"
240
+ },
241
+ Unichain: {
242
+ chainId: unichain.id,
243
+ chain: unichain,
244
+ usdc: "0x078D782b760474a361dDA0AF3839290b0EF57AD6",
245
+ usdcName: "USD Coin",
246
+ usdcVersion: "2",
247
+ domain: 10,
248
+ tokenMessenger: "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d",
249
+ messageTransmitter: "0x81D40F21F12A8F0E3252Bccb954D722d4c464B64",
250
+ rpcUrl: unichain.rpcUrls.default.http[0]
251
+ },
252
+ Avalanche: {
253
+ chainId: avalanche.id,
254
+ chain: avalanche,
255
+ usdc: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
256
+ usdcName: "USD Coin",
257
+ usdcVersion: "2",
258
+ domain: 1,
259
+ tokenMessenger: "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d",
260
+ messageTransmitter: "0x81D40F21F12A8F0E3252Bccb954D722d4c464B64",
261
+ rpcUrl: avalanche.rpcUrls.default.http[0]
262
+ },
263
+ Worldchain: {
264
+ chainId: worldchain.id,
265
+ chain: worldchain,
266
+ usdc: "0x79A02482A880bCe3F13E09da970dC34dB4cD24D1",
267
+ usdcName: "USD Coin",
268
+ usdcVersion: "2",
269
+ domain: 13,
270
+ tokenMessenger: "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d",
271
+ messageTransmitter: "0x81D40F21F12A8F0E3252Bccb954D722d4c464B64",
272
+ rpcUrl: worldchain.rpcUrls.default.http[0]
273
+ },
274
+ Monad: {
275
+ chainId: monad.id,
276
+ chain: monad,
277
+ usdc: "0x754704Bc059F8C67012fEd69BC8A327a5aafb603",
278
+ usdcName: "USD Coin",
279
+ usdcVersion: "2",
280
+ domain: 15,
281
+ tokenMessenger: "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d",
282
+ messageTransmitter: "0x81D40F21F12A8F0E3252Bccb954D722d4c464B64",
283
+ rpcUrl: monad.rpcUrls.default.http[0]
246
284
  }
247
285
  };
248
286
  }
@@ -2143,8 +2181,8 @@ async function executeCCTPBridge(sourceChain, amount, crossChainConfig, facilita
2143
2181
  abi: messageTransmitterAbi,
2144
2182
  functionName: "receiveMessage",
2145
2183
  args: [
2146
- attestationResponse.message,
2147
- attestationResponse.attestation
2184
+ attestationResponse.message.startsWith("0x") ? attestationResponse.message : `0x${attestationResponse.message}`,
2185
+ attestationResponse.attestation.startsWith("0x") ? attestationResponse.attestation : `0x${attestationResponse.attestation}`
2148
2186
  ]
2149
2187
  });
2150
2188
  console.log(`[CCTP] Mint tx sent: ${mintHash}`);