@across-protocol/sdk 4.2.2-alpha.0 → 4.2.3

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 (146) hide show
  1. package/dist/cjs/arch/svm/BlockUtils.d.ts +15 -0
  2. package/dist/cjs/arch/svm/BlockUtils.js +180 -0
  3. package/dist/cjs/arch/svm/BlockUtils.js.map +1 -0
  4. package/dist/cjs/arch/svm/index.d.ts +1 -0
  5. package/dist/cjs/arch/svm/index.js +1 -0
  6. package/dist/cjs/arch/svm/index.js.map +1 -1
  7. package/dist/cjs/clients/BundleDataClient/BundleDataClient.js +1 -1
  8. package/dist/cjs/clients/SpokePoolClient/EVMSpokePoolClient.js +2 -1
  9. package/dist/cjs/clients/SpokePoolClient/EVMSpokePoolClient.js.map +1 -1
  10. package/dist/cjs/clients/SpokePoolClient/SVMSpokePoolClient.d.ts +3 -3
  11. package/dist/cjs/clients/SpokePoolClient/SVMSpokePoolClient.js +19 -18
  12. package/dist/cjs/clients/SpokePoolClient/SVMSpokePoolClient.js.map +1 -1
  13. package/dist/cjs/clients/SpokePoolClient/SpokePoolClient.d.ts +3 -4
  14. package/dist/cjs/clients/SpokePoolClient/SpokePoolClient.js +13 -5
  15. package/dist/cjs/clients/SpokePoolClient/SpokePoolClient.js.map +1 -1
  16. package/dist/cjs/clients/SpokePoolClient/index.d.ts +3 -3
  17. package/dist/cjs/clients/SpokePoolClient/index.js +5 -5
  18. package/dist/cjs/clients/index.d.ts +1 -1
  19. package/dist/cjs/clients/index.js +4 -2
  20. package/dist/cjs/clients/index.js.map +1 -1
  21. package/dist/cjs/clients/mocks/MockSpokePoolClient.d.ts +11 -5
  22. package/dist/cjs/clients/mocks/MockSpokePoolClient.js +35 -18
  23. package/dist/cjs/clients/mocks/MockSpokePoolClient.js.map +1 -1
  24. package/dist/cjs/clients/mocks/MockSvmSpokePoolClient.d.ts +2 -2
  25. package/dist/cjs/clients/mocks/MockSvmSpokePoolClient.js +1 -1
  26. package/dist/cjs/constants.d.ts +1 -1
  27. package/dist/cjs/constants.js +3 -1
  28. package/dist/cjs/constants.js.map +1 -1
  29. package/dist/cjs/gasPriceOracle/adapters/solana.d.ts +2 -2
  30. package/dist/cjs/gasPriceOracle/oracle.d.ts +3 -2
  31. package/dist/cjs/gasPriceOracle/oracle.js +1 -3
  32. package/dist/cjs/gasPriceOracle/oracle.js.map +1 -1
  33. package/dist/cjs/gasPriceOracle/types.d.ts +2 -0
  34. package/dist/cjs/gasPriceOracle/types.js +12 -0
  35. package/dist/cjs/gasPriceOracle/types.js.map +1 -1
  36. package/dist/cjs/interfaces/SpokePool.d.ts +3 -1
  37. package/dist/cjs/interfaces/SpokePool.js.map +1 -1
  38. package/dist/cjs/providers/infura.js +1 -0
  39. package/dist/cjs/providers/infura.js.map +1 -1
  40. package/dist/cjs/utils/BlockFinder.d.ts +0 -1
  41. package/dist/cjs/utils/BlockFinder.js.map +1 -1
  42. package/dist/cjs/utils/NetworkUtils.d.ts +0 -2
  43. package/dist/cjs/utils/NetworkUtils.js +18 -26
  44. package/dist/cjs/utils/NetworkUtils.js.map +1 -1
  45. package/dist/cjs/utils/TypeGuards.d.ts +3 -0
  46. package/dist/cjs/utils/TypeGuards.js +6 -1
  47. package/dist/cjs/utils/TypeGuards.js.map +1 -1
  48. package/dist/esm/arch/svm/BlockUtils.d.ts +25 -0
  49. package/dist/esm/arch/svm/BlockUtils.js +207 -0
  50. package/dist/esm/arch/svm/BlockUtils.js.map +1 -0
  51. package/dist/esm/arch/svm/index.d.ts +1 -0
  52. package/dist/esm/arch/svm/index.js +1 -0
  53. package/dist/esm/arch/svm/index.js.map +1 -1
  54. package/dist/esm/clients/BundleDataClient/BundleDataClient.js +2 -2
  55. package/dist/esm/clients/SpokePoolClient/EVMSpokePoolClient.js +3 -2
  56. package/dist/esm/clients/SpokePoolClient/EVMSpokePoolClient.js.map +1 -1
  57. package/dist/esm/clients/SpokePoolClient/SVMSpokePoolClient.d.ts +3 -3
  58. package/dist/esm/clients/SpokePoolClient/SVMSpokePoolClient.js +19 -18
  59. package/dist/esm/clients/SpokePoolClient/SVMSpokePoolClient.js.map +1 -1
  60. package/dist/esm/clients/SpokePoolClient/SpokePoolClient.d.ts +3 -4
  61. package/dist/esm/clients/SpokePoolClient/SpokePoolClient.js +13 -5
  62. package/dist/esm/clients/SpokePoolClient/SpokePoolClient.js.map +1 -1
  63. package/dist/esm/clients/SpokePoolClient/index.d.ts +3 -3
  64. package/dist/esm/clients/SpokePoolClient/index.js +4 -4
  65. package/dist/esm/clients/index.d.ts +1 -1
  66. package/dist/esm/clients/index.js +1 -1
  67. package/dist/esm/clients/index.js.map +1 -1
  68. package/dist/esm/clients/mocks/MockSpokePoolClient.d.ts +11 -5
  69. package/dist/esm/clients/mocks/MockSpokePoolClient.js +38 -21
  70. package/dist/esm/clients/mocks/MockSpokePoolClient.js.map +1 -1
  71. package/dist/esm/clients/mocks/MockSvmSpokePoolClient.d.ts +2 -2
  72. package/dist/esm/clients/mocks/MockSvmSpokePoolClient.js +2 -2
  73. package/dist/esm/constants.d.ts +1 -1
  74. package/dist/esm/constants.js +1 -1
  75. package/dist/esm/constants.js.map +1 -1
  76. package/dist/esm/gasPriceOracle/adapters/solana.d.ts +2 -2
  77. package/dist/esm/gasPriceOracle/oracle.d.ts +3 -8
  78. package/dist/esm/gasPriceOracle/oracle.js +3 -6
  79. package/dist/esm/gasPriceOracle/oracle.js.map +1 -1
  80. package/dist/esm/gasPriceOracle/types.d.ts +2 -0
  81. package/dist/esm/gasPriceOracle/types.js +9 -1
  82. package/dist/esm/gasPriceOracle/types.js.map +1 -1
  83. package/dist/esm/interfaces/SpokePool.d.ts +3 -1
  84. package/dist/esm/interfaces/SpokePool.js.map +1 -1
  85. package/dist/esm/providers/infura.js +1 -0
  86. package/dist/esm/providers/infura.js.map +1 -1
  87. package/dist/esm/utils/BlockFinder.d.ts +0 -1
  88. package/dist/esm/utils/BlockFinder.js.map +1 -1
  89. package/dist/esm/utils/NetworkUtils.d.ts +0 -12
  90. package/dist/esm/utils/NetworkUtils.js +5 -19
  91. package/dist/esm/utils/NetworkUtils.js.map +1 -1
  92. package/dist/esm/utils/TypeGuards.d.ts +3 -0
  93. package/dist/esm/utils/TypeGuards.js +4 -0
  94. package/dist/esm/utils/TypeGuards.js.map +1 -1
  95. package/dist/types/arch/svm/BlockUtils.d.ts +26 -0
  96. package/dist/types/arch/svm/BlockUtils.d.ts.map +1 -0
  97. package/dist/types/arch/svm/index.d.ts +1 -0
  98. package/dist/types/arch/svm/index.d.ts.map +1 -1
  99. package/dist/types/clients/SpokePoolClient/EVMSpokePoolClient.d.ts.map +1 -1
  100. package/dist/types/clients/SpokePoolClient/SVMSpokePoolClient.d.ts +3 -3
  101. package/dist/types/clients/SpokePoolClient/SVMSpokePoolClient.d.ts.map +1 -1
  102. package/dist/types/clients/SpokePoolClient/SpokePoolClient.d.ts +3 -4
  103. package/dist/types/clients/SpokePoolClient/SpokePoolClient.d.ts.map +1 -1
  104. package/dist/types/clients/SpokePoolClient/index.d.ts +3 -3
  105. package/dist/types/clients/index.d.ts +1 -1
  106. package/dist/types/clients/index.d.ts.map +1 -1
  107. package/dist/types/clients/mocks/MockSpokePoolClient.d.ts +11 -5
  108. package/dist/types/clients/mocks/MockSpokePoolClient.d.ts.map +1 -1
  109. package/dist/types/clients/mocks/MockSvmSpokePoolClient.d.ts +2 -2
  110. package/dist/types/constants.d.ts +1 -1
  111. package/dist/types/constants.d.ts.map +1 -1
  112. package/dist/types/gasPriceOracle/adapters/solana.d.ts +2 -2
  113. package/dist/types/gasPriceOracle/adapters/solana.d.ts.map +1 -1
  114. package/dist/types/gasPriceOracle/oracle.d.ts +3 -8
  115. package/dist/types/gasPriceOracle/oracle.d.ts.map +1 -1
  116. package/dist/types/gasPriceOracle/types.d.ts +2 -0
  117. package/dist/types/gasPriceOracle/types.d.ts.map +1 -1
  118. package/dist/types/interfaces/SpokePool.d.ts +3 -1
  119. package/dist/types/interfaces/SpokePool.d.ts.map +1 -1
  120. package/dist/types/providers/infura.d.ts.map +1 -1
  121. package/dist/types/utils/BlockFinder.d.ts +0 -1
  122. package/dist/types/utils/BlockFinder.d.ts.map +1 -1
  123. package/dist/types/utils/NetworkUtils.d.ts +0 -12
  124. package/dist/types/utils/NetworkUtils.d.ts.map +1 -1
  125. package/dist/types/utils/TypeGuards.d.ts +3 -0
  126. package/dist/types/utils/TypeGuards.d.ts.map +1 -1
  127. package/package.json +1 -1
  128. package/src/arch/svm/BlockUtils.ts +166 -0
  129. package/src/arch/svm/index.ts +1 -0
  130. package/src/clients/BundleDataClient/BundleDataClient.ts +2 -2
  131. package/src/clients/SpokePoolClient/EVMSpokePoolClient.ts +3 -1
  132. package/src/clients/SpokePoolClient/SVMSpokePoolClient.ts +6 -4
  133. package/src/clients/SpokePoolClient/SpokePoolClient.ts +18 -8
  134. package/src/clients/SpokePoolClient/index.ts +4 -4
  135. package/src/clients/index.ts +8 -1
  136. package/src/clients/mocks/MockSpokePoolClient.ts +66 -36
  137. package/src/clients/mocks/MockSvmSpokePoolClient.ts +2 -2
  138. package/src/constants.ts +2 -0
  139. package/src/gasPriceOracle/adapters/solana.ts +2 -2
  140. package/src/gasPriceOracle/oracle.ts +16 -5
  141. package/src/gasPriceOracle/types.ts +11 -1
  142. package/src/interfaces/SpokePool.ts +4 -1
  143. package/src/providers/infura.ts +1 -0
  144. package/src/utils/BlockFinder.ts +0 -1
  145. package/src/utils/NetworkUtils.ts +13 -21
  146. package/src/utils/TypeGuards.ts +7 -0
