diff --git a/package.json b/package.json index b964aaef..2227f2c9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@across-protocol/sdk", "author": "UMA Team", - "version": "3.1.29", + "version": "3.1.30", "license": "AGPL-3.0", "homepage": "https://docs.across.to/reference/sdk", "files": [ diff --git a/src/clients/SpokePoolClient.ts b/src/clients/SpokePoolClient.ts index 75c08286..f82490c3 100644 --- a/src/clients/SpokePoolClient.ts +++ b/src/clients/SpokePoolClient.ts @@ -32,7 +32,7 @@ import { RelayerRefundExecutionWithBlock, RootBundleRelayWithBlock, SlowFillRequestWithBlock, - SpeedUp, + SpeedUpWithBlock, TokensBridged, V3FundsDepositedEvent, } from "../interfaces"; @@ -67,7 +67,7 @@ export class SpokePoolClient extends BaseAbstractClient { protected oldestTime = 0; protected depositHashes: { [depositHash: string]: DepositWithBlock } = {}; protected depositHashesToFills: { [depositHash: string]: FillWithBlock[] } = {}; - protected speedUps: { [depositorAddress: string]: { [depositId: number]: SpeedUp[] } } = {}; + protected speedUps: { [depositorAddress: string]: { [depositId: number]: SpeedUpWithBlock[] } } = {}; protected slowFillRequests: { [relayDataHash: string]: SlowFillRequestWithBlock } = {}; protected depositRoutes: { [originToken: string]: { [DestinationChainId: number]: boolean } } = {}; protected tokensBridged: TokensBridged[] = []; @@ -296,7 +296,7 @@ export class SpokePoolClient extends BaseAbstractClient { * Retrieves speed up requests grouped by depositor and depositId. * @returns A mapping of depositor addresses to deposit ids with their corresponding speed up requests. */ - public getSpeedUps(): { [depositorAddress: string]: { [depositId: number]: SpeedUp[] } } { + public getSpeedUps(): { [depositorAddress: string]: { [depositId: number]: SpeedUpWithBlock[] } } { return this.speedUps; } @@ -592,7 +592,8 @@ export class SpokePoolClient extends BaseAbstractClient { const speedUpEvents = [...(queryResults[eventsToQuery.indexOf("RequestedSpeedUpV3Deposit")] ?? [])]; for (const event of speedUpEvents) { - const speedUp: SpeedUp = { ...spreadEvent(event.args), originChainId: this.chainId }; + const rawEvent = spreadEventWithBlockNumber(event); + const speedUp = { ...rawEvent, originChainId: this.chainId } as SpeedUpWithBlock; assign(this.speedUps, [speedUp.depositor, speedUp.depositId], [speedUp]); // Find deposit hash matching this speed up event and update the deposit data associated with the hash, diff --git a/src/interfaces/SpokePool.ts b/src/interfaces/SpokePool.ts index 27e68da9..38b0af70 100644 --- a/src/interfaces/SpokePool.ts +++ b/src/interfaces/SpokePool.ts @@ -74,6 +74,8 @@ export interface SpeedUp { updatedMessage: string; } +export interface SpeedUpWithBlock extends SpeedUp, SortableEvent {} + export interface SlowFillRequest extends RelayData { destinationChainId: number; } diff --git a/test/common.test.ts b/test/common.test.ts index 4f01e12d..a69ae92a 100644 --- a/test/common.test.ts +++ b/test/common.test.ts @@ -41,7 +41,7 @@ describe("Utils test", () => { const relayerAddress = DEFAULT_SIMULATED_RELAYER_ADDRESS; // @todo: Ensure that NODE_URL_1 is always defined in test CI? - const rpcUrl = process.env.NODE_URL_1 ?? "https://cloudflare-eth.com"; + const rpcUrl = process.env.NODE_URL_1 ?? "https://mainnet.gateway.tenderly.co"; const provider = new providers.JsonRpcProvider(rpcUrl, 1); const spokePool: SpokePool = SpokePool__factory.connect(spokePoolAddress, provider);