@across-protocol/sdk 3.2.10 → 3.2.11
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/cjs/clients/SpokePoolClient.d.ts +3 -4
- package/dist/cjs/clients/SpokePoolClient.js +20 -48
- package/dist/cjs/clients/SpokePoolClient.js.map +1 -1
- package/dist/cjs/clients/mocks/MockSpokePoolClient.js +0 -2
- package/dist/cjs/clients/mocks/MockSpokePoolClient.js.map +1 -1
- package/dist/cjs/providers/retryProvider.d.ts +1 -0
- package/dist/cjs/providers/retryProvider.js +43 -6
- package/dist/cjs/providers/retryProvider.js.map +1 -1
- package/dist/cjs/providers/types.d.ts +28 -0
- package/dist/cjs/providers/types.js +15 -0
- package/dist/cjs/providers/types.js.map +1 -1
- package/dist/cjs/utils/NetworkUtils.js +2 -2
- package/dist/cjs/utils/NetworkUtils.js.map +1 -1
- package/dist/esm/clients/BundleDataClient/utils/DataworkerUtils.js +1 -1
- package/dist/esm/clients/BundleDataClient/utils/DataworkerUtils.js.map +1 -1
- package/dist/esm/clients/SpokePoolClient.d.ts +6 -7
- package/dist/esm/clients/SpokePoolClient.js +18 -46
- package/dist/esm/clients/SpokePoolClient.js.map +1 -1
- package/dist/esm/clients/mocks/MockSpokePoolClient.js +0 -2
- package/dist/esm/clients/mocks/MockSpokePoolClient.js.map +1 -1
- package/dist/esm/providers/retryProvider.d.ts +1 -0
- package/dist/esm/providers/retryProvider.js +49 -6
- package/dist/esm/providers/retryProvider.js.map +1 -1
- package/dist/esm/providers/types.d.ts +28 -0
- package/dist/esm/providers/types.js +18 -1
- package/dist/esm/providers/types.js.map +1 -1
- package/dist/esm/utils/NetworkUtils.js +2 -2
- package/dist/esm/utils/NetworkUtils.js.map +1 -1
- package/dist/esm/utils/SpokeUtils.d.ts +1 -1
- package/dist/esm/utils/SpokeUtils.js +1 -1
- package/dist/types/clients/SpokePoolClient.d.ts +6 -7
- package/dist/types/clients/SpokePoolClient.d.ts.map +1 -1
- package/dist/types/clients/mocks/MockSpokePoolClient.d.ts.map +1 -1
- package/dist/types/providers/retryProvider.d.ts +1 -0
- package/dist/types/providers/retryProvider.d.ts.map +1 -1
- package/dist/types/providers/types.d.ts +28 -0
- package/dist/types/providers/types.d.ts.map +1 -1
- package/dist/types/utils/SpokeUtils.d.ts +1 -1
- package/package.json +1 -1
- package/src/clients/BundleDataClient/utils/DataworkerUtils.ts +1 -1
- package/src/clients/SpokePoolClient.ts +15 -23
- package/src/clients/mocks/MockSpokePoolClient.ts +0 -2
- package/src/providers/retryProvider.ts +46 -7
- package/src/providers/types.ts +21 -0
- package/src/utils/NetworkUtils.ts +1 -1
- package/src/utils/SpokeUtils.ts +1 -1
|
@@ -8,6 +8,7 @@ import { AcrossConfigStoreClient } from "./AcrossConfigStoreClient";
|
|
|
8
8
|
type SpokePoolUpdateSuccess = {
|
|
9
9
|
success: true;
|
|
10
10
|
currentTime: number;
|
|
11
|
+
oldestTime: number;
|
|
11
12
|
firstDepositId: number;
|
|
12
13
|
latestDepositId: number;
|
|
13
14
|
events: Log[][];
|
|
@@ -29,9 +30,7 @@ export declare class SpokePoolClient extends BaseAbstractClient {
|
|
|
29
30
|
readonly chainId: number;
|
|
30
31
|
deploymentBlock: number;
|
|
31
32
|
protected currentTime: number;
|
|
32
|
-
protected
|
|
33
|
-
[blockNumber: number]: number;
|
|
34
|
-
};
|
|
33
|
+
protected oldestTime: number;
|
|
35
34
|
protected depositHashes: {
|
|
36
35
|
[depositHash: string]: DepositWithBlock;
|
|
37
36
|
};
|
|
@@ -224,7 +223,7 @@ export declare class SpokePoolClient extends BaseAbstractClient {
|
|
|
224
223
|
* @note // We want to find the block range that satisfies these conditions:
|
|
225
224
|
* // - the low block has deposit count <= targetDepositId
|
|
226
225
|
* // - the high block has a deposit count > targetDepositId.
|
|
227
|
-
* // This way the caller can search for a
|
|
226
|
+
* // This way the caller can search for a V3FundsDeposited event between [low, high] that will always
|
|
228
227
|
* // contain the event emitted when deposit ID was incremented to targetDepositId + 1. This is the same transaction
|
|
229
228
|
* // where the deposit with deposit ID = targetDepositId was created.
|
|
230
229
|
*/
|
|
@@ -308,10 +307,10 @@ export declare class SpokePoolClient extends BaseAbstractClient {
|
|
|
308
307
|
*/
|
|
309
308
|
getCurrentTime(): number;
|
|
310
309
|
/**
|
|
311
|
-
* Retrieves the time
|
|
312
|
-
* @returns The time
|
|
310
|
+
* Retrieves the oldest time searched on the SpokePool contract.
|
|
311
|
+
* @returns The oldest time searched, which will be 0 if there has been no update() yet.
|
|
313
312
|
*/
|
|
314
|
-
|
|
313
|
+
getOldestTime(): number;
|
|
315
314
|
findDeposit(depositId: number, destinationChainId: number): Promise<DepositWithBlock>;
|
|
316
315
|
/**
|
|
317
316
|
* Determines whether a deposit originates from a lite chain.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpokePoolClient.d.ts","sourceRoot":"","sources":["../../../src/clients/SpokePoolClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SpokePoolClient.d.ts","sourceRoot":"","sources":["../../../src/clients/SpokePoolClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EACL,SAAS,EACT,SAAS,EAET,gBAAgB,EAChB,iBAAiB,EAEjB,YAAY,EAKb,MAAM,UAAU,CAAC;AASlB,OAAO,EACL,OAAO,EACP,gBAAgB,EAChB,IAAI,EACJ,UAAU,EACV,aAAa,EACb,GAAG,EACH,SAAS,EACT,+BAA+B,EAC/B,wBAAwB,EACxB,wBAAwB,EACxB,gBAAgB,EAChB,aAAa,EACd,MAAM,eAAe,CAAC;AAIvB,OAAO,EAAE,kBAAkB,EAAyB,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AACtG,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,uB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GAAG;IAiB/C,wBAAwB,CAAC,MAAM,EAAE,+BAA+B,GAAG,GAAG;IA2BtE,cAAc,CACZ,WAAW,EAAE,MAAM,EACnB,kBAAkB,EAAE,MAAM,EAC1B,OAAO,EAAE,OAAO,EAChB,SAAS,GAAE,cAAmB,GAC7B,GAAG;CAcP"}
|
|
@@ -11,6 +11,7 @@ export declare class RetryProvider extends ethers.providers.StaticJsonRpcProvide
|
|
|
11
11
|
send(method: string, params: Array<unknown>): Promise<unknown>;
|
|
12
12
|
_validateResponse(method: string, _: Array<unknown>, response: unknown): boolean;
|
|
13
13
|
_sendAndValidate(provider: ethers.providers.StaticJsonRpcProvider, method: string, params: Array<unknown>): Promise<unknown>;
|
|
14
|
+
protected callReverted(method: string, error: unknown): boolean;
|
|
14
15
|
_trySend(provider: ethers.providers.StaticJsonRpcProvider, method: string, params: Array<unknown>): Promise<unknown>;
|
|
15
16
|
_getQuorum(method: string, params: Array<unknown>): number;
|
|
16
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retryProvider.d.ts","sourceRoot":"","sources":["../../../src/providers/retryProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"retryProvider.d.ts","sourceRoot":"","sources":["../../../src/providers/retryProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAO1D,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,qBAAa,aAAc,SAAQ,MAAM,CAAC,SAAS,CAAC,qBAAqB;IAKrE,QAAQ,CAAC,mBAAmB,EAAE,MAAM;IACpC,QAAQ,CAAC,OAAO,EAAE,MAAM;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM;IACt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AAO,CAAC,GAAG,MAAM;CAqB3D"}
|
|
@@ -1,3 +1,31 @@
|
|
|
1
1
|
export type RPCProvider = "ALCHEMY" | "DRPC" | "INFURA" | "INFURA_DIN";
|
|
2
2
|
export type RPCTransport = "https" | "wss";
|
|
3
|
+
export declare const JsonRpcError: import("superstruct").Struct<{
|
|
4
|
+
error: {
|
|
5
|
+
message: string;
|
|
6
|
+
code: number;
|
|
7
|
+
data?: any;
|
|
8
|
+
};
|
|
9
|
+
id: string | number;
|
|
10
|
+
jsonrpc: "2.0";
|
|
11
|
+
}, {
|
|
12
|
+
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
|
13
|
+
id: import("superstruct").Struct<string | number, null>;
|
|
14
|
+
error: import("superstruct").Struct<{
|
|
15
|
+
message: string;
|
|
16
|
+
code: number;
|
|
17
|
+
data?: any;
|
|
18
|
+
}, {
|
|
19
|
+
code: import("superstruct").Struct<number, null>;
|
|
20
|
+
message: import("superstruct").Struct<string, null>;
|
|
21
|
+
data: import("superstruct").Struct<any, null>;
|
|
22
|
+
}>;
|
|
23
|
+
}>;
|
|
24
|
+
export declare const RpcError: import("superstruct").Struct<{
|
|
25
|
+
reason: string;
|
|
26
|
+
body: string;
|
|
27
|
+
}, {
|
|
28
|
+
reason: import("superstruct").Struct<string, null>;
|
|
29
|
+
body: import("superstruct").Struct<string, null>;
|
|
30
|
+
}>;
|
|
3
31
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/providers/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/providers/types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,YAAY,CAAC;AACvE,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,KAAK,CAAC;AAK3C,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;EAQvB,CAAC;AAGH,eAAO,MAAM,QAAQ;;;;;;EAGnB,CAAC"}
|
|
@@ -20,7 +20,7 @@ export declare function populateV3Relay(spokePool: Contract, deposit: Deposit, r
|
|
|
20
20
|
* @note // We want to find the block range that satisfies these conditions:
|
|
21
21
|
* // - the low block has deposit count <= targetDepositId
|
|
22
22
|
* // - the high block has a deposit count > targetDepositId.
|
|
23
|
-
* // This way the caller can search for a
|
|
23
|
+
* // This way the caller can search for a V3FundsDeposited event between [low, high] that will always
|
|
24
24
|
* // contain the event emitted when deposit ID was incremented to targetDepositId + 1. This is the same transaction
|
|
25
25
|
* // where the deposit with deposit ID = targetDepositId was created.
|
|
26
26
|
*/
|
package/package.json
CHANGED
|
@@ -138,7 +138,7 @@ export function _buildPoolRebalanceRoot(
|
|
|
138
138
|
// Realized LP fees are keyed the same as running balances and represent the amount of LP fees that should be paid
|
|
139
139
|
// to LP's for each running balance.
|
|
140
140
|
|
|
141
|
-
// For each
|
|
141
|
+
// For each FilledV3Relay group, identified by { repaymentChainId, L1TokenAddress }, initialize a "running balance"
|
|
142
142
|
// to the total refund amount for that group.
|
|
143
143
|
const runningBalances: RunningBalances = {};
|
|
144
144
|
const realizedLpFees: RunningBalances = {};
|
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
import assert from "assert";
|
|
2
1
|
import { Contract, EventFilter } from "ethers";
|
|
3
2
|
import winston from "winston";
|
|
4
3
|
import {
|
|
5
4
|
AnyObject,
|
|
6
5
|
BigNumber,
|
|
7
6
|
bnZero,
|
|
8
|
-
bnUint32Max,
|
|
9
7
|
DefaultLogLevels,
|
|
10
8
|
EventSearchConfig,
|
|
11
|
-
getBlockRangeForDepositId,
|
|
12
|
-
getDepositIdAtBlock,
|
|
13
|
-
getNetworkName,
|
|
14
|
-
getRelayDataHash,
|
|
15
9
|
MAX_BIG_INT,
|
|
16
10
|
MakeOptional,
|
|
17
|
-
relayFillStatus,
|
|
18
11
|
assign,
|
|
12
|
+
getRelayDataHash,
|
|
19
13
|
isDefined,
|
|
20
14
|
toBN,
|
|
21
15
|
} from "../utils";
|
|
@@ -42,6 +36,8 @@ import {
|
|
|
42
36
|
TokensBridged,
|
|
43
37
|
} from "../interfaces";
|
|
44
38
|
import { SpokePool } from "../typechain";
|
|
39
|
+
import { getNetworkName } from "../utils/NetworkUtils";
|
|
40
|
+
import { getBlockRangeForDepositId, getDepositIdAtBlock, relayFillStatus } from "../utils/SpokeUtils";
|
|
45
41
|
import { BaseAbstractClient, isUpdateFailureReason, UpdateFailureReason } from "./BaseAbstractClient";
|
|
46
42
|
import { HubPoolClient } from "./HubPoolClient";
|
|
47
43
|
import { AcrossConfigStoreClient } from "./AcrossConfigStoreClient";
|
|
@@ -49,6 +45,7 @@ import { AcrossConfigStoreClient } from "./AcrossConfigStoreClient";
|
|
|
49
45
|
type SpokePoolUpdateSuccess = {
|
|
50
46
|
success: true;
|
|
51
47
|
currentTime: number;
|
|
48
|
+
oldestTime: number;
|
|
52
49
|
firstDepositId: number;
|
|
53
50
|
latestDepositId: number;
|
|
54
51
|
events: Log[][];
|
|
@@ -66,7 +63,7 @@ export type SpokePoolUpdate = SpokePoolUpdateSuccess | SpokePoolUpdateFailure;
|
|
|
66
63
|
*/
|
|
67
64
|
export class SpokePoolClient extends BaseAbstractClient {
|
|
68
65
|
protected currentTime = 0;
|
|
69
|
-
protected
|
|
66
|
+
protected oldestTime = 0;
|
|
70
67
|
protected depositHashes: { [depositHash: string]: DepositWithBlock } = {};
|
|
71
68
|
protected depositHashesToFills: { [depositHash: string]: FillWithBlock[] } = {};
|
|
72
69
|
protected speedUps: { [depositorAddress: string]: { [depositId: number]: SpeedUpWithBlock[] } } = {};
|
|
@@ -414,7 +411,7 @@ export class SpokePoolClient extends BaseAbstractClient {
|
|
|
414
411
|
* @note // We want to find the block range that satisfies these conditions:
|
|
415
412
|
* // - the low block has deposit count <= targetDepositId
|
|
416
413
|
* // - the high block has a deposit count > targetDepositId.
|
|
417
|
-
* // This way the caller can search for a
|
|
414
|
+
* // This way the caller can search for a V3FundsDeposited event between [low, high] that will always
|
|
418
415
|
* // contain the event emitted when deposit ID was incremented to targetDepositId + 1. This is the same transaction
|
|
419
416
|
* // where the deposit with deposit ID = targetDepositId was created.
|
|
420
417
|
*/
|
|
@@ -511,11 +508,12 @@ export class SpokePoolClient extends BaseAbstractClient {
|
|
|
511
508
|
|
|
512
509
|
const timerStart = Date.now();
|
|
513
510
|
const multicallFunctions = ["getCurrentTime", "numberOfDeposits"];
|
|
514
|
-
const [multicallOutput, ...events] = await Promise.all([
|
|
511
|
+
const [multicallOutput, oldestTime, ...events] = await Promise.all([
|
|
515
512
|
spokePool.callStatic.multicall(
|
|
516
513
|
multicallFunctions.map((f) => spokePool.interface.encodeFunctionData(f)),
|
|
517
514
|
{ blockTag: searchConfig.toBlock }
|
|
518
515
|
),
|
|
516
|
+
this.spokePool.getCurrentTime({ blockTag: Math.max(searchConfig.fromBlock, this.deploymentBlock) }),
|
|
519
517
|
...eventSearchConfigs.map((config) => paginatedEventQuery(this.spokePool, config.filter, config.searchConfig)),
|
|
520
518
|
]);
|
|
521
519
|
this.log("debug", `Time to query new events from RPC for ${this.chainId}: ${Date.now() - timerStart} ms`);
|
|
@@ -537,6 +535,7 @@ export class SpokePoolClient extends BaseAbstractClient {
|
|
|
537
535
|
return {
|
|
538
536
|
success: true,
|
|
539
537
|
currentTime: currentTime.toNumber(), // uint32
|
|
538
|
+
oldestTime: oldestTime.toNumber(),
|
|
540
539
|
firstDepositId,
|
|
541
540
|
latestDepositId: Math.max(numberOfDeposits - 1, 0),
|
|
542
541
|
searchEndBlock: searchConfig.toBlock,
|
|
@@ -561,7 +560,7 @@ export class SpokePoolClient extends BaseAbstractClient {
|
|
|
561
560
|
if (!update.success) {
|
|
562
561
|
return;
|
|
563
562
|
}
|
|
564
|
-
const { events: queryResults, currentTime, searchEndBlock } = update;
|
|
563
|
+
const { events: queryResults, currentTime, oldestTime, searchEndBlock } = update;
|
|
565
564
|
|
|
566
565
|
if (eventsToQuery.includes("TokensBridged")) {
|
|
567
566
|
for (const event of queryResults[eventsToQuery.indexOf("TokensBridged")]) {
|
|
@@ -709,6 +708,7 @@ export class SpokePoolClient extends BaseAbstractClient {
|
|
|
709
708
|
|
|
710
709
|
// Next iteration should start off from where this one ended.
|
|
711
710
|
this.currentTime = currentTime;
|
|
711
|
+
if (this.oldestTime === 0) this.oldestTime = oldestTime; // Set oldest time only after the first update.
|
|
712
712
|
this.firstDepositIdForSpokePool = update.firstDepositId;
|
|
713
713
|
this.latestBlockSearched = searchEndBlock;
|
|
714
714
|
this.lastDepositIdForSpokePool = update.latestDepositId;
|
|
@@ -798,19 +798,11 @@ export class SpokePoolClient extends BaseAbstractClient {
|
|
|
798
798
|
}
|
|
799
799
|
|
|
800
800
|
/**
|
|
801
|
-
* Retrieves the time
|
|
802
|
-
* @returns The time
|
|
801
|
+
* Retrieves the oldest time searched on the SpokePool contract.
|
|
802
|
+
* @returns The oldest time searched, which will be 0 if there has been no update() yet.
|
|
803
803
|
*/
|
|
804
|
-
public
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
const resolve = async () => {
|
|
808
|
-
const currentTime = await this.spokePool.getCurrentTime({ blockTag: blockNumber });
|
|
809
|
-
assert(BigNumber.isBigNumber(currentTime) && currentTime.lt(bnUint32Max));
|
|
810
|
-
return currentTime.toNumber();
|
|
811
|
-
};
|
|
812
|
-
|
|
813
|
-
return (this.timestamps[blockNumber] ??= await resolve());
|
|
804
|
+
public getOldestTime(): number {
|
|
805
|
+
return this.oldestTime;
|
|
814
806
|
}
|
|
815
807
|
|
|
816
808
|
async findDeposit(depositId: number, destinationChainId: number): Promise<DepositWithBlock> {
|
|
@@ -114,8 +114,6 @@ export class MockSpokePoolClient extends SpokePoolClient {
|
|
|
114
114
|
// Event signatures. Not strictly required, but they make generated events more recognisable.
|
|
115
115
|
public readonly eventSignatures: Record<string, string> = {
|
|
116
116
|
EnabledDepositRoute: "address,uint256,bool",
|
|
117
|
-
FilledRelay: "uint256,uint256,uint256,int64,uint32,uint32,address,address,address,bytes",
|
|
118
|
-
FundsDeposited: "uint256,uint256,uint256,int64,uint32,uint32,address,address,address,bytes",
|
|
119
117
|
};
|
|
120
118
|
|
|
121
119
|
depositV3(deposit: DepositWithBlock): Log {
|
|
@@ -5,6 +5,7 @@ import { getOriginFromURL } from "../utils/NetworkUtils";
|
|
|
5
5
|
import { CacheProvider } from "./cachedProvider";
|
|
6
6
|
import { compareRpcResults, createSendErrorWithMessage, formatProviderError } from "./utils";
|
|
7
7
|
import { PROVIDER_CACHE_TTL } from "./constants";
|
|
8
|
+
import { JsonRpcError, RpcError } from "./types";
|
|
8
9
|
import { Logger } from "winston";
|
|
9
10
|
|
|
10
11
|
export class RetryProvider extends ethers.providers.StaticJsonRpcProvider {
|
|
@@ -88,9 +89,10 @@ export class RetryProvider extends ethers.providers.StaticJsonRpcProvider {
|
|
|
88
89
|
): Promise<[ethers.providers.StaticJsonRpcProvider, unknown]> => {
|
|
89
90
|
return this._trySend(provider, method, params)
|
|
90
91
|
.then((result): [ethers.providers.StaticJsonRpcProvider, unknown] => [provider, result])
|
|
91
|
-
.catch((err) => {
|
|
92
|
+
.catch((err: unknown) => {
|
|
92
93
|
// Append the provider and error to the error array.
|
|
93
|
-
|
|
94
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
95
|
+
errors.push([provider, (err as any)?.stack || err?.toString()]);
|
|
94
96
|
|
|
95
97
|
// If there are no new fallback providers to use, terminate the recursion by throwing an error.
|
|
96
98
|
// Otherwise, we can try to call another provider.
|
|
@@ -98,6 +100,11 @@ export class RetryProvider extends ethers.providers.StaticJsonRpcProvider {
|
|
|
98
100
|
throw err;
|
|
99
101
|
}
|
|
100
102
|
|
|
103
|
+
// If one RPC provider reverted, others likely will too. Skip them.
|
|
104
|
+
if (quorumThreshold === 1 && this.callReverted(method, err)) {
|
|
105
|
+
throw err;
|
|
106
|
+
}
|
|
107
|
+
|
|
101
108
|
// This line does two things:
|
|
102
109
|
// 1. Removes a fallback provider from the array so it cannot be used as a fallback for another required
|
|
103
110
|
// provider.
|
|
@@ -260,12 +267,44 @@ export class RetryProvider extends ethers.providers.StaticJsonRpcProvider {
|
|
|
260
267
|
return response;
|
|
261
268
|
}
|
|
262
269
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
270
|
+
// For an error emitted in response to an eth_call or eth_estimateGas request, determine whether the response body
|
|
271
|
+
// indicates that the call reverted during execution. The exact RPC responses returned can vary, but `error.body` has
|
|
272
|
+
// reliably included both the code (typically 3 on revert) and the error message indicating "execution reverted".
|
|
273
|
+
// This is consistent with section 5.1 of the JSON-RPC spec (https://www.jsonrpc.org/specification).
|
|
274
|
+
protected callReverted(method: string, error: unknown): boolean {
|
|
275
|
+
if (!(method === "eth_call" || method === "eth_estimateGas") || !RpcError.is(error)) {
|
|
276
|
+
return false;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
let response: unknown;
|
|
280
|
+
try {
|
|
281
|
+
response = JSON.parse(error.body);
|
|
282
|
+
} catch {
|
|
283
|
+
return false;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
return JsonRpcError.is(response) && response.error.message.toLowerCase().includes("revert");
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
async _trySend(
|
|
290
|
+
provider: ethers.providers.StaticJsonRpcProvider,
|
|
291
|
+
method: string,
|
|
292
|
+
params: Array<unknown>
|
|
293
|
+
): Promise<unknown> {
|
|
294
|
+
let { retries } = this;
|
|
295
|
+
|
|
296
|
+
// eslint-disable-next-line no-constant-condition
|
|
297
|
+
while (true) {
|
|
298
|
+
const [settled] = await Promise.allSettled([this._sendAndValidate(provider, method, params)]);
|
|
299
|
+
if (settled.status === "fulfilled") {
|
|
300
|
+
return settled.value;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
if (retries-- <= 0 || this.callReverted(method, settled.reason)) {
|
|
304
|
+
throw settled.reason;
|
|
305
|
+
}
|
|
306
|
+
await delay(this.delay);
|
|
267
307
|
}
|
|
268
|
-
return promise;
|
|
269
308
|
}
|
|
270
309
|
|
|
271
310
|
_getQuorum(method: string, params: Array<unknown>): number {
|
package/src/providers/types.ts
CHANGED
|
@@ -1,2 +1,23 @@
|
|
|
1
|
+
import { any, literal, nullable, number, string, type, union } from "superstruct";
|
|
2
|
+
|
|
1
3
|
export type RPCProvider = "ALCHEMY" | "DRPC" | "INFURA" | "INFURA_DIN";
|
|
2
4
|
export type RPCTransport = "https" | "wss";
|
|
5
|
+
|
|
6
|
+
// JSON-RPC 2.0 Error object
|
|
7
|
+
// See JSON-RPC 2.0 Specification section 5 Reponse object
|
|
8
|
+
// https://www.jsonrpc.org/specification
|
|
9
|
+
export const JsonRpcError = type({
|
|
10
|
+
jsonrpc: literal("2.0"),
|
|
11
|
+
id: union([number(), string()]),
|
|
12
|
+
error: type({
|
|
13
|
+
code: number(),
|
|
14
|
+
message: string(),
|
|
15
|
+
data: nullable(any()),
|
|
16
|
+
}),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
// Generic/unknown RPC error (may embed a JsonRpcError).
|
|
20
|
+
export const RpcError = type({
|
|
21
|
+
reason: string(),
|
|
22
|
+
body: string(),
|
|
23
|
+
});
|
|
@@ -57,7 +57,7 @@ export function chainIsMatic(chainId: number): boolean {
|
|
|
57
57
|
* @returns True if chainId is an OP stack, otherwise false.
|
|
58
58
|
*/
|
|
59
59
|
export function chainIsOPStack(chainId: number): boolean {
|
|
60
|
-
return PUBLIC_NETWORKS[chainId]?.family === ChainFamily.OP_STACK
|
|
60
|
+
return PUBLIC_NETWORKS[chainId]?.family === ChainFamily.OP_STACK;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
/**
|
package/src/utils/SpokeUtils.ts
CHANGED
|
@@ -65,7 +65,7 @@ export function populateV3Relay(
|
|
|
65
65
|
* @note // We want to find the block range that satisfies these conditions:
|
|
66
66
|
* // - the low block has deposit count <= targetDepositId
|
|
67
67
|
* // - the high block has a deposit count > targetDepositId.
|
|
68
|
-
* // This way the caller can search for a
|
|
68
|
+
* // This way the caller can search for a V3FundsDeposited event between [low, high] that will always
|
|
69
69
|
* // contain the event emitted when deposit ID was incremented to targetDepositId + 1. This is the same transaction
|
|
70
70
|
* // where the deposit with deposit ID = targetDepositId was created.
|
|
71
71
|
*/
|