@across-protocol/sdk 3.3.26 → 3.3.27

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.
Files changed (50) hide show
  1. package/dist/cjs/clients/BundleDataClient/BundleDataClient.js.map +1 -1
  2. package/dist/cjs/clients/BundleDataClient/utils/SuperstructUtils.d.ts +28 -28
  3. package/dist/cjs/clients/SpokePoolClient.d.ts +0 -4
  4. package/dist/cjs/clients/SpokePoolClient.js +1 -4
  5. package/dist/cjs/clients/SpokePoolClient.js.map +1 -1
  6. package/dist/cjs/constants.d.ts +1 -0
  7. package/dist/cjs/constants.js +2 -1
  8. package/dist/cjs/constants.js.map +1 -1
  9. package/dist/cjs/utils/Multicall.js +2 -0
  10. package/dist/cjs/utils/Multicall.js.map +1 -1
  11. package/dist/cjs/utils/SpokeUtils.d.ts +1 -0
  12. package/dist/cjs/utils/SpokeUtils.js +6 -1
  13. package/dist/cjs/utils/SpokeUtils.js.map +1 -1
  14. package/dist/cjs/utils/common.d.ts +0 -51
  15. package/dist/cjs/utils/common.js +1 -55
  16. package/dist/cjs/utils/common.js.map +1 -1
  17. package/dist/esm/clients/BundleDataClient/BundleDataClient.js.map +1 -1
  18. package/dist/esm/clients/BundleDataClient/utils/SuperstructUtils.d.ts +28 -28
  19. package/dist/esm/clients/SpokePoolClient.d.ts +0 -19
  20. package/dist/esm/clients/SpokePoolClient.js +1 -19
  21. package/dist/esm/clients/SpokePoolClient.js.map +1 -1
  22. package/dist/esm/constants.d.ts +1 -0
  23. package/dist/esm/constants.js +3 -0
  24. package/dist/esm/constants.js.map +1 -1
  25. package/dist/esm/utils/Multicall.js +2 -0
  26. package/dist/esm/utils/Multicall.js.map +1 -1
  27. package/dist/esm/utils/SpokeUtils.d.ts +1 -0
  28. package/dist/esm/utils/SpokeUtils.js +10 -1
  29. package/dist/esm/utils/SpokeUtils.js.map +1 -1
  30. package/dist/esm/utils/common.d.ts +0 -62
  31. package/dist/esm/utils/common.js +0 -63
  32. package/dist/esm/utils/common.js.map +1 -1
  33. package/dist/types/clients/BundleDataClient/BundleDataClient.d.ts.map +1 -1
  34. package/dist/types/clients/BundleDataClient/utils/SuperstructUtils.d.ts +28 -28
  35. package/dist/types/clients/SpokePoolClient.d.ts +0 -19
  36. package/dist/types/clients/SpokePoolClient.d.ts.map +1 -1
  37. package/dist/types/constants.d.ts +1 -0
  38. package/dist/types/constants.d.ts.map +1 -1
  39. package/dist/types/utils/Multicall.d.ts.map +1 -1
  40. package/dist/types/utils/SpokeUtils.d.ts +1 -0
  41. package/dist/types/utils/SpokeUtils.d.ts.map +1 -1
  42. package/dist/types/utils/common.d.ts +0 -62
  43. package/dist/types/utils/common.d.ts.map +1 -1
  44. package/package.json +3 -3
  45. package/src/clients/BundleDataClient/BundleDataClient.ts +7 -0
  46. package/src/clients/SpokePoolClient.ts +3 -29
  47. package/src/constants.ts +4 -0
  48. package/src/utils/Multicall.ts +2 -0
  49. package/src/utils/SpokeUtils.ts +11 -1
  50. package/src/utils/common.ts +0 -101
@@ -4,7 +4,6 @@ import assert from "assert";
4
4
  import Decimal from "decimal.js";
5
5
  import { ethers, PopulatedTransaction, providers, VoidSigner } from "ethers";
6
6
  import { getGasPriceEstimate } from "../gasPriceOracle";
7
- import { TypedMessage } from "../interfaces/TypedData";
8
7
  import { BigNumber, BigNumberish, BN, formatUnits, parseUnits, toBN } from "./BigNumberUtils";