@@ -23,19 +23,25 @@ export declare class MockSpokePoolClient extends EVMSpokePoolClient {
23
23
  _update(eventsToQuery: string[]): Promise<SpokePoolUpdate>;
24
24
  readonly eventSignatures: Record<string, string>;
25
25
  deposit(deposit: Omit<Deposit, "messageHash"> & Partial<SortableEvent>): Log;
26
+ depositV3(deposit: Omit<Deposit, "messageHash"> & Partial<SortableEvent>): Log;
26
27
  protected _deposit(event: string, deposit: Omit<Deposit, "messageHash"> & Partial<SortableEvent>): Log;
28
+ fillV3Relay(fill: Omit<Fill, "messageHash"> & {
29
+ message: string;
30
+ } & Partial<SortableEvent>): Log;
27
31
  fillRelay(fill: Omit<Fill, "messageHash"> & {
28
- message?: string;
32
+ message: string;
29
33
  } & Partial<SortableEvent>): Log;
30
34
  protected _fillRelay(event: string, fill: Omit<Fill, "messageHash"> & {
31
- message?: string;
35
+ message: string;
32
36
  } & Partial<SortableEvent>): Log;
37
+ speedUpV3Deposit(speedUp: SpeedUp): Log;
33
38
  speedUpDeposit(speedUp: SpeedUp): Log;
34
39
  protected _speedUpDeposit(event: string, speedUp: SpeedUp): Log;
35
40
  setTokensBridged(tokensBridged: TokensBridged): Log;
36
- requestSlowFill(request: Omit<SlowFillRequest, "destinationChainId"> & Partial<SortableEvent>): Log;
37
- protected _requestSlowFill(event: string, request: Omit<SlowFillRequest, "destinationChainId"> & Partial<SortableEvent>): Log;
38
- executeSlowRelayLeaf(leaf: Omit<SlowFillLeaf, "messageHash">): Log;
41
+ requestV3SlowFill(request: Omit<SlowFillRequest, "messageHash"> & Partial<SortableEvent>): Log;
42
+ requestSlowFill(request: Omit<SlowFillRequest, "messageHash"> & Partial<SortableEvent>): Log;
43
+ protected _requestSlowFill(event: string, request: Omit<SlowFillRequest, "messageHash"> & Partial<SortableEvent>): Log;
44
+ executeV3SlowRelayLeaf(leaf: Omit<SlowFillLeaf, "messageHash">): Log;
39
45
  executeRelayerRefundLeaf(refund: RelayerRefundExecution & Partial<SortableEvent>): Log;
40
46
  setEnableRoute(originToken: string, destinationChainId: number, enabled: boolean, overrides?: EventOverrides): Log;
41
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MockSpokePoolClient.d.ts","sourceRoot":"","sources":["../../../../src/clients/mocks/MockSpokePoolClient.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAElC,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAO,EACL,GAAG,EACH,O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CAAC,GAC7E,GAAG;IA8EN,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,GAAG;IAIvC,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,GAAG;IAIrC,SAAS,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,GAAG;IAkB/D,gBAAgB,CAAC,aAAa,EAAE,aAAa,GAAG,GAAG;IAanD,iBAAiB,CAAC,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,aAAa,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,GAAG,GAAG;IAI9F,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,aAAa,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,GAAG,GAAG;IAI5F,SAAS,CAAC,gBAAgB,CACxB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,aAAa,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,GACrE,GAAG;IA2BN,sBAAsB,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,aAAa,CAAC,GAAG,GAAG;IAkBpE,wBAAwB,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,aAAa,CAAC,GAAG,GAAG;IA2BtF,cAAc,CACZ,WAAW,EAAE,MAAM,EACnB,kBAAkB,EAAE,MAAM,EAC1B,OAAO,EAAE,OAAO,EAChB,SAAS,GAAE,cAAmB,GAC7B,GAAG;CAcP"}
@@ -3,13 +3,13 @@ import { SvmSpokeClient } from "@across-protocol/contracts";
3
3
  import { Address } from "@solana/kit";
4
4
  import { DepositWithBlock, RelayerRefundExecution, SortableEvent, SlowFillLeaf, Log } from "../../interfaces";
5
5
  import { MakeOptional, EventSearchConfig } from "../../utils";
6
- import { SpokePoolUpdate, SvmSpokePoolClient } from "../SpokePoolClient";
6
+ import { SpokePoolUpdate, SVMSpokePoolClient } from "../SpokePoolClient";
7
7
  import { HubPoolClient } from "../HubPoolClient";
8
8
  import { EventOverrides } from "./MockEvents";
9
9
  import { AcrossConfigStoreClient } from "../AcrossConfigStoreClient";
10
10
  import { MockSvmCpiEventsClient } from "./MockSvmCpiEventsClient";
11
11
  import { EventWithData } from "../../arch/svm";
12
- export declare class MockSvmSpokePoolClient extends SvmSpokePoolClient {
12
+ export declare class MockSvmSpokePoolClient extends SVMSpokePoolClient {
13
13
  mockEventsClient: MockSvmCpiEventsClient;
14
14
  private destinationTokenForChainOverride;
15
15
  constructor(logger: winston.Logger, chainId: number, programId?: Address<"JAZWcGrpSWNPTBj8QtJ9UyQqhJCDhG9GJkDeMf5NQBiq">, deploymentBlock?: number, eventSearchConfig?: MakeOptional<EventSearchConfig, "to">, opts?: {
@@ -1,4 +1,4 @@
1
- export { ChainFamily, CHAIN_IDs, MAINNET_CHAIN_IDs, PUBLIC_NETWORKS, TESTNET_CHAIN_IDs, TOKEN_SYMBOLS_MAP, TOKEN_EQUIVALENCE_REMAPPING, } from "@across-protocol/constants";
1
+ export { CCTP_NO_DOMAIN, ChainFamily, CHAIN_IDs, MAINNET_CHAIN_IDs, PUBLIC_NETWORKS, PRODUCTION_NETWORKS, TESTNET_CHAIN_IDs, TOKEN_SYMBOLS_MAP, TOKEN_EQUIVALENCE_REMAPPING, } from "@across-protocol/constants";
2
2
  export declare const ZERO_ADDRESS: string, ZERO_BYTES: string;
3
3
  export declare const MAX_SAFE_ALLOWANCE = "79228162514264337593543950335";
4
4
  export declare const MAX_SAFE_DEPOSIT_ID = "4294967295";
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,2BAA2B,GAC5B,MAAM,4BAA4B,CAAC;AAEpC,eAAO,MAAqB,YAAY,UAAY,UAAU,QAAoB,CAAC;AAGnF,eAAO,MAAM,kBAAkB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O,MAAM,2CAA2C,IAAI,CAAC;AAG7D,eAAO,MAAM,oBAAoB,oBAAoB,CAAC;AAOtD,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC;;;;;;;GAOG;AACH,eAAO,MAAM,iCAAiC,UAA2B,CAAC;AAE1E,eAAO,MAAM,mBAAmB,QAAuB,CAAC;AACxD,eAAO,MAAM,wBAAwB,QAAU,CAAC;AAEhD,eAAO,MAAM,iCAAiC,+CAA+C,CAAC;AAC9F,eAAO,MAAM,qCAAqC,iDAAiD,CAAC;AACpG,eAAO,MAAM,sCAAsC,+CAA+C,CAAC;AAEnG,eAAO,MAAM,+BAA+B,gDAAgD,CAAC;AAE7F,eAAO,MAAM,aAAa,OAAO,CAAC;AAClC,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC,eAAO,MAAM,oBAAoB,UAKhC,CAAC;AAEF,eAAO,MAAM,mBAAmB,UAY/B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;CAO7B,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import { SVMProvider } from "../../arch/svm";
2
- import { GasPriceEstimate } from "../types";
2
+ import { SvmGasPriceEstimate } from "../types";
3
3
  import { GasPriceEstimateOptions } from "../oracle";
4
4
  /**
5
5
  * @notice Returns result of getFeeForMessage and getRecentPrioritizationFees RPC calls.
6
6
  * @returns GasPriceEstimate
7
7
  */
8
- export declare function messageFee(provider: SVMProvider, opts: GasPriceEstimateOptions): Promise<GasPriceEstimate>;
8
+ export declare function messageFee(provider: SVMProvider, opts: GasPriceEstimateOptions): Promise<SvmGasPriceEstimate>;
9
9
  //# sourceMappingURL=solana.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../../../../src/gasPriceOracle/adapters/solana.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAGpD;;;GAGG;AACH,wBAAsB,UAAU,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAoChH"}
1
+ {"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../../../../src/gasPriceOracle/adapters/solana.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAGpD;;;GAGG;AACH,wBAAsB,UAAU,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAoCnH"}
@@ -2,7 +2,7 @@ import { Transport } from "viem";
2
2
  import { providers } from "ethers";
3
3
  import { BigNumber } from "../utils";
4
4
  import { SVMProvider as SolanaProvider } from "../arch/svm";
5
- import { GasPriceEstimate } from "./types";
5
+ import { EvmGasPriceEstimate, GasPriceEstimate, SvmGasPriceEstimate } from "./types";
6
6
  export interface GasPriceEstimateOptions {
7
7
  baseFeeMultiplier: BigNumber;
8
8
  priorityFeeMultiplier: BigNumber;
@@ -11,13 +11,8 @@ export interface GasPriceEstimateOptions {
11
11
  unsignedTx?: unknown;
12
12
  transport?: Transport;
13
13
  }
14
- /**
15
- * Provide an estimate for the current gas price for a particular chain.
16
- * @param provider A valid ethers provider.
17
- * @param {opts} GasPriceEstimateOptions optional parameters.
18
- * @returns An object of type GasPriceEstimate.
19
- */
20
- export declare function getGasPriceEstimate(provider: providers.Provider | SolanaProvider, opts?: Partial<GasPriceEstimateOptions>): Promise<GasPriceEstimate>;
14
+ export declare function getGasPriceEstimate(provider: providers.Provider, opts?: Partial<GasPriceEstimateOptions>): Promise<EvmGasPriceEstimate>;
15
+ export declare function getGasPriceEstimate(provider: SolanaProvider, opts?: Partial<GasPriceEstimateOptions>): Promise<SvmGasPriceEstimate>;
21
16
  /**
22
17
  * Provide an estimate for the current gas price for a particular chain.
23
18
  * @param providerOrChainId A valid ethers provider or a chain ID.
@@ -1 +1 @@
1
- {"version":3,"file":"oracle.d.ts","sourceRoot":"","sources":["../../../src/gasPriceOracle/oracle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,EAAE,SAAS,EAAiD,MAAM,UAAU,CAAC;AACpF,OAAO,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAQ3C,MAAM,WAAW,uBAAuB;IAEtC,iBAAiB,EAAE,SAAS,CAAC;IAE7B,qBAAqB,EAAE,SAAS,CAAC;IAEjC,cAAc,EAAE,OAAO,CAAC;IAExB,OAAO,EAAE,MAAM,CAAC;IAEhB,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AASD;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,QAAQ,EAAE,SAAS,CAAC,QAAQ,GAAG,cAAc,EAC7C,IAAI,GAAE,OAAO,CAAC,uBAAuB,CAAM,GAC1C,OAAO,CAAC,gBAAgB,CAAC,CAwC3B;AAwCD;;;;;;GAMG;AACH,wBAAsB,wBAAwB,CAC5C,iBAAiB,EAAE,SAAS,CAAC,QAAQ,GAAG,MAAM,EAC9C,IAAI,EAAE,uBAAuB,GAC5B,OAAO,CAAC,gBAAgB,CAAC,CA2B3B"}
1
+ {"version":3,"file":"oracle.d.ts","sourceRoot":"","sources":["../../../src/gasPriceOracle/oracle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,EAAE,SAAS,EAAgE,MAAM,UAAU,CAAC;AACnG,OAAO,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAQrF,MAAM,WAAW,uBAAuB;IAEtC,iBAAiB,EAAE,SAAS,CAAC;IAE7B,qBAAqB,EAAE,SAAS,CAAC;IAEjC,cAAc,EAAE,OAAO,CAAC;IAExB,OAAO,EAAE,MAAM,CAAC;IAEhB,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAUD,wBAAsB,mBAAmB,CACvC,QAAQ,EAAE,SAAS,CAAC,QAAQ,EAC5B,IAAI,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,GACtC,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAGhC,wBAAsB,mBAAmB,CACvC,QAAQ,EAAE,cAAc,EACxB,IAAI,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,GACtC,OAAO,CAAC,mBAAmB,CAAC,CAAC;AA0FhC;;;;;;GAMG;AACH,wBAAsB,wBAAwB,CAC5C,iBAAiB,EAAE,SAAS,CAAC,QAAQ,GAAG,MAAM,EAC9C,IAAI,EAAE,uBAAuB,GAC5B,OAAO,CAAC,gBAAgB,CAAC,CA2B3B"}
@@ -13,4 +13,6 @@ export type SvmGasPriceEstimate = {
13
13
  export interface GasPriceFeed {
14
14
  (provider: PublicClient<Transport, Chain>, chainId: number): Promise<InternalGasPriceEstimate>;
15
15
  }
16
+ export declare function isEVMGasPrice(gasPrice: GasPriceEstimate): gasPrice is EvmGasPriceEstimate;
17
+ export declare function isSVMGasPrice(gasPrice: GasPriceEstimate): gasPrice is SvmGasPriceEstimate;
16
18
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/gasPriceOracle/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,SAAS,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,MAAM,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,MAAM,MAAM,wBAAwB,GAAG,gBAAgB,CAAC;AACxD,MAAM,MAAM,gBAAgB,GAAG,mBAAmB,GAAG,mBAAmB,CAAC;AAEzE,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,EAAE,SAAS,CAAC;IACxB,oBAAoB,EAAE,SAAS,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,SAAS,CAAC;IACnB,2BAA2B,EAAE,SAAS,CAAC;CACxC,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,CAAC,QAAQ,EAAE,YAAY,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;CAChG"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/gasPriceOracle/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,SAAS,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,MAAM,CAAC;AAClF,OAAO,EAAE,SAAS,EAAa,MAAM,UAAU,CAAC;AAEhD,MAAM,MAAM,wBAAwB,GAAG,gBAAgB,CAAC;AACxD,MAAM,MAAM,gBAAgB,GAAG,mBAAmB,GAAG,mBAAmB,CAAC;AAEzE,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,EAAE,SAAS,CAAC;IACxB,oBAAoB,EAAE,SAAS,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,SAAS,CAAC;IACnB,2BAA2B,EAAE,SAAS,CAAC;CACxC,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,CAAC,QAAQ,EAAE,YAAY,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;CAChG;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,gBAAgB,GAAG,QAAQ,IAAI,mBAAmB,CAGzF;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,gBAAgB,GAAG,QAAQ,IAAI,mBAAmB,CAGzF"}
@@ -1,7 +1,9 @@
1
1
  import { SortableEvent } from "./Common";
2
+ import { FilledV3RelayEvent, V3FundsDepositedEvent } from "../typechain";
2
3
  import { SpokePoolClient } from "../clients";
3
4
  import { BigNumber } from "../utils";
4
5
  import { RelayerRefundLeaf } from "./HubPool";
6
+ export type { FilledV3RelayEvent, V3FundsDepositedEvent };
5
7
  export interface RelayData {
6
8
  originChainId: number;
7
9
  depositor: string;
@@ -80,7 +82,7 @@ export interface SpeedUp {
80
82
  }
81
83
  export interface SpeedUpWithBlock extends SpeedUp, SortableEvent {
82
84
  }
83
- export interface SlowFillRequest extends Omit<RelayData, "message"> {
85
+ export interface SlowFillRequest extends RelayData {
84
86
  messageHash: string;
85
87
  destinationChainId: number;
86
88
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SpokePool.d.ts","sourceRoot":"","sources":["../../../src/interfaces/SpokePool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,WAAW,SAAS;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,EAA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,iBAAiB;IAC/D,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,+BAAgC,SAAQ,sBAAsB,EAAE,aAAa;CAAG;AAEjG,MAAM,WAAW,MAAM;IACrB,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAED,MAAM,WAAW,eAAe;IAC9B,CAAC,gBAAgB,EAAE,MAAM,GAAG;QAC1B,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;KACrC,CAAC;CACH;AAED,MAAM,WAAW,aAAc,SAAQ,aAAa;IAClD,cAAc,EAAE,SAAS,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,uBAAuB;IACtC,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,CAAC;CACpC"}
@@ -1 +1 @@
1
- {"version":3,"file":"infura.d.ts","sourceRoot":"","sources":["../../../src/providers/infura.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AASvC,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,GAAG,MAAM,CAYvF"}
1
+ {"version":3,"file":"infura.d.ts","sourceRoot":"","sources":["../../../src/providers/infura.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAUvC,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,GAAG,MAAM,CAYvF"}
@@ -9,7 +9,6 @@ export type BlockTimeAverage = {
9
9
  timestamp: number;
10
10
  };
11
11
  export interface Block {
12
- hash: string;
13
12
  number: number;
14
13
  timestamp: number;
15
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"BlockFinder.d.ts","sourceRoot":"","sources":["../../../src/utils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AC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,8BAAsB,WAAW,CAAC,MAAM,SAAS,KAAK;IACpD,QAAQ,CAAC,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC;CACpG"}
@@ -53,18 +53,6 @@ export declare function chainIsOrbit(chainId: number): boolean;
53
53
  * @returns True if chainId is an Arbitrum chain, otherwise false.
54
54
  */
55
55
  export declare function chainIsArbitrum(chainId: number): boolean;
56
- /**
57
- * Determines whether a chain ID is an Aleph0 implementation
58
- * @param chainId Chain ID to evaluate
59
- * @returns True if chainId is an Aleph0 chain, otherwise false.
60
- */
61
- export declare function chainIsAlephZero(chainId: number): boolean;
62
- /**
63
- * Determines whether a chain ID is a Lens implementation
64
- * @param chainId Chain ID to evaluate
65
- * @returns True if chainId is a Lens chain, otherwise false.
66
- */
67
- export declare function chainIsLens(chainId: number): boolean;
68
56
  /**
69
57
  * Determines whether a chain ID is a Linea implementation.
70
58
  * @param chainId Chain ID to evaluate.
@@ -1 +1 @@
1
- {"version":3,"file":"NetworkUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/NetworkUtils.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAI9C,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAGjE;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAErE;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED;;;;GAIG;AAC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G,OAAO,CAK3D;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAExE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAMpD"}
@@ -1,4 +1,7 @@
1
+ import { providers } from "ethers";
2
+ import { SVMProvider } from "../arch/svm/types";
1
3
  export declare function isPromiseFulfilled<T>(promiseSettledResult: PromiseSettledResult<T>): promiseSettledResult is PromiseFulfilledResult<T>;
2
4
  export declare function isPromiseRejected<T>(promiseSettledResult: PromiseSettledResult<T>): promiseSettledResult is PromiseRejectedResult;
3
5
  export declare function isDefined<T>(input: T | null | undefined): input is T;
6
+ export declare function isEvmProvider(provider: providers.Provider | SVMProvider): provider is providers.Provider;
4
7
  //# sourceMappingURL=TypeGuards.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TypeGuards.d.ts","sourceRoot":"","sources":["../../../src/utils/TypeGuards.ts"],"names":[],"mappings":"AAAA,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,oBAAoB,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAC5C,oBAAoB,IAAI,sBAAsB,CAAC,CAAC,CAAC,CAEnD;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EACjC,oBAAoB,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAC5C,oBAAoB,IAAI,qBAAqB,CAE/C;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,IAAI,CAAC,CAEpE"}
1
+ {"version":3,"file":"TypeGuards.d.ts","sourceRoot":"","sources":["../../../src/utils/TypeGuards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,oBAAoB,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAC5C,oBAAoB,IAAI,sBAAsB,CAAC,CAAC,CAAC,CAEnD;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EACjC,oBAAoB,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAC5C,oBAAoB,IAAI,qBAAqB,CAE/C;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,IAAI,CAAC,CAEpE;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,SAAS,CAAC,QAAQ,GAAG,WAAW,GAAG,QAAQ,IAAI,SAAS,CAAC,QAAQ,CAExG"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@across-protocol/sdk",
3
3
  "author": "UMA Team",
4
- "version": "4.2.2-alpha.0",
4
+ "version": "4.2.3",
5
5
  "license": "AGPL-3.0",
6
6
  "homepage": "https://docs.across.to/reference/sdk",
7
7
  "files": [
@@ -0,0 +1,166 @@
1
+ import assert from "assert";
2
+ import { clamp, sortedIndexBy } from "lodash";
3
+ import { BlockFinder, type Block, type BlockTimeAverage, type BlockFinderHints } from "../../utils/BlockFinder";
4
+ import { isDefined } from "../../utils/TypeGuards";
5
+ import { getCurrentTime } from "../../utils/TimeUtils";
6
+ import { CHAIN_IDs } from "../../constants";
7
+ import { SVMProvider } from "./";
8
+
9
+ interface SVMBlock extends Block {}
10
+
11
+ const now = getCurrentTime();
12
+ const averageBlockTimes: { [chainId: number]: BlockTimeAverage } = {
13
+ [CHAIN_IDs.SOLANA]: { average: 0.4, timestamp: now, blockRange: 1 },
14
+ };
15
+
16
+ /**
17
+ * @description Compute the average slot time over a slot range.
18
+ * @dev Solana slots are all defined to be ~400ms away from each other += a small deviation, so we can hardcode this.
19
+ * @returns Average number of seconds per slot
20
+ */
21
+ export function averageBlockTime(): Pick<BlockTimeAverage, "average" | "blockRange"> {
22
+ // @todo This may need to be expanded to work without assuming that chainId = CHAIN_IDs.SOLANA.
23
+ return averageBlockTimes[CHAIN_IDs.SOLANA];
24
+ }
25
+
26
+ async function estimateBlocksElapsed(
27
+ seconds: number,
28
+ cushionPercentage = 0.0,
29
+ _provider: SVMProvider
30
+ ): Promise<number> {
31
+ const cushionMultiplier = cushionPercentage + 1.0;
32
+ const { average } = await averageBlockTime();
33
+ return Math.floor((seconds * cushionMultiplier) / average);
34
+ }
35
+
36
+ export class SVMBlockFinder extends BlockFinder<SVMBlock> {
37
+ constructor(
38
+ private readonly provider: SVMProvider,
39
+ private readonly blocks: SVMBlock[] = []
40
+ ) {
41
+ super();
42
+ }
43
+
44
+ /**
45
+ * @notice Gets the latest slot whose timestamp is <= the provided timestamp.
46
+ * @param number Timestamp timestamp to search.
47
+ * @param hints Optional low and high slot to bound the search space.
48
+ */
49
+ public async getBlockForTimestamp(timestamp: number | string, hints: BlockFinderHints = {}): Promise<SVMBlock> {
50
+ timestamp = Number(timestamp);
51
+ assert(timestamp !== undefined && timestamp !== null, "timestamp must be provided");
52
+ // If the last slot we have stored is too early, grab the latest slot.
53
+ if (this.blocks.length === 0 || this.blocks[this.blocks.length - 1].timestamp < timestamp) {
54
+ const block = await this.getLatestBlock();
55
+ if (timestamp >= block.timestamp) return block;
56
+ }
57
+
58
+ // Prime the BlockFinder cache with any supplied hints.
59
+ // If the hint is accurate, then this will bypass the subsequent estimation.
60
+ await Promise.all(
61
+ Object.values(hints)
62
+ .filter(isDefined)
63
+ .map((blockNumber) => this.getBlock(blockNumber))
64
+ );
65
+
66
+ // Check the first slot. If it's greater than our timestamp, we need to find an earlier slot.
67
+ if (this.blocks[0].timestamp > timestamp) {
68
+ const initialBlock = this.blocks[0];
69
+ // We use a 2x cushion to reduce the number of iterations in the following loop and increase the chance
70
+ // that the first slot we find sets a floor for the target timestamp. The loop converges on the correct slot
71
+ // slower than the following incremental search performed by `findBlock`, so we want to minimize the number of
72
+ // loop iterations in favor of searching more slots over the `findBlock` search.
73
+ const cushion = 1;
74
+ const incrementDistance = Math.max(
75
+ // Ensure the increment slot distance is _at least_ a single slot to prevent an infinite loop.
76
+ await estimateBlocksElapsed(initialBlock.timestamp - timestamp, cushion, this.provider),
77
+ 1
78
+ );
79
+
80
+ // Search backwards by a constant increment until we find a slot before the timestamp or hit slot 0.
81
+ for (let multiplier = 1; ; multiplier++) {
82
+ const distance = multiplier * incrementDistance;
83
+ const blockNumber = Math.max(0, initialBlock.number - distance);
84
+ const block = await this.getBlock(blockNumber);
85
+ if (block.timestamp <= timestamp) break; // Found an earlier block.
86
+ assert(blockNumber > 0, "timestamp is before block 0");
87
+ }
88
+ }
89
+
90
+ // Find the index where the slot would be inserted and use that as the end slot (since it is >= the timestamp).
91
+ const index = sortedIndexBy(this.blocks, { timestamp } as Block, "timestamp");
92
+ return this.findBlock(this.blocks[index - 1], this.blocks[index], timestamp);
93
+ }
94
+
95
+ // Grabs the most recent slot and caches it.
96
+ private async getLatestBlock(): Promise<SVMBlock> {
97
+ const latestSlot = await this.provider.getSlot().send();
98
+ const estimatedSlotTime = await this.provider.getBlockTime(latestSlot).send();
99
+
100
+ // Cast the return type to an SVMBlock.
101
+ const block: SVMBlock = {
102
+ timestamp: Number(estimatedSlotTime),
103
+ number: Number(latestSlot),
104
+ };
105
+ const index = sortedIndexBy(this.blocks, block, "number");
106
+ if (this.blocks[index]?.number !== block.number) this.blocks.splice(index, 0, block);
107
+ return this.blocks[index];
108
+ }
109
+
110
+ // Grabs the slot for a particular number and caches it.
111
+ private async getBlock(number: number): Promise<SVMBlock> {
112
+ let index = sortedIndexBy(this.blocks, { number } as Block, "number");
113
+ if (this.blocks[index]?.number === number) return this.blocks[index]; // Return early if block already exists.
114
+
115
+ const estimatedSlotTime = await this.provider.getBlockTime(BigInt(number)).send();
116
+ // Cast the return type to an SVMBlock.
117
+ const block: SVMBlock = {
118
+ timestamp: Number(estimatedSlotTime),
119
+ number,
120
+ };
121
+
122
+ // Recompute the index after the async call since the state of this.blocks could have changed!
123
+ index = sortedIndexBy(this.blocks, { number } as Block, "number");
124
+
125
+ // Rerun this check to avoid duplicate insertion.
126
+ if (this.blocks[index]?.number === number) return this.blocks[index];
127
+ this.blocks.splice(index, 0, block); // A simple insert at index.
128
+ return block;
129
+ }
130
+
131
+ // Return the latest slot, between startSlot and endSlot, whose timestamp is <= timestamp.
132
+ // Effectively, this is an interpolation search algorithm to minimize slot requests.
133
+ // Note: startSlot and endSlot _must_ be different slots.
134
+ private async findBlock(_startSlot: SVMBlock, _endSlot: SVMBlock, timestamp: number): Promise<SVMBlock> {
135
+ const [startBlock, endBlock] = [_startSlot, _endSlot];
136
+ // In the case of equality, the endBlock is expected to be passed as the one whose timestamp === the requested
137
+ // timestamp.
138
+ if (endBlock.timestamp === timestamp) return endBlock;
139
+
140
+ // If there's no equality, but the blocks are adjacent, return the startBlock, since we want the returned slot's
141
+ // timestamp to be <= the requested timestamp.
142
+ if (endBlock.number === startBlock.number + 1) return startBlock;
143
+
144
+ assert(endBlock.number !== startBlock.number, "startBlock cannot equal endBlock");
145
+ assert(
146
+ timestamp < endBlock.timestamp && timestamp > startBlock.timestamp,
147
+ "timestamp not in between start and end blocks"
148
+ );
149
+
150
+ // Interpolating the timestamp we're searching for to slot numbers.
151
+ const totalTimeDifference = endBlock.timestamp - startBlock.timestamp;
152
+ const totalBlockDistance = endBlock.number - startBlock.number;
153
+ const blockPercentile = (timestamp - startBlock.timestamp) / totalTimeDifference;
154
+ const estimatedBlock = startBlock.number + Math.round(blockPercentile * totalBlockDistance);
155
+
156
+ // Clamp ensures the estimated slot is strictly greater than the start slot and strictly less than the end slot.
157
+ const newBlock = await this.getBlock(clamp(estimatedBlock, startBlock.number + 1, endBlock.number - 1));
158
+
159
+ // Depending on whether the new slot is below or above the timestamp, narrow the search space accordingly.
160
+ if (newBlock.timestamp < timestamp) {
161
+ return this.findBlock(newBlock, endBlock, timestamp);
162
+ } else {
163
+ return this.findBlock(startBlock, newBlock, timestamp);
164
+ }
165
+ }
166
+ }
@@ -3,3 +3,4 @@ export * from "./SpokeUtils";
3
3
  export * from "./types";
4
4
  export * from "./utils";
5
5
  export * from "./constants";
6
+ export * from "./BlockUtils";
@@ -57,7 +57,7 @@ import {
57
57
  V3FillWithBlock,
58
58
  verifyFillRepayment,
59
59
  } from "./utils";
60
- import { isEVMSpokePoolClient, isSvmSpokePoolClient } from "../SpokePoolClient";
60
+ import { isEVMSpokePoolClient, isSVMSpokePoolClient } from "../SpokePoolClient";
61
61
 
62
62
  // max(uint256) - 1
63
63
  export const INFINITE_FILL_DEADLINE = bnUint32Max;
@@ -1617,7 +1617,7 @@ export class BundleDataClient {
1617
1617
  deposit: DepositWithBlock,
1618
1618
  spokePoolClient: SpokePoolClient
1619
1619
  ): Promise<FillWithBlock | undefined> {
1620
- if (isSvmSpokePoolClient(spokePoolClient)) {
1620
+ if (isSVMSpokePoolClient(spokePoolClient)) {
1621
1621
  return await findSvmFillEvent(
1622
1622
  deposit,
1623
1623
  spokePoolClient.chainId,
@@ -16,6 +16,7 @@ import {
16
16
  isZeroAddress,
17
17
  MakeOptional,
18
18
  toBN,
19
+ EvmAddress,
19
20
  } from "../../utils";
20
21
  import {
21
22
  EventSearchConfig,
@@ -42,6 +43,7 @@ export class EVMSpokePoolClient extends SpokePoolClient {
42
43
  eventSearchConfig: MakeOptional<EventSearchConfig, "to"> = { from: 0, maxLookBack: 0 }
43
44
  ) {
44
45
  super(logger, hubPoolClient, chainId, deploymentBlock, eventSearchConfig);
46
+ this.spokePoolAddress = EvmAddress.from(spokePool.address);
45
47
  }
46
48
 
47
49
  public override relayFillStatus(relayData: RelayData, atHeight?: number): Promise<FillStatus> {
@@ -206,7 +208,7 @@ export class EVMSpokePoolClient extends SpokePoolClient {
206
208
 
207
209
  this.logger.debug({
208
210
  at: "SpokePoolClient#findDeposit",
209
- message: "Located deposit outside of SpokePoolClient's search range",
211
+ message: "Located V3 deposit outside of SpokePoolClient's search range",
210
212
  deposit,
211
213
  elapsedMs: tStop - tStart,
212
214
  });
@@ -20,6 +20,7 @@ import {
20
20
  isZeroAddress,
21
21
  MakeOptional,
22
22
  sortEventsAscendingInPlace,
23
+ SvmAddress,
23
24
  } from "../../utils";
24
25
  import { isUpdateFailureReason } from "../BaseAbstractClient";
25
26
  import { HubPoolClient } from "../HubPoolClient";
@@ -29,7 +30,7 @@ import { knownEventNames, SpokePoolClient, SpokePoolUpdate } from "./SpokePoolCl
29
30
  * SvmSpokePoolClient is a client for the SVM SpokePool program. It extends the base SpokePoolClient
30
31
  * and implements the abstract methods required for interacting with an SVM Spoke Pool.
31
32
  */
32
- export class SvmSpokePoolClient extends SpokePoolClient {
33
+ export class SVMSpokePoolClient extends SpokePoolClient {
33
34
  /**
34
35
  * Protected constructor. Use the async create() method to instantiate.
35
36
  */
@@ -45,6 +46,7 @@ export class SvmSpokePoolClient extends SpokePoolClient {
45
46
  ) {
46
47
  // Convert deploymentSlot to number for base class, might need refinement
47
48
  super(logger, hubPoolClient, chainId, Number(deploymentSlot), eventSearchConfig);
49
+ this.spokePoolAddress = SvmAddress.from(programId.toString());
48
50
  }
49
51
 
50
52
  /**
@@ -57,11 +59,11 @@ export class SvmSpokePoolClient extends SpokePoolClient {
57
59
  deploymentSlot: bigint,
58
60
  eventSearchConfig: MakeOptional<EventSearchConfig, "to"> = { from: 0, maxLookBack: 0 }, // Provide default
59
61
  rpc: Rpc<SolanaRpcApiFromTransport<RpcTransport>>
60
- ): Promise<SvmSpokePoolClient> {
62
+ ): Promise<SVMSpokePoolClient> {
61
63
  const svmEventsClient = await SvmCpiEventsClient.create(rpc);
62
64
  const programId = svmEventsClient.getProgramAddress();
63
65
  const statePda = await getStatePda(programId);
64
- return new SvmSpokePoolClient(
66
+ return new SVMSpokePoolClient(
65
67
  logger,
66
68
  hubPoolClient,
67
69
  chainId,
@@ -86,7 +88,7 @@ export class SvmSpokePoolClient extends SpokePoolClient {
86
88
  ) {
87
89
  const programId = eventClient.getProgramAddress();
88
90
  const statePda = await getStatePda(programId);
89
- return new SvmSpokePoolClient(
91
+ return new SVMSpokePoolClient(
90
92
  logger,
91
93
  hubPoolClient,
92
94
  chainId,
@@ -19,6 +19,7 @@ import {
19
19
  validateFillForDeposit,
20
20
  chainIsEvm,
21
21
  chainIsProd,
22
+ Address,
22
23
  } from "../../utils";
23
24
  import { duplicateEvent, sortEventsAscendingInPlace } from "../../utils/EventUtils";
24
25
  import { ZERO_ADDRESS } from "../../constants";
@@ -86,6 +87,7 @@ export abstract class SpokePoolClient extends BaseAbstractClient {
86
87
  protected relayerRefundExecutions: RelayerRefundExecutionWithBlock[] = [];
87
88
  protected configStoreClient: AcrossConfigStoreClient | undefined;
88
89
  protected invalidFills: Set<string> = new Set();
90
+ public spokePoolAddress: Address | undefined;
89
91
  public fills: { [OriginChainId: number]: FillWithBlock[] } = {};
90
92
 
91
93
  /**
@@ -300,10 +302,9 @@ export abstract class SpokePoolClient extends BaseAbstractClient {
300
302
  * @param relayData RelayData field for the SlowFill request.
301
303
  * @returns The corresponding SlowFillRequest event if found, otherwise undefined.
302
304
  */
303
- public getSlowFillRequest(
304
- relayData: Omit<RelayData, "message"> & { messageHash: string }
305
- ): SlowFillRequestWithBlock | undefined {
306
- const hash = getRelayEventKey({ ...relayData, destinationChainId: this.chainId });
305
+ public getSlowFillRequest(relayData: RelayData): SlowFillRequestWithBlock | undefined {
306
+ const messageHash = getMessageHash(relayData.message);
307
+ const hash = getRelayEventKey({ ...relayData, messageHash, destinationChainId: this.chainId });
307
308
  return this.slowFillRequests[hash];
308
309
  }
309
310
 
@@ -554,7 +555,7 @@ export abstract class SpokePoolClient extends BaseAbstractClient {
554
555
  }
555
556
  };
556
557
 
557
- for (const event of ["FundsDeposited"]) {
558
+ for (const event of ["V3FundsDeposited", "FundsDeposited"]) {
558
559
  if (eventsToQuery.includes(event)) {
559
560
  await queryDepositEvents(event);
560
561
  }
@@ -582,7 +583,7 @@ export abstract class SpokePoolClient extends BaseAbstractClient {
582
583
  };
583
584
 
584
585
  // Update deposits with speed up requests from depositor.
585
- ["RequestedSpeedUpDeposit"].forEach((event) => {
586
+ ["RequestedSpeedUpV3Deposit", "RequestedSpeedUpDeposit"].forEach((event) => {
586
587
  if (eventsToQuery.includes(event)) {
587
588
  querySpeedUpDepositEvents(event);
588
589
  }
@@ -597,6 +598,10 @@ export abstract class SpokePoolClient extends BaseAbstractClient {
597
598
  destinationChainId: this.chainId,
598
599
  };
599
600
 
601
+ if (eventName === "RequestedV3SlowFill") {
602
+ slowFillRequest.messageHash = getMessageHash(slowFillRequest.message);
603
+ }
604
+
600
605
  const depositHash = getRelayEventKey({ ...slowFillRequest, destinationChainId: this.chainId });
601
606
 
602
607
  // Sanity check that this event is not a duplicate.
@@ -609,7 +614,7 @@ export abstract class SpokePoolClient extends BaseAbstractClient {
609
614
  }
610
615
  };
611
616
 
612
- ["RequestedSlowFill"].forEach((event) => {
617
+ ["RequestedV3SlowFill", "RequestedSlowFill"].forEach((event) => {
613
618
  if (eventsToQuery.includes(event)) {
614
619
  queryRequestedSlowFillEvents(event);
615
620
  }
@@ -633,6 +638,11 @@ export abstract class SpokePoolClient extends BaseAbstractClient {
633
638
  destinationChainId: this.chainId,
634
639
  };
635
640
 
641
+ if (eventName === "FilledV3Relay") {
642
+ fill.messageHash = getMessageHash((event as unknown as { message: string }).message);
643
+ fill.relayExecutionInfo.updatedMessageHash = getMessageHash(event.relayExecutionInfo.updatedMessage!);
644
+ }
645
+
636
646
  // Sanity check that this event is not a duplicate.
637
647
  const duplicateFill = this.fills[fill.originChainId]?.find((f) => duplicateEvent(fill, f));
638
648
  if (duplicateFill) {
@@ -646,7 +656,7 @@ export abstract class SpokePoolClient extends BaseAbstractClient {
646
656
  };
647
657
 
648
658
  // Update observed fills with ingested event data.
649
- ["FilledRelay"].forEach((event) => {
659
+ ["FilledV3Relay", "FilledRelay"].forEach((event) => {
650
660
  if (eventsToQuery.includes(event)) {
651
661
  queryFilledRelayEvents(event);
652
662
  }