@across-protocol/sdk 4.2.16-alpha.6 → 4.2.16
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/arch/evm/SpokeUtils.d.ts +3 -8
- package/dist/cjs/arch/evm/SpokeUtils.js +11 -26
- package/dist/cjs/arch/evm/SpokeUtils.js.map +1 -1
- package/dist/cjs/arch/svm/SpokeUtils.d.ts +2 -8
- package/dist/cjs/arch/svm/SpokeUtils.js +50 -41
- package/dist/cjs/arch/svm/SpokeUtils.js.map +1 -1
- package/dist/cjs/arch/svm/eventsClient.js +2 -4
- package/dist/cjs/arch/svm/eventsClient.js.map +1 -1
- package/dist/cjs/arch/svm/utils.d.ts +3 -3
- package/dist/cjs/arch/svm/utils.js +14 -16
- package/dist/cjs/arch/svm/utils.js.map +1 -1
- package/dist/cjs/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.d.ts +3 -3
- package/dist/cjs/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.js +2 -4
- package/dist/cjs/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.js.map +1 -1
- package/dist/cjs/clients/BundleDataClient/BundleDataClient.d.ts +6 -7
- package/dist/cjs/clients/BundleDataClient/BundleDataClient.js +83 -78
- package/dist/cjs/clients/BundleDataClient/BundleDataClient.js.map +1 -1
- package/dist/cjs/clients/BundleDataClient/utils/DataworkerUtils.js +13 -13
- package/dist/cjs/clients/BundleDataClient/utils/DataworkerUtils.js.map +1 -1
- package/dist/cjs/clients/BundleDataClient/utils/FillUtils.d.ts +1 -2
- package/dist/cjs/clients/BundleDataClient/utils/FillUtils.js +2 -3
- package/dist/cjs/clients/BundleDataClient/utils/FillUtils.js.map +1 -1
- package/dist/cjs/clients/BundleDataClient/utils/MerkleTreeUtils.js +1 -5
- package/dist/cjs/clients/BundleDataClient/utils/MerkleTreeUtils.js.map +1 -1
- package/dist/cjs/clients/BundleDataClient/utils/PoolRebalanceUtils.js +3 -3
- package/dist/cjs/clients/BundleDataClient/utils/PoolRebalanceUtils.js.map +1 -1
- package/dist/cjs/clients/BundleDataClient/utils/SuperstructUtils.d.ts +71 -71
- package/dist/cjs/clients/BundleDataClient/utils/SuperstructUtils.js +8 -13
- package/dist/cjs/clients/BundleDataClient/utils/SuperstructUtils.js.map +1 -1
- package/dist/cjs/clients/HubPoolClient.d.ts +21 -21
- package/dist/cjs/clients/HubPoolClient.js +58 -84
- package/dist/cjs/clients/HubPoolClient.js.map +1 -1
- package/dist/cjs/clients/SpokePoolClient/EVMSpokePoolClient.js +1 -1
- package/dist/cjs/clients/SpokePoolClient/EVMSpokePoolClient.js.map +1 -1
- package/dist/cjs/clients/SpokePoolClient/SpokePoolClient.d.ts +2 -2
- package/dist/cjs/clients/SpokePoolClient/SpokePoolClient.js +45 -65
- package/dist/cjs/clients/SpokePoolClient/SpokePoolClient.js.map +1 -1
- package/dist/cjs/clients/SpokePoolClient/SpokePoolClientManager.d.ts +13 -0
- package/dist/cjs/clients/SpokePoolClient/SpokePoolClientManager.js +18 -0
- package/dist/cjs/clients/SpokePoolClient/SpokePoolClientManager.js.map +1 -0
- package/dist/cjs/clients/mocks/MockHubPoolClient.d.ts +9 -9
- package/dist/cjs/clients/mocks/MockHubPoolClient.js +9 -15
- package/dist/cjs/clients/mocks/MockHubPoolClient.js.map +1 -1
- package/dist/cjs/clients/mocks/MockSpokePoolClient.d.ts +3 -5
- package/dist/cjs/clients/mocks/MockSpokePoolClient.js +36 -40
- package/dist/cjs/clients/mocks/MockSpokePoolClient.js.map +1 -1
- package/dist/cjs/clients/mocks/MockSvmCpiEventsClient.d.ts +1 -1
- package/dist/cjs/clients/mocks/MockSvmCpiEventsClient.js +4 -6
- package/dist/cjs/clients/mocks/MockSvmCpiEventsClient.js.map +1 -1
- package/dist/cjs/clients/mocks/MockSvmSpokePoolClient.d.ts +2 -2
- package/dist/cjs/clients/mocks/MockSvmSpokePoolClient.js +2 -2
- package/dist/cjs/clients/mocks/MockSvmSpokePoolClient.js.map +1 -1
- package/dist/cjs/interfaces/HubPool.d.ts +14 -19
- package/dist/cjs/interfaces/SpokePool.d.ts +19 -18
- package/dist/cjs/interfaces/SpokePool.js.map +1 -1
- package/dist/cjs/relayFeeCalculator/chain-queries/baseQuery.d.ts +7 -15
- package/dist/cjs/relayFeeCalculator/chain-queries/baseQuery.js +15 -24
- package/dist/cjs/relayFeeCalculator/chain-queries/baseQuery.js.map +1 -1
- package/dist/cjs/relayFeeCalculator/chain-queries/factory.js +1 -1
- package/dist/cjs/relayFeeCalculator/chain-queries/factory.js.map +1 -1
- package/dist/cjs/relayFeeCalculator/chain-queries/svmQuery.d.ts +4 -12
- package/dist/cjs/relayFeeCalculator/chain-queries/svmQuery.js +44 -46
- package/dist/cjs/relayFeeCalculator/chain-queries/svmQuery.js.map +1 -1
- package/dist/cjs/relayFeeCalculator/relayFeeCalculator.d.ts +6 -6
- package/dist/cjs/relayFeeCalculator/relayFeeCalculator.js +10 -10
- package/dist/cjs/relayFeeCalculator/relayFeeCalculator.js.map +1 -1
- package/dist/cjs/utils/AddressUtils.d.ts +8 -12
- package/dist/cjs/utils/AddressUtils.js +36 -33
- package/dist/cjs/utils/AddressUtils.js.map +1 -1
- package/dist/cjs/utils/NetworkUtils.js +1 -1
- package/dist/cjs/utils/NetworkUtils.js.map +1 -1
- package/dist/cjs/utils/SpokeUtils.d.ts +3 -3
- package/dist/cjs/utils/SpokeUtils.js +22 -4
- package/dist/cjs/utils/SpokeUtils.js.map +1 -1
- package/dist/cjs/utils/TokenUtils.d.ts +4 -4
- package/dist/cjs/utils/TokenUtils.js +3 -5
- package/dist/cjs/utils/TokenUtils.js.map +1 -1
- package/dist/esm/arch/evm/SpokeUtils.d.ts +4 -9
- package/dist/esm/arch/evm/SpokeUtils.js +14 -29
- package/dist/esm/arch/evm/SpokeUtils.js.map +1 -1
- package/dist/esm/arch/svm/SpokeUtils.d.ts +3 -9
- package/dist/esm/arch/svm/SpokeUtils.js +55 -42
- package/dist/esm/arch/svm/SpokeUtils.js.map +1 -1
- package/dist/esm/arch/svm/eventsClient.js +3 -5
- package/dist/esm/arch/svm/eventsClient.js.map +1 -1
- package/dist/esm/arch/svm/utils.d.ts +3 -3
- package/dist/esm/arch/svm/utils.js +15 -17
- package/dist/esm/arch/svm/utils.js.map +1 -1
- package/dist/esm/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.d.ts +3 -3
- package/dist/esm/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.js +2 -4
- package/dist/esm/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.js.map +1 -1
- package/dist/esm/clients/BundleDataClient/BundleDataClient.d.ts +6 -7
- package/dist/esm/clients/BundleDataClient/BundleDataClient.js +84 -79
- package/dist/esm/clients/BundleDataClient/BundleDataClient.js.map +1 -1
- package/dist/esm/clients/BundleDataClient/utils/DataworkerUtils.js +14 -14
- package/dist/esm/clients/BundleDataClient/utils/DataworkerUtils.js.map +1 -1
- package/dist/esm/clients/BundleDataClient/utils/FillUtils.d.ts +1 -2
- package/dist/esm/clients/BundleDataClient/utils/FillUtils.js +3 -5
- package/dist/esm/clients/BundleDataClient/utils/FillUtils.js.map +1 -1
- package/dist/esm/clients/BundleDataClient/utils/MerkleTreeUtils.js +1 -5
- package/dist/esm/clients/BundleDataClient/utils/MerkleTreeUtils.js.map +1 -1
- package/dist/esm/clients/BundleDataClient/utils/PoolRebalanceUtils.js +4 -4
- package/dist/esm/clients/BundleDataClient/utils/PoolRebalanceUtils.js.map +1 -1
- package/dist/esm/clients/BundleDataClient/utils/SuperstructUtils.d.ts +71 -71
- package/dist/esm/clients/BundleDataClient/utils/SuperstructUtils.js +10 -20
- package/dist/esm/clients/BundleDataClient/utils/SuperstructUtils.js.map +1 -1
- package/dist/esm/clients/HubPoolClient.d.ts +22 -23
- package/dist/esm/clients/HubPoolClient.js +63 -98
- package/dist/esm/clients/HubPoolClient.js.map +1 -1
- package/dist/esm/clients/SpokePoolClient/EVMSpokePoolClient.js +2 -2
- package/dist/esm/clients/SpokePoolClient/EVMSpokePoolClient.js.map +1 -1
- package/dist/esm/clients/SpokePoolClient/SpokePoolClient.d.ts +2 -2
- package/dist/esm/clients/SpokePoolClient/SpokePoolClient.js +47 -68
- package/dist/esm/clients/SpokePoolClient/SpokePoolClient.js.map +1 -1
- package/dist/esm/clients/SpokePoolClient/SpokePoolClientManager.d.ts +28 -0
- package/dist/esm/clients/SpokePoolClient/SpokePoolClientManager.js +30 -0
- package/dist/esm/clients/SpokePoolClient/SpokePoolClientManager.js.map +1 -0
- package/dist/esm/clients/mocks/MockHubPoolClient.d.ts +9 -9
- package/dist/esm/clients/mocks/MockHubPoolClient.js +10 -16
- package/dist/esm/clients/mocks/MockHubPoolClient.js.map +1 -1
- package/dist/esm/clients/mocks/MockSpokePoolClient.d.ts +3 -5
- package/dist/esm/clients/mocks/MockSpokePoolClient.js +38 -42
- package/dist/esm/clients/mocks/MockSpokePoolClient.js.map +1 -1
- package/dist/esm/clients/mocks/MockSvmCpiEventsClient.d.ts +1 -1
- package/dist/esm/clients/mocks/MockSvmCpiEventsClient.js +5 -7
- package/dist/esm/clients/mocks/MockSvmCpiEventsClient.js.map +1 -1
- package/dist/esm/clients/mocks/MockSvmSpokePoolClient.d.ts +2 -2
- package/dist/esm/clients/mocks/MockSvmSpokePoolClient.js +3 -3
- package/dist/esm/clients/mocks/MockSvmSpokePoolClient.js.map +1 -1
- package/dist/esm/interfaces/HubPool.d.ts +14 -19
- package/dist/esm/interfaces/SpokePool.d.ts +19 -18
- package/dist/esm/interfaces/SpokePool.js.map +1 -1
- package/dist/esm/relayFeeCalculator/chain-queries/baseQuery.d.ts +10 -18
- package/dist/esm/relayFeeCalculator/chain-queries/baseQuery.js +20 -29
- package/dist/esm/relayFeeCalculator/chain-queries/baseQuery.js.map +1 -1
- package/dist/esm/relayFeeCalculator/chain-queries/factory.js +2 -2
- package/dist/esm/relayFeeCalculator/chain-queries/factory.js.map +1 -1
- package/dist/esm/relayFeeCalculator/chain-queries/svmQuery.d.ts +6 -14
- package/dist/esm/relayFeeCalculator/chain-queries/svmQuery.js +48 -51
- package/dist/esm/relayFeeCalculator/chain-queries/svmQuery.js.map +1 -1
- package/dist/esm/relayFeeCalculator/relayFeeCalculator.d.ts +6 -6
- package/dist/esm/relayFeeCalculator/relayFeeCalculator.js +9 -9
- package/dist/esm/relayFeeCalculator/relayFeeCalculator.js.map +1 -1
- package/dist/esm/utils/AddressUtils.d.ts +8 -12
- package/dist/esm/utils/AddressUtils.js +38 -36
- package/dist/esm/utils/AddressUtils.js.map +1 -1
- package/dist/esm/utils/NetworkUtils.js +1 -1
- package/dist/esm/utils/NetworkUtils.js.map +1 -1
- package/dist/esm/utils/SpokeUtils.d.ts +8 -3
- package/dist/esm/utils/SpokeUtils.js +26 -4
- package/dist/esm/utils/SpokeUtils.js.map +1 -1
- package/dist/esm/utils/TokenUtils.d.ts +18 -22
- package/dist/esm/utils/TokenUtils.js +4 -6
- package/dist/esm/utils/TokenUtils.js.map +1 -1
- package/dist/types/arch/evm/SpokeUtils.d.ts +4 -9
- package/dist/types/arch/evm/SpokeUtils.d.ts.map +1 -1
- package/dist/types/arch/svm/SpokeUtils.d.ts +3 -9
- package/dist/types/arch/svm/SpokeUtils.d.ts.map +1 -1
- package/dist/types/arch/svm/eventsClient.d.ts.map +1 -1
- package/dist/types/arch/svm/utils.d.ts +3 -3
- package/dist/types/arch/svm/utils.d.ts.map +1 -1
- package/dist/types/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.d.ts +3 -3
- package/dist/types/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.d.ts.map +1 -1
- package/dist/types/clients/BundleDataClient/BundleDataClient.d.ts +6 -7
- package/dist/types/clients/BundleDataClient/BundleDataClient.d.ts.map +1 -1
- package/dist/types/clients/BundleDataClient/utils/DataworkerUtils.d.ts.map +1 -1
- package/dist/types/clients/BundleDataClient/utils/FillUtils.d.ts +1 -2
- package/dist/types/clients/BundleDataClient/utils/FillUtils.d.ts.map +1 -1
- package/dist/types/clients/BundleDataClient/utils/MerkleTreeUtils.d.ts.map +1 -1
- package/dist/types/clients/BundleDataClient/utils/PoolRebalanceUtils.d.ts.map +1 -1
- package/dist/types/clients/BundleDataClient/utils/SuperstructUtils.d.ts +71 -71
- package/dist/types/clients/BundleDataClient/utils/SuperstructUtils.d.ts.map +1 -1
- package/dist/types/clients/HubPoolClient.d.ts +22 -23
- package/dist/types/clients/HubPoolClient.d.ts.map +1 -1
- package/dist/types/clients/SpokePoolClient/EVMSpokePoolClient.d.ts.map +1 -1
- package/dist/types/clients/SpokePoolClient/SpokePoolClient.d.ts +2 -2
- package/dist/types/clients/SpokePoolClient/SpokePoolClient.d.ts.map +1 -1
- package/dist/types/clients/SpokePoolClient/SpokePoolClientManager.d.ts +29 -0
- package/dist/types/clients/SpokePoolClient/SpokePoolClientManager.d.ts.map +1 -0
- package/dist/types/clients/mocks/MockHubPoolClient.d.ts +9 -9
- package/dist/types/clients/mocks/MockHubPoolClient.d.ts.map +1 -1
- package/dist/types/clients/mocks/MockSpokePoolClient.d.ts +3 -5
- package/dist/types/clients/mocks/MockSpokePoolClient.d.ts.map +1 -1
- package/dist/types/clients/mocks/MockSvmCpiEventsClient.d.ts +1 -1
- package/dist/types/clients/mocks/MockSvmCpiEventsClient.d.ts.map +1 -1
- package/dist/types/clients/mocks/MockSvmSpokePoolClient.d.ts +2 -2
- package/dist/types/clients/mocks/MockSvmSpokePoolClient.d.ts.map +1 -1
- package/dist/types/interfaces/HubPool.d.ts +14 -19
- package/dist/types/interfaces/HubPool.d.ts.map +1 -1
- package/dist/types/interfaces/SpokePool.d.ts +19 -18
- package/dist/types/interfaces/SpokePool.d.ts.map +1 -1
- package/dist/types/relayFeeCalculator/chain-queries/baseQuery.d.ts +10 -18
- package/dist/types/relayFeeCalculator/chain-queries/baseQuery.d.ts.map +1 -1
- package/dist/types/relayFeeCalculator/chain-queries/factory.d.ts.map +1 -1
- package/dist/types/relayFeeCalculator/chain-queries/svmQuery.d.ts +6 -14
- package/dist/types/relayFeeCalculator/chain-queries/svmQuery.d.ts.map +1 -1
- package/dist/types/relayFeeCalculator/relayFeeCalculator.d.ts +6 -6
- package/dist/types/relayFeeCalculator/relayFeeCalculator.d.ts.map +1 -1
- package/dist/types/utils/AddressUtils.d.ts +8 -12
- package/dist/types/utils/AddressUtils.d.ts.map +1 -1
- package/dist/types/utils/SpokeUtils.d.ts +8 -3
- package/dist/types/utils/SpokeUtils.d.ts.map +1 -1
- package/dist/types/utils/TokenUtils.d.ts +18 -22
- package/dist/types/utils/TokenUtils.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/arch/evm/SpokeUtils.ts +22 -72
- package/src/arch/svm/SpokeUtils.ts +53 -67
- package/src/arch/svm/eventsClient.ts +8 -40
- package/src/arch/svm/utils.ts +6 -6
- package/src/clients/AcrossConfigStoreClient/AcrossConfigStoreClient.ts +4 -7
- package/src/clients/BundleDataClient/BundleDataClient.ts +90 -77
- package/src/clients/BundleDataClient/utils/DataworkerUtils.ts +13 -28
- package/src/clients/BundleDataClient/utils/FillUtils.ts +4 -10
- package/src/clients/BundleDataClient/utils/MerkleTreeUtils.ts +1 -7
- package/src/clients/BundleDataClient/utils/PoolRebalanceUtils.ts +4 -4
- package/src/clients/BundleDataClient/utils/SuperstructUtils.ts +10 -22
- package/src/clients/HubPoolClient.ts +82 -127
- package/src/clients/SpokePoolClient/EVMSpokePoolClient.ts +0 -6
- package/src/clients/SpokePoolClient/SpokePoolClient.ts +35 -121
- package/src/clients/SpokePoolClient/SpokePoolClientManager.ts +36 -0
- package/src/clients/mocks/MockHubPoolClient.ts +19 -24
- package/src/clients/mocks/MockSpokePoolClient.ts +27 -39
- package/src/clients/mocks/MockSvmCpiEventsClient.ts +5 -8
- package/src/clients/mocks/MockSvmSpokePoolClient.ts +3 -12
- package/src/interfaces/HubPool.ts +14 -23
- package/src/interfaces/SpokePool.ts +19 -19
- package/src/relayFeeCalculator/chain-queries/baseQuery.ts +20 -39
- package/src/relayFeeCalculator/chain-queries/factory.ts +2 -2
- package/src/relayFeeCalculator/chain-queries/svmQuery.ts +56 -57
- package/src/relayFeeCalculator/relayFeeCalculator.ts +13 -15
- package/src/utils/AddressUtils.ts +51 -39
- package/src/utils/NetworkUtils.ts +1 -1
- package/src/utils/SpokeUtils.ts +33 -11
- package/src/utils/TokenUtils.ts +8 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MockSvmSpokePoolClient.js","sourceRoot":"","sources":["../../../../src/clients/mocks/MockSvmSpokePoolClient.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAG5D,OAAO,
|
|
1
|
+
{"version":3,"file":"MockSvmSpokePoolClient.js","sourceRoot":"","sources":["../../../../src/clients/mocks/MockSvmSpokePoolClient.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAG5D,OAAO,EAAE,cAAc,EAAE,MAAM,EAAmC,MAAM,aAAa,CAAC;AACtF,OAAO,EAAmB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAIzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAoD,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEnG,uEAAuE;AACvE,kEAAkE;AAClE;IAA4C,0CAAkB;IAI5D,gCACE,MAAsB,EACtB,OAAe,EACf,SAAoD,EACpD,eAA2B,EAC3B,iBAAsF,EACtF,IAAuE;QAHvE,0BAAA,EAAA,YAAY,cAAc,CAAC,yBAAyB;QACpD,gCAAA,EAAA,mBAA2B;QAC3B,kCAAA,EAAA,sBAA6D,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE;QACtF,qBAAA,EAAA,SAAkD,aAAa,EAAE,IAAI,EAAE;QANzE,YAQE,kBACE,MAAM,EACN,IAAI,CAAC,aAAa,EAClB,OAAO,EACP,MAAM,CAAC,eAAe,CAAC,EAC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UACE,YAAoB,EACpB,mBAA2B,EAC3B,QAAiB,EACjB,UAA+B;QAA/B,2BAAA,EAAA,eAA+B;QAE/B,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;IAC3E,CAAC;IACH,6BAAC;AAAD,CAAC,AAxGD,CAA4C,kBAAkB,GAwG7D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BigNumber } from "../utils";
|
|
2
2
|
import { SortableEvent } from "./Common";
|
|
3
3
|
export interface PoolRebalanceLeaf {
|
|
4
4
|
chainId: number;
|
|
@@ -7,15 +7,15 @@ export interface PoolRebalanceLeaf {
|
|
|
7
7
|
netSendAmounts: BigNumber[];
|
|
8
8
|
runningBalances: BigNumber[];
|
|
9
9
|
leafId: number;
|
|
10
|
-
l1Tokens:
|
|
10
|
+
l1Tokens: string[];
|
|
11
11
|
}
|
|
12
12
|
export interface RelayerRefundLeaf {
|
|
13
13
|
amountToReturn: BigNumber;
|
|
14
14
|
chainId: number;
|
|
15
15
|
refundAmounts: BigNumber[];
|
|
16
16
|
leafId: number;
|
|
17
|
-
l2TokenAddress:
|
|
18
|
-
refundAddresses:
|
|
17
|
+
l2TokenAddress: string;
|
|
18
|
+
refundAddresses: string[];
|
|
19
19
|
}
|
|
20
20
|
export interface ProposedRootBundle extends SortableEvent {
|
|
21
21
|
challengePeriodEndTimestamp: number;
|
|
@@ -24,7 +24,7 @@ export interface ProposedRootBundle extends SortableEvent {
|
|
|
24
24
|
poolRebalanceRoot: string;
|
|
25
25
|
relayerRefundRoot: string;
|
|
26
26
|
slowRelayRoot: string;
|
|
27
|
-
proposer:
|
|
27
|
+
proposer: string;
|
|
28
28
|
}
|
|
29
29
|
export type RealizedLpFee = {
|
|
30
30
|
quoteBlock: number;
|
|
@@ -47,7 +47,7 @@ export interface ExecutedRootBundle extends SortableEvent {
|
|
|
47
47
|
netSendAmounts: BigNumber[];
|
|
48
48
|
runningBalances: BigNumber[];
|
|
49
49
|
leafId: number;
|
|
50
|
-
l1Tokens:
|
|
50
|
+
l1Tokens: string[];
|
|
51
51
|
proof: string[];
|
|
52
52
|
}
|
|
53
53
|
export type ExecutedRootBundleStringified = Omit<ExecutedRootBundle, "bundleLpFees" | "netSendAmounts" | "runningBalances"> & {
|
|
@@ -61,13 +61,8 @@ export type TokenRunningBalance = {
|
|
|
61
61
|
export interface RelayerRefundLeafWithGroup extends RelayerRefundLeaf {
|
|
62
62
|
groupIndex: number;
|
|
63
63
|
}
|
|
64
|
-
export interface
|
|
65
|
-
address:
|
|
66
|
-
symbol: string;
|
|
67
|
-
decimals: number;
|
|
68
|
-
}
|
|
69
|
-
export interface TokenInfo {
|
|
70
|
-
address: Address;
|
|
64
|
+
export interface L1Token {
|
|
65
|
+
address: string;
|
|
71
66
|
symbol: string;
|
|
72
67
|
decimals: number;
|
|
73
68
|
}
|
|
@@ -77,22 +72,22 @@ export interface LpToken {
|
|
|
77
72
|
}
|
|
78
73
|
export interface CrossChainContractsSet extends SortableEvent {
|
|
79
74
|
l2ChainId: number;
|
|
80
|
-
spokePool:
|
|
75
|
+
spokePool: string;
|
|
81
76
|
}
|
|
82
77
|
export interface DestinationTokenWithBlock extends SortableEvent {
|
|
83
|
-
l2Token:
|
|
84
|
-
l1Token:
|
|
78
|
+
l2Token: string;
|
|
79
|
+
l1Token: string;
|
|
85
80
|
}
|
|
86
81
|
export interface SetPoolRebalanceRoot extends SortableEvent {
|
|
87
82
|
destinationChainId: number;
|
|
88
|
-
l1Token:
|
|
89
|
-
destinationToken:
|
|
83
|
+
l1Token: string;
|
|
84
|
+
destinationToken: string;
|
|
90
85
|
}
|
|
91
86
|
export interface PendingRootBundle {
|
|
92
87
|
poolRebalanceRoot: string;
|
|
93
88
|
relayerRefundRoot: string;
|
|
94
89
|
slowRelayRoot: string;
|
|
95
|
-
proposer:
|
|
90
|
+
proposer: string;
|
|
96
91
|
unclaimedPoolRebalanceLeafCount: number;
|
|
97
92
|
challengePeriodEndTimestamp: number;
|
|
98
93
|
bundleEvaluationBlockNumbers: number[];
|
|
@@ -1,31 +1,29 @@
|
|
|
1
1
|
import { SortableEvent } from "./Common";
|
|
2
2
|
import { SpokePoolClient } from "../clients";
|
|
3
|
-
import { BigNumber
|
|
3
|
+
import { BigNumber } from "../utils";
|
|
4
4
|
import { RelayerRefundLeaf } from "./HubPool";
|
|
5
5
|
export interface RelayData {
|
|
6
6
|
originChainId: number;
|
|
7
|
-
depositor:
|
|
8
|
-
recipient:
|
|
7
|
+
depositor: string;
|
|
8
|
+
recipient: string;
|
|
9
9
|
depositId: BigNumber;
|
|
10
|
-
inputToken:
|
|
10
|
+
inputToken: string;
|
|
11
11
|
inputAmount: BigNumber;
|
|
12
|
-
outputToken:
|
|
12
|
+
outputToken: string;
|
|
13
13
|
outputAmount: BigNumber;
|
|
14
14
|
message: string;
|
|
15
15
|
fillDeadline: number;
|
|
16
|
-
exclusiveRelayer:
|
|
16
|
+
exclusiveRelayer: string;
|
|
17
17
|
exclusivityDeadline: number;
|
|
18
18
|
}
|
|
19
|
-
export interface
|
|
20
|
-
updatedRecipient: Address;
|
|
21
|
-
updatedOutputAmount: BigNumber;
|
|
22
|
-
updatedMessage: string;
|
|
23
|
-
}
|
|
24
|
-
export interface Deposit extends RelayData, Partial<SpeedUpCommon> {
|
|
19
|
+
export interface Deposit extends RelayData {
|
|
25
20
|
messageHash: string;
|
|
26
21
|
destinationChainId: number;
|
|
27
22
|
quoteTimestamp: number;
|
|
28
23
|
speedUpSignature?: string;
|
|
24
|
+
updatedRecipient?: string;
|
|
25
|
+
updatedOutputAmount?: BigNumber;
|
|
26
|
+
updatedMessage?: string;
|
|
29
27
|
fromLiteChain: boolean;
|
|
30
28
|
toLiteChain: boolean;
|
|
31
29
|
}
|
|
@@ -46,7 +44,7 @@ export declare enum FillType {
|
|
|
46
44
|
SlowFill = 2
|
|
47
45
|
}
|
|
48
46
|
export interface RelayExecutionEventInfo {
|
|
49
|
-
updatedRecipient:
|
|
47
|
+
updatedRecipient: string;
|
|
50
48
|
updatedOutputAmount: BigNumber;
|
|
51
49
|
updatedMessage?: string;
|
|
52
50
|
updatedMessageHash: string;
|
|
@@ -55,7 +53,7 @@ export interface RelayExecutionEventInfo {
|
|
|
55
53
|
export interface Fill extends Omit<RelayData, "message"> {
|
|
56
54
|
messageHash: string;
|
|
57
55
|
destinationChainId: number;
|
|
58
|
-
relayer:
|
|
56
|
+
relayer: string;
|
|
59
57
|
repaymentChainId: number;
|
|
60
58
|
relayExecutionInfo: RelayExecutionEventInfo;
|
|
61
59
|
}
|
|
@@ -65,17 +63,20 @@ export interface FillWithTime extends Fill, SortableEvent {
|
|
|
65
63
|
fillTimestamp: number;
|
|
66
64
|
}
|
|
67
65
|
export interface EnabledDepositRoute {
|
|
68
|
-
originToken:
|
|
66
|
+
originToken: string;
|
|
69
67
|
destinationChainId: number;
|
|
70
68
|
enabled: boolean;
|
|
71
69
|
}
|
|
72
70
|
export interface EnabledDepositRouteWithBlock extends EnabledDepositRoute, SortableEvent {
|
|
73
71
|
}
|
|
74
|
-
export interface SpeedUp
|
|
75
|
-
depositor:
|
|
72
|
+
export interface SpeedUp {
|
|
73
|
+
depositor: string;
|
|
76
74
|
depositorSignature: string;
|
|
77
75
|
depositId: BigNumber;
|
|
78
76
|
originChainId: number;
|
|
77
|
+
updatedRecipient: string;
|
|
78
|
+
updatedOutputAmount: BigNumber;
|
|
79
|
+
updatedMessage: string;
|
|
79
80
|
}
|
|
80
81
|
export interface SpeedUpWithBlock extends SpeedUp, SortableEvent {
|
|
81
82
|
}
|
|
@@ -114,7 +115,7 @@ export interface TokensBridged extends SortableEvent {
|
|
|
114
115
|
amountToReturn: BigNumber;
|
|
115
116
|
chainId: number;
|
|
116
117
|
leafId: number;
|
|
117
|
-
l2TokenAddress:
|
|
118
|
+
l2TokenAddress: string;
|
|
118
119
|
}
|
|
119
120
|
export interface ClaimedRelayerRefundWithBlock extends SortableEvent {
|
|
120
121
|
l2TokenAddress: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpokePool.js","sourceRoot":"","sources":["../../../src/interfaces/SpokePool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SpokePool.js","sourceRoot":"","sources":["../../../src/interfaces/SpokePool.ts"],"names":[],"mappings":"AAwCA,MAAM,CAAN,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,mDAAY,CAAA;IACZ,qEAAiB,CAAA;IACjB,+CAAM,CAAA;AACR,CAAC,EAJW,UAAU,KAAV,UAAU,QAIrB;AAED,MAAM,CAAN,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,+CAAY,CAAA;IACZ,+DAAgB,CAAA;IAChB,+CAAQ,CAAA;AACV,CAAC,EAJW,QAAQ,KAAR,QAAQ,QAInB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { L2Provider } from "@eth-optimism/sdk/dist/interfaces/l2-provider";
|
|
2
2
|
import { PopulatedTransaction, providers } from "ethers";
|
|
3
|
-
import {
|
|
3
|
+
import { Deposit } from "../../interfaces";
|
|
4
4
|
import { SpokePool } from "../../typechain";
|
|
5
|
-
import { BigNumberish,
|
|
5
|
+
import { BigNumberish, TransactionCostEstimate, BigNumber } from "../../utils";
|
|
6
6
|
import { Logger, QueryInterface } from "../relayFeeCalculator";
|
|
7
7
|
import { Transport } from "viem";
|
|
8
8
|
import { EvmProvider } from "../../arch/evm/types";
|
|
@@ -38,7 +38,7 @@ export declare class QueryBase implements QueryInterface {
|
|
|
38
38
|
constructor(provider: EvmProvider, symbolMapping: SymbolMappingType, spokePoolAddress: string, simulatedRelayerAddress: string, logger: Logger, coingeckoProApiKey?: string | undefined, fixedGasPrice?: BigNumberish | undefined, coingeckoBaseCurrency?: string);
|
|
39
39
|
/**
|
|
40
40
|
* Retrieves the current gas costs of performing a fillRelay contract at the referenced SpokePool.
|
|
41
|
-
* @param
|
|
41
|
+
* @param deposit V3 deposit instance.
|
|
42
42
|
* @param relayerAddress Relayer address to simulate with.
|
|
43
43
|
* @param options
|
|
44
44
|
* @param options.gasPrice Optional gas price to use for the simulation.
|
|
@@ -46,9 +46,7 @@ export declare class QueryBase implements QueryInterface {
|
|
|
46
46
|
* @param options.transport Optional transport object for custom gas price retrieval.
|
|
47
47
|
* @returns The gas estimate for this function call (multiplied with the optional buffer).
|
|
48
48
|
*/
|
|
49
|
-
getGasCosts(
|
|
50
|
-
destinationChainId: number;
|
|
51
|
-
}, relayer?: Address, options?: Partial<{
|
|
49
|
+
getGasCosts(deposit: Omit<Deposit, "messageHash">, relayer?: string, options?: Partial<{
|
|
52
50
|
gasPrice: BigNumberish;
|
|
53
51
|
gasUnits: BigNumberish;
|
|
54
52
|
baseFeeMultiplier: BigNumber;
|
|
@@ -58,24 +56,18 @@ export declare class QueryBase implements QueryInterface {
|
|
|
58
56
|
}>): Promise<TransactionCostEstimate>;
|
|
59
57
|
/**
|
|
60
58
|
* @notice Return ethers.PopulatedTransaction for a fill based on input deposit args
|
|
61
|
-
* @param
|
|
59
|
+
* @param deposit
|
|
62
60
|
* @param relayer Sender of PopulatedTransaction
|
|
63
61
|
* @returns PopulatedTransaction
|
|
64
62
|
*/
|
|
65
|
-
getUnsignedTxFromDeposit(
|
|
66
|
-
destinationChainId: number;
|
|
67
|
-
recipient: EvmAddress;
|
|
68
|
-
outputToken: EvmAddress;
|
|
69
|
-
}, relayer?: Address): Promise<PopulatedTransaction>;
|
|
63
|
+
getUnsignedTxFromDeposit(deposit: Omit<Deposit, "messageHash">, relayer?: string): Promise<PopulatedTransaction>;
|
|
70
64
|
/**
|
|
71
65
|
* @notice Return the gas cost of a simulated transaction
|
|
72
|
-
* @param
|
|
66
|
+
* @param deposit
|
|
73
67
|
* @param relayer Sender of PopulatedTransaction
|
|
74
68
|
* @returns Estimated gas cost based on ethers.VoidSigner's gas estimation
|
|
75
69
|
*/
|
|
76
|
-
getNativeGasCost(
|
|
77
|
-
destinationChainId: number;
|
|
78
|
-
}, relayer?: Address): Promise<BigNumber>;
|
|
70
|
+
getNativeGasCost(deposit: Omit<Deposit, "messageHash">, relayer?: string): Promise<BigNumber>;
|
|
79
71
|
/**
|
|
80
72
|
* @notice Return L1 data fee for OP stack L2 transaction, which is based on L2 calldata.
|
|
81
73
|
* @dev https://docs.optimism.io/stack/transactions/fees#l1-data-fee
|
|
@@ -84,7 +76,7 @@ export declare class QueryBase implements QueryInterface {
|
|
|
84
76
|
* @param options Specify gas units to avoid additional gas estimation call and multiplier for L1 data fee
|
|
85
77
|
* @returns BigNumber L1 data fee in gas units
|
|
86
78
|
*/
|
|
87
|
-
getOpStackL1DataFee(unsignedTx: PopulatedTransaction, relayer:
|
|
79
|
+
getOpStackL1DataFee(unsignedTx: PopulatedTransaction, relayer: string | undefined, options: Partial<{
|
|
88
80
|
opStackL2GasUnits: BigNumberish;
|
|
89
81
|
opStackL1DataFeeMultiplier: BigNumber;
|
|
90
82
|
}>): Promise<BigNumber>;
|
|
@@ -99,7 +91,7 @@ export declare class QueryBase implements QueryInterface {
|
|
|
99
91
|
* @param options.transport A custom transport object for custom gas price retrieval.
|
|
100
92
|
* @returns Estimated cost in units of gas and the underlying gas token (gasPrice * estimatedGasUnits).
|
|
101
93
|
*/
|
|
102
|
-
estimateGas(unsignedTx: PopulatedTransaction, senderAddress:
|
|
94
|
+
estimateGas(unsignedTx: PopulatedTransaction, senderAddress: string, provider: providers.Provider | L2Provider<providers.Provider>, options?: Partial<{
|
|
103
95
|
gasPrice: BigNumberish;
|
|
104
96
|
gasUnits: BigNumberish;
|
|
105
97
|
baseFeeMultiplier: BigNumber;
|
|
@@ -5,9 +5,9 @@ import { Coingecko } from "../../coingecko";
|
|
|
5
5
|
import { CHAIN_IDs } from "../../constants";
|
|
6
6
|
import { SpokePool__factory } from "../../typechain";
|
|
7
7
|
import { populateV3Relay } from "../../arch/evm";
|
|
8
|
-
import { BigNumber, toBNWei, bnZero, chainIsOPStack, fixedPointAdjustment,
|
|
8
|
+
import { BigNumber, toBNWei, bnZero, chainIsOPStack, fixedPointAdjustment, } from "../../utils";
|
|
9
9
|
import assert from "assert";
|
|
10
|
-
import {
|
|
10
|
+
import { getDefaultSimulatedRelayerAddress } from "../relayFeeCalculator";
|
|
11
11
|
import { getGasPriceEstimate } from "../../gasPriceOracle";
|
|
12
12
|
/**
|
|
13
13
|
* A unified QueryBase for querying gas costs, token prices, and decimals of various tokens
|
|
@@ -39,7 +39,7 @@ var QueryBase = /** @class */ (function () {
|
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
41
|
* Retrieves the current gas costs of performing a fillRelay contract at the referenced SpokePool.
|
|
42
|
-
* @param
|
|
42
|
+
* @param deposit V3 deposit instance.
|
|
43
43
|
* @param relayerAddress Relayer address to simulate with.
|
|
44
44
|
* @param options
|
|
45
45
|
* @param options.gasPrice Optional gas price to use for the simulation.
|
|
@@ -47,20 +47,16 @@ var QueryBase = /** @class */ (function () {
|
|
|
47
47
|
* @param options.transport Optional transport object for custom gas price retrieval.
|
|
48
48
|
* @returns The gas estimate for this function call (multiplied with the optional buffer).
|
|
49
49
|
*/
|
|
50
|
-
QueryBase.prototype.getGasCosts = function (
|
|
51
|
-
if (relayer === void 0) { relayer =
|
|
50
|
+
QueryBase.prototype.getGasCosts = function (deposit, relayer, options) {
|
|
51
|
+
if (relayer === void 0) { relayer = getDefaultSimulatedRelayerAddress(deposit.destinationChainId); }
|
|
52
52
|
if (options === void 0) { options = {}; }
|
|
53
53
|
return __awaiter(this, void 0, void 0, function () {
|
|
54
|
-
var _a, gasPrice, gasUnits, baseFeeMultiplier, priorityFeeMultiplier, opStackL1GasCostMultiplier, transport,
|
|
54
|
+
var _a, gasPrice, gasUnits, baseFeeMultiplier, priorityFeeMultiplier, opStackL1GasCostMultiplier, transport, tx, _b, nativeGasCost, tokenGasCost, impliedGasPrice, opStackL1GasCost;
|
|
55
55
|
return __generator(this, function (_c) {
|
|
56
56
|
switch (_c.label) {
|
|
57
57
|
case 0:
|
|
58
58
|
_a = options.gasPrice, gasPrice = _a === void 0 ? this.fixedGasPrice : _a, gasUnits = options.gasUnits, baseFeeMultiplier = options.baseFeeMultiplier, priorityFeeMultiplier = options.priorityFeeMultiplier, opStackL1GasCostMultiplier = options.opStackL1GasCostMultiplier, transport = options.transport;
|
|
59
|
-
|
|
60
|
-
assert(recipient.isEVM(), "getGasCosts: recipient not an EVM address (".concat(recipient, ")"));
|
|
61
|
-
assert(outputToken.isEVM(), "getGasCosts: outputToken not an EVM address (".concat(outputToken, ")"));
|
|
62
|
-
assert(exclusiveRelayer.isEVM(), "getGasCosts: exclusiveRelayer not an EVM address (".concat(exclusiveRelayer, ")"));
|
|
63
|
-
return [4 /*yield*/, this.getUnsignedTxFromDeposit(__assign(__assign({}, relayData), { recipient: recipient, outputToken: outputToken, exclusiveRelayer: exclusiveRelayer }), relayer)];
|
|
59
|
+
return [4 /*yield*/, this.getUnsignedTxFromDeposit(deposit, relayer)];
|
|
64
60
|
case 1:
|
|
65
61
|
tx = _c.sent();
|
|
66
62
|
return [4 /*yield*/, this.estimateGas(tx, relayer, this.provider, {
|
|
@@ -85,35 +81,30 @@ var QueryBase = /** @class */ (function () {
|
|
|
85
81
|
};
|
|
86
82
|
/**
|
|
87
83
|
* @notice Return ethers.PopulatedTransaction for a fill based on input deposit args
|
|
88
|
-
* @param
|
|
84
|
+
* @param deposit
|
|
89
85
|
* @param relayer Sender of PopulatedTransaction
|
|
90
86
|
* @returns PopulatedTransaction
|
|
91
87
|
*/
|
|
92
|
-
QueryBase.prototype.getUnsignedTxFromDeposit = function (
|
|
93
|
-
if (relayer === void 0) { relayer =
|
|
94
|
-
return populateV3Relay(this.spokePool,
|
|
88
|
+
QueryBase.prototype.getUnsignedTxFromDeposit = function (deposit, relayer) {
|
|
89
|
+
if (relayer === void 0) { relayer = getDefaultSimulatedRelayerAddress(deposit.destinationChainId); }
|
|
90
|
+
return populateV3Relay(this.spokePool, deposit, relayer);
|
|
95
91
|
};
|
|
96
92
|
/**
|
|
97
93
|
* @notice Return the gas cost of a simulated transaction
|
|
98
|
-
* @param
|
|
94
|
+
* @param deposit
|
|
99
95
|
* @param relayer Sender of PopulatedTransaction
|
|
100
96
|
* @returns Estimated gas cost based on ethers.VoidSigner's gas estimation
|
|
101
97
|
*/
|
|
102
|
-
QueryBase.prototype.getNativeGasCost = function (
|
|
103
|
-
if (relayer === void 0) { relayer =
|
|
98
|
+
QueryBase.prototype.getNativeGasCost = function (deposit, relayer) {
|
|
99
|
+
if (relayer === void 0) { relayer = getDefaultSimulatedRelayerAddress(deposit.destinationChainId); }
|
|
104
100
|
return __awaiter(this, void 0, void 0, function () {
|
|
105
|
-
var
|
|
101
|
+
var unsignedTx, voidSigner;
|
|
106
102
|
return __generator(this, function (_a) {
|
|
107
103
|
switch (_a.label) {
|
|
108
|
-
case 0:
|
|
109
|
-
recipient = relayData.recipient, outputToken = relayData.outputToken, exclusiveRelayer = relayData.exclusiveRelayer;
|
|
110
|
-
assert(recipient.isEVM(), "getNativeGasCost: recipient not an EVM address (".concat(recipient, ")"));
|
|
111
|
-
assert(outputToken.isEVM(), "getNativeGasCost: outputToken not an EVM address (".concat(outputToken, ")"));
|
|
112
|
-
assert(exclusiveRelayer.isEVM(), "getNativeGasCost: exclusiveRelayer not an EVM address (".concat(exclusiveRelayer, ")"));
|
|
113
|
-
return [4 /*yield*/, this.getUnsignedTxFromDeposit(__assign(__assign({}, relayData), { recipient: recipient, outputToken: outputToken, exclusiveRelayer: exclusiveRelayer }), relayer)];
|
|
104
|
+
case 0: return [4 /*yield*/, this.getUnsignedTxFromDeposit(deposit, relayer)];
|
|
114
105
|
case 1:
|
|
115
106
|
unsignedTx = _a.sent();
|
|
116
|
-
voidSigner = new VoidSigner(relayer
|
|
107
|
+
voidSigner = new VoidSigner(relayer, this.provider);
|
|
117
108
|
return [2 /*return*/, voidSigner.estimateGas(unsignedTx)];
|
|
118
109
|
}
|
|
119
110
|
});
|
|
@@ -128,7 +119,7 @@ var QueryBase = /** @class */ (function () {
|
|
|
128
119
|
* @returns BigNumber L1 data fee in gas units
|
|
129
120
|
*/
|
|
130
121
|
QueryBase.prototype.getOpStackL1DataFee = function (unsignedTx, relayer, options) {
|
|
131
|
-
if (relayer === void 0) { relayer =
|
|
122
|
+
if (relayer === void 0) { relayer = getDefaultSimulatedRelayerAddress(unsignedTx.chainId); }
|
|
132
123
|
return __awaiter(this, void 0, void 0, function () {
|
|
133
124
|
var _a, opStackL2GasUnits, _b, opStackL1DataFeeMultiplier, chainId, voidSigner, populatedTransaction, l1DataFee;
|
|
134
125
|
return __generator(this, function (_c) {
|
|
@@ -139,7 +130,7 @@ var QueryBase = /** @class */ (function () {
|
|
|
139
130
|
case 1:
|
|
140
131
|
chainId = (_c.sent()).chainId;
|
|
141
132
|
assert(isOptimismL2Provider(this.provider), "Unexpected provider for chain ID ".concat(chainId, "."));
|
|
142
|
-
voidSigner = new VoidSigner(relayer
|
|
133
|
+
voidSigner = new VoidSigner(relayer, this.provider);
|
|
143
134
|
return [4 /*yield*/, voidSigner.populateTransaction(__assign(__assign({}, unsignedTx), { gasLimit: opStackL2GasUnits }))];
|
|
144
135
|
case 2:
|
|
145
136
|
populatedTransaction = _c.sent();
|
|
@@ -173,7 +164,7 @@ var QueryBase = /** @class */ (function () {
|
|
|
173
164
|
return [4 /*yield*/, provider.getNetwork()];
|
|
174
165
|
case 1:
|
|
175
166
|
chainId = (_f.sent()).chainId;
|
|
176
|
-
voidSigner = new VoidSigner(senderAddress
|
|
167
|
+
voidSigner = new VoidSigner(senderAddress, provider);
|
|
177
168
|
queries = [
|
|
178
169
|
gasUnits ? Promise.resolve(BigNumber.from(gasUnits)) : voidSigner.estimateGas(unsignedTx),
|
|
179
170
|
_gasPrice
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseQuery.js","sourceRoot":"","sources":["../../../../src/relayFeeCalculator/chain-queries/baseQuery.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,IAAI,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;
|
|
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
import { CUSTOM_GAS_TOKENS } from "../../constants";
|
|
7
7
|
import { chainIsOPStack, isDefined, chainIsSvm, SvmAddress } from "../../utils";
|
|
8
8
|
import { QueryBase } from "./baseQuery";
|
|
9
|
-
import { DEFAULT_LOGGER,
|
|
9
|
+
import { DEFAULT_LOGGER, getDefaultSimulatedRelayerAddress } from "../relayFeeCalculator";
|
|
10
10
|
import { CustomGasTokenQueries } from "./customGasToken";
|
|
11
11
|
import { SvmQuery } from "./svmQuery";
|
|
12
12
|
/**
|
|
@@ -22,7 +22,7 @@ var QueryBase__factory = /** @class */ (function () {
|
|
|
22
22
|
QueryBase__factory.create = function (chainId, provider, symbolMapping, spokePoolAddress, simulatedRelayerAddress, coingeckoProApiKey, logger, coingeckoBaseCurrency) {
|
|
23
23
|
if (symbolMapping === void 0) { symbolMapping = TOKEN_SYMBOLS_MAP; }
|
|
24
24
|
if (spokePoolAddress === void 0) { spokePoolAddress = getDeployedAddress("SpokePool", chainId); }
|
|
25
|
-
if (simulatedRelayerAddress === void 0) { simulatedRelayerAddress =
|
|
25
|
+
if (simulatedRelayerAddress === void 0) { simulatedRelayerAddress = getDefaultSimulatedRelayerAddress(chainId); }
|
|
26
26
|
if (logger === void 0) { logger = DEFAULT_LOGGER; }
|
|
27
27
|
if (coingeckoBaseCurrency === void 0) { coingeckoBaseCurrency = "eth"; }
|
|
28
28
|
assert(isDefined(spokePoolAddress));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../../src/relayFeeCalculator/chain-queries/factory.ts"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAE,iBAAiB,EAAE,MAA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QAEpE,uBAAA,EAAA,uBAA+B;QAC/B,sCAAA,EAAA,6BAA6B;QAE7B,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC,CAAC;QAEpC,IAAM,oBAAoB,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QACxD,IAAI,oBAAoB,EAAE;YACxB,OAAO,IAAI,qBAAqB,CAAC;gBAC/B,aAAa,EAAE;oBACb,QAA8B;oBAC9B,aAAa;oBACb,gBAAgB;oBAChB,uBAAuB;oBACvB,MAAM;oBACN,kBAAkB;oBAClB,aAAa,CAAC,OAAO,CAAC;oBACtB,KAAK;iBACN;gBACD,oBAAoB,sBAAA;aACrB,CAAC,CAAC;SACJ;QACD,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE;YACvB,OAAO,IAAI,QAAQ,CACjB,QAAuB,EACvB,aAAa,EACb,UAAU,CAAC,IAAI,CAAC,gBAAgB,CAAC,EACjC,UAAU,CAAC,IAAI,CAAC,uBAAuB,CAAC,EACxC,MAAM,EACN,kBAAkB,EAClB,aAAa,CAAC,OAAO,CAAC,EACtB,qBAAqB,CACtB,CAAC;SACH;QAED,oEAAoE;QACpE,QAAQ,GAAG,cAAc,CAAC,OAAO,CAAC;YAChC,CAAC,CAAC,YAAY,CAAC,QAA8B,CAAC;YAC9C,CAAC,CAAE,QAA+B,CAAC;QAErC,OAAO,IAAI,SAAS,CAClB,QAAQ,EACR,aAAa,EACb,gBAAgB,EAChB,uBAAuB,EACvB,MAAM,EACN,kBAAkB,EAClB,aAAa,CAAC,OAAO,CAAC,EACtB,qBAAqB,CACtB,CAAC;IACJ,CAAC;IACH,yBAAC;AAAD,CAAC,AA1DD,IA0DC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SVMProvider } from "../../arch/svm";
|
|
2
|
-
import {
|
|
2
|
+
import { Deposit } from "../../interfaces";
|
|
3
3
|
import { BigNumber, BigNumberish, SvmAddress, TransactionCostEstimate } from "../../utils";
|
|
4
4
|
import { Logger, QueryInterface } from "../relayFeeCalculator";
|
|
5
5
|
import { SymbolMappingType } from "./";
|
|
@@ -37,7 +37,7 @@ export declare class SvmQuery implements QueryInterface {
|
|
|
37
37
|
constructor(provider: SVMProvider, symbolMapping: SymbolMappingType, spokePool: SvmAddress, simulatedRelayerAddress: SvmAddress, logger: Logger, coingeckoProApiKey?: string | undefined, fixedGasPrice?: BigNumberish | undefined, coingeckoBaseCurrency?: string);
|
|
38
38
|
/**
|
|
39
39
|
* Retrieves the current gas costs of performing a fillRelay contract at the referenced SpokePool.
|
|
40
|
-
* @param
|
|
40
|
+
* @param deposit V3 deposit instance.
|
|
41
41
|
* @param _relayer Relayer address to simulate with.
|
|
42
42
|
* @param options
|
|
43
43
|
* @param options.gasPrice Optional gas price to use for the simulation.
|
|
@@ -45,9 +45,7 @@ export declare class SvmQuery implements QueryInterface {
|
|
|
45
45
|
* @param options.transport Optional transport object for custom gas price retrieval.
|
|
46
46
|
* @returns The gas estimate for this function call (multiplied with the optional buffer).
|
|
47
47
|
*/
|
|
48
|
-
getGasCosts(
|
|
49
|
-
destinationChainId: number;
|
|
50
|
-
}, relayer?: import("../../utils").Address, options?: Partial<{
|
|
48
|
+
getGasCosts(deposit: Omit<Deposit, "messageHash">, _relayer?: string, options?: Partial<{
|
|
51
49
|
gasPrice: BigNumberish;
|
|
52
50
|
gasUnits: BigNumberish;
|
|
53
51
|
baseFeeMultiplier: BigNumber;
|
|
@@ -59,20 +57,14 @@ export declare class SvmQuery implements QueryInterface {
|
|
|
59
57
|
* @param relayer SVM address of the relayer
|
|
60
58
|
* @returns Estimated gas cost in compute units
|
|
61
59
|
*/
|
|
62
|
-
getNativeGasCost(deposit:
|
|
63
|
-
destinationChainId: number;
|
|
64
|
-
}, _relayer?: import("../../utils").Address): Promise<BigNumber>;
|
|
60
|
+
getNativeGasCost(deposit: Omit<Deposit, "messageHash">, _relayer?: string): Promise<BigNumber>;
|
|
65
61
|
/**
|
|
66
62
|
* @notice Return the fillRelay transaction for a given deposit
|
|
67
|
-
* @param
|
|
63
|
+
* @param deposit
|
|
68
64
|
* @param relayer SVM address of the relayer
|
|
69
65
|
* @returns FillRelay transaction
|
|
70
66
|
*/
|
|
71
|
-
getFillRelayTx(
|
|
72
|
-
destinationChainId: number;
|
|
73
|
-
recipient: SvmAddress;
|
|
74
|
-
outputToken: SvmAddress;
|
|
75
|
-
}, relayer?: import("../../utils").Address, repaymentChainId?: number, repaymentAddress?: import("../../utils").Address): Promise<import("@solana/kit").TransactionMessageWithBlockhashLifetime & import("@solana/kit").ITransactionMessageWithFeePayerSigner<string, import("@solana/kit").TransactionSigner<string>> & Omit<Readonly<{
|
|
67
|
+
getFillRelayTx(deposit: Omit<Deposit, "messageHash">, _relayer?: string, repaymentChainId?: number, repaymentAddress?: string): Promise<import("@solana/kit").TransactionMessageWithBlockhashLifetime & import("@solana/kit").ITransactionMessageWithFeePayerSigner<string, import("@solana/kit").TransactionSigner<string>> & Omit<Readonly<{
|
|
76
68
|
instructions: readonly import("@solana/kit").IInstruction<string, readonly (import("@solana/kit").IAccountLookupMeta<string, string> | import("@solana/kit").IAccountMeta<string>)[]>[];
|
|
77
69
|
version: 0;
|
|
78
70
|
}>, "feePayer">>;
|