9
8
  import { ConvertDecimals } from "./FormattingUtils";
10
9
  import { chainIsOPStack } from "./NetworkUtils";
@@ -323,106 +322,6 @@ async function getLineaGasFees(chainId: number, transport: Transport | undefined
323
322
  };
324
323
  }
325
324
 
326
- export type UpdateDepositDetailsMessageType = {
327
- UpdateDepositDetails: [
328
- {
329
- name: "depositId";
330
- type: "uint32";
331
- },
332
- { name: "originChainId"; type: "uint256" },
333
- { name: "updatedRelayerFeePct"; type: "int64" },
334
- { name: "updatedRecipient"; type: "address" },
335
- { name: "updatedMessage"; type: "bytes" },
336
- ];
337
- };
338
-
339
- export type UpdateV3DepositDetailsMessageType = {
340
- UpdateDepositDetails: [
341
- { name: "depositId"; type: "uint32" },
342
- { name: "originChainId"; type: "uint256" },
343
- { name: "updatedOutputAmount"; type: "uint256" },
344
- { name: "updatedRecipient"; type: "address" },
345
- { name: "updatedMessage"; type: "bytes" },
346
- ];
347
- };
348
-
349
- /**
350
- * Utility function to get EIP-712 compliant typed data that can be signed with the JSON-RPC method
351
- * `eth_signedTypedDataV4` in MetaMask (https://docs.metamask.io/guide/signing-data.html). The resulting signature
352
- * can then be used to call the method `speedUpDeposit` of a `SpokePool.sol` contract.
353
- * @param depositId The deposit ID to speed up.
354
- * @param originChainId The chain ID of the origin chain.
355
- * @param updatedRelayerFeePct The new relayer fee percentage.
356
- * @param updatedRecipient The new recipient address.
357
- * @param updatedMessage The new message that should be provided to the recipient.
358
- * @return EIP-712 compliant typed data.
359
- */
360
- export function getUpdateDepositTypedData(
361
- depositId: number,
362
- originChainId: number,
363
- updatedRelayerFeePct: BigNumber,
364
- updatedRecipient: string,
365
- updatedMessage: string
366
- ): TypedMessage<UpdateDepositDetailsMessageType> {
367
- return {
368
- types: {
369
- UpdateDepositDetails: [
370
- { name: "depositId", type: "uint32" },
371
- { name: "originChainId", type: "uint256" },
372
- { name: "updatedRelayerFeePct", type: "int64" },
373
- { name: "updatedRecipient", type: "address" },
374
- { name: "updatedMessage", type: "bytes" },
375
- ],
376
- },
377
- primaryType: "UpdateDepositDetails",
378
- domain: {
379
- name: "ACROSS-V2",
380
- version: "1.0.0",
381
- chainId: originChainId,
382
- },
383
- message: {
384
- depositId,
385
- originChainId,
386
- updatedRelayerFeePct,
387
- updatedRecipient,
388
- updatedMessage,
389
- },
390
- };
391
- }
392
-
393
- export function getUpdateV3DepositTypedData(
394
- depositId: number,
395
- originChainId: number,
396
- updatedOutputAmount: BigNumber,
397
- updatedRecipient: string,
398
- updatedMessage: string
399
- ): TypedMessage<UpdateV3DepositDetailsMessageType> {
400
- return {
401
- types: {
402
- UpdateDepositDetails: [
403
- { name: "depositId", type: "uint32" },
404
- { name: "originChainId", type: "uint256" },
405
- { name: "updatedOutputAmount", type: "uint256" },
406
- { name: "updatedRecipient", type: "address" },
407
- { name: "updatedMessage", type: "bytes" },
408
- ],
409
- },
410
- primaryType: "UpdateDepositDetails",
411
- domain: {
412
- name: "ACROSS-V2",
413
- version: "1.0.0",
414
- chainId: originChainId,
415
- },
416
- message: {
417
- depositId,
418
- originChainId,
419
- updatedOutputAmount,
420
- updatedRecipient,
421
- updatedMessage,
422
- },
423
- };
424
- }
425
-
426
325
  export function randomAddress() {
427
326
  return ethers.utils.getAddress(ethers.utils.hexlify(ethers.utils.randomBytes(20)));
428
327
  